Skip to content

FreshFocus Produce Invoicing Image title

Overview

The final step in managing produce agreements is to 'close-out' the agreement and any Purchase Receipts that have been generated. Instead of using the normal workflow for Purchase Invoicing, FreshFocus uses a Produce Agreement Invoice process to coordinate the payback and profitability on the Produce Agreement.

The benefit of this approach is you can manage multiple agreements, documents and receipts easily in a single invoice.

Produce Agreements and Produce Documents (if used) utilise produce traceability, produce value and produce revenue postings that arise from the various posting rules that are triggered at different points in the lifecycle of the inventory.

Produce Agreement Invoices (PAI) allow the user to choose one or more agreements to process, make advance payments, print Recipient Created Tax Invoices (RCTI), review, amend and finalise the agreement by posting the invoice.

The diagram below shows the lifecycle from Produce Agreement to Produce Agreement Invoice and the use of Produce Rules, Purchase Receipts, Item Ledger Entries (from business activities), that result in Tracking Entries, Produce Value Entries, and Revenue Entries.

Traceability

We can see that Produce Agreement Invoices comprise a Header (the vendor), Lines (the agreements) and Detail Lines (the trade accounts and payback amounts that have been calculated).

Produce Agreements and Percentage Processed

Whether an agreement is ready for processing often depends on the Payback Calculation Method that is set for the Produce Agreement.

Each agreement has a Percentage Processed field that is updated whenever tracking is posted to the agreement. The percentage is calculated as shown below.

Payback Method Percentage Processed Calculation Rules and Treatments
Fixed Price (Purchase) When received the Produce Agreement is ready for processing. If the produce is subject to further downstream processing, or adjusted, it does not affect the percentage processed. Produce Posting Rules and Treatments continue to be triggered as produce is graded, packed, and or sold. For this payback calculation method, treatments should reflect that once process, the invoicing process can commence, so rule Movement Types that occur after receiving should have treatments that don't impact the payback calculation. If the rule should still impact agreement profitability but not affect the payback, then the treat type of 'Cost' can be used, otherwise use 'n/a'.
Grade Out Traces item ledger entries of type 'Consumption' that are connected with a Finished Grading Order and 'Negative Adjustment' of any lot connected with the Produce Agreement. Determines the share of the lot traceable back to the agreement, aggregates the 'Consumed' quantity and then divides into the produce agreement received quantity. Note additional charges may apply after an agreement reaches 100% but if the Agreement is Invoiced, these charges cannot be recovered directly. Produce Posting Rules and Treatments continue to be triggered as produce is graded, packed, and or sold. For this payback calculation method, treatments should reflect that once process, the invoicing process can commence, so rule Movement Types that occur after grading should have treatments that don't impact the payback calculation. If the rule should still impact agreement profitability but not affect the payback, then the treat type of 'Cost' can be used, otherwise use 'n/a'.
Pack Out Traces item ledger entries of type 'Consumption' that are connected with either an Assembly Order or Finished Production Order and 'Negative Adjustment' of any lot connected with the produce agreement. Determines the share of the lot traceable back to the Agreement, aggregates the 'Consumed' quantity and then divides into the produce agreement received quantity. Note additional charges may apply after an agreement reaches 100% but if the Agreement is Invoiced, these charges cannot be recovered directly. Produce Posting Rules and Treatments continue to be triggered as produce is graded, packed, and or sold. For this payback calculation method, treatments should reflect that once process, the invoicing process can commence, so rule Movement Types that occur after production, or assembly processing should have treatments that don't impact the payback calculation. If the rule should still impact agreement profitability but not affect the payback, then the treat type of 'Cost' can be used, otherwise use 'n/a'.
Fixed Price (Sales) Traces item ledger entries of type 'Sale' and 'Negative Adjustment' of any lot connected with the produce agreement. Determines the share of the lot traceable back to the Agreement, aggregates the 'sold' quantity and then divides into the produce agreement received quantity. Note additional charges may apply after an agreement reached 100% but if the Agreement is Invoice, these charges cannot be recovered directly. As the processed percentage occurs at sale, all valid rules and treatments will be included in the payback calculation.
Sales Commission Same as for Fixed Price Sales Same as for Fixed Price Sales

While you can process a produce agreement invoice at any time, even if the percentage processed is less than 100%, the payback amount may not reflect the required payback under the agreement, as not all deductions, charges or costs will be represented.

Note

For example, assume you are required to deduct a 'LEVY' when produce is sold according to where it is sold using the 'Target Market' produce property. Yet the payback calculation method for your Produce Agreement is 'Fixed Price Purchase'.

Unless you wait for all produce to be sold, the posting rules engine cannot determine what the required levy would be until the lots connected with the produce agreement have been sold. Yet the agreement is considered 100% after being received.

Produce value posting and treatments continue to apply even after the agreement is invoiced. These value entries will not affect the payback, but may affect lot/agreement profitability.

It is important that rules, and treatments are set correctly for the payback methods to ensure that when the payback is calculated it is accurate. For more information see Produce Rule Treatments.

Work with Produce Agreement Invoices

To create Produce Agreement Invoices choose the icon, enter Produce Agreement Invoice and then choose the related link, or select using your role centre actions. The list of Produce Agreement Invoices is displayed.

Images

Select the +New action to create a new invoice card. The produce agreement invoice header will record information such as the created Purchase Invoice No.s as the process is completed, these fields can be shown by selecting the show more action on the General Fast Tab. At a minimum a vendor and posting date must be specified.

Image

Produce Agreement Invoice Header Field Descriptions

Fields can be displayed or hidden using the page personalisation features of Business Central.

Caption Type Description
No. Code Specifies the unique number of the produce agreement invoice.
Vendor No. Code Specifies the vendor no. that this produce agreement invoice is for.
Vendor Name Text Specifies the name of the vendor for the posted produce agreement invoice.
Posting Date Date Specifies the posting date for the produce agreement invoice.
No. Series Code Specifies the Number series used to created the produce agreement invoice
Posted No. Series Code Specifies the number series that will be used when this produce agreement invoice is posted.
Status Option Specifies the status of the produce agreement invoice. Use the action bar to change the return's status.
Unposted Invoice No. Code Specifies what type of document was created when the return was posted. this field is relevant if the RCTI field is not checked.
Auto-Post Purchase Invoice Boolean Specifies if the posting the produce agreement invoice automatically posts the related purchase invoice and/or credit (if any). If not set a purchase invoice (or credit) will be created but must then be posted manually.
Unposted Credit Memo No. Code Specifies the document number that this produce agreement credit memo generated. This field is relevant if the RCTI field is not checked.
Posted Invoice No. Code Specifies the document number of the posted purchase invoice that was created.
Posted Credit Memo No. Code Specifies the document number of the posted purchase credit memo that was created.

With the header information completed, you can then begin to populate the lines of the invoice with agreements.

Produce Agreement Invoice Lines

Each Produce Agreement Invoice Line represents a single produce agreement. You can add agreements manually to the invoice lines, or you can calculate the lines them using a batch job.

For calculated invoicing you select the Get Produce Agreements action. You can organise your produce agreements any way you choose, often a combination of the agreement expected date, and percentage processed works well.

Image

You can add filters to limit the number of produce agreements returned such as percentage completed and then select OK.

The Produce Agreements are transferred to the invoice lines, are automatically refreshed, and create agreement invoice detail lines.

For manual invoicing you simply enter or lookup the agreements on each line, when finished you can use the 'Refresh Agreements' Action on the header to calculate payback values. This action also creates produce agreement invoice detail lines.

Image

You can delete any agreements that you do not wish to process at any time by selecting the Line|Manage and Delete action. You can also manually refresh agreements at any time using the Refresh action in the action bar.

Image

Note

There is no limit to how many Produce Agreements you can invoice at any time. However a produce agreement can only be associated with a single invoice.

Produce Agreement Invoice Line Field Descriptions

Fields can be displayed or hidden using the page personalisation features of Business Central.

Most of the fields in the lines are not-editable, they are derived from the Produce Agreement, and the various values are updated based on the detail lines.

One exception to this is changing the payback calculation method will enable the agreement price or commission percentage fields to be editable.

Caption Type Description
Document No. Code Specifies the produce agreement invoice number that the line relates to.
Line No. Integer Specifies the line number of the produce agreement invoice line.
Produce Agreement No. Code Specifies the produce agreement number for this produce agreement invoice line.
Payback Calculation Option Specifies the payback calculation on the produce agreement invoice line, this value determines how the payback is calculated.
Received Quantity Decimal Specifies the quantity that was received in connection with the produce agreement line.
Gross Payback (LCY) Decimal Specifies the gross payback amount calculated for the produce agreement invoice line. The agreement basis determines how this amount is derived, for example if the basis is commission then this amount would represent net sales value (sales less rebates taken), and is the amount from which commission, deductions and charges are taken.
Total Cost (LCY) Decimal Specifies the total cost amount calculated for the produce agreement invoice line. Costs are not involved in the produce agreement invoice payback amount, but are used to assist with determining overall profit for the produce agreement.
Total Recharge (LCY) Decimal Specifies the total recharge amounts calculated for the produce agreement invoice line. Recharges will be displayed on the produce agreement invoice (RCTI), and post according to the produce posting rules for the given charge.
Total Deductions (LCY) Decimal Specifies the total deduction amounts calculated for the produce agreement invoice line. Deductions are taken up against the gross return amount, and are not displayed on the produce agreement invoice (RCTI), as such they reduce the unit cost of the item when the RCTI is posted.
Total Sales Amount (LCY) Decimal Specifies the total sales value (net) calculated for the produce agreement invoice line. This amount is calculated from the lot traceability from the inbound lot to all outbound lots used on sales and will include rebates. This amount is the basis for commission based calculations.
Total Advanced Payments (LCY) Decimal Calculates the total advance payments made
Unit of Measure Code Specifies the unit of measure of the received quantity.
Item No. Code Specifies the item number that the produce agreement relates to.
Variant Code Code Specifies the item variant code that the produce agreement relates to.
Agreement Unit Price Decimal Specifies the agreement unit price of the produce agreement invoice Line.
Sales Commission Decimal Specifies the sales commission rate to apply to the grower produce agreement invoice line.
Produce Document No. Code Specifies the trade document number (if used) in connection with the produce agreement on the produce agreement invoice line.
Processed Percentage Decimal Specifies a calculated percentage of the produce agreement receipts that have been sold or traded.
Total Quantity Sold Decimal Specifies the total quantity calculated for the produce agreement invoice line. This amount is calculated from the lot traceability from the inbound lot to all outbound lots used on sales.

To see the exact calculation for the payback, you can view the Produce Agreement Detail Lines.

Produce Agreement Invoice Detail Lines

When Agreements are added and refreshed, FreshFocus will use the payback calculation method to create detail lines comprising the produce value postings, and payback amounts.

You can view the details by selecting the relevant agreement line and selecting the Line|Line Details action. The line by line calculations for the agreement are then displayed.

Image

Produce Agreement Invoice Line Detail Field Descriptions

Fields can be displayed or hidden using the page personalisation features of Business Central.

Caption Type Description
Produce Agreement Invoice No. Code Specifies the produce agreement invoice number that the line relates to.
Produce Agreement Invoice Line No. Integer Specifies the line number of the produce agreement invoice line.
Line No. Integer Specifies the line number of the produce agreement invoice line detail.
Produce Value Posting Type Option Specifies the line entry type for the produce agreement invoice detail line.
Trade Account Code Specifies the line entry type for the produce agreement invoice detail line.
Description Text Specifies the document number that originated this detail line.
Description 2 Text Specifies the additional description of the produce agreement invoice line detail.
Unit Amount (LCY) Decimal Specifies the unit amount of the produce agreement invoice line detail in local currency.
Quantity Decimal Specifies the reference quantity of the produce agreement invoice line detail.
Unit Of Measure Code Specifies the unit of measure of the produce agreement invoice line detail.
Line Amount (LCY) Decimal Specifies the line amount of the produce agreement invoice line detail in local currency.
Item No. Code Specifies the reference item number of the produce agreement invoice line detail.
Variant Code Code Specifies the reference item variant number of the produce agreement invoice line detail.
Lot No. Code Specifies the reference lot number of the produce agreement invoice line detail.
Produce Posting Rule Code Code Specifies the related produce posting code of the produce agreement invoice line detail.
Produce Tracking Entry Integer Specifies the related produce tracking entry number of the produce agreement invoice line detail.
Produce Value Entry Integer Specifies the related produce value entry number of the produce agreement invoice line detail.
Produce Agreement No. Code Specifies the produce agreement number that the produce agreement invoice line detail relates to.
Purchase Line Type Option Specifies the charge line type to use in connection with the account no. Generally speaking a G/L Account type is specified.
Purchase Line Type No. Code Specifies the account number to use in connection with this produce agreement invoice line detail record.
Posting Date Date Specifies the posting date of the line, this field is inherited from the produce agreement invoice card.
Document No. Code Specifies the document number that originated this detail line.
System-Created Entry Boolean Specifies whether this line detail was system created. System created lines are not editable.
Price Code Code Specifies the produce agreement price code that was used to determine the unit amount field on the line.
Balancing Line Boolean Specifies the produce agreement line detail has been inserted as a balancing line (due to net return being negative).
Posted Advanced Payment Document No. Code Specifies the document number used in connection with an advance payment.
No. of Related Entries Integer Specifies the number of related produce value entries to this agreement line detail.

Processing Advance Payments

In some cases its not possible to calculate a full payback on an agreement before a payment needs to be generated. In these cases you can create Advance Payments against the produce agreement invoice.

Multiple advance payments can be recorded against the detail lines of the invoice, the user can manually add a line with a produce posting type of 'Advance Payment', enter a Trade Account code that directs the posting amounts to the required G/L account with an amount.

Image

The effect of posting a FreshFocus advance payment is a Purchase Invoice, with a Vendor Ledger Entry that can be paid using the normal payable flow in Business Central.

Note

FreshFocus advance payments are different to the standard Business Central 'prepayments' process. This is to afford maximum flexibility in the Produce Agreement Invoice process.

Advance payments can be entered and processed at any time prior to finalising the Produce Agreement Invoice. After entering the advanced payment details, select the Process|Process Advance Payment action.

Image

This action immediately creates a posted purchase invoice with Vendor Ledger details to the system.

Because the actions involve financial postings it is not possible to delete these documents once they have been created.

If the action is in error, then use the 'Void Advance Payment' action.

Image

Selecting OK will process and post a credit memo to offset the invoice that was posted.

Making Adjustments Before Posting

Managing produce agreements and the complexity of rules, and of lot-for-lot bindings can sometimes result in agreements that require adjustment.

You can add or remove detail lines within this worksheet and use F5 to update the fact box to check the payback and agreement profit, to ensure you are meeting your agreements obligations.

Image

When an Agreement is refreshed, any payback, deduction or recharge lines that are marked as 'system-created' are deleted and re-created using the latest available information. Any manual entries that have been made are not changed and now appear at the top of the lines.

Because system creates entries that cannot be changed by the user, you can enter a manual entry for the difference to correct any issues with rules that have resulted in incorrect produce value entries.

Of course manual changes are best made just before finalising the invoice, as they will be based on the latest available data, and this in-turn should reduce the adjustments that need to be made.

Where possible rules should be used to automatically charge.

Changing the Payback Calculation Method on a Produce Agreement Invoice

It is possible to change the Payback Calculation Method at any time prior to posting the produce agreement invoice, this is done by changing the method on the lines in the invoice, you can also modify the Agreement Unit Price and Commission field where applicable.

When the payback calculation method is changed on the Produce Agreement Invoice, FreshFocus will delete the detail lines, and recalculate the gross payback using the new payback calculation method.

Treatments are not changed when the payback calculation method is changed

Produce Value Entries are posted on the basis of treatments that are defined against the produce posting rules during operations, and the Agreement Payback Method as originally set. These entries are transferred to the Produce Agreement Invoice where they can be handled or modified as necessary.

Any change to the payback calculation method during invoicing will NOT change how these produce values are treated, the user is responsible for reviewing the deductions and recharges to ensure they are appropriate for the changed payback method.

This may mean that a cost, charge or deduction should be deleted, or added to the detail lines in order to obtain the correct cost. For example if a deduction should be treated as a recharge due to the change in calculation, you could either

  1. Delete the incorrect deduction, and add a recharge, or
  2. Add a negative deduction to offset the original incorrect entry and also add a recharge

The benefit of the 2nd approach is that you can always audit what was done to the invoice, and the changes survive the agreement being refreshed.

Preventing Negative Stock Value

FreshFocus uses the standard Business Central inventory costing engine which prevents negatively costed items. Due to the complex nature of agreements its possible that the combined effect of deductions and agreement prices causes an individual agreement payback to be negative.

In these circumstances, FreshFocus will not allow a negative value to be posted to the inventory accounts. Instead, the produce will be costed at zero, and the difference in value will be posted as a credit note to the Negative Payback Trade Account defined in FreshFocus Setup.

Note

There is no need to setup up posting rules and treatments for the Negative Payback Trade Account.

If the combined effect of any deductions and produce cost for any Produce Agreement Line that will be invoiced is negative, then then upon 'Release' a warning will be displayed.

Image

The produce agreement invoice detail lines will require offsets to be added. An example of negative agreement value is shown below.

Image

Choose the Payback|Move Negative Payback Line action. The result is a new payback line to offset the negative deduction value, and a new recharge line to the Negative Payback Trade Account. Note the overall payback amount is not changed.

Image

Note

If more than one Produce Agreement is being invoiced and the total value of that is positive, then FreshFocus will produce an invoice, if the net effect is negative then the agreement will still produce an invoice at zero value (to close out the receipts), and a credit note for the negative value to be posted as a recharge.

Finalising the Produce Agreement Invoice

In FreshFocus Setup you can elect to automatically post the underlying purchase invoice and credit (if any) connected with this produce agreement invoice.

At the invoice level you can un-check this so you can review the create invoice before posting.

Once the agreement lines have been reviewed, and any adjustments made, you then 'release' the invoice using the Release action on the Produce Agreement Header. This prevents further changes from being made including refreshing the document.

If required, you can reopen the product Agreement Invoice using the Reopen action.

To progress the document into the Payables flow in Business Central, select Post from the action menu

Image

FreshFocus will generate a vendor purchase invoice, using the standard Business Central 'Get-Receipts' function, apply the deductions to the payback figure to determine the unit cost (of inventory) and then separately add lines for the recharges.

If the document was not set to automatically post you can navigate to it, review and post manually.

By invoicing the produce agreement receipts, it will require inventory cost adjustment.

Depending on your Inventory Setup in Business Central this may be automatic or require a manual running of the adjust-cost items routine.

Reverse billing that is typical in produce inventory can often place a VERY high load on system resources, so it should be monitored for performance and run manually via batch job or job queue to avoid interrupting user workloads during busy periods.

Posted Produce Agreements

Once the Produce Agreement and underlying Purchase Invoices have been posted, the information is transferred to the Posted Produce Agreement as a permanent record of the invoice.

To view the list of Posted Produce Agreement Invoices choose the icon, enter Posted Produce Agreement Invoice and then choose the related link, or select using your role centre actions.

In all respects the structure and data is the same as a produce agreement invoice prior to posting only that the lines, values and amounts cannot be changed.

See Also

Frequently Asked Questions

Release Notes

Planned Features

For Developers