Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAPbobsCOM.Documents.Update cannot update DocDate only

0 Likes
578
  • SAP Managed Tags

In DI, setting DocDate value seems to automatically set TaxDate to be same as DocDate and recalculates DocDueDate as per payment terms, ignoring the value in TaxDate or DocDueDate.

Currently our users have to open each draft document in UI (SAP App), update DocDate (SAP refreshes TaxDate to match DocDate, and DocDueDate per Payment Terms), then change TaxDate back to the correct value, and Save as Draft again.

My question is: Using DI-API, how can I update only DocDate on a Draft A/P Invoice and keep TaxDate and DocDueDate unchanged?

System: SAP Business One 10.0 (10.00.170) FP 2108 (64-bit)

Steps:

Create a Draft A/P Invoice with Payment Terms = Net 30 from TaxDate and:

  • DocDate = today
  • TaxDate = today
  • DocDueDate = today + 30

Update this draft A/P Invoice with:

  • DocDate = today + 1
  • Keep TaxDate = today
  • Keep DocDueDate = today + 30

Update the draft

Expected result (as in UI):

  • DocDate = today + 1
  • TaxDate = today
  • DocDueDate = today + 30

Actual result (in DI):

  • DocDate = today + 1
  • TaxDate = today + 1
  • DocDueDate = today + 1 + 30

Thank you!

Grace

0 REPLIES 0