Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
REceiving Error
06-10-2014, 05:08 PM
Post: #1
REceiving Error
Receiving the following error:

The credit quantity for the line for <itemnumber> is more than the quantity invoiced. This check is made to ensure that the credit note is not duplicated.



This is coming from this logic:

Code:
foreach ($_SESSION['CreditItems' . $identifier]->LineItems as $CreditLine) {

                                $SQL = "SELECT count(*) FROM salesorderdetails WHERE orderno = '" . $_SESSION['CreditItems'.$identifier]->OrderNo . "'

                                                                                                                                                AND stkcode = '" . $CreditLine->StockID . "'

                                                                                                                                                [color=#FFD700]AND quantity >=" . $CreditLine->QtyDispatched . " [/color]

                                                                                                                                                AND qtyinvoiced >=" . $CreditLine->QtyDispatched;

                                $ErrMsg = _('Failed to retrieve salesoderdetails to compare if the order has been invoiced and that it is possible that the credit note may not already have been done');

                                $DuplicateCreditResult = DB_query($SQL,$db,$ErrMsg);

                                $myrow1 = DB_fetch_array($DuplicateCreditResult);

                                if($myrow1[0] == 0){

                                                prnMsg(_('The credit quantity for the line for') . ' ' . $CreditLine->StockID . ' ' . ('is more than the quantity invoiced. This check is made to ensure that the credit note is not duplicated.'),'error');

                                                $OKToProcess = false;

                                                include('includes/footer.inc');

                                                exit;

                                }

                }

The issue is that I had an order for 40,000 LBs and Shipped 40,625. Since I overshipped the highlighted line fails.

Short term fix I can update DB quantity field.

Long term should the fix be to remove this eidt. Make edit more detailed (Link to dispatch quantities using stockmoves and /or stockserialmoves table or Update quantity field on order when overshipping and before closing order?

Thoughts?



Best Regards,

Andrew Galuski
Visit this user's website Find all posts by this user
Quote this message in a reply
06-10-2014, 10:35 PM
Post: #2
RE: Issuing a credit on overshipment
This is an error while trying to issue a credit.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)