ledger123 / runmyaccounts

SQL-Ledger Customizations by Run My Accounts
GNU General Public License v2.0
16 stars 9 forks source link

Losing 1 Transaction from Booking together with its accno #461

Closed dorskaya-infoniqa closed 8 months ago

dorskaya-infoniqa commented 9 months ago

One of our tools sends request wit the following payload to gl.pl:

precision=2
description=
AP_amount_2=
billing_lines=1
AP_amount_1=
login=tool%40einzelfirma
credit_1=3075
taxincluded=1
intnotes=
reference=50002-231005-0157
path=bin%2Fmozilla
password=1234
action=post
rma_taxaccount_2=
currency=CHF
rma_taxaccount_1=
defaultcurrency=CHF
app_id=Docca
tax_11701=230.41
involved_accounts=3
rowcount=2
accno_1=1000
accno_2=4000
transdate=2023-11-01T00%3A00%3A00
amount_2=0.0
doc_id=50002-231005-0157
amount_1=0.0
script=gl.pl
taxaccounts=11701
oldamount_1=0.0
oldamount_2=0.0

You see, in the end there are 2 accnos: accno_1=1000 accno_2=4000 But in the end SQL-Ledger shows only 1 Transaction in accno 1000, transaction from accno 4000 was lost and is not shown:

image Important note: while testing we observed this problem only for the documents that were booked with type_General Ledger

ledger123 commented 9 months ago

Hi,

Just change rowcount=2 to rowcount=3 (one more than the number of lines and this issue will be resolved. In other words we always need to add 1 to the number of lines to rowcount.

Regards

barworobiec commented 9 months ago

So this request is not working: http://localhost:8082/runmyaccounts/gl.pl?debit_1=1&billed_accounts=2&taxamount_1=0.0&exchangerate=1&taxamount_2=0.0&precision=2&description=Auf+OBH+Wunsch+%28%3Ca+href%3D%22https%3A%2F%2Fdoc.runmyaccounts.com%2Falfresco%2Fwebdav%2FMandanten%2Faxontronicde%2FBuchhaltungsbelege%2FBuchungsbelege%2F2024%2F02%2Faxontronicde_12604-240216-0015_20240216.pdf%22%3EBuchungsbeleg%3C%2Fa%3E%2C+erf.+23.02.2024%29&credit_2=1&AP_amount_2=&billing_lines=1&AP_amount_1=&login=bartosz&intnotes=21.02.2024+10%3A01+%28Router+axontronicde%29%3A+Genehmigt-----%0A%0A23.02.2024+19%3A22+%28Router+axontronicde%29%3A+Genehmigt-----%0A%0A&reference=12604-240216-0015&path=bin%2Fmozilla&password=1234&action=post&rma_taxaccount_2=&currency=EUR&rma_taxaccount_1=&defaultcurrency=EUR&app_id=Docca&involved_accounts=2&rowcount=2&accno_1=1467&accno_2=5998&transdate=20240216&amount_2=0.0&doc_id=12604-240216-0015&amount_1=0.0&script=gl.pl&oldamount_1=0.0&oldamount_2=0.0&closedto=20231031

This request is working: http://localhost:8082/runmyaccounts/gl.pl?debit_1=1&billed_accounts=2&**linetaxamount_1=0.0&exchangerate=1&linetaxamount_2=0.0&precision=2&description=Auf+OBH+Wunsch+%28%3Ca+href%3D%22https%3A%2F%2Fdoc.runmyaccounts.com%2Falfresco%2Fwebdav%2FMandanten%2Faxontronicde%2FBuchhaltungsbelege%2FBuchungsbelege%2F2024%2F02%2Faxontronicde_12604-240216-0015_20240216.pdf%22%3EBuchungsbeleg%3C%2Fa%3E%2C+erf.+23.02.2024%29&credit_2=1&AP_amount_2=&billing_lines=1&AP_amount_1=&login=bartosz&intnotes=21.02.2024+10%3A01+%28Router+axontronicde%29%3A+Genehmigt-----%0A%0A23.02.2024+19%3A22+%28Router+axontronicde%29%3A+Genehmigt-----%0A%0A&reference=12604-240216-0015&path=bin%2Fmozilla&password=1234&action=post&rma_taxaccount_2=&currency=EUR&rma_taxaccount_1=&defaultcurrency=EUR&app_id=Docca&involved_accounts=2&rowcount=2&accno_1=1467&accno_2=5998&transdate=20240216&amount_2=0.0&doc_id=12604-240216-0015&amount_1=0.0&script=gl.pl&oldamount_1=0.0&oldamount_2=0.0&closedto=20231031

Both requests have rowcount=2. The only change is how the tax is passed taxamount_X vs linetaxamount_X, can we make two requests working, to have a cohesion.

dorskaya-infoniqa commented 8 months ago

Thank you, after some clarifications and changes works fine