Credit note for invoice for Assembly item Error v4.06.6
Hi,
When Credit Note, Credit_Invoice.php is invoked for a Assembly item an error exception is being raised:
"Database Error : CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE: Stock movement records for the assembly components of ARGAN-C:50 could not be inserted because
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0.05' )' at line 1
-----------------------------
Database SQL Failure : The following SQL to insert the assembly components stock movement records was used 0.05' )
"
I printed out the SQL just before DB_query() and all the values submitted to mysql looks ok. Here is print statement:
prnMsg( _('SQL error: ') . ' ' . $AssParts['component'] . ' ' . $CreditNo . ' ' . _SESSION['CreditItems']->Location . ' ' . $DefaultDispatchDate . ' ' . $_SESSION['CreditItems']->DebtorNo . ' ' . $_SESSION['CreditItems']->Branch . ' ' . $PeriodNo . ' ' . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . ' ' . $AssParts['quantity'] . ' ' . $CreditLine->QtyDispatched . ' ' . $AssParts['standard'] );
return;
It looks like that the problem is somewhere else?
For Purchased items it is working fine.
Thanks,
Srdjan
|