Proposal Summary
This proposal summarizes the functionality for implementing auto-invoicing functionality for only the inventory items in shipped item fulfillments.
Requirement
When an item fulfilIment status becomes ‘shipped’, the item fulfillment should get automatically invoiced, but only the inventory item in the that item fulfillment record needs to be invoiced.
Our Solution
- We will develop a Map/Reduce script and schedule the script to execute at 2.00 AM every day.
- The script will fetch all the item fulfilment records that were shipped within the last 24 hours.
- For each such item fulfillment, the script will create invoice record, but only the inventory items will be considered for creating the invoice.
- If an item in a shipped item fulfillment is group item and if the group item contains non inventory item, we will only invoice the inventory item from the group item.
- This auto invoice creation will be a schedule-based procedure. The script will execute only once a day, at 2.00 AM.
- We will create one invoice for the one item fulfillment record.
- We will store respective invoice document number in the item fulfilment record.
Assumptions
- We will not consider item fulfilment records generated from transfer orders. Consider only the item fulfilments that are created from the sales order record.
- We will not consider the discount item, markup item and promotions applied in sales order for invoice creation.
- We will not consider the kit items and its component in the invoice creation.
- If a user creates an invoice manually or with the assistance of a third-party integration. We will not consider those sales order or item fulfilment record to generate auto invoices. (We will not consider the item fulfillment / sales order user manullay processed)
- We will only consider item fulfilment if the status has been updated to shipped today. The system note will identify this status change.
- If a group item in item fulfillment contains inventory and non-inventory items, we will invoice only the inventory items from the group item.
- We will not delete invoices, when user delete the corresponding item fufillment records.
- If the form selected for a sales order is ‘Standard Sales Order – Cash Sale’, then we cannot create invoices for such sales orders, instead, cash sale will be created.
- Similarly, if a payment method is specified in the sales order, then cash sale will be created when billing the order. So, in both the scenarios, we are unable to create auto invoices, we will exclude the item fulfillments created from such orders from our execution for auto invoicing.