When each sales order line is invoiced the rebate information from the line (rebate amount, rebate record number,) is moved from the sales order line to the invoice line. At the same time, the system stores the current cost of the item from the inventory master in the current_cost field of the invoice line and the current cost minus the rebate in the cost field of the invoice line. In the case of Vendor Shipments the actual cost from the purchase order linked to the sales order is used instead of the current inventory cost of the item.
As each invoice line is created, the system uses the following logic to record the costs and rebate amounts in each line item. The logic for normal (special order and warehouse shipments) and vendor shipments are presented separately as different logic is used.
Warehouse/Special Order Lines
• The current average cost of the item from inventory is loaded into the current cost field of the invoice line.
• The current average cost of the item from inventory is also loaded into the cost field of the invoice line.
• If a cost was specified in the order line being invoiced (due to a cost in the special price record), the cost from the order line is moved into the cost field of the invoice line.
• If a rebate is recorded in the sales order line, the rebate amount is used to recalculate the cost in the invoice line (the rebate amount is subtracted from the inventory average cost of the item to determine the cost to be used for the invoice). The rebate is also recorded in the rebate field in the order line. This behavior means that a rebate amount will override any cost specified in the special pricing record (the system will adjust the cost of the line to the inventory cost less the rebate amt to be received from the vendor).
Vendor Ship Lines
• When a vendor shipment line is processed, the cost of the item is based on the PO lines that you place with your vendor for the sales order and the cost of the item in your inventory is not relevant.
• The system takes the cost from the PO line being processed (adjusted to your local currency) and loads this in the cost field of the invoice line.
• The system also loads any rebate information from the sales order line (rebate amount, record number) into the invoice line. When a vendor shipment is processed, the system will only record a rebate amount if the rebate field is loaded (the system does not treat any difference between the PO cost and your inventory cost as a rebate as the item is being shipped direct from your vendor and the cost of the item in inventory is not used.