Skip to main content
Business helpers provide common calculations for invoices, receipts, and financial documents.

calculateTax

Calculates tax amount based on a tax rate percentage.
Examples:
Output: 8.50

calculateDiscount

Calculates discount amount based on a discount percentage.
Examples:
Output: 20.00

netAmount

Calculates net amount after tax and discount.
Calculation: (amount - discount) + tax on discounted amount Examples:
Calculation:
  • Original: $100
  • Discount (20%): -$20
  • Subtotal: $80
  • Tax (10% of 80):+80): +8
  • Net: $88.00

invoiceNumber

Generates a formatted invoice number.
Format: PREFIX-YYYYMM-NUMBER Examples:
Output: INV-202412-000001
Output: INV-202412-000042
Output: REC-202412-00001234

dueDate

Calculates a due date by adding days to an invoice date.
Examples:
Output: 2025-01-14

Practical Examples

Complete Invoice Calculations

Invoice Header with Auto-Generated Number

Payment Terms Section

Receipt with Discount