Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Z_ImportDebtors.php An error always occurs when importing "invaddrbranch"
09-08-2022, 09:32 AM,
#1
Z_ImportDebtors.php An error always occurs when importing "invaddrbranch"
I'm trying to import a bunch of customer profiles, but I keep getting an error when importing "invaddrbranch", the value of this field seems to be only "0" and "1", I've tried both "0" and "1", but both Incorrect.

Database Error 1366 : The customer could not be updated because
Incorrect integer value: '' for column 'invaddrbranch' at row 1
Reply
09-08-2022, 11:57 AM, (This post was last modified: 09-08-2022, 11:59 AM by TurboPT.)
#2
RE: Z_ImportDebtors.php An error always occurs when importing "invaddrbranch"
What webERP version do you have, out of curiosity?

The DB error is showing an empty string instead of 1 or 0? The part of the message that shows: ... Incorrect integer value: '' for column 'invaddrbranch'...

I'll have to check it out and see what might be the situation.
Reply
09-08-2022, 08:22 PM,
#3
RE: Z_ImportDebtors.php An error always occurs when importing "invaddrbranch"
(09-08-2022, 11:57 AM)TurboPT Wrote: What webERP version do you have, out of curiosity?

The DB error is showing an empty string instead of 1 or 0? The part of the message that shows: ... Incorrect integer value: '' for column 'invaddrbranch'...

I'll have to check it out and see what might be the situation.
My weberp is 4.15.1, and also I tried empty string, "0" and "1", but same result.4.15.1 4
Reply
09-09-2022, 02:02 AM,
#4
RE: Z_ImportDebtors.php An error always occurs when importing "invaddrbranch"
Try changing line 413 from
'" . $_POST['InvAddrBranch'] . "',
to
" . $_POST['InvAddrBranch'] . ',
and see if that helps,

Tim
Reply
09-09-2022, 09:46 AM,
#5
RE: Z_ImportDebtors.php An error always occurs when importing "invaddrbranch"
(09-09-2022, 02:02 AM)TimSchofield Wrote: Try changing line 413 from
'" . $_POST['InvAddrBranch'] . "',
to
" . $_POST['InvAddrBranch'] . ',
and see if that helps,

Tim
Tim,

Thank you very much, but it doesn't work, copy your fields completely, the page got wrong, I changed the punctuation inside, and the previous error is reproduced.

Alex
Reply
09-09-2022, 08:06 PM,
#6
RE: Z_ImportDebtors.php An error always occurs when importing "invaddrbranch"
Finally, I found the reason, the file have two strings but for one value, one is Invaddrbranch, other is AddrInvBranch, now I unify both strings into one and the problem is solved.
Reply
09-09-2022, 08:21 PM,
#7
RE: Z_ImportDebtors.php An error always occurs when importing "invaddrbranch"
Thanks for solving this, I was just puzzling over it.
I have committed the fix and issued a pull request

Tim
Reply
09-10-2022, 08:48 AM,
#8
RE: Z_ImportDebtors.php An error always occurs when importing "invaddrbranch"
Commit merged, thanks Tim!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)