npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

seru-react-native-print-template

v0.96.0

Published

seru-react-native-print-template

Downloads

3,853

Readme

Seru React Native Print Template

Pacote focado a padronização de componentes para Notas Fiscais e DAV's (Documento auxiliar de venda).

Instalação

  yarn add seru-react-native-print-template

Logo

Casos de uso

PrintOrder

import { PrintOrder } from 'seru-react-native-print-template'

<PrintOrder 
    devicePrinter="1"
    printFullNameItem={true}
    resale={{
        name: 'Revenda 01',
        site: 'https://revenda01.com.br'
    }}
    systemVersion="1.0.0"
    order={{
        company: {
            logoUrl: "",
            name: "",
            document: "",
            stateInscription: "",
            address: {
                street: "",
                number: "",
                neighborhood: "",
                city: "",
                state: "",
                postalCode: "",
                complement: "",
            };
        },
        code: "001",
        operator: "Operador Teste",
        password: "28",
        passwordPanelUrl: "",
        passwordType: "password",
        tableNumber: "",
        tableTicket: "",
        customer: {
            name: "Cliente Teste",
            document: "";
            phoneNumber: "",
            address: {
                street: "",
                number: "",
                neighborhood: "",
                city: "",
                state: "",
                postalCode: "",
                complement: "",          
            }
        },
        note: "",
        items: [{
            name: "X Tudo",
            quantity: 1,
            unitPrice: 25,
            fullPrice: 30,
            sku: "xtd"
            discount: 0,
            note: "",
            taxe: 0,
            additionals: [{
                name: "Adicionais";
                options: [{
                    name: "Dobro de Bacon";
                    quantity: 1,
                    price: 5,
                    removable: false,
                }],
                removable: false,
            }],
            canceled: false,
            items: [],
            shippingAmount: 0
        }],
        discount: 0,
        taxes: 0,
        subtotal: 0,
        total: 0,
        personQuantity: 0,
        change: 0,
        payments: [{
            value: 10,
            method: "Dinheiro",
            canceled: true
        },
        {
            value: 1,
            method: "Dinheiro",
        }],
        licensePlate: "",
        shippingAmount: 0,
        deliveryType: "Levar"
    }}
/>

PrintTaxInvoice

import { PrintTaxInvoice } from 'seru-react-native-print-template'

<PrintTaxInvoice 
    devicePrinter="1"
    printFullNameItem={true}
    resale={{
        name: 'Revenda 01',
        site: 'https://revenda01.com.br'
    }}
    systemVersion="1.0.0"
    order={{
        company: {
            logoUrl: "",
            name: "",
            document: "",
            stateInscription: "",
            address: {
                street: "",
                number: "",
                neighborhood: "",
                city: "",
                state: "",
                postalCode: "",
                complement: "",
            };
        },
        password: "28",
        passwordPanelUrl: "",
        passwordType: "password",
        status: 'authorized',
        key: '',
        qrCode: '',
        number: '',
        tributes: '',
        taxe: '',
        serie: '',
        receiptDate: new Date(),
        items: [{
            _id: "fac17064-3bc5-44fd-abec-757f756c90ca",
            name: "X Tudo",
            canceled: false,
            quantity: 1,
            discount: 0,
            taxe: 0,
            shippingAmount: 0,
            unitPrice: 25,
            fullPrice: 30,
            additionalUnitPrice: 5,
            additionalsFullPrice: 5,
            sku: 'xtd'
        }],
        payments: [{
            value: 10,
            method: "Dinheiro"
        }],
        change: 0,
        customer: {
            name: "Cliente Teste",
            document: ""
        },
        discount: 0,
        shippingAmount: 0,
        fullAmount: 30,
        licensePlate: ''
    }}
/>

Interfaces / Enums

Campos comuns componentes

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | | devicePrinter | string * | Modelo de impressora | printFullNameItem | boolean | Se deseja exibir a descrição do produto em uma linha inteira | order | IPrintOrder * | Dados do pedido | taxInvoice | IPrintTaxInvoice * | Dados da nota fiscal | resale | IPrintResale | Dados da revenda | systemVersion | string | Versão do sistema de origem | app | AppEnum | Aplicativo de origem

IPrinterCompany

Empresa

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |logoUrl | string | Logo da empresa |name | string * | Nome da empresa |document | string * | CNPJ da empresa |stateInscription | string * | Inscrição estadual da empresa |address | IPrintAddress * | Endereço da empresa

IPrintResale

Revenda | Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |name | string | Nome da revenda |site | string | Site da revenda

IPrintCustomer

Cliente | Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |name | string | Nome do cliente |document | string | CPF/CNPJ do cliente |phoneNumber | string | Telefone do cliente |address | IPrintAddress | Endereço do cliente

IPrintAddress

Endereço | Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |street | string | Rua |number | string | Número |neighborhood | string | Bairro |city | string | Cidade |state | string | Estado |postalCode | string | Código postal |complement | string | Complmento

Order

IPrintOrder

Pedido

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |company | IPrinterCompany | Empresa |code | string | Código |operator | string | Nome do operador |password | string | Senha do pedido |passwordPanelUrl | string | URL do painel de senha |passwordType | name ou password | Tipo de senha |tableNumber | string | Número da mesa |tableTicket | string | Número da comanda |customer | IPrintCustomer | Cliente |note | string | Observação |items | ArrayOf<IPrintOrderItem> | Itens do pedido |discount | number | Total de desconto |taxes | number | Total de taxa de serviço |subtotal | number | Subtotal |total | number | Total |personQuantity | number | Quantidade de pessoas |change | number | Total do troco |payments | ArrayOf<IPrintOrderPayment> | Pagamentos |licensePlate | string | Placa do carro |shippingAmount | number | Total de entrega |deliveryType | string | Tipo de delivery

IPrintOrderItem

Item do pedido

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |name | string | Nome |quantity | number | Quantidade |unitPrice | number | Valor unitário |fullPrice | number | Valor total |sku | string | Sku |discount | number | Valor total de desconto |note | string | Observação |taxe | number | Valor total taxa de serviço |additionals | ArrayOf<IPrintOrderItemAdditional> | Adicionais |canceled | boolean | Cancelado |items | ArrayOf<IPrintOrderItem> | Itens de combo |comboType | journey ou automatic ou carvery | Tipo de combo |shippingAmount | Valor total de entrega | Valor total de entrega

IPrintOrderItemAdditional

Adicional

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |name | string | Nome |options | ArrayOf<IPrintOrderItemAdditionalOption> | Opções |removable | number | Pra remoção

IPrintOrderItemAdditionalOption

Opção do adicional

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |name | string | Nome |quantity | number | Quantidade |price | number | Valor |removable | number | Pra remoção

IPrintOrderPayment

Pagamento do pedido

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |value | number | Valor |method | string | Método de pagamento |canceled | boolean | Cancelado

TaxInvoice

TaxInvoiceStatusEnum

Lista de status | Valor | Descrição | |--------------|--------------| | pending | Pendente | | queued | Em fila | | failed | Falha | | authorized | Autorizado | | canceled | Cancelado | | concluded | Concluído | | unusable | Inutilizável | | contingency | Contingência |

IPrintTaxInvoice

Nota fiscal

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |company | IPrinterCompany | Empresa |password | string | Senha do pedido |passwordType | string | Tipo de senha |passwordPanelUrl | string | URL do painel de senha |status | TaxInvoiceStatusEnum | Status |key | string | Chave |qrCode | string | QR Code |number | string | Número |tributes | number | Tributos |taxe | number | Valor total taxa de serviço |serie | string | Série |receiptDate | Date | Data de emissão |items | ArrayOf<IPrintTaxInvoiceItem> | Itens da nota |payments | ArrayOf<IPrintTaxInvoicePayment> | Pagamentos da nota |change | number | Valor total de troco |itemServiceCharge | IPrintTaxInvoiceItemServiceCharge | Dados do item caso 'workItemService' seja 'true' |workItemService | boolean | Se o item é ou não de taxa de serviço |customer | IPrintCustomer | Cliente |discount | number | Desconto |shippingAmount | number | Valor total de entrega |fullAmount | number | Valor total |licensePlate | string | Placa do carro

IPrintTaxInvoiceItem

Item da nota fiscal

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |_id | string | Id do item na nota fiscal |name | string | Nome |canceled | boolean | Cancelado |quantity | number | Quantidade |discount | number | Valor total de desconto |taxe | number | Valor total de taxa de serviço |shippingAmount | number | Valor total de entrega |unitPrice | number | Valor unitário |fullPrice | number | Valor total |additionalUnitPrice | number | Valor unitário dos adicionais |additionalsFullPrice | number | Valor total dos adicionais |workItemService | boolean | Se o item é de taxa de serviço ou não |sku | string | Sku

IPrintTaxInvoicePayment

Pagamento da nota fiscal

| Campo | Tipo | Descrição |
| ----------------- | ----------------------------------|------------------------------ | |value | string | Valor |method | string | Método de pagamento Exp: Dinheiro