Totals UDF miscalculating during AR Repetitive Invoice Selection

SUGGESTED

Hi all, not sure if I have gremlins or have missed something. Running Sage 100 Advanced 2018, I have created two numeric fields in AR_RepetitiveInvoiceDetail that automatically sum to Totals UDFs in AR_RepetitiveInvoiceHeader: so far so good--amounts entered in the detail lines correctly sum to the each Total UDF. The same fields are replicated in AR_InvoiceDetail and AR_InvoiceHeader, and function as expected: manually entered invoices with values in detail UDFs flow to both Totals UDFs correctly. There are no scripts updating these fields.

The trouble comes when creating invoices using Repetitive Invoice Selection: the detail UDF values copy correctly to AR_InvoiceDetail, and ONE of the AR_InvoiceHeader Total UDFs correctly calculates the sum of the details UDFs, but the other doubles the correct value. I have confirmed both Totals UDFs are now set up the same: on the Data Sources tab the AR_Invoice_bus BO is selected, with Data Source <Total from AR_InvoiceDetail> for the appropriate column. The BO AR_Invoice_bus:CopyFromRepetitiveInvoice is NOT selected.

It appears that one of the new UDFs is "stuck" as if the AR_Invoice_bus:CopyFromRepetitiveInvoiceHeader turned on. If I remove all Data Sources for the incorrect UDF then the correct value calculates--but then manually entered invoices do not calculate. Restoring the Data Sources fixes manually entered invoices, but consistently doubles the value when using Repetitive Invoice Selection. I have tried selecting as Data Source both AR_Invoice_bus or AR_Invoice_bus:CopyFromRepetitiveInvoice one at a time and together, but that does not correct the error: I can't seem to clear the "stuck" programming.

I am considering deleting the errant field from the AR_InvoiceHeader table and recreating it, but wonder if doing so will be enough as I need to use the same field name (the field is used extensively in Sage as well as an external program linked to Sage, so changing the name at this point would be problematic).

I also wonder if I should be concerned that when I view the list of available Data Sources for AR_Invoice_bus, every field is duplicated: is this normal? If not, how do I go about correcting it?
Any advice would be appreciated.

  • 0
    SUGGESTED

    I duplicated the issue of invoice total UDF being doubled when the invoice is created from repetitive invoice.  To work around this issue, change the name of your invoice header UDFs so they are different than the repetitive invoice header UDFs.

    If I name my UDFs TOTAL1 and TOTAL2 in both header tables, both UDFs are doubled on the invoice header.  I change my invoice header UDFs to INVTOTAL1 and INVTOTAL2, then they calculate correctly.

    We will look into correcting this in future release.