From: <dai...@us...> - 2011-09-06 10:51:50
|
Revision: 4680 http://web-erp.svn.sourceforge.net/web-erp/?rev=4680&view=rev Author: daintree Date: 2011-09-06 10:51:43 +0000 (Tue, 06 Sep 2011) Log Message: ----------- fix CounterSales.php notices Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-09-05 18:55:20 UTC (rev 4679) +++ trunk/CounterSales.php 2011-09-06 10:51:43 UTC (rev 4680) @@ -22,11 +22,21 @@ } if (isset($_SESSION['Items'.$identifier])){ //update the Items object variable with the data posted from the form - $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; - $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; - $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; - $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; - $_SESSION['Items'.$identifier]->Email = $_POST['Email']; + if (isset($_POST['CustRef'])){ + $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; + } + if (isset($_POST['Comments'])){ + $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; + } + if (isset($_POST['DeliverTo'])){ + $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; + } + if (isset($_POST['PhoneNo'])){ + $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; + } + if (isset($_POST['Email'])){ + $_SESSION['Items'.$identifier]->Email = $_POST['Email']; + } } if (isset($_POST['QuickEntry'])){ @@ -85,11 +95,7 @@ exit; } if (isset($_GET['DebtorNo'])) { - $_SESSION['Items'.$identifier]->DebtorNo = $_GET['DebtorNo'];tcpdf.php line 5826: -// header('Content-Type: application/force-download'); -// header('Content-Type: application/octet-stream',false); -// header('Content-Type: application/download',false); - + $_SESSION['Items'.$identifier]->DebtorNo = $_GET['DebtorNo']; $_SESSION['Items'.$identifier]->Branch = $_GET['BranchNo']; } else { $_SESSION['Items'.$identifier]->Branch = $myrow['cashsalebranch']; @@ -2263,7 +2269,7 @@ } $OnOrder = $PurchQty + $WoQty; - $Available = $qoh - $DemandQty + $OnOrder; + $Available = $QOH - $DemandQty + $OnOrder; printf('<td>%s</td> <td>%s</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-09-06 10:51:50
|
Revision: 4680 http://web-erp.svn.sourceforge.net/web-erp/?rev=4680&view=rev Author: daintree Date: 2011-09-06 10:51:43 +0000 (Tue, 06 Sep 2011) Log Message: ----------- fix CounterSales.php notices Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-09-05 18:55:20 UTC (rev 4679) +++ trunk/CounterSales.php 2011-09-06 10:51:43 UTC (rev 4680) @@ -22,11 +22,21 @@ } if (isset($_SESSION['Items'.$identifier])){ //update the Items object variable with the data posted from the form - $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; - $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; - $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; - $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; - $_SESSION['Items'.$identifier]->Email = $_POST['Email']; + if (isset($_POST['CustRef'])){ + $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; + } + if (isset($_POST['Comments'])){ + $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; + } + if (isset($_POST['DeliverTo'])){ + $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; + } + if (isset($_POST['PhoneNo'])){ + $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; + } + if (isset($_POST['Email'])){ + $_SESSION['Items'.$identifier]->Email = $_POST['Email']; + } } if (isset($_POST['QuickEntry'])){ @@ -85,11 +95,7 @@ exit; } if (isset($_GET['DebtorNo'])) { - $_SESSION['Items'.$identifier]->DebtorNo = $_GET['DebtorNo'];tcpdf.php line 5826: -// header('Content-Type: application/force-download'); -// header('Content-Type: application/octet-stream',false); -// header('Content-Type: application/download',false); - + $_SESSION['Items'.$identifier]->DebtorNo = $_GET['DebtorNo']; $_SESSION['Items'.$identifier]->Branch = $_GET['BranchNo']; } else { $_SESSION['Items'.$identifier]->Branch = $myrow['cashsalebranch']; @@ -2263,7 +2269,7 @@ } $OnOrder = $PurchQty + $WoQty; - $Available = $qoh - $DemandQty + $OnOrder; + $Available = $QOH - $DemandQty + $OnOrder; printf('<td>%s</td> <td>%s</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-09-07 09:40:49
|
Revision: 4681 http://web-erp.svn.sourceforge.net/web-erp/?rev=4681&view=rev Author: daintree Date: 2011-09-07 09:40:43 +0000 (Wed, 07 Sep 2011) Log Message: ----------- fix CounterSales.php notices Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-09-06 10:51:43 UTC (rev 4680) +++ trunk/CounterSales.php 2011-09-07 09:40:43 UTC (rev 4681) @@ -20,23 +20,13 @@ } else { $identifier=$_GET['identifier']; } -if (isset($_SESSION['Items'.$identifier])){ +if (isset($_SESSION['Items'.$identifier]) AND isset($_POST['CustRef'])){ //update the Items object variable with the data posted from the form - if (isset($_POST['CustRef'])){ - $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; - } - if (isset($_POST['Comments'])){ - $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; - } - if (isset($_POST['DeliverTo'])){ - $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; - } - if (isset($_POST['PhoneNo'])){ - $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; - } - if (isset($_POST['Email'])){ - $_SESSION['Items'.$identifier]->Email = $_POST['Email']; - } + $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; + $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; + $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; + $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; + $_SESSION['Items'.$identifier]->Email = $_POST['Email']; } if (isset($_POST['QuickEntry'])){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-09-07 09:40:49
|
Revision: 4681 http://web-erp.svn.sourceforge.net/web-erp/?rev=4681&view=rev Author: daintree Date: 2011-09-07 09:40:43 +0000 (Wed, 07 Sep 2011) Log Message: ----------- fix CounterSales.php notices Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-09-06 10:51:43 UTC (rev 4680) +++ trunk/CounterSales.php 2011-09-07 09:40:43 UTC (rev 4681) @@ -20,23 +20,13 @@ } else { $identifier=$_GET['identifier']; } -if (isset($_SESSION['Items'.$identifier])){ +if (isset($_SESSION['Items'.$identifier]) AND isset($_POST['CustRef'])){ //update the Items object variable with the data posted from the form - if (isset($_POST['CustRef'])){ - $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; - } - if (isset($_POST['Comments'])){ - $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; - } - if (isset($_POST['DeliverTo'])){ - $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; - } - if (isset($_POST['PhoneNo'])){ - $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; - } - if (isset($_POST['Email'])){ - $_SESSION['Items'.$identifier]->Email = $_POST['Email']; - } + $_SESSION['Items'.$identifier]->CustRef = $_POST['CustRef']; + $_SESSION['Items'.$identifier]->Comments = $_POST['Comments']; + $_SESSION['Items'.$identifier]->DeliverTo = $_POST['DeliverTo']; + $_SESSION['Items'.$identifier]->PhoneNo = $_POST['PhoneNo']; + $_SESSION['Items'.$identifier]->Email = $_POST['Email']; } if (isset($_POST['QuickEntry'])){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-10-23 17:09:22
|
Revision: 5725 http://sourceforge.net/p/web-erp/reponame/5725 Author: tim_schofield Date: 2012-10-23 17:09:20 +0000 (Tue, 23 Oct 2012) Log Message: ----------- Fix typo errors in sql Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-10-20 10:20:40 UTC (rev 5724) +++ trunk/CounterSales.php 2012-10-23 17:09:20 UTC (rev 5725) @@ -1111,7 +1111,7 @@ $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand FROM salesorderdetails INNER JOIN salesorders - ON saleorderdetails.orderno=salesorders.orderno + ON salesorderdetails.orderno=salesorders.orderno WHERE salesorderdetails.stkcode = '" . $StockItem->StockID . "' AND salesorderdetails.completed = 0 AND salesorders.quotation = 0"; @@ -1125,7 +1125,7 @@ INNER JOIN bom ON salesorderdetails.stkcode=bom.parent INNER JOIN stockmaster - stockmaster.stockid=bom.parent + ON stockmaster.stockid=bom.parent WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $StockItem->StockID . "' AND salesorderdetails.completed=0 |
From: <tim...@us...> - 2012-10-23 17:46:46
|
Revision: 5726 http://sourceforge.net/p/web-erp/reponame/5726 Author: tim_schofield Date: 2012-10-23 17:46:45 +0000 (Tue, 23 Oct 2012) Log Message: ----------- Fix rounding problem when price is calculated Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-10-23 17:09:20 UTC (rev 5725) +++ trunk/CounterSales.php 2012-10-23 17:46:45 UTC (rev 5726) @@ -507,7 +507,7 @@ prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); - $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); + $Price = filter_number_format(($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100))); } else { $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); } @@ -933,7 +933,7 @@ prnMsg(_('There are no lines on this sale. Please enter lines to invoice first'),'error'); $InputError = true; } - if (abs(filter_number_format($_POST['AmountPaid']) -($_SESSION['Items'.$identifier]->total+filter_number_format($_POST['TaxTotal'])))>=0.01) { + if (abs(filter_number_format($_POST['AmountPaid']) -(filter_number_format($_SESSION['Items'.$identifier]->total)+filter_number_format($_POST['TaxTotal'])))>=0.01) { prnMsg(_('The amount entered as payment does not equal the amount of the invoice. Please ensure the customer has paid the correct amount and re-enter'),'error'); $InputError = true; } |
From: <dai...@us...> - 2012-10-24 09:15:24
|
Revision: 5727 http://sourceforge.net/p/web-erp/reponame/5727 Author: daintree Date: 2012-10-24 09:15:22 +0000 (Wed, 24 Oct 2012) Log Message: ----------- reverse incorrect use of filter_number_format Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-10-23 17:46:45 UTC (rev 5726) +++ trunk/CounterSales.php 2012-10-24 09:15:22 UTC (rev 5727) @@ -507,7 +507,7 @@ prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); - $Price = filter_number_format(($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100))); + $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); } else { $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); } @@ -933,7 +933,7 @@ prnMsg(_('There are no lines on this sale. Please enter lines to invoice first'),'error'); $InputError = true; } - if (abs(filter_number_format($_POST['AmountPaid']) -(filter_number_format($_SESSION['Items'.$identifier]->total)+filter_number_format($_POST['TaxTotal'])))>=0.01) { + if (abs(filter_number_format($_POST['AmountPaid']) -($_SESSION['Items'.$identifier]->total+filter_number_format($_POST['TaxTotal'])))>=0.01) { prnMsg(_('The amount entered as payment does not equal the amount of the invoice. Please ensure the customer has paid the correct amount and re-enter'),'error'); $InputError = true; } |
From: <dai...@us...> - 2012-10-25 07:51:59
|
Revision: 5728 http://sourceforge.net/p/web-erp/reponame/5728 Author: daintree Date: 2012-10-25 07:51:57 +0000 (Thu, 25 Oct 2012) Log Message: ----------- fix rounding so cash received entered will not trigger error Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-10-24 09:15:22 UTC (rev 5727) +++ trunk/CounterSales.php 2012-10-25 07:51:57 UTC (rev 5728) @@ -522,7 +522,7 @@ $OrderLine->DiscountPercent = 0; } - if ($Quantity<0 or $Price <0 or $DiscountPercentage >100 or $DiscountPercentage <0){ + if ($Quantity<0 OR $Price < 0 OR $DiscountPercentage >100 OR $DiscountPercentage <0){ prnMsg(_('The item could not be updated because you are attempting to set the quantity ordered to less than 0 or the price less than 0 or the discount more than 100% or less than 0%'),'warn'); } else if ($OrderLine->Quantity !=$Quantity OR $OrderLine->Price != $Price @@ -912,12 +912,21 @@ if (!isset($_POST['AmountPaid'])){ $_POST['AmountPaid'] =0; } - echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . $_POST['AmountPaid'] . '" /></td></tr>'; + echo '<tr> + <td>' . _('Amount Paid') . ':</td> + <td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . $_POST['AmountPaid'] . '" /></td> + </tr>'; echo '</table>'; //end the sub table in the second column of master table - echo '</th></tr></table>'; //end of column/row/master table - echo '<br /><div class="centre"><input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> - <input type="submit" name="ProcessSale" value="' . _('Process The Sale') . '" /></div><hr />'; + echo '</th> + </tr> + </table>'; //end of column/row/master table + echo '<br /> + <div class="centre"> + <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> + <input type="submit" name="ProcessSale" value="' . _('Process The Sale') . '" /> + </div> + <hr />'; } # end of if lines @@ -933,7 +942,7 @@ prnMsg(_('There are no lines on this sale. Please enter lines to invoice first'),'error'); $InputError = true; } - if (abs(filter_number_format($_POST['AmountPaid']) -($_SESSION['Items'.$identifier]->total+filter_number_format($_POST['TaxTotal'])))>=0.01) { + if (abs(filter_number_format($_POST['AmountPaid']) -(round($_SESSION['Items'.$identifier]->total+filter_number_format($_POST['TaxTotal']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces)))>=0.01) { prnMsg(_('The amount entered as payment does not equal the amount of the invoice. Please ensure the customer has paid the correct amount and re-enter'),'error'); $InputError = true; } |
From: <dai...@us...> - 2012-11-17 22:23:23
|
Revision: 5743 http://sourceforge.net/p/web-erp/reponame/5743 Author: daintree Date: 2012-11-17 22:23:20 +0000 (Sat, 17 Nov 2012) Log Message: ----------- Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-11-17 08:58:30 UTC (rev 5742) +++ trunk/CounterSales.php 2012-11-17 22:23:20 UTC (rev 5743) @@ -505,10 +505,8 @@ } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) { /* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */ - prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); - $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); } else { $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); |
From: <ex...@us...> - 2013-05-12 06:24:05
|
Revision: 5942 http://sourceforge.net/p/web-erp/reponame/5942 Author: exsonqu Date: 2013-05-12 06:24:01 +0000 (Sun, 12 May 2013) Log Message: ----------- 12/5/2013 Exson Make the SMTP mail available for CounterSales.php to mail new WO. Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2013-05-12 05:10:16 UTC (rev 5941) +++ trunk/CounterSales.php 2013-05-12 06:24:01 UTC (rev 5942) @@ -1275,7 +1275,16 @@ $EmailSubject = _('New Work Order Number') . ' ' . $WONo . ' ' . _('for') . ' ' . $StockItem->StockID . ' x ' . $WOQuantity; //Send email to the Factory Manager - mail($_SESSION['FactoryManagerEmail'],$EmailSubject,$FactoryManagerEmail); + if($_SESSION['SmtpSetting']==0){ + mail($_SESSION['FactoryManagerEmail'],$EmailSubject,$FactoryManagerEmail); + + }else{ + include('includes/htmlMimeMail.php'); + $mail = new htmlMimeMail(); + $mail->setSubject($EmailSubject); + $result = SendmailBySmtp($mail,array($_SESSION['FactoryManagerEmail'])); + } + } //end if with this sales order there is a shortfall of stock - need to create the WO }//end if auto create WOs in on } /* end inserted line items into sales order details */ @@ -2430,4 +2439,4 @@ } } include('includes/footer.inc'); -?> \ No newline at end of file +?> |
From: <dai...@us...> - 2013-05-18 02:19:57
|
Revision: 5975 http://sourceforge.net/p/web-erp/reponame/5975 Author: daintree Date: 2013-05-18 02:19:54 +0000 (Sat, 18 May 2013) Log Message: ----------- ensure queries inside transaction have rollback capability Modified Paths: -------------- trunk/CounterSales.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2013-05-17 23:39:08 UTC (rev 5974) +++ trunk/CounterSales.php 2013-05-18 02:19:54 UTC (rev 5975) @@ -1092,8 +1092,9 @@ 0, '" . $_SESSION['Items'.$identifier]->SalesPerson . "')"; + $DbgMsg = _('Trouble inserting the sales order header. The SQL that failed was'); $ErrMsg = _('The order cannot be added because'); - $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg); + $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg,$DbgMsg,true); $StartOf_LineItemsSQL = "INSERT INTO salesorderdetails (orderlineno, orderno, |