Skip to content

POS Invoice

POS Invoices are issued in real-time at the point of sale with automatic submission to T-VAN.

Overview

AttributeValue
ServicePOSSaleInvoiceService / POSVATInvoiceService
Real-timeYes
Auto-submitYes
Use CaseIn-store POS systems

POS Invoice Types

POS Sale Invoice

  • Quick checkout
  • No buyer info required
  • Simplified format

POS VAT Invoice

  • Customer requests VAT invoice
  • Buyer tax code required
  • Full VAT details

Create POS Sale Invoice

typescript
import { POSSaleInvoiceService } from '@nx-3rd/iiapi';

const invoice = await this.posSaleService.create({
  // Minimal required fields
  invoiceDate: new Date(),

  items: [
    {
      itemName: 'Coffee',
      quantity: 2,
      unitPrice: 50000,
      amount: 100000,
    },
    {
      itemName: 'Cake',
      quantity: 1,
      unitPrice: 35000,
      amount: 35000,
    },
  ],

  totalAmount: 135000,
  totalPayment: 135000,
  paymentMethod: 'CASH',

  // Optional: Terminal info
  posTerminalId: 'POS001',
  cashierId: 'CASHIER001',
});

Create POS VAT Invoice

typescript
import { POSVATInvoiceService } from '@nx-3rd/iiapi';

const invoice = await this.posVatService.create({
  // Customer info for VAT
  buyer: {
    taxCode: '9876543210',
    name: 'Customer Company',
    address: '456 Avenue',
  },

  invoiceDate: new Date(),

  items: [
    {
      itemName: 'Office Supplies',
      quantity: 10,
      unitPrice: 50000,
      amount: 500000,
      vatRate: 10,
      vatAmount: 50000,
    },
  ],

  totalAmount: 500000,
  totalVatAmount: 50000,
  totalPayment: 550000,
  paymentMethod: 'CARD',

  posTerminalId: 'POS001',
});

Real-time Flow

typescript
// Get printable invoice data
const printData = await this.iiApiService.getPrintData(invoice.id);

// Print receipt
await printer.print({
  header: printData.sellerInfo,
  items: printData.items,
  totals: printData.totals,
  qrCode: printData.lookupQR, // For customer to verify
  footer: `Invoice: ${printData.invoiceNumber}`,
});

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.