Skip to main content

Invoice

1.Create Supplier Invoice

Scenario: User creates a Supplier Invoice

  • Given the User is on the Invoice List Page
  • When the User clicks on the 'Supplier Invoice' button
  • Then select Branch (eg: Main Branch)
  • And select Supplier (eg: Roby Smith)
  • And select multiple Inventory items
  • And fill Quantity and Unit Price (eg: Roby Smith)
  • Then click on Create Invoice button

2. Create Customer Invoice

Scenario: User creates a Customer Invoice

  • Given the User is on the Invoice List Page
  • When the User clicks on the 'Customer Invoice' button
  • Then select Branch (eg: Main Branch)
  • And select Customer (eg: John Doe)
  • And select multiple Inventory items
  • And fill Quantity and Unit Price
  • And optionally add a Discount
  • Then click on Create Invoice button

3. Payment

Scenario: User enters payment details

  • Given the User is on the Invoice List Page
  • Then click on Pay button
  • Then the Payment Modal is open
  • When the User selects a Payment Method
  • And enters an Amount (not exceeding the due amount)
  • And optionally enters a Reference
  • Then the system records the payment
  • And updates the invoice status to Paid or Partially Paid or Paid accordingly

4. Print Invoice

Scenario: User prints an invoice from the table

  • Given the User is on the Invoice List Page
  • When the User clicks on the 'Print' button for any invoice in the table
  • Then a printable invoice page opens
  • And the print dialog appears
  • And the invoice shows all item details, quantities, prices, and payment information

5. Edit Invoice

Scenario: User edits a Supplier Invoice

  • Given the User is on the Invoice List Page
  • When the User clicks on the 'Edit' button for an unpaid Supplier invoice
  • Then the Edit Invoice modal appears with existing invoice details
  • And the User can modify quantities, unit prices, and inventory items
  • And clicking Update Invoice saves the changes

Scenario: User edits a Customer Invoice

  • Given the User is on the Invoice List Page
  • When the User clicks on the 'Edit' button for an unpaid Customer invoice
  • Then the Edit Invoice modal appears with existing invoice details
  • And the User can modify quantities, unit prices, inventory items, and discount
  • And clicking Update Invoice saves the changes

6. Return Products

Scenario: User returns products from a Supplier Invoice

  • Given the User is on the Invoice List Page
  • When the User clicks on the 'Return' button for a Supplier invoice
  • Then the Purchase Return modal appears with invoice details
  • And the User enters return quantities for selected items
  • And clicking Return button processes the return
  • And the invoice total is adjusted accordingly

Scenario: User returns products from a Customer Invoice

  • Given the User is on the Invoice List Page
  • When the User clicks on the 'Return' button for a Customer invoice
  • Then the Sales Return modal appears with invoice details
  • And the User enters return quantities for selected items
  • And clicking Return button processes the return
  • And the invoice total is adjusted accordingly

7. Filter Invoices

Scenario: User filters invoices by various criteria

  • Given the User is on the Invoice List Page
  • When the User selects filter options:
    • Invoice Type (Supplier/Customer)
    • Payment Status (Paid/Unpaid/Partially Paid)
    • Branch (Main Branch/Other branches)
  • Then the invoice table updates to show only matching invoices
  • And the User can combine multiple filters for precise results

Scenario: User searches for invoices by ID or keyword

  • Given the User is on the Invoice List Page
  • When the User enters an invoice ID or keyword in the search field
  • Then the invoice table updates to show only matching results

8. Bulk Operations

Scenario: User marks multiple invoices as paid

  • Given the User is on the Invoice List Page
  • When the User selects multiple invoices using checkboxes
  • And selects Mark as Paid from the bulk action dropdown
  • And clicks Submit
  • And confirms the action in the confirmation dialog
  • Then all selected invoices are marked as paid
  • And their status changes to Paid

Scenario: User marks multiple invoices as void

  • Given the User is on the Invoice List Page
  • When the User selects multiple invoices using checkboxes
  • And selects Mark as Void from the bulk action dropdown
  • And clicks Submit
  • And confirms the action in the confirmation dialog
  • Then all selected invoices are marked as void
  • And the User can verify they appear in the Void Invoices tab