ARInvoice.GetShipments - Incorrect Invoice Header Total

Happy Friday All,
We have been using ERS (Auto Invoice) since go live and it’s always been a bit of a nuisance, because

  1. It posts straight away, which requires RMAs for incorrect shipments
  2. it’s bloody slow

Finally created a funtion that creates a daily Invoice group and add’s each shipment invoice. Works fast and also created a function to delete the invoice from the shipment.
Looked great until I realised the invoice header calculation total is incorrect.
What I mean is:
I ship one line of 100 part a at $0.4 = 40$
Australian Tax is simple, 10% GST on top
So the line shows subtotal of $40 + $4 Tax = $44
BUT
The Invoice Header shows Line Amounts $36 + $4 Tax = Total $40 ???

It looks like it’s deducting the tax amount from the Line Amounts when creating the header.
When I pull in the invoice through invoice entry - Get Shipments, it works correctly
The Invoice Header shows Line Amounts $40 + $4 Tax = Total $44

The trace doesn’t show any other method involved, and no errors occur.
Any ideas or hints???
Thanks

Hey,
Having similar issue, we have tax on multiple lines and its diferent based on state vise…where you able to figure that out??

Hey,
Unfortunatly I couldn’t and gave up eventually due to more urgent issues.
I will try again once we moved to Kinetic later this year, maybe it works better then.
Good luck and let me know if you solve the riddle :wink:

Thanks, i think i was able to by pass that yesterday by calling multiple BOs for the tax amts…but now getting stuck on AR invoice posting…
Ice.Common.BusinessObjectException: System.InvalidOperationException: Nullable object must have a value.
at System.Nullable1.get_Value() at Erp.Internal.PE.AR_InvoicePre_Post.Post() in C:\_releases\ERP\ERP11.2.300.22\Source\Server\Internal\PE\AR_Invoice\AR_InvoicePre_Post.cs:line 1630 at Ice.Cloud.ProxyBase1.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer) in C:_releases\ICE\ICE4.2.300.10\Source\Shared\Framework\Epicor.ServiceModel\Cloud\ProxyBase.cs:line 734
at Ice.Cloud.ProxyBase1.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy) in C:\_releases\ICE\ICE4.2.300.10\Source\Shared\Framework\Epicor.ServiceModel\Cloud\ProxyBase.cs:line 679 at Ice.Cloud.ProxyBase1.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy) in C:_releases\ICE\ICE4.2.300.10\Source\Shared\Framework\Epicor.ServiceModel\Cloud\ProxyBase.cs:line 658
at Ice.Proxy.Lib.RunTaskImpl.RunTask(Int64 ipTaskNum) in C:_releases\ICE\ICE4.2.300.0\Source\Shared\Contracts\Lib\RunTask\RunTaskProxy.cs:line 63
at Ice.TaskAgent.Core.ImplCaller.RunTaskImplCaller1.<>c__DisplayClass4_0.<Call>b__0(TImpl impl) at Ice.TaskAgent.Core.ImplCaller.RunTaskImplCaller1.Call[TResult](Func2 doWork, ExceptionBehavior communicationExceptionBehavior, ExceptionBehavior timeoutExceptionBehavior, Boolean isContinuousProcessingTask) at Ice.TaskAgent.Core.ImplCaller.RunTaskImplCaller1.Call(Action`1 doWork, ExceptionBehavior communicationExceptionBehavior, ExceptionBehavior timeoutExceptionBehavior, Boolean isContinuousProcessingTask)
at Ice.TaskAgent.Core.ScheduleProcessor.CallServiceAction(SysTaskRow sysTaskRecord, SysTaskParamRow companyParamRecord, ServiceCallArguments serviceCallArguments, Boolean isContinuousStartupTask)

I figured it out, its the hidden fields in the Inv tax table that was updating when we manually create/Add the tax, i added the copy over to my code and it did posted…everything went well this time…

Try adding this BO to your code to update the tax amounts, for us it was a complex as we run a DMT to add order rel tax but the order rel tax table is not even there for us in epicor DMT tool, so i created UD table on order release table and when added on order release it created order release tax table for that release line with the UD field value in it. Then on Get Shipments we need to copy those sales tax to invoice tax…

// Step 1: Mark tax as manual
invoiceService.OnChangeofManualTax(invoiceNum.Value, invoiceLine, taxCode, rateCode, true, ref arData);

        if (isManual)
        {
            // Step 2: Update TaxAmt
            invoiceService.OnChangeofTaxAmt(invoiceNum.Value, invoiceLine, taxCode, rateCode, taxAmt, ref arData);

            // Step 3: Update TaxableAmt
            invoiceService.OnChangeofTaxableAmt(invoiceNum.Value, invoiceLine, taxCode, rateCode, taxableAmt, ref arData);

            // Step 4: Update ReportableAmt
            invoiceService.OnChangeofTaxReportAmt(invoiceNum.Value, invoiceLine, taxCode, rateCode, reportableAmt, ref arData);

            // Step 5: Update FixedAmt
            invoiceService.OnChangeofFixedAmt(invoiceNum.Value, invoiceLine, taxCode, rateCode, fixedAmt, ref arData);
1 Like

Silly question here, but doesn’t V10 have the menu “Generate Shipment Invoices”?

If so you could put that, print invoices and post into a process set.

2 Likes

Oh boy, been using Epicor for a decade in all areas, one would think I would have come across this feature LOL
Thanks for that Hally, I’ll see how reliable that one is.

Ok I can’t take credit for this, if you want to thank anyone thank @aosemwengie1 an absolute legend if I do say so myself.

a picture of a cartoon character with the words what a legend below it

1 Like

You replied so you’re my legend for today :wink:
This forum is just spiked with legends IMO

2 Likes