From: <dai...@us...> - 2011-07-16 02:55:52
|
Revision: 4631 http://web-erp.svn.sourceforge.net/web-erp/?rev=4631&view=rev Author: daintree Date: 2011-07-16 02:55:44 +0000 (Sat, 16 Jul 2011) Log Message: ----------- fix invoice/credit note printing Modified Paths: -------------- trunk/Credit_Invoice.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-07-14 10:27:29 UTC (rev 4630) +++ trunk/Credit_Invoice.php 2011-07-16 02:55:44 UTC (rev 4631) @@ -49,20 +49,20 @@ stockmoves.loccode, locations.taxprovinceid, currencies.decimalplaces - FROM debtortrans INNER JOIN debtorsmaster ON - debtortrans.debtorno = debtorsmaster.debtorno - INNER JOIN custbranch ON - debtortrans.branchcode = custbranch.branchcode - AND debtortrans.debtorno = custbranch.debtorno - INNER JOIN currencies ON - debtorsmaster.currcode = currencies.currabrev - INNER JOIN stockmoves ON - stockmoves.transno=debtortrans.transno - INNER JOIN locations ON - stockmoves.loccode = locations.loccode + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno = debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.branchcode = custbranch.branchcode + AND debtortrans.debtorno = custbranch.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN stockmoves + ON stockmoves.transno=debtortrans.transno + AND stockmoves.type=debtortrans.type + INNER JOIN locations ON + stockmoves.loccode = locations.loccode WHERE debtortrans.transno = '" . $_GET['InvoiceNumber'] . "' - AND debtortrans.type=10 - AND stockmoves.type=10"; + AND stockmoves.type=10"; $ErrMsg = _('A credit cannot be produced for the selected invoice') . '. ' . _('The invoice details cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the invoice details was'); @@ -533,10 +533,10 @@ /*Now need to update the invoice DebtorTrans record for the amount to be allocated and if the invoice is now settled*/ $SQL = "UPDATE debtortrans - SET alloc = alloc + " . $Allocate_amount . ", - settled='" . $SettledInvoice . "' - WHERE transno = '" . $_SESSION['ProcessingCredit'] . "' - AND type=10"; + SET alloc = alloc + " . $Allocate_amount . ", + settled='" . $SettledInvoice . "' + WHERE transno = '" . $_SESSION['ProcessingCredit'] . "' + AND type=10"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The alteration to the invoice record to reflect the allocation of the credit note to the invoice could not be done because'); $DbgMsg = _('The following SQL to update the invoice allocation was used'); @@ -545,39 +545,39 @@ /*Now insert the Credit Note into the DebtorTrans table with the allocations as calculated above*/ $SQL = "INSERT INTO debtortrans (transno, - type, - debtorno, - branchcode, - trandate, - inputdate, - prd, - reference, - tpe, - order_, - ovamount, - ovgst, - ovfreight, - rate, - invtext, - alloc, - settled) - VALUES (". $CreditNo . ", - 11, - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', - '" . $DefaultDispatchDate . "', - '" . date('Y-m-d H-i-s') . "', - '" . $PeriodNo . "', - 'Inv-" . $_SESSION['ProcessingCredit'] . "', - '" . $_SESSION['CreditItems']->DefaultSalesType . "', - '" . $_SESSION['CreditItems']->OrderNo . "', - '" . -($_SESSION['CreditItems']->total) . "', - '" . -$TaxTotal . "', - '" . -$_SESSION['CreditItems']->FreightCost . "', - '" . $_SESSION['CurrencyRate'] . "', - '" . $_POST['CreditText'] . "', - '" . -$Allocate_amount . "', - '" . $Settled . "')"; + type, + debtorno, + branchcode, + trandate, + inputdate, + prd, + reference, + tpe, + order_, + ovamount, + ovgst, + ovfreight, + rate, + invtext, + alloc, + settled) + VALUES (". $CreditNo . ", + 11, + '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . $_SESSION['CreditItems']->Branch . "', + '" . $DefaultDispatchDate . "', + '" . date('Y-m-d H-i-s') . "', + '" . $PeriodNo . "', + 'Inv-" . $_SESSION['ProcessingCredit'] . "', + '" . $_SESSION['CreditItems']->DefaultSalesType . "', + '" . $_SESSION['CreditItems']->OrderNo . "', + '" . -($_SESSION['CreditItems']->total) . "', + '" . -$TaxTotal . "', + '" . -$_SESSION['CreditItems']->FreightCost . "', + '" . $_SESSION['CurrencyRate'] . "', + '" . $_POST['CreditText'] . "', + '" . -$Allocate_amount . "', + '" . $Settled . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The customer credit note transaction could not be added to the database because'); $DbgMsg = _('The following SQL to insert the customer credit note was used'); @@ -620,16 +620,16 @@ /* Update sales order details quantity invoiced less this credit quantity. */ - foreach ($_SESSION['CreditItems']->LineItems as $OrderLine) { + foreach ($_SESSION['CreditItems']->LineItems as $CreditLine) { - if ($OrderLine->QtyDispatched >0){ - $LocalCurrencyPrice= round(($OrderLine->Price / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']); + if ($CreditLine->QtyDispatched >0){ + $LocalCurrencyPrice= round(($CreditLine->Price / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']); /*Determine the type of stock item being credited */ - $SQL = "SELECT mbflag FROM stockmaster WHERE stockid = '" . $OrderLine->StockID . "'"; + $SQL = "SELECT mbflag FROM stockmaster WHERE stockid = '" . $CreditLine->StockID . "'"; $Result = DB_query($SQL, $db, - _('Could not determine if the item') . ' ' . $OrderLine->StockID . ' ' . _('is purchased or manufactured'), + _('Could not determine if the item') . ' ' . $CreditLine->StockID . ' ' . _('is purchased or manufactured'), _('The SQL used that failed was'),true); $MBFlagRow = DB_fetch_row($Result); $MBFlag = $MBFlagRow[0]; @@ -637,7 +637,7 @@ /*Need to get the current location quantity will need it later for the stock movements */ $SQL="SELECT locstock.quantity FROM locstock - WHERE locstock.stockid='" . $OrderLine->StockID . "' + WHERE locstock.stockid='" . $CreditLine->StockID . "' AND loccode= '" . $_SESSION['CreditItems']->Location . "'"; $Result = DB_query($SQL, $db); if (DB_num_rows($Result)==1){ @@ -656,11 +656,11 @@ /* some want this some do not */ $SQL = "UPDATE salesorderdetails - SET qtyinvoiced = qtyinvoiced - " . $OrderLine->QtyDispatched . ", + SET qtyinvoiced = qtyinvoiced - " . $CreditLine->QtyDispatched . ", completed=0 WHERE orderno = '" . $_SESSION['CreditItems']->OrderNo . "' - AND stkcode = '" . $OrderLine->StockID . "' - AND orderlineno='" . $OrderLine->LineNumber."'"; + AND stkcode = '" . $CreditLine->StockID . "' + AND orderlineno='" . $CreditLine->LineNumber."'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales order detail record could not be updated for the reduced quantity invoiced because'); $DbgMsg = _('The following SQL to update the sales order detail record was used'); @@ -673,8 +673,8 @@ if ($MBFlag=='B' OR $MBFlag=='M') { $SQL = "UPDATE locstock - SET locstock.quantity = locstock.quantity + " . $OrderLine->QtyDispatched . " - WHERE locstock.stockid = '" . $OrderLine->StockID . "' + SET locstock.quantity = locstock.quantity + " . $CreditLine->QtyDispatched . " + WHERE locstock.stockid = '" . $CreditLine->StockID . "' AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); @@ -695,11 +695,11 @@ FROM bom, stockmaster WHERE bom.component=stockmaster.stockid - AND bom.parent='" . $OrderLine->StockID . "' + AND bom.parent='" . $CreditLine->StockID . "' AND bom.effectiveto > '" . Date('Y-m-d') . "' AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; - $ErrMsg = _('Could not retrieve assembly components from the database for') . ' ' . $OrderLine->StockID . ' ' . _('because'); + $ErrMsg = _('Could not retrieve assembly components from the database for') . ' ' . $CreditLine->StockID . ' ' . _('because'); $DbgMsg = _('The SQL that failed was'); $AssResult = DB_query($sql,$db, $ErrMsg, $DbgMsg, true); @@ -758,11 +758,11 @@ '" . $_SESSION['CreditItems']->DebtorNo . "', '" . $_SESSION['CreditItems']->Branch . "', '" . $PeriodNo . "', - '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $OrderLine->StockID . "', - '" . $AssParts['quantity'] * $OrderLine->QtyDispatched . "', + '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . "', + '" . $AssParts['quantity'] * $CreditLine->QtyDispatched . "', '" . $AssParts['standard'] . "', 0, - '" . ($QtyOnHandPrior + ($AssParts['quantity'] * $OrderLine->QtyDispatched)) . "' + '" . ($QtyOnHandPrior + ($AssParts['quantity'] * $CreditLine->QtyDispatched)) . "' )"; } else { @@ -787,19 +787,19 @@ '" . $_SESSION['CreditItems']->DebtorNo . "', '" . $_SESSION['CreditItems']->Branch . "', '" . $PeriodNo . "', - '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $OrderLine->StockID . "', - '" . $AssParts['quantity'] * $OrderLine->QtyDispatched . "', + '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . "', + '" . $AssParts['quantity'] * $CreditLine->QtyDispatched . "', '" . $AssParts['standard'] . "', 0)"; } - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records for the assembly components of') .' ' . $OrderLine->StockID . ' ' . _('could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records for the assembly components of') .' ' . $CreditLine->StockID . ' ' . _('could not be inserted because'); $DbgMsg = _('The following SQL to insert the assembly components stock movement records was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); if ($Component_MBFlag=="M" OR $Component_MBFlag=="B"){ $SQL = "UPDATE locstock - SET locstock.quantity = locstock.quantity + " . $AssParts['quantity'] * $OrderLine->QtyDispatched . " + SET locstock.quantity = locstock.quantity + " . $AssParts['quantity'] * $CreditLine->QtyDispatched . " WHERE locstock.stockid = '" . $AssParts['component'] . "' AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; @@ -813,8 +813,8 @@ } } /* end of assembly explosion and updates */ /*Update the cart with the recalculated standard cost from the explosion of the assembly's components*/ - $_SESSION['CreditItems']->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; - $OrderLine->StandardCost = $StandardCost; + $_SESSION['CreditItems']->LineItems[$CreditLine->LineNumber]->StandardCost = $StandardCost; + $CreditLine->StandardCost = $StandardCost; } /* Insert stock movements for the stock coming back in - with unit cost */ @@ -836,7 +836,7 @@ standardcost, newqoh, narrative) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -846,11 +846,11 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Ex Inv') .' - ' . $_SESSION['ProcessingCredit'] . "', - '" . $OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior + $OrderLine->QtyDispatched) . "', - '" . $OrderLine->Narrative . "')"; + '" . $CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', + '" . ($QtyOnHandPrior + $CreditLine->QtyDispatched) . "', + '" . $CreditLine->Narrative . "')"; } else { $SQL = "INSERT INTO stockmoves ( @@ -868,7 +868,7 @@ discountpercent, standardcost, narrative) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -878,10 +878,10 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Ex Inv') . " - " . $_SESSION['ProcessingCredit'] . "', - '" . $OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . $OrderLine->Narrative . "' + '" . $CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', + '" . $CreditLine->Narrative . "' )"; } @@ -891,12 +891,12 @@ $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); /*Insert the StockSerialMovements and update the StockSerialItems for controlled items*/ - //echo "<div align=left><pre>"; var_dump($OrderLine); echo "</pre> </div>"; - if ($OrderLine->Controlled ==1){ - foreach($OrderLine->SerialItems as $Item){ + //echo "<div align=left><pre>"; var_dump($CreditLine); echo "</pre> </div>"; + if ($CreditLine->Controlled ==1){ + foreach($CreditLine->SerialItems as $Item){ /*We need to add the StockSerialItem record and The StockSerialMoves as well */ $SQL = "SELECT quantity from stockserialitems - WHERE stockid='" . $OrderLine->StockID . "' + WHERE stockid='" . $CreditLine->StockID . "' AND loccode='" . $_SESSION['CreditItems']->Location . "' AND serialno='" . $Item->BundleRef . "'"; @@ -910,7 +910,7 @@ serialno, quantity) VALUES - ('" . $OrderLine->StockID . "', + ('" . $CreditLine->StockID . "', '" . $_SESSION['CreditItems']->Location . "', '" . $Item->BundleRef . "', '". $Item->BundleQty ."')"; @@ -922,7 +922,7 @@ $SQL = "UPDATE stockserialitems SET quantity= quantity + " . $Item->BundleQty . " - WHERE stockid='" . $OrderLine->StockID . "' + WHERE stockid='" . $CreditLine->StockID . "' AND loccode='" . $_SESSION['CreditItems']->Location . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -937,7 +937,7 @@ serialno, moveqty) VALUES ('" . $StkMoveNo . "', - '" . $OrderLine->StockID . "', + '" . $CreditLine->StockID . "', '" . $Item->BundleRef . "', '" . $Item->BundleQty . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock movement record could not be inserted because'); @@ -968,7 +968,7 @@ standardcost, newqoh, narrative ) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -978,11 +978,11 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Ex Inv') . ' - ' . $_SESSION['ProcessingCredit'] . "', - '" . $OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior +$OrderLine->QtyDispatched) . "', - '" . $OrderLine->Narrative . "')"; + '" . $CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', + '" . ($QtyOnHandPrior +$CreditLine->QtyDispatched) . "', + '" . $CreditLine->Narrative . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement records was used'); @@ -1006,7 +1006,7 @@ newqoh, narrative ) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -1016,12 +1016,12 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Written off ex Inv') . ' - ' . $_SESSION['ProcessingCredit'] . "', - '" . -$OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', + '" . -$CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', 0, '" . $QtyOnHandPrior . "', - '" . $OrderLine->Narrative . "')"; + '" . $CreditLine->Narrative . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement records was used'); @@ -1046,7 +1046,7 @@ newqoh, hidemovt, narrative) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -1056,12 +1056,12 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Ex Inv') .' - ' . $_SESSION['ProcessingCredit'] . "', - '" . $OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', + '" . $CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', '" . $QtyOnHandPrior . "', 1, - '" . $OrderLine->Narrative . "')"; + '" . $CreditLine->Narrative . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); @@ -1074,7 +1074,7 @@ $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); /*Insert the taxes that applied to this line */ - foreach ($OrderLine->Taxes as $Tax) { + foreach ($CreditLine->Taxes as $Tax) { $SQL = "INSERT INTO stockmovestaxes (stkmoveno, taxauthid, @@ -1111,7 +1111,7 @@ AND periodno='" . $PeriodNo . "' AND cust = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch = '" . $_SESSION['CreditItems']->Branch . "' - AND salesanalysis.stockid = '" . $OrderLine->StockID . "' + AND salesanalysis.stockid = '" . $CreditLine->StockID . "' AND budgetoractual=1 GROUP BY stkcategory, salesanalysis.area, salesperson"; @@ -1127,32 +1127,32 @@ if ($_POST['CreditType']=='ReverseOverCharge'){ $SQL = "UPDATE salesanalysis - SET amt=amt-" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", - disc=disc-" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . " + SET amt=amt-" . ($CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", + disc=disc-" . ($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . " WHERE salesanalysis.area='" . $myrow[2] . "' AND salesanalysis.salesperson='" . $myrow[3] . "' AND typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' AND periodno = '" . $PeriodNo . "' AND cust = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch = '" . $_SESSION['CreditItems']->Branch . "' - AND stockid = '" . $OrderLine->StockID . "' + AND stockid = '" . $CreditLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[1] . "' AND budgetoractual=1"; } else { $SQL = "UPDATE salesanalysis - SET amt=amt-" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", - cost=cost-" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . ", - qty=qty-" . $OrderLine->QtyDispatched . ", - disc=disc-" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . " + SET amt=amt-" . ($CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", + cost=cost-" . ($CreditLine->StandardCost * $CreditLine->QtyDispatched) . ", + qty=qty-" . $CreditLine->QtyDispatched . ", + disc=disc-" . ($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . " WHERE salesanalysis.area='" . $myrow[2] . "' AND salesanalysis.salesperson='" . $myrow[3] . "' AND typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' AND periodno = '" . $PeriodNo . "' AND cust = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch = '" . $_SESSION['CreditItems']->Branch . "' - AND stockid = '" . $OrderLine->StockID . "' + AND stockid = '" . $CreditLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[1] . "' AND budgetoractual=1"; } @@ -1175,19 +1175,19 @@ stkcategory) SELECT '" . $_SESSION['CreditItems']->DefaultSalesType . "', '" . $PeriodNo . "', - '" . -($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . -($CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', '" . $_SESSION['CreditItems']->DebtorNo . "', '" . $_SESSION['CreditItems']->Branch . "', 0, - '" . -($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . $OrderLine->StockID . "', + '" . -($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . $CreditLine->StockID . "', custbranch.area, 1, custbranch.salesman, stockmaster.categoryid FROM stockmaster, custbranch - WHERE stockmaster.stockid = '" . $OrderLine->StockID . "' + WHERE stockmaster.stockid = '" . $CreditLine->StockID . "' AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "'"; } else { @@ -1207,20 +1207,20 @@ stkcategory) SELECT '" . $_SESSION['CreditItems']->DefaultSalesType . "', '" . $PeriodNo . "', - '" . -($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . -($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "', + '" . -($CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . -($CreditLine->StandardCost * $CreditLine->QtyDispatched) . "', '" . $_SESSION['CreditItems']->DebtorNo . "', '" . $_SESSION['CreditItems']->Branch . "', - '" . -$OrderLine->QtyDispatched . "', - '" . -($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . $OrderLine->StockID . "', + '" . -$CreditLine->QtyDispatched . "', + '" . -($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . $CreditLine->StockID . "', custbranch.area, 1, custbranch.salesman, stockmaster.categoryid FROM stockmaster, custbranch - WHERE stockmaster.stockid = '" . $OrderLine->StockID . "' + WHERE stockmaster.stockid = '" . $CreditLine->StockID . "' AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "'"; @@ -1235,12 +1235,12 @@ /* If GLLink_Stock then insert GLTrans to credit stock and debit cost of sales at standard cost*/ if ($_SESSION['CompanyRecord']['gllink_stock']==1 - AND ($OrderLine->StandardCost !=0 OR (isset($StandardCost) and $StandardCost !=0)) + AND ($CreditLine->StandardCost !=0 OR (isset($StandardCost) and $StandardCost !=0)) AND $_POST['CreditType']!='ReverseOverCharge'){ /*first the cost of sales entry*/ - $COGSAccount = GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['CreditItems']->DefaultSalesType, $db); + $COGSAccount = GetCOGSGLAccount($Area, $CreditLine->StockID, $_SESSION['CreditItems']->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1254,8 +1254,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $COGSAccount . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . -round($OrderLine->StandardCost * $OrderLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "' + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->QtyDispatched . " @ " . $CreditLine->StandardCost . "', + '" . -round($CreditLine->StandardCost * $CreditLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); @@ -1278,10 +1278,10 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_POST['WriteOffGLCode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . round($OrderLine->StandardCost * $OrderLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->QtyDispatched . " @ " . $CreditLine->StandardCost . "', + '" . round($CreditLine->StandardCost * $CreditLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "')"; } else { - $StockGLCode = GetStockGLCode($OrderLine->StockID, $db); + $StockGLCode = GetStockGLCode($CreditLine->StockID, $db); $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1294,8 +1294,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . round($OrderLine->StandardCost * $OrderLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->QtyDispatched . " @ " . $CreditLine->StandardCost . "', + '" . round($CreditLine->StandardCost * $CreditLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "')"; } $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side or write off of the cost of sales GL posting could not be inserted because'); @@ -1304,10 +1304,10 @@ } /* end of if GL and stock integrated and standard cost !=0 */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $OrderLine->Price !=0){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ //Post sales transaction to GL credit sales - $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['CreditItems']->DefaultSalesType, $db); + $SalesGLAccounts = GetSalesGLAccount($Area, $CreditLine->StockID, $_SESSION['CreditItems']->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1321,15 +1321,15 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', - '" . round(($OrderLine->Price * $OrderLine->QtyDispatched)/$_SESSION['CurrencyRate'],$_SESSION['CompanyRecord']['decimalplaces']) . "' + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->QtyDispatched . " @ " . $CreditLine->Price . "', + '" . round(($CreditLine->Price * $CreditLine->QtyDispatched)/$_SESSION['CurrencyRate'],$_SESSION['CompanyRecord']['decimalplaces']) . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); - if ($OrderLine->DiscountPercent !=0){ + if ($CreditLine->DiscountPercent !=0){ $SQL = "INSERT INTO gltrans (type, typeno, @@ -1343,8 +1343,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', - '" . -round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate'],$_SESSION['CompanyRecord']['decimalplaces']) . "' + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . -round(($CreditLine->Price * $CreditLine->QtyDispatched * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate'],$_SESSION['CompanyRecord']['decimalplaces']) . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2011-07-14 10:27:29 UTC (rev 4630) +++ trunk/PrintCustTrans.php 2011-07-16 02:55:44 UTC (rev 4631) @@ -125,25 +125,27 @@ custbranch.brpostaddr6, salesman.salesmanname, debtortrans.debtorno, - debtortrans.branchcode - FROM debtortrans, - debtorsmaster, - custbranch, - salesorders, - shippers, - salesman, - locations, - paymentterms - WHERE debtortrans.order_ = salesorders.orderno - AND debtortrans.type=10 - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.shipvia=shippers.shipper_id - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtorsmaster.paymentterms=paymentterms.termsindicator - AND debtortrans.debtorno=custbranch.debtorno + debtortrans.branchcode, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode - AND salesorders.fromstkloc=locations.loccode"; + INNER JOIN salesorders + ON debtortrans.order_ = salesorders.orderno + INNER JOIN shippers + ON debtortrans.shipvia=shippers.shipper_id + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=10 + AND debtortrans.transno='" . $FromTransNo . "'"; if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No') { $sql = $sql . " AND debtorsmaster.ediinvoices=0"; @@ -182,19 +184,21 @@ salesman.salesmanname, debtortrans.debtorno, debtortrans.branchcode, - paymentterms.terms - FROM debtortrans, - debtorsmaster, - custbranch, - salesman, - paymentterms + paymentterms.terms, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev WHERE debtortrans.type=11 - AND debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode"; + AND debtortrans.transno='" . $FromTransNo . "'"; if ($_POST['PrintEDI']=='No') { $sql = $sql . " AND debtorsmaster.ediinvoices=0"; @@ -225,7 +229,8 @@ ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, (stockmoves.price * " . $ExchRate . ") AS fxprice, stockmoves.narrative, - stockmaster.units + stockmaster.units, + stockmaster.decimalplaces FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid @@ -241,7 +246,8 @@ ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) AS fxnet, (stockmoves.price * " . $ExchRate . ") AS fxprice, stockmoves.narrative, - stockmaster.units + stockmaster.units, + stockmaster.decimalplaces FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid @@ -277,9 +283,9 @@ $DisplayDiscount = number_format($myrow2['discountpercent']*100,2) . '%'; $DiscountPrice=$myrow2['fxprice']*(1-$myrow2['discountpercent']); } - $DisplayNet=number_format($myrow2['fxnet'],2); - $DisplayPrice=number_format($myrow2['fxprice'],3); - $DisplayQty=$myrow2['quantity']; + $DisplayNet=number_format($myrow2['fxnet'],$myrow['decimalplaces']); + $DisplayPrice=number_format($myrow2['fxprice'],$myrow['decimalplaces']); + $DisplayQty=number_format($myrow2['quantity'],$myrow2['decimalplaces']); $LeftOvers = $pdf->addTextWrap($Left_Margin+3,$YPos,95,$FontSize,$myrow2['stockid']); $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,123,$FontSize,$myrow2['description']); @@ -351,17 +357,17 @@ if ($InvOrCredit=='Invoice') { - $DisplaySubTot = number_format($myrow['ovamount'],2); - $DisplayFreight = number_format($myrow['ovfreight'],2); - $DisplayTax = number_format($myrow['ovgst'],2); - $DisplayTotal = number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],2); + $DisplaySubTot = number_format($myrow['ovamount'],$myrow['decimalplaces']); + $DisplayFreight = number_format($myrow['ovfreight'],$myrow['decimalplaces']); + $DisplayTax = number_format($myrow['ovgst'],$myrow['decimalplaces']); + $DisplayTotal = number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['decimalplaces']); } else { - $DisplaySubTot = number_format(-$myrow['ovamount'],2); - $DisplayFreight = number_format(-$myrow['ovfreight'],2); - $DisplayTax = number_format(-$myrow['ovgst'],2); - $DisplayTotal = number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],2); + $DisplaySubTot = number_format(-$myrow['ovamount'],$myrow['decimalplaces']); + $DisplayFreight = number_format(-$myrow['ovfreight'],$myrow['decimalplaces']); + $DisplayTax = number_format(-$myrow['ovgst'],$myrow['decimalplaces']); + $DisplayTotal = number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],$myrow['decimalplaces']); } /* Print out the invoice text entered */ $YPos = $Bottom_Margin+(3*$line_height); @@ -559,93 +565,102 @@ if ($InvOrCredit=='Invoice') { - $sql = "SELECT - debtortrans.trandate, - debtortrans.ovamount, - debtortrans.ovdiscount, - debtortrans.ovfreight, - debtortrans.ovgst, - debtortrans.rate, - debtortrans.invtext, - debtortrans.consignment, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.currcode, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.customerref, - salesorders.orderno, - salesorders.orddate, - shippers.shippername, - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - salesman.salesmanname, - debtortrans.debtorno - FROM debtortrans, - debtorsmaster, - custbranch, - salesorders, - shippers, - salesman - WHERE debtortrans.order_ = salesorders.orderno - AND debtortrans.type=10 - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.shipvia=shippers.shipper_id - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode"; + $sql = "SELECT debtortrans.trandate, + debtortrans.ovamount, + debtortrans.ovdiscount, + debtortrans.ovfreight, + debtortrans.ovgst, + debtortrans.rate, + debtortrans.invtext, + debtortrans.consignment, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.currcode, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.customerref, + salesorders.orderno, + salesorders.orddate, + shippers.shippername, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + salesman.salesmanname, + debtortrans.debtorno, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesorders + ON debtortrans.order_ = salesorders.orderno + INNER JOIN shippers + ON debtortrans.shipvia=shippers.shipper_id + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=10 + AND debtortrans.transno='" . $FromTransNo . "'"; } else { $sql = "SELECT debtortrans.trandate, - debtortrans.ovamount, - debtortrans.ovdiscount, - debtortrans.ovfreight, - debtortrans.ovgst, - debtortrans.rate, - debtortrans.invtext, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.currcode, - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - salesman.salesmanname, - debtortrans.debtorno - FROM debtortrans, - debtorsmaster, - custbranch, - salesman - WHERE debtortrans.type=11 - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode"; + debtortrans.ovamount, + debtortrans.ovdiscount, + debtortrans.ovfreight, + debtortrans.ovgst, + debtortrans.rate, + debtortrans.invtext, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.currcode, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + salesman.salesmanname, + debtortrans.debtorno, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=11 + AND debtortrans.transno='" . $FromTransNo . "'"; } $result=DB_query($sql,$db); @@ -761,19 +776,20 @@ </table>'; $sql ="SELECT stockmoves.stockid, - stockmaster.description, - -stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.narrative, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 - AND stockmoves.transno='" . $FromTransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + -stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.narrative, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=10 + AND stockmoves.transno='" . $FromTransNo . "' + AND stockmoves.show_on_inv_crds=1"; } else { /* then its a credit note */ @@ -799,20 +815,21 @@ </tr></table>'; $sql ="SELECT stockmoves.stockid, - stockmaster.description, - stockmoves.qty as quantity, - stockmoves.discountpercent, ((1 - stockmoves.discountpercent) * stockmoves.price * ' . $ExchRate . ' * stockmoves.qty) AS fxnet, - (stockmoves.price * ' . $ExchRate . ') AS fxprice, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=11 - AND stockmoves.transno='" . $FromTransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + stockmoves.qty as quantity, + stockmoves.discountpercent, ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) AS fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=11 + AND stockmoves.transno='" . $FromTransNo . "' + AND stockmoves.show_on_inv_crds=1"; } - echo '<hr>'; + echo '<hr />'; echo '<div class="centre"><font size=2>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</font></div>'; $result=DB_query($sql,$db); @@ -850,9 +867,9 @@ echo $RowStarter; - $DisplayPrice = number_format($myrow2['fxprice'],2); - $DisplayQty = number_format($myrow2['quantity'],2); - $DisplayNet = number_format($myrow2['fxnet'],2); + $DisplayPrice = number_format($myrow2['fxprice'],$myrow['decimalplaces']); + $DisplayQty = number_format($myrow2['quantity'],$myrow2['decimalplaces']); + $DisplayNet = number_format($myrow2['fxnet'],$myrow['decimalplaces']); if ($myrow2['discountpercent']==0){ $DisplayDiscount =''; @@ -912,15 +929,17 @@ echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br />'; echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />'; echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; - echo '</td><td class=number>' . _('Page') . ': ' . $PageNumber . '</td></tr></table>'; - echo '<table class="table1"><tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> - <th>' . _('Quantity') . '</th> - <th>' . _('Unit') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Discount') . '</th> - <th>' . _('Net') . '</th></tr>'; + echo '</td><td class="number">' . _('Page') . ': ' . $PageNumber . '</td></tr></table>'; + echo '<table class="table1"> + <tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Net') . '</th> + </tr>'; $LineCounter = 10; @@ -960,14 +979,16 @@ echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />'; echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; echo '</td><td class=number>' . _('Page') . ': ' . $PageNumber . '</td></tr></table>'; - echo '<table class="table1"><tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> - <th>' . _('Quantity') . '</th> - <th>' . _('Unit') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Discount') . '</th> - <th>' . _('Net') . '</th></tr>'; + echo '<table class="table1"> + <tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Net') . '</th> + </tr>'; $LineCounter = 10; } @@ -986,15 +1007,15 @@ if ($InvOrCredit=='Invoice') { - $DisplaySubTot = number_format($myrow['ovamount'],2); - $DisplayFreight = number_format($myrow['ovfreight'],2); - $DisplayTax = number_format($myrow['ovgst'],2); - $DisplayTotal = number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],2); + $DisplaySubTot = number_format($myrow['ovamount'],$myrow['decimalplaces']); + $DisplayFreight = number_format($myrow['ovfreight'],$myrow['decimalplaces']); + $DisplayTax = number_format($myrow['ovgst'],$myrow['decimalplaces']); + $DisplayTotal = number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['decimalplaces']); } else { - $DisplaySubTot = number_format(-$myrow['ovamount'],2); - $DisplayFreight = number_format(-$myrow['ovfreight'],2); - $DisplayTax = number_format(-$myrow['ovgst'],2); - $DisplayTotal = number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],2); + $DisplaySubTot = number_format(-$myrow['ovamount'],$myrow['decimalplaces']); + $DisplayFreight = number_format(-$myrow['ovfreight'],$myrow['decimalplaces']); + $DisplayTax = number_format(-$myrow['ovgst'],$myrow['decimalplaces']); + $DisplayTotal = number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],$myrow['decimalplaces']); } /*Print out the invoice text entered */ Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2011-07-14 10:27:29 UTC (rev 4630) +++ trunk/PrintCustTransPortrait.php 2011-07-16 02:55:44 UTC (rev 4631) @@ -99,123 +99,127 @@ if ($InvOrCredit=='Invoice') { $sql = "SELECT debtortrans.trandate, - debtortrans.ovamount, - debtortrans.ovdiscount, - debtortrans.ovfreight, - debtortrans.ovgst, - debtortrans.rate, - debtortrans.invtext, - debtortrans.consignment, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.currcode, - debtorsmaster.invaddrbranch, - debtorsmaster.taxref, - paymentterms.terms, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.customerref, - salesorders.orderno, - salesorders.orddate, - locations.locationname, - shippers.shippername, - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.brpostaddr1, - custbranch.brpostaddr2, - custbranch.brpostaddr3, - custbranch.brpostaddr4, - custbranch.brpostaddr5, - custbranch.brpostaddr6, - salesman.salesmanname, - debtortrans.debtorno, - debtortrans.branchcode - FROM debtortrans, - debtorsmaster, - custbranch, - salesorders, - shippers, - salesman, - locations, - paymentterms - WHERE debtortrans.order_ = salesorders.orderno - AND debtortrans.type=10 - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.shipvia=shippers.shipper_id - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtorsmaster.paymentterms=paymentterms.termsindicator - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode - AND salesorders.fromstkloc=locations.loccode"; + debtortrans.ovamount, + debtortrans.ovdiscount, + debtortrans.ovfreight, + debtortrans.ovgst, + debtortrans.rate, + debtortrans.invtext, + debtortrans.consignment, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.currcode, + debtorsmaster.invaddrbranch, + debtorsmaster.taxref, + paymentterms.terms, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.customerref, + salesorders.orderno, + salesorders.orddate, + locations.locationname, + shippers.shippername, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.brpostaddr1, + custbranch.brpostaddr2, + custbranch.brpostaddr3, + custbranch.brpostaddr4, + custbranch.brpostaddr5, + custbranch.brpostaddr6, + salesman.salesmanname, + debtortrans.debtorno, + debtortrans.branchcode, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesorders + ON debtortrans.order_ = salesorders.orderno + INNER JOIN shippers + ON debtortrans.shipvia=shippers.shipper_id + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=10 + AND debtortrans.transno='" . $FromTransNo . "'"; - if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No'){ - $sql = $sql . ' AND debtorsmaster.ediinvoices=0'; + if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No') { + $sql = $sql . " AND debtorsmaster.ediinvoices=0"; } } else { - $sql = "SELECT debtortrans.trandate, - debtortrans.ovamount, - debtortrans.ovdiscount, - debtortrans.ovfreight, - debtortrans.ovgst, - debtortrans.rate, - debtortrans.invtext, - debtorsmaster.invaddrbranch, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.currcode, - debtorsmaster.taxref, - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.brpostaddr1, - custbranch.brpostaddr2, - custbranch.brpostaddr3, - custbranch.brpostaddr4, - custbranch.brpostaddr5, - custbranch.brpostaddr6, - salesman.salesmanname, - debtortrans.debtorno, - debtortrans.branchcode, - paymentterms.terms - FROM debtortrans, - debtorsmaster, - custbranch, - salesman, - paymentterms - WHERE debtortrans.type=11 - AND debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtortrans.transno='" . $FromTransNo ."' - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode"; + debtortrans.ovamount, + debtortrans.ovdiscount, + debtortrans.ovfreight, + debtortrans.ovgst, + debtortrans.rate, + debtortrans.invtext, + debtorsmaster.invaddrbranch, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.currcode, + debtorsmaster.taxref, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.brpostaddr1, + custbranch.brpostaddr2, + custbranch.brpostaddr3, + custbranch.brpostaddr4, + custbranch.brpostaddr5, + custbranch.brpostaddr6, + salesman.salesmanname, + debtortrans.debtorno, + debtortrans.branchcode, + paymentterms.terms, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=11 + AND debtortrans.transno='" . $FromTransNo . "'"; + if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No'){ $sql = $sql . ' AND debtorsmaster.ediinvoices=0'; } @@ -250,11 +254,11 @@ stockmoves.narrative, stockmaster.controlled, stockmaster.units, - stockmoves.stkmoveno - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 + stockmoves.stkmoveno, + stockmaster.decimalplaces + FROM stockmoves INNER JOIN stockmaster + ON stockmoves.stockid = stockmaster.stockid + WHERE stockmoves.type=10 AND stockmoves.transno='" . $FromTransNo . "' AND stockmoves.show_on_inv_crds=1"; } else { @@ -268,11 +272,11 @@ stockmoves.narrative, stockmaster.controlled, stockmaster.units, - stockmoves.stkmoveno - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=11 + stockmoves.stkmoveno, + stockmaster.decimalplaces + FROM stockmoves INNER JOIN stockmaster + ON stockmoves.stockid = stockmaster.stockid + WHERE stockmoves.type=11 AND stockmoves.transno='" . $FromTransNo . "' AND stockmoves.show_on_inv_crds=1"; } // end else @@ -305,9 +309,9 @@ $DisplayDiscount = number_format($myrow2['discountpercent'] * 100, 2) . '%'; $DiscountPrice = $myrow2['fxprice'] * (1 - $myrow2['discountpercent']); } - $DisplayNet = $myrow2['fxnet']; - $DisplayPrice = $myrow2['fxprice']; - $DisplayQty = $myrow2['quantity']; + $DisplayNet = number_format($myrow2['fxnet'],$myrow['decimalplaces']); + $DisplayPrice = number_format($myrow2['fxprice'],$myrow['decimalplaces']); + $DisplayQty = number_format($myrow2['quantity'],$myrow2['decimalplaces']); $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos,71,$FontSize,$myrow2['stockid']); $LeftOvers = $pdf->addTextWrap($Left_Margin+80,$YPos,186,$FontSize,$myrow2['description']); @@ -318,11 +322,11 @@ $lines++; } - $... [truncated message content] |
From: <dai...@us...> - 2011-07-16 02:55:52
|
Revision: 4631 http://web-erp.svn.sourceforge.net/web-erp/?rev=4631&view=rev Author: daintree Date: 2011-07-16 02:55:44 +0000 (Sat, 16 Jul 2011) Log Message: ----------- fix invoice/credit note printing Modified Paths: -------------- trunk/Credit_Invoice.php trunk/PrintCustTrans.php trunk/PrintCustTransPortrait.php Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-07-14 10:27:29 UTC (rev 4630) +++ trunk/Credit_Invoice.php 2011-07-16 02:55:44 UTC (rev 4631) @@ -49,20 +49,20 @@ stockmoves.loccode, locations.taxprovinceid, currencies.decimalplaces - FROM debtortrans INNER JOIN debtorsmaster ON - debtortrans.debtorno = debtorsmaster.debtorno - INNER JOIN custbranch ON - debtortrans.branchcode = custbranch.branchcode - AND debtortrans.debtorno = custbranch.debtorno - INNER JOIN currencies ON - debtorsmaster.currcode = currencies.currabrev - INNER JOIN stockmoves ON - stockmoves.transno=debtortrans.transno - INNER JOIN locations ON - stockmoves.loccode = locations.loccode + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno = debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.branchcode = custbranch.branchcode + AND debtortrans.debtorno = custbranch.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + INNER JOIN stockmoves + ON stockmoves.transno=debtortrans.transno + AND stockmoves.type=debtortrans.type + INNER JOIN locations ON + stockmoves.loccode = locations.loccode WHERE debtortrans.transno = '" . $_GET['InvoiceNumber'] . "' - AND debtortrans.type=10 - AND stockmoves.type=10"; + AND stockmoves.type=10"; $ErrMsg = _('A credit cannot be produced for the selected invoice') . '. ' . _('The invoice details cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the invoice details was'); @@ -533,10 +533,10 @@ /*Now need to update the invoice DebtorTrans record for the amount to be allocated and if the invoice is now settled*/ $SQL = "UPDATE debtortrans - SET alloc = alloc + " . $Allocate_amount . ", - settled='" . $SettledInvoice . "' - WHERE transno = '" . $_SESSION['ProcessingCredit'] . "' - AND type=10"; + SET alloc = alloc + " . $Allocate_amount . ", + settled='" . $SettledInvoice . "' + WHERE transno = '" . $_SESSION['ProcessingCredit'] . "' + AND type=10"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The alteration to the invoice record to reflect the allocation of the credit note to the invoice could not be done because'); $DbgMsg = _('The following SQL to update the invoice allocation was used'); @@ -545,39 +545,39 @@ /*Now insert the Credit Note into the DebtorTrans table with the allocations as calculated above*/ $SQL = "INSERT INTO debtortrans (transno, - type, - debtorno, - branchcode, - trandate, - inputdate, - prd, - reference, - tpe, - order_, - ovamount, - ovgst, - ovfreight, - rate, - invtext, - alloc, - settled) - VALUES (". $CreditNo . ", - 11, - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', - '" . $DefaultDispatchDate . "', - '" . date('Y-m-d H-i-s') . "', - '" . $PeriodNo . "', - 'Inv-" . $_SESSION['ProcessingCredit'] . "', - '" . $_SESSION['CreditItems']->DefaultSalesType . "', - '" . $_SESSION['CreditItems']->OrderNo . "', - '" . -($_SESSION['CreditItems']->total) . "', - '" . -$TaxTotal . "', - '" . -$_SESSION['CreditItems']->FreightCost . "', - '" . $_SESSION['CurrencyRate'] . "', - '" . $_POST['CreditText'] . "', - '" . -$Allocate_amount . "', - '" . $Settled . "')"; + type, + debtorno, + branchcode, + trandate, + inputdate, + prd, + reference, + tpe, + order_, + ovamount, + ovgst, + ovfreight, + rate, + invtext, + alloc, + settled) + VALUES (". $CreditNo . ", + 11, + '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . $_SESSION['CreditItems']->Branch . "', + '" . $DefaultDispatchDate . "', + '" . date('Y-m-d H-i-s') . "', + '" . $PeriodNo . "', + 'Inv-" . $_SESSION['ProcessingCredit'] . "', + '" . $_SESSION['CreditItems']->DefaultSalesType . "', + '" . $_SESSION['CreditItems']->OrderNo . "', + '" . -($_SESSION['CreditItems']->total) . "', + '" . -$TaxTotal . "', + '" . -$_SESSION['CreditItems']->FreightCost . "', + '" . $_SESSION['CurrencyRate'] . "', + '" . $_POST['CreditText'] . "', + '" . -$Allocate_amount . "', + '" . $Settled . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The customer credit note transaction could not be added to the database because'); $DbgMsg = _('The following SQL to insert the customer credit note was used'); @@ -620,16 +620,16 @@ /* Update sales order details quantity invoiced less this credit quantity. */ - foreach ($_SESSION['CreditItems']->LineItems as $OrderLine) { + foreach ($_SESSION['CreditItems']->LineItems as $CreditLine) { - if ($OrderLine->QtyDispatched >0){ - $LocalCurrencyPrice= round(($OrderLine->Price / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']); + if ($CreditLine->QtyDispatched >0){ + $LocalCurrencyPrice= round(($CreditLine->Price / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']); /*Determine the type of stock item being credited */ - $SQL = "SELECT mbflag FROM stockmaster WHERE stockid = '" . $OrderLine->StockID . "'"; + $SQL = "SELECT mbflag FROM stockmaster WHERE stockid = '" . $CreditLine->StockID . "'"; $Result = DB_query($SQL, $db, - _('Could not determine if the item') . ' ' . $OrderLine->StockID . ' ' . _('is purchased or manufactured'), + _('Could not determine if the item') . ' ' . $CreditLine->StockID . ' ' . _('is purchased or manufactured'), _('The SQL used that failed was'),true); $MBFlagRow = DB_fetch_row($Result); $MBFlag = $MBFlagRow[0]; @@ -637,7 +637,7 @@ /*Need to get the current location quantity will need it later for the stock movements */ $SQL="SELECT locstock.quantity FROM locstock - WHERE locstock.stockid='" . $OrderLine->StockID . "' + WHERE locstock.stockid='" . $CreditLine->StockID . "' AND loccode= '" . $_SESSION['CreditItems']->Location . "'"; $Result = DB_query($SQL, $db); if (DB_num_rows($Result)==1){ @@ -656,11 +656,11 @@ /* some want this some do not */ $SQL = "UPDATE salesorderdetails - SET qtyinvoiced = qtyinvoiced - " . $OrderLine->QtyDispatched . ", + SET qtyinvoiced = qtyinvoiced - " . $CreditLine->QtyDispatched . ", completed=0 WHERE orderno = '" . $_SESSION['CreditItems']->OrderNo . "' - AND stkcode = '" . $OrderLine->StockID . "' - AND orderlineno='" . $OrderLine->LineNumber."'"; + AND stkcode = '" . $CreditLine->StockID . "' + AND orderlineno='" . $CreditLine->LineNumber."'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales order detail record could not be updated for the reduced quantity invoiced because'); $DbgMsg = _('The following SQL to update the sales order detail record was used'); @@ -673,8 +673,8 @@ if ($MBFlag=='B' OR $MBFlag=='M') { $SQL = "UPDATE locstock - SET locstock.quantity = locstock.quantity + " . $OrderLine->QtyDispatched . " - WHERE locstock.stockid = '" . $OrderLine->StockID . "' + SET locstock.quantity = locstock.quantity + " . $CreditLine->QtyDispatched . " + WHERE locstock.stockid = '" . $CreditLine->StockID . "' AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); @@ -695,11 +695,11 @@ FROM bom, stockmaster WHERE bom.component=stockmaster.stockid - AND bom.parent='" . $OrderLine->StockID . "' + AND bom.parent='" . $CreditLine->StockID . "' AND bom.effectiveto > '" . Date('Y-m-d') . "' AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; - $ErrMsg = _('Could not retrieve assembly components from the database for') . ' ' . $OrderLine->StockID . ' ' . _('because'); + $ErrMsg = _('Could not retrieve assembly components from the database for') . ' ' . $CreditLine->StockID . ' ' . _('because'); $DbgMsg = _('The SQL that failed was'); $AssResult = DB_query($sql,$db, $ErrMsg, $DbgMsg, true); @@ -758,11 +758,11 @@ '" . $_SESSION['CreditItems']->DebtorNo . "', '" . $_SESSION['CreditItems']->Branch . "', '" . $PeriodNo . "', - '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $OrderLine->StockID . "', - '" . $AssParts['quantity'] * $OrderLine->QtyDispatched . "', + '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . "', + '" . $AssParts['quantity'] * $CreditLine->QtyDispatched . "', '" . $AssParts['standard'] . "', 0, - '" . ($QtyOnHandPrior + ($AssParts['quantity'] * $OrderLine->QtyDispatched)) . "' + '" . ($QtyOnHandPrior + ($AssParts['quantity'] * $CreditLine->QtyDispatched)) . "' )"; } else { @@ -787,19 +787,19 @@ '" . $_SESSION['CreditItems']->DebtorNo . "', '" . $_SESSION['CreditItems']->Branch . "', '" . $PeriodNo . "', - '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $OrderLine->StockID . "', - '" . $AssParts['quantity'] * $OrderLine->QtyDispatched . "', + '" . _('Ex Inv') . ': ' . $_SESSION['ProcessingCredit'] . ' ' . _('Assembly') . ': ' . $CreditLine->StockID . "', + '" . $AssParts['quantity'] * $CreditLine->QtyDispatched . "', '" . $AssParts['standard'] . "', 0)"; } - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records for the assembly components of') .' ' . $OrderLine->StockID . ' ' . _('could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records for the assembly components of') .' ' . $CreditLine->StockID . ' ' . _('could not be inserted because'); $DbgMsg = _('The following SQL to insert the assembly components stock movement records was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); if ($Component_MBFlag=="M" OR $Component_MBFlag=="B"){ $SQL = "UPDATE locstock - SET locstock.quantity = locstock.quantity + " . $AssParts['quantity'] * $OrderLine->QtyDispatched . " + SET locstock.quantity = locstock.quantity + " . $AssParts['quantity'] * $CreditLine->QtyDispatched . " WHERE locstock.stockid = '" . $AssParts['component'] . "' AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; @@ -813,8 +813,8 @@ } } /* end of assembly explosion and updates */ /*Update the cart with the recalculated standard cost from the explosion of the assembly's components*/ - $_SESSION['CreditItems']->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; - $OrderLine->StandardCost = $StandardCost; + $_SESSION['CreditItems']->LineItems[$CreditLine->LineNumber]->StandardCost = $StandardCost; + $CreditLine->StandardCost = $StandardCost; } /* Insert stock movements for the stock coming back in - with unit cost */ @@ -836,7 +836,7 @@ standardcost, newqoh, narrative) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -846,11 +846,11 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Ex Inv') .' - ' . $_SESSION['ProcessingCredit'] . "', - '" . $OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior + $OrderLine->QtyDispatched) . "', - '" . $OrderLine->Narrative . "')"; + '" . $CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', + '" . ($QtyOnHandPrior + $CreditLine->QtyDispatched) . "', + '" . $CreditLine->Narrative . "')"; } else { $SQL = "INSERT INTO stockmoves ( @@ -868,7 +868,7 @@ discountpercent, standardcost, narrative) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -878,10 +878,10 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Ex Inv') . " - " . $_SESSION['ProcessingCredit'] . "', - '" . $OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . $OrderLine->Narrative . "' + '" . $CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', + '" . $CreditLine->Narrative . "' )"; } @@ -891,12 +891,12 @@ $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); /*Insert the StockSerialMovements and update the StockSerialItems for controlled items*/ - //echo "<div align=left><pre>"; var_dump($OrderLine); echo "</pre> </div>"; - if ($OrderLine->Controlled ==1){ - foreach($OrderLine->SerialItems as $Item){ + //echo "<div align=left><pre>"; var_dump($CreditLine); echo "</pre> </div>"; + if ($CreditLine->Controlled ==1){ + foreach($CreditLine->SerialItems as $Item){ /*We need to add the StockSerialItem record and The StockSerialMoves as well */ $SQL = "SELECT quantity from stockserialitems - WHERE stockid='" . $OrderLine->StockID . "' + WHERE stockid='" . $CreditLine->StockID . "' AND loccode='" . $_SESSION['CreditItems']->Location . "' AND serialno='" . $Item->BundleRef . "'"; @@ -910,7 +910,7 @@ serialno, quantity) VALUES - ('" . $OrderLine->StockID . "', + ('" . $CreditLine->StockID . "', '" . $_SESSION['CreditItems']->Location . "', '" . $Item->BundleRef . "', '". $Item->BundleQty ."')"; @@ -922,7 +922,7 @@ $SQL = "UPDATE stockserialitems SET quantity= quantity + " . $Item->BundleQty . " - WHERE stockid='" . $OrderLine->StockID . "' + WHERE stockid='" . $CreditLine->StockID . "' AND loccode='" . $_SESSION['CreditItems']->Location . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -937,7 +937,7 @@ serialno, moveqty) VALUES ('" . $StkMoveNo . "', - '" . $OrderLine->StockID . "', + '" . $CreditLine->StockID . "', '" . $Item->BundleRef . "', '" . $Item->BundleQty . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock movement record could not be inserted because'); @@ -968,7 +968,7 @@ standardcost, newqoh, narrative ) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -978,11 +978,11 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Ex Inv') . ' - ' . $_SESSION['ProcessingCredit'] . "', - '" . $OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior +$OrderLine->QtyDispatched) . "', - '" . $OrderLine->Narrative . "')"; + '" . $CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', + '" . ($QtyOnHandPrior +$CreditLine->QtyDispatched) . "', + '" . $CreditLine->Narrative . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement records was used'); @@ -1006,7 +1006,7 @@ newqoh, narrative ) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -1016,12 +1016,12 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Written off ex Inv') . ' - ' . $_SESSION['ProcessingCredit'] . "', - '" . -$OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', + '" . -$CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', 0, '" . $QtyOnHandPrior . "', - '" . $OrderLine->Narrative . "')"; + '" . $CreditLine->Narrative . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement records was used'); @@ -1046,7 +1046,7 @@ newqoh, hidemovt, narrative) - VALUES ('" . $OrderLine->StockID . "', + VALUES ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', '" . $_SESSION['CreditItems']->Location . "', @@ -1056,12 +1056,12 @@ '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . _('Ex Inv') .' - ' . $_SESSION['ProcessingCredit'] . "', - '" . $OrderLine->QtyDispatched . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', + '" . $CreditLine->QtyDispatched . "', + '" . $CreditLine->DiscountPercent . "', + '" . $CreditLine->StandardCost . "', '" . $QtyOnHandPrior . "', 1, - '" . $OrderLine->Narrative . "')"; + '" . $CreditLine->Narrative . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement records could not be inserted because'); @@ -1074,7 +1074,7 @@ $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); /*Insert the taxes that applied to this line */ - foreach ($OrderLine->Taxes as $Tax) { + foreach ($CreditLine->Taxes as $Tax) { $SQL = "INSERT INTO stockmovestaxes (stkmoveno, taxauthid, @@ -1111,7 +1111,7 @@ AND periodno='" . $PeriodNo . "' AND cust = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch = '" . $_SESSION['CreditItems']->Branch . "' - AND salesanalysis.stockid = '" . $OrderLine->StockID . "' + AND salesanalysis.stockid = '" . $CreditLine->StockID . "' AND budgetoractual=1 GROUP BY stkcategory, salesanalysis.area, salesperson"; @@ -1127,32 +1127,32 @@ if ($_POST['CreditType']=='ReverseOverCharge'){ $SQL = "UPDATE salesanalysis - SET amt=amt-" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", - disc=disc-" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . " + SET amt=amt-" . ($CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", + disc=disc-" . ($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . " WHERE salesanalysis.area='" . $myrow[2] . "' AND salesanalysis.salesperson='" . $myrow[3] . "' AND typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' AND periodno = '" . $PeriodNo . "' AND cust = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch = '" . $_SESSION['CreditItems']->Branch . "' - AND stockid = '" . $OrderLine->StockID . "' + AND stockid = '" . $CreditLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[1] . "' AND budgetoractual=1"; } else { $SQL = "UPDATE salesanalysis - SET amt=amt-" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", - cost=cost-" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . ", - qty=qty-" . $OrderLine->QtyDispatched . ", - disc=disc-" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . " + SET amt=amt-" . ($CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", + cost=cost-" . ($CreditLine->StandardCost * $CreditLine->QtyDispatched) . ", + qty=qty-" . $CreditLine->QtyDispatched . ", + disc=disc-" . ($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . " WHERE salesanalysis.area='" . $myrow[2] . "' AND salesanalysis.salesperson='" . $myrow[3] . "' AND typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' AND periodno = '" . $PeriodNo . "' AND cust = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch = '" . $_SESSION['CreditItems']->Branch . "' - AND stockid = '" . $OrderLine->StockID . "' + AND stockid = '" . $CreditLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[1] . "' AND budgetoractual=1"; } @@ -1175,19 +1175,19 @@ stkcategory) SELECT '" . $_SESSION['CreditItems']->DefaultSalesType . "', '" . $PeriodNo . "', - '" . -($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . -($CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', '" . $_SESSION['CreditItems']->DebtorNo . "', '" . $_SESSION['CreditItems']->Branch . "', 0, - '" . -($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . $OrderLine->StockID . "', + '" . -($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . $CreditLine->StockID . "', custbranch.area, 1, custbranch.salesman, stockmaster.categoryid FROM stockmaster, custbranch - WHERE stockmaster.stockid = '" . $OrderLine->StockID . "' + WHERE stockmaster.stockid = '" . $CreditLine->StockID . "' AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "'"; } else { @@ -1207,20 +1207,20 @@ stkcategory) SELECT '" . $_SESSION['CreditItems']->DefaultSalesType . "', '" . $PeriodNo . "', - '" . -($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . -($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "', + '" . -($CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . -($CreditLine->StandardCost * $CreditLine->QtyDispatched) . "', '" . $_SESSION['CreditItems']->DebtorNo . "', '" . $_SESSION['CreditItems']->Branch . "', - '" . -$OrderLine->QtyDispatched . "', - '" . -($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . $OrderLine->StockID . "', + '" . -$CreditLine->QtyDispatched . "', + '" . -($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . $CreditLine->StockID . "', custbranch.area, 1, custbranch.salesman, stockmaster.categoryid FROM stockmaster, custbranch - WHERE stockmaster.stockid = '" . $OrderLine->StockID . "' + WHERE stockmaster.stockid = '" . $CreditLine->StockID . "' AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "' AND custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "'"; @@ -1235,12 +1235,12 @@ /* If GLLink_Stock then insert GLTrans to credit stock and debit cost of sales at standard cost*/ if ($_SESSION['CompanyRecord']['gllink_stock']==1 - AND ($OrderLine->StandardCost !=0 OR (isset($StandardCost) and $StandardCost !=0)) + AND ($CreditLine->StandardCost !=0 OR (isset($StandardCost) and $StandardCost !=0)) AND $_POST['CreditType']!='ReverseOverCharge'){ /*first the cost of sales entry*/ - $COGSAccount = GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['CreditItems']->DefaultSalesType, $db); + $COGSAccount = GetCOGSGLAccount($Area, $CreditLine->StockID, $_SESSION['CreditItems']->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1254,8 +1254,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $COGSAccount . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . -round($OrderLine->StandardCost * $OrderLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "' + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->QtyDispatched . " @ " . $CreditLine->StandardCost . "', + '" . -round($CreditLine->StandardCost * $CreditLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); @@ -1278,10 +1278,10 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_POST['WriteOffGLCode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . round($OrderLine->StandardCost * $OrderLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->QtyDispatched . " @ " . $CreditLine->StandardCost . "', + '" . round($CreditLine->StandardCost * $CreditLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "')"; } else { - $StockGLCode = GetStockGLCode($OrderLine->StockID, $db); + $StockGLCode = GetStockGLCode($CreditLine->StockID, $db); $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1294,8 +1294,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . round($OrderLine->StandardCost * $OrderLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->QtyDispatched . " @ " . $CreditLine->StandardCost . "', + '" . round($CreditLine->StandardCost * $CreditLine->QtyDispatched,$_SESSION['CompanyRecord']['decimalplaces']) . "')"; } $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side or write off of the cost of sales GL posting could not be inserted because'); @@ -1304,10 +1304,10 @@ } /* end of if GL and stock integrated and standard cost !=0 */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $OrderLine->Price !=0){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ //Post sales transaction to GL credit sales - $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['CreditItems']->DefaultSalesType, $db); + $SalesGLAccounts = GetSalesGLAccount($Area, $CreditLine->StockID, $_SESSION['CreditItems']->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1321,15 +1321,15 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', - '" . round(($OrderLine->Price * $OrderLine->QtyDispatched)/$_SESSION['CurrencyRate'],$_SESSION['CompanyRecord']['decimalplaces']) . "' + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->QtyDispatched . " @ " . $CreditLine->Price . "', + '" . round(($CreditLine->Price * $CreditLine->QtyDispatched)/$_SESSION['CurrencyRate'],$_SESSION['CompanyRecord']['decimalplaces']) . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg, $DbgMsg, true); - if ($OrderLine->DiscountPercent !=0){ + if ($CreditLine->DiscountPercent !=0){ $SQL = "INSERT INTO gltrans (type, typeno, @@ -1343,8 +1343,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', - '" . -round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate'],$_SESSION['CompanyRecord']['decimalplaces']) . "' + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . -round(($CreditLine->Price * $CreditLine->QtyDispatched * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate'],$_SESSION['CompanyRecord']['decimalplaces']) . "' )"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2011-07-14 10:27:29 UTC (rev 4630) +++ trunk/PrintCustTrans.php 2011-07-16 02:55:44 UTC (rev 4631) @@ -125,25 +125,27 @@ custbranch.brpostaddr6, salesman.salesmanname, debtortrans.debtorno, - debtortrans.branchcode - FROM debtortrans, - debtorsmaster, - custbranch, - salesorders, - shippers, - salesman, - locations, - paymentterms - WHERE debtortrans.order_ = salesorders.orderno - AND debtortrans.type=10 - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.shipvia=shippers.shipper_id - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtorsmaster.paymentterms=paymentterms.termsindicator - AND debtortrans.debtorno=custbranch.debtorno + debtortrans.branchcode, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode - AND salesorders.fromstkloc=locations.loccode"; + INNER JOIN salesorders + ON debtortrans.order_ = salesorders.orderno + INNER JOIN shippers + ON debtortrans.shipvia=shippers.shipper_id + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=10 + AND debtortrans.transno='" . $FromTransNo . "'"; if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No') { $sql = $sql . " AND debtorsmaster.ediinvoices=0"; @@ -182,19 +184,21 @@ salesman.salesmanname, debtortrans.debtorno, debtortrans.branchcode, - paymentterms.terms - FROM debtortrans, - debtorsmaster, - custbranch, - salesman, - paymentterms + paymentterms.terms, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev WHERE debtortrans.type=11 - AND debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode"; + AND debtortrans.transno='" . $FromTransNo . "'"; if ($_POST['PrintEDI']=='No') { $sql = $sql . " AND debtorsmaster.ediinvoices=0"; @@ -225,7 +229,8 @@ ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, (stockmoves.price * " . $ExchRate . ") AS fxprice, stockmoves.narrative, - stockmaster.units + stockmaster.units, + stockmaster.decimalplaces FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid @@ -241,7 +246,8 @@ ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) AS fxnet, (stockmoves.price * " . $ExchRate . ") AS fxprice, stockmoves.narrative, - stockmaster.units + stockmaster.units, + stockmaster.decimalplaces FROM stockmoves, stockmaster WHERE stockmoves.stockid = stockmaster.stockid @@ -277,9 +283,9 @@ $DisplayDiscount = number_format($myrow2['discountpercent']*100,2) . '%'; $DiscountPrice=$myrow2['fxprice']*(1-$myrow2['discountpercent']); } - $DisplayNet=number_format($myrow2['fxnet'],2); - $DisplayPrice=number_format($myrow2['fxprice'],3); - $DisplayQty=$myrow2['quantity']; + $DisplayNet=number_format($myrow2['fxnet'],$myrow['decimalplaces']); + $DisplayPrice=number_format($myrow2['fxprice'],$myrow['decimalplaces']); + $DisplayQty=number_format($myrow2['quantity'],$myrow2['decimalplaces']); $LeftOvers = $pdf->addTextWrap($Left_Margin+3,$YPos,95,$FontSize,$myrow2['stockid']); $LeftOvers = $pdf->addTextWrap($Left_Margin+100,$YPos,123,$FontSize,$myrow2['description']); @@ -351,17 +357,17 @@ if ($InvOrCredit=='Invoice') { - $DisplaySubTot = number_format($myrow['ovamount'],2); - $DisplayFreight = number_format($myrow['ovfreight'],2); - $DisplayTax = number_format($myrow['ovgst'],2); - $DisplayTotal = number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],2); + $DisplaySubTot = number_format($myrow['ovamount'],$myrow['decimalplaces']); + $DisplayFreight = number_format($myrow['ovfreight'],$myrow['decimalplaces']); + $DisplayTax = number_format($myrow['ovgst'],$myrow['decimalplaces']); + $DisplayTotal = number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['decimalplaces']); } else { - $DisplaySubTot = number_format(-$myrow['ovamount'],2); - $DisplayFreight = number_format(-$myrow['ovfreight'],2); - $DisplayTax = number_format(-$myrow['ovgst'],2); - $DisplayTotal = number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],2); + $DisplaySubTot = number_format(-$myrow['ovamount'],$myrow['decimalplaces']); + $DisplayFreight = number_format(-$myrow['ovfreight'],$myrow['decimalplaces']); + $DisplayTax = number_format(-$myrow['ovgst'],$myrow['decimalplaces']); + $DisplayTotal = number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],$myrow['decimalplaces']); } /* Print out the invoice text entered */ $YPos = $Bottom_Margin+(3*$line_height); @@ -559,93 +565,102 @@ if ($InvOrCredit=='Invoice') { - $sql = "SELECT - debtortrans.trandate, - debtortrans.ovamount, - debtortrans.ovdiscount, - debtortrans.ovfreight, - debtortrans.ovgst, - debtortrans.rate, - debtortrans.invtext, - debtortrans.consignment, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.currcode, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.customerref, - salesorders.orderno, - salesorders.orddate, - shippers.shippername, - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - salesman.salesmanname, - debtortrans.debtorno - FROM debtortrans, - debtorsmaster, - custbranch, - salesorders, - shippers, - salesman - WHERE debtortrans.order_ = salesorders.orderno - AND debtortrans.type=10 - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.shipvia=shippers.shipper_id - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode"; + $sql = "SELECT debtortrans.trandate, + debtortrans.ovamount, + debtortrans.ovdiscount, + debtortrans.ovfreight, + debtortrans.ovgst, + debtortrans.rate, + debtortrans.invtext, + debtortrans.consignment, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.currcode, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.customerref, + salesorders.orderno, + salesorders.orddate, + shippers.shippername, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + salesman.salesmanname, + debtortrans.debtorno, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesorders + ON debtortrans.order_ = salesorders.orderno + INNER JOIN shippers + ON debtortrans.shipvia=shippers.shipper_id + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=10 + AND debtortrans.transno='" . $FromTransNo . "'"; } else { $sql = "SELECT debtortrans.trandate, - debtortrans.ovamount, - debtortrans.ovdiscount, - debtortrans.ovfreight, - debtortrans.ovgst, - debtortrans.rate, - debtortrans.invtext, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.currcode, - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - salesman.salesmanname, - debtortrans.debtorno - FROM debtortrans, - debtorsmaster, - custbranch, - salesman - WHERE debtortrans.type=11 - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode"; + debtortrans.ovamount, + debtortrans.ovdiscount, + debtortrans.ovfreight, + debtortrans.ovgst, + debtortrans.rate, + debtortrans.invtext, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.currcode, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + salesman.salesmanname, + debtortrans.debtorno, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=11 + AND debtortrans.transno='" . $FromTransNo . "'"; } $result=DB_query($sql,$db); @@ -761,19 +776,20 @@ </table>'; $sql ="SELECT stockmoves.stockid, - stockmaster.description, - -stockmoves.qty as quantity, - stockmoves.discountpercent, - ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, - (stockmoves.price * " . $ExchRate . ") AS fxprice, - stockmoves.narrative, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 - AND stockmoves.transno='" . $FromTransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + -stockmoves.qty as quantity, + stockmoves.discountpercent, + ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . "* -stockmoves.qty) AS fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmoves.narrative, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=10 + AND stockmoves.transno='" . $FromTransNo . "' + AND stockmoves.show_on_inv_crds=1"; } else { /* then its a credit note */ @@ -799,20 +815,21 @@ </tr></table>'; $sql ="SELECT stockmoves.stockid, - stockmaster.description, - stockmoves.qty as quantity, - stockmoves.discountpercent, ((1 - stockmoves.discountpercent) * stockmoves.price * ' . $ExchRate . ' * stockmoves.qty) AS fxnet, - (stockmoves.price * ' . $ExchRate . ') AS fxprice, - stockmaster.units - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=11 - AND stockmoves.transno='" . $FromTransNo . "' - AND stockmoves.show_on_inv_crds=1"; + stockmaster.description, + stockmoves.qty as quantity, + stockmoves.discountpercent, ((1 - stockmoves.discountpercent) * stockmoves.price * " . $ExchRate . " * stockmoves.qty) AS fxnet, + (stockmoves.price * " . $ExchRate . ") AS fxprice, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmoves, + stockmaster + WHERE stockmoves.stockid = stockmaster.stockid + AND stockmoves.type=11 + AND stockmoves.transno='" . $FromTransNo . "' + AND stockmoves.show_on_inv_crds=1"; } - echo '<hr>'; + echo '<hr />'; echo '<div class="centre"><font size=2>' . _('All amounts stated in') . ' ' . $myrow['currcode'] . '</font></div>'; $result=DB_query($sql,$db); @@ -850,9 +867,9 @@ echo $RowStarter; - $DisplayPrice = number_format($myrow2['fxprice'],2); - $DisplayQty = number_format($myrow2['quantity'],2); - $DisplayNet = number_format($myrow2['fxnet'],2); + $DisplayPrice = number_format($myrow2['fxprice'],$myrow['decimalplaces']); + $DisplayQty = number_format($myrow2['quantity'],$myrow2['decimalplaces']); + $DisplayNet = number_format($myrow2['fxnet'],$myrow['decimalplaces']); if ($myrow2['discountpercent']==0){ $DisplayDiscount =''; @@ -912,15 +929,17 @@ echo _('Telephone') . ': ' . $_SESSION['CompanyRecord']['telephone'] . '<br />'; echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />'; echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; - echo '</td><td class=number>' . _('Page') . ': ' . $PageNumber . '</td></tr></table>'; - echo '<table class="table1"><tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> - <th>' . _('Quantity') . '</th> - <th>' . _('Unit') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Discount') . '</th> - <th>' . _('Net') . '</th></tr>'; + echo '</td><td class="number">' . _('Page') . ': ' . $PageNumber . '</td></tr></table>'; + echo '<table class="table1"> + <tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Net') . '</th> + </tr>'; $LineCounter = 10; @@ -960,14 +979,16 @@ echo _('Facsimile') . ': ' . $_SESSION['CompanyRecord']['fax'] . '<br />'; echo _('Email') . ': ' . $_SESSION['CompanyRecord']['email'] . '<br />'; echo '</td><td class=number>' . _('Page') . ': ' . $PageNumber . '</td></tr></table>'; - echo '<table class="table1"><tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> - <th>' . _('Quantity') . '</th> - <th>' . _('Unit') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Discount') . '</th> - <th>' . _('Net') . '</th></tr>'; + echo '<table class="table1"> + <tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Net') . '</th> + </tr>'; $LineCounter = 10; } @@ -986,15 +1007,15 @@ if ($InvOrCredit=='Invoice') { - $DisplaySubTot = number_format($myrow['ovamount'],2); - $DisplayFreight = number_format($myrow['ovfreight'],2); - $DisplayTax = number_format($myrow['ovgst'],2); - $DisplayTotal = number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],2); + $DisplaySubTot = number_format($myrow['ovamount'],$myrow['decimalplaces']); + $DisplayFreight = number_format($myrow['ovfreight'],$myrow['decimalplaces']); + $DisplayTax = number_format($myrow['ovgst'],$myrow['decimalplaces']); + $DisplayTotal = number_format($myrow['ovfreight']+$myrow['ovgst']+$myrow['ovamount'],$myrow['decimalplaces']); } else { - $DisplaySubTot = number_format(-$myrow['ovamount'],2); - $DisplayFreight = number_format(-$myrow['ovfreight'],2); - $DisplayTax = number_format(-$myrow['ovgst'],2); - $DisplayTotal = number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],2); + $DisplaySubTot = number_format(-$myrow['ovamount'],$myrow['decimalplaces']); + $DisplayFreight = number_format(-$myrow['ovfreight'],$myrow['decimalplaces']); + $DisplayTax = number_format(-$myrow['ovgst'],$myrow['decimalplaces']); + $DisplayTotal = number_format(-$myrow['ovfreight']-$myrow['ovgst']-$myrow['ovamount'],$myrow['decimalplaces']); } /*Print out the invoice text entered */ Modified: trunk/PrintCustTransPortrait.php =================================================================== --- trunk/PrintCustTransPortrait.php 2011-07-14 10:27:29 UTC (rev 4630) +++ trunk/PrintCustTransPortrait.php 2011-07-16 02:55:44 UTC (rev 4631) @@ -99,123 +99,127 @@ if ($InvOrCredit=='Invoice') { $sql = "SELECT debtortrans.trandate, - debtortrans.ovamount, - debtortrans.ovdiscount, - debtortrans.ovfreight, - debtortrans.ovgst, - debtortrans.rate, - debtortrans.invtext, - debtortrans.consignment, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.currcode, - debtorsmaster.invaddrbranch, - debtorsmaster.taxref, - paymentterms.terms, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.customerref, - salesorders.orderno, - salesorders.orddate, - locations.locationname, - shippers.shippername, - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.brpostaddr1, - custbranch.brpostaddr2, - custbranch.brpostaddr3, - custbranch.brpostaddr4, - custbranch.brpostaddr5, - custbranch.brpostaddr6, - salesman.salesmanname, - debtortrans.debtorno, - debtortrans.branchcode - FROM debtortrans, - debtorsmaster, - custbranch, - salesorders, - shippers, - salesman, - locations, - paymentterms - WHERE debtortrans.order_ = salesorders.orderno - AND debtortrans.type=10 - AND debtortrans.transno='" . $FromTransNo . "' - AND debtortrans.shipvia=shippers.shipper_id - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtorsmaster.paymentterms=paymentterms.termsindicator - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode - AND salesorders.fromstkloc=locations.loccode"; + debtortrans.ovamount, + debtortrans.ovdiscount, + debtortrans.ovfreight, + debtortrans.ovgst, + debtortrans.rate, + debtortrans.invtext, + debtortrans.consignment, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.currcode, + debtorsmaster.invaddrbranch, + debtorsmaster.taxref, + paymentterms.terms, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.customerref, + salesorders.orderno, + salesorders.orddate, + locations.locationname, + shippers.shippername, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.brpostaddr1, + custbranch.brpostaddr2, + custbranch.brpostaddr3, + custbranch.brpostaddr4, + custbranch.brpostaddr5, + custbranch.brpostaddr6, + salesman.salesmanname, + debtortrans.debtorno, + debtortrans.branchcode, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesorders + ON debtortrans.order_ = salesorders.orderno + INNER JOIN shippers + ON debtortrans.shipvia=shippers.shipper_id + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=10 + AND debtortrans.transno='" . $FromTransNo . "'"; - if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No'){ - $sql = $sql . ' AND debtorsmaster.ediinvoices=0'; + if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No') { + $sql = $sql . " AND debtorsmaster.ediinvoices=0"; } } else { - $sql = "SELECT debtortrans.trandate, - debtortrans.ovamount, - debtortrans.ovdiscount, - debtortrans.ovfreight, - debtortrans.ovgst, - debtortrans.rate, - debtortrans.invtext, - debtorsmaster.invaddrbranch, - debtorsmaster.name, - debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, - debtorsmaster.address5, - debtorsmaster.address6, - debtorsmaster.currcode, - debtorsmaster.taxref, - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.brpostaddr1, - custbranch.brpostaddr2, - custbranch.brpostaddr3, - custbranch.brpostaddr4, - custbranch.brpostaddr5, - custbranch.brpostaddr6, - salesman.salesmanname, - debtortrans.debtorno, - debtortrans.branchcode, - paymentterms.terms - FROM debtortrans, - debtorsmaster, - custbranch, - salesman, - paymentterms - WHERE debtortrans.type=11 - AND debtorsmaster.paymentterms = paymentterms.termsindicator - AND debtortrans.transno='" . $FromTransNo ."' - AND debtortrans.debtorno=debtorsmaster.debtorno - AND debtortrans.debtorno=custbranch.debtorno - AND debtortrans.branchcode=custbranch.branchcode - AND custbranch.salesman=salesman.salesmancode"; + debtortrans.ovamount, + debtortrans.ovdiscount, + debtortrans.ovfreight, + debtortrans.ovgst, + debtortrans.rate, + debtortrans.invtext, + debtorsmaster.invaddrbranch, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + debtorsmaster.currcode, + debtorsmaster.taxref, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.brpostaddr1, + custbranch.brpostaddr2, + custbranch.brpostaddr3, + custbranch.brpostaddr4, + custbranch.brpostaddr5, + custbranch.brpostaddr6, + salesman.salesmanname, + debtortrans.debtorno, + debtortrans.branchcode, + paymentterms.terms, + currencies.decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN custbranch + ON debtortrans.debtorno=custbranch.debtorno + AND debtortrans.branchcode=custbranch.branchcode + INNER JOIN salesman + ON custbranch.salesman=salesman.salesmancode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.type=11 + AND debtortrans.transno='" . $FromTransNo . "'"; + if (isset($_POST['PrintEDI']) and $_POST['PrintEDI']=='No'){ $sql = $sql . ' AND debtorsmaster.ediinvoices=0'; } @@ -250,11 +254,11 @@ stockmoves.narrative, stockmaster.controlled, stockmaster.units, - stockmoves.stkmoveno - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=10 + stockmoves.stkmoveno, + stockmaster.decimalplaces + FROM stockmoves INNER JOIN stockmaster + ON stockmoves.stockid = stockmaster.stockid + WHERE stockmoves.type=10 AND stockmoves.transno='" . $FromTransNo . "' AND stockmoves.show_on_inv_crds=1"; } else { @@ -268,11 +272,11 @@ stockmoves.narrative, stockmaster.controlled, stockmaster.units, - stockmoves.stkmoveno - FROM stockmoves, - stockmaster - WHERE stockmoves.stockid = stockmaster.stockid - AND stockmoves.type=11 + stockmoves.stkmoveno, + stockmaster.decimalplaces + FROM stockmoves INNER JOIN stockmaster + ON stockmoves.stockid = stockmaster.stockid + WHERE stockmoves.type=11 AND stockmoves.transno='" . $FromTransNo . "' AND stockmoves.show_on_inv_crds=1"; } // end else @@ -305,9 +309,9 @@ $DisplayDiscount = number_format($myrow2['discountpercent'] * 100, 2) . '%'; $DiscountPrice = $myrow2['fxprice'] * (1 - $myrow2['discountpercent']); } - $DisplayNet = $myrow2['fxnet']; - $DisplayPrice = $myrow2['fxprice']; - $DisplayQty = $myrow2['quantity']; + $DisplayNet = number_format($myrow2['fxnet'],$myrow['decimalplaces']); + $DisplayPrice = number_format($myrow2['fxprice'],$myrow['decimalplaces']); + $DisplayQty = number_format($myrow2['quantity'],$myrow2['decimalplaces']); $LeftOvers = $pdf->addTextWrap($Left_Margin+5,$YPos,71,$FontSize,$myrow2['stockid']); $LeftOvers = $pdf->addTextWrap($Left_Margin+80,$YPos,186,$FontSize,$myrow2['description']); @@ -318,11 +322,11 @@ $lines++; } - $... [truncated message content] |
From: <dai...@us...> - 2011-07-16 02:59:22
|
Revision: 4632 http://web-erp.svn.sourceforge.net/web-erp/?rev=4632&view=rev Author: daintree Date: 2011-07-16 02:59:14 +0000 (Sat, 16 Jul 2011) Log Message: ----------- type=text quoting Modified Paths: -------------- trunk/AuditTrail.php trunk/Credit_Invoice.php trunk/DeliveryDetails.php trunk/EDIMessageFormat.php trunk/FixedAssetLocations.php trunk/GoodsReceived.php trunk/OutstandingGRNs.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFRemittanceAdvice.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/PDFSuppTransListing.php trunk/PO_Header.php trunk/PO_SelectPurchOrder.php trunk/PcAssignCashToTab.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PurchData.php trunk/ReverseGRN.php trunk/SMTPServer.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SelectWorkOrder.php trunk/Shipt_Select.php trunk/StockAdjustments.php trunk/StockCostUpdate.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockReorderLevel.php trunk/StockTransfers.php trunk/StockUsage.php trunk/SuppPaymentRun.php trunk/SupplierContacts.php trunk/SupplierTenders.php trunk/UserSettings.php trunk/WhereUsedInquiry.php trunk/WorkOrderIssue.php trunk/Z_ReverseSuppPaymentRun.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/OutputSerialItems.php Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/AuditTrail.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -33,9 +33,9 @@ echo '<table class="selection">'; echo '<tr><td>'. _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="1" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value=' .$_POST['FromDate'].'></td></tr>'; + <td><input tabindex="1" type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value=' .$_POST['FromDate'].'></td></tr>'; echo '<tr><td>'. _('To Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="2" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" value=' . $_POST['ToDate'] . '></td></tr>'; + <td><input tabindex="2" type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" value=' . $_POST['ToDate'] . '></td></tr>'; // Show user selections echo '<tr><td>'. _('User ID'). '</td> Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/Credit_Invoice.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -326,8 +326,8 @@ $DisplayLineTotal = number_format($LineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); $j++; - echo '<td><input tabindex=' . $j . ' type=text class=number name="Price_' . $LnItm->LineNumber . '" maxlength=12 size=6 value=' . $LnItm->Price . '></td> - <td><input tabindex=' . $j . ' type=text class="number" name="Discount_' . $LnItm->LineNumber . '" maxlength=3 size=3 value=' . ($LnItm->DiscountPercent * 100) . '></td> + echo '<td><input tabindex=' . $j . ' type="text" class=number name="Price_' . $LnItm->LineNumber . '" maxlength=12 size=6 value=' . $LnItm->Price . '></td> + <td><input tabindex=' . $j . ' type="text" class="number" name="Discount_' . $LnItm->LineNumber . '" maxlength=3 size=3 value=' . ($LnItm->DiscountPercent * 100) . '></td> <td class=number>' . $DisplayLineTotal . '</td>'; /*Need to list the taxes applicable to this line */ @@ -398,7 +398,7 @@ <td class=number>' . number_format($_SESSION['Old_FreightCost'],$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> <td></td> <td colspan=2 class=number>' . _('Credit Freight Cost') . '</td> - <td><input tabindex='.$j.' type=text class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '"></td>'; + <td><input tabindex='.$j.' type="text" class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '"></td>'; echo '<td>'; echo '</td><td>'; @@ -421,7 +421,7 @@ } if (!isset($_POST['ProcessCredit'])) { - echo '<input type=text class=number name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 value=' . $FreightTaxLine->TaxRate * 100 . '>'; + echo '<input type="text" class=number name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 value=' . $FreightTaxLine->TaxRate * 100 . '>'; } if ($FreightTaxLine->TaxOnTax ==1){ $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/DeliveryDetails.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -941,7 +941,7 @@ echo '<br /><table class=selection><tr> <td>'. _('Deliver To') .':</td> - <td><input type=text size=42 maxlength=40 name="DeliverTo" value="' . $_SESSION['Items'.$identifier]->DeliverTo . '"></td> + <td><input type="text" size=42 maxlength=40 name="DeliverTo" value="' . $_SESSION['Items'.$identifier]->DeliverTo . '"></td> </tr>'; echo '<tr> @@ -1011,28 +1011,28 @@ echo '<tr> <td>'. _('Delivery Address 4') . ':</td> - <td><input type=text size=42 maxlength=40 name="BrAdd4" value="' . $_SESSION['Items'.$identifier]->DelAdd4 . '"></td> + <td><input type="text" size=42 maxlength=40 name="BrAdd4" value="' . $_SESSION['Items'.$identifier]->DelAdd4 . '"></td> </tr>'; echo '<tr> <td>'. _('Delivery Address 5') . ':</td> - <td><input type=text size=42 maxlength=40 name="BrAdd5" value="' . $_SESSION['Items'.$identifier]->DelAdd5 . '"></td> + <td><input type="text" size=42 maxlength=40 name="BrAdd5" value="' . $_SESSION['Items'.$identifier]->DelAdd5 . '"></td> </tr>'; echo '<tr> <td>'. _('Delivery Address 6') . ':</td> - <td><input type=text size=42 maxlength=40 name="BrAdd6" value="' . $_SESSION['Items'.$identifier]->DelAdd6 . '"></td> + <td><input type="text" size=42 maxlength=40 name="BrAdd6" value="' . $_SESSION['Items'.$identifier]->DelAdd6 . '"></td> </tr>'; echo '<tr> <td>'. _('Contact Phone Number') .':</td> - <td><input type=text size=25 maxlength=25 name="PhoneNo" value="' . $_SESSION['Items'.$identifier]->PhoneNo . '"></td> + <td><input type="text" size=25 maxlength=25 name="PhoneNo" value="' . $_SESSION['Items'.$identifier]->PhoneNo . '"></td> </tr>'; -echo '<tr><td>' . _('Contact Email') . ':</td><td><input type=text size=40 maxlength=38 name="Email" value="' . $_SESSION['Items'.$identifier]->Email . '"></td></tr>'; +echo '<tr><td>' . _('Contact Email') . ':</td><td><input type="text" size=40 maxlength=38 name="Email" value="' . $_SESSION['Items'.$identifier]->Email . '"></td></tr>'; echo '<tr><td>'. _('Customer Reference') .':</td> - <td><input type=text size=25 maxlength=25 name="CustRef" value="' . $_SESSION['Items'.$identifier]->CustRef . '"></td> + <td><input type="text" size=25 maxlength=25 name="CustRef" value="' . $_SESSION['Items'.$identifier]->CustRef . '"></td> </tr>'; echo '<tr> @@ -1068,7 +1068,7 @@ } echo '<tr><td>'. _('Charge Freight Cost inc tax') .':</td>'; -echo '<td><input type=text class="number" size=10 maxlength=12 name="FreightCost" value="' . $_SESSION['Items'.$identifier]->FreightCost . '"></td>'; +echo '<td><input type="text" class="number" size=10 maxlength=12 name="FreightCost" value="' . $_SESSION['Items'.$identifier]->FreightCost . '"></td>'; if ($_SESSION['DoFreightCalc']==true){ echo '<td><input type=submit name="Update" value="' . _('Recalc Freight Cost') . '"></td></tr>'; Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/EDIMessageFormat.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -234,7 +234,7 @@ echo '</td></tr>'; echo '<tr><td>Sequence Number:</td>'; -echo '<td><input tabindex=3 type=text name=SequenceNo size=3 maxlength=3 value='.$_POST['SequenceNo'].'>'; +echo '<td><input tabindex=3 type="text" name=SequenceNo size=3 maxlength=3 value='.$_POST['SequenceNo'].'>'; echo '</td></tr>'; echo '<tr><td>' . _('Line Text') . ':' .'</td>'; echo '<td>'; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/FixedAssetLocations.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -110,11 +110,11 @@ echo '<input type=hidden name=LocationID value="'.$LocationID.'">'; echo '<td>'.$LocationID.'</td>'; } else { - echo '<td><input type=text name=LocationID size=6 value="'.$LocationID.'"></td></tr>'; + echo '<td><input type="text" name=LocationID size=6 value="'.$LocationID.'"></td></tr>'; } echo '<tr><th style="text-align:left">'._('Location Description').'</th>'; -echo '<td><input type=text name=LocationDescription size=20 value="'.$LocationDescription.'"></td></tr>'; +echo '<td><input type="text" name=LocationDescription size=20 value="'.$LocationDescription.'"></td></tr>'; echo '<tr><th style="text-align:left">'._('Parent Location').'</th>'; echo '<td><select name=ParentLocationID>'; Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/GoodsReceived.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -75,7 +75,7 @@ echo '<table class="selection"> <tr> <td>'. _('Date Goods/Service Received'). ':</td> - <td><input type=text class=date alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength=10 size=10 onChange="return isDate(this, this.value, '."'". + <td><input type="text" class=date alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength=10 size=10 onChange="return isDate(this, this.value, '."'". $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_POST['DefaultReceivedDate'] . '"></td> </tr> </table> @@ -161,7 +161,7 @@ echo '<input type=hidden name="RecvQty_' . $LnItm->LineNo . '" value="' . $LnItm->ReceiveQty . '"><a href="GoodsReceivedControlled.php?identifier=' . $identifier . '&LineNo=' . $LnItm->LineNo . '">' . number_format($LnItm->ReceiveQty,$LnItm->DecimalPlaces) . '</a></td>'; } else { - echo '<input type=text class=number name="RecvQty_' . $LnItm->LineNo . '" maxlength=10 size=10 value="' . $LnItm->ReceiveQty . '"></td>'; + echo '<input type="text" class=number name="RecvQty_' . $LnItm->LineNo . '" maxlength=10 size=10 value="' . $LnItm->ReceiveQty . '"></td>'; } if ($_SESSION['ShowValueOnGRN']==1) { Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/OutstandingGRNs.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -155,9 +155,9 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('From Supplier Code') . ':</td> - <td><input type=text name="FromCriteria" value="0"></td></tr>'; + <td><input type="text" name="FromCriteria" value="0"></td></tr>'; echo '<tr><td>' . _('To Supplier Code'). ':</td> - <td><input type=text name="ToCriteria" value="zzzzzzz"></td></tr>'; + <td><input type="text" name="ToCriteria" value="zzzzzzz"></td></tr>'; echo '</table><br /><div class="centre"><input type=Submit Name="PrintPDF" value="' . _('Print PDF') . '"></div>'; Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFChequeListing.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -39,7 +39,7 @@ <td><input type="text" name="FromDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; echo '<tr><td>' . _('Enter the date to which cheques are to be listed') . ':</td> - <td><input type=text name="ToDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + <td><input type="text" name="ToDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; echo '<tr><td>' . _('Bank Account') . '</td><td>'; Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFCustTransListing.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -29,7 +29,7 @@ echo '<table class=selection> <tr> <td>' . _('Enter the date for which the transactions are to be listed') . ':</td> - <td><input type=text name="Date" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + <td><input type="text" name="Date" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; echo '<tr><td>' . _('Transaction type') . '</td><td>'; Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFDIFOT.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -29,14 +29,14 @@ echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ":</td><td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; + echo '<tr><td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ":</td><td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; if (!isset($_POST['DaysAcceptable'])){ $_POST['DaysAcceptable'] = 1; } - echo '<tr><td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ":</td><td><input type=text class=number name='DaysAcceptable' maxlength=2 size=2 VALUE=" . $_POST['DaysAcceptable'] . "></td></tr>"; + echo '<tr><td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ":</td><td><input type="text" class=number name='DaysAcceptable' maxlength=2 size=2 VALUE=" . $_POST['DaysAcceptable'] . "></td></tr>"; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFDeliveryDifferences.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -29,7 +29,7 @@ echo '<table class=selection> <tr> <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> - <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> </tr>'; echo '<tr> <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFLowGP.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -130,15 +130,15 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size=10 maxlength="10" value="' . $_POST['FromDate'] . '"></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size=10 maxlength="10" value="' . $_POST['FromDate'] . '"></td> </tr>'; echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '"></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '"></td> </tr>'; echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ':</td> - <td><input type=text class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> + <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> </tr>'; echo '</table> Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFOrderStatus.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -34,7 +34,7 @@ echo '<table class="selection"> <tr> <td>' . _('Enter the date from which orders are to be listed') . ':</td> - <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td> </tr>'; echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td><td>'; echo '<input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>'; Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFOrdersInvoiced.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -37,7 +37,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ':</td><td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td></tr>'; echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td> - <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + <td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFPeriodStockTransListing.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -33,7 +33,7 @@ </tr>'; echo '<tr> <td>' . _('Enter the date to which the transactions are to be listed') . ':</td> - <td><input type=text name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + <td><input type="text" name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; echo '<tr><td>' . _('Transaction type') . '</td><td>'; Modified: trunk/PDFPickingList.php =================================================================== --- trunk/PDFPickingList.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFPickingList.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -30,7 +30,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr>'; echo '<td>'._('Create picking lists for all deliveries to be made on').' : '.'</td>'; - echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength=10 size=11 value='.date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)).'></td></tr>'; + echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength=10 size=11 value='.date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)).'></td></tr>'; echo '<tr><td>'._('From Warehouse').' : '.'</td> <td><select name="loccode">'; while ($myrow=DB_fetch_array($result)) { Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFRemittanceAdvice.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -136,9 +136,9 @@ $DefaultToCriteria = $_POST['ToCriteria']; } echo '<tr><td>' . _('From Supplier Code') . ':</font></td> - <td><input Type=text maxlength=6 size=7 name=FromCriteria value="' . $DefaultFromCriteria . '"></td></tr>'; + <td><input type="text" maxlength=6 size=7 name=FromCriteria value="' . $DefaultFromCriteria . '"></td></tr>'; echo '<tr><td>' . _('To Supplier Code') . ':</td> - <td><input Type=text maxlength=6 size=7 name=ToCriteria value="' . $DefaultToCriteria . '"></td></tr>'; + <td><input type="text" maxlength=6 size=7 name=ToCriteria value="' . $DefaultToCriteria . '"></td></tr>'; if (!isset($_POST['PaymentDate'])){ $DefaultDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')+1,0 ,Date('y'))); @@ -147,7 +147,7 @@ } echo '<tr><td>' . _('Date Of Payment') . ':</td> - <td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="PaymentDate" maxlength=11 size=12 VALUE=' . $DefaultDate . '></td></tr>'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="PaymentDate" maxlength=11 size=12 VALUE=' . $DefaultDate . '></td></tr>'; echo '</table><div class="centre"><input type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '"></div>'; Modified: trunk/PDFStockLocTransfer.php =================================================================== --- trunk/PDFStockLocTransfer.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFStockLocTransfer.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -23,7 +23,7 @@ echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table><tr><td>'._('Transfer docket to reprint').'</td>'; - echo '<td><input type=text class=number size=10 name="TransferNo"></td></tr></table>'; + echo '<td><input type="text" class=number size=10 name="TransferNo"></td></tr></table>'; echo '<div class="centre"><input type=submit Name="Print" Value="' . _('Print') .'">'; include ('includes/footer.inc'); exit; Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFStockTransfer.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -24,7 +24,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr>'; echo '<td>'._('Print Stock Transfer Note').' : '.'</td>'; - echo '<td><input type=text class="number" name="TransferNo" maxlength=10 size=11 /></td></tr>'; + echo '<td><input type="text" class="number" name="TransferNo" maxlength=10 size=11 /></td></tr>'; echo '</table>'; echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Print Transfer Note') . '"></div></form>'; include('includes/footer.inc'); Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFSuppTransListing.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -29,7 +29,7 @@ echo '<table class=selection> <tr> <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> - <td><input type=text name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> + <td><input type="text" name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> </tr>"; echo '<tr><td>' . _('Transaction type') . '</td><td>'; Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PO_Header.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -816,7 +816,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Status Comment') . ':</td> - <td><input type=text name="StatusComments" size=50></td></tr> + <td><input type="text" name="StatusComments" size=50></td></tr> <tr><td colspan=2><b>' . $_SESSION['PO'.$identifier]->StatusComments .'</b></td></tr>'; echo '<input type="hidden" name="StatusCommentsComplete" value="' . htmlentities($_SESSION['PO'.$identifier]->StatusComments, ENT_QUOTES,'UTF-8') .'" />'; @@ -1063,7 +1063,7 @@ if ($_SESSION['PO'.$identifier]->CurrCode != $_SESSION['CompanyRecord']['currencydefault']) { echo '<tr><td>'. _('Exchange Rate').':'.'</td> - <td><input type=text name="ExRate" value='.$_POST['ExRate'].' class="number" size=11></td> + <td><input type="text" name="ExRate" value='.$_POST['ExRate'].' class="number" size=11></td> </tr>'; } else { echo '<input type=hidden name="ExRate" value="1">'; Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PO_SelectPurchOrder.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -104,7 +104,7 @@ if (isset($SelectedStockItem)) { echo _('For the part') . ':<b>' . $SelectedStockItem . '</b> ' . _('and') . ' <input type=hidden name="SelectedStockItem" value="' . $SelectedStockItem . '">'; } - echo _('Order Number') . ': <input type=text name="OrderNumber" maxlength=8 size=9> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; + echo _('Order Number') . ': <input type="text" name="OrderNumber" maxlength=8 size=9> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql, $db); while ($myrow = DB_fetch_array($resultStkLocs)) { Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PcAssignCashToTab.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -329,7 +329,7 @@ echo '<tr><td>' . _('Cash Assignation Date') . ':</td>'; - echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size=10 maxlength=10 value=' . $_POST['Date'] . '></td></tr>'; + echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size=10 maxlength=10 value=' . $_POST['Date'] . '></td></tr>'; if (!isset($_POST['Amount'])) { Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/Prices.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -211,7 +211,7 @@ echo '<table class=selection>'; echo '<tr><th colspan=7><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo _('Pricing for part') . ':<input type=text name="Item" maxsizee=22 value="' . $Item . '" maxlength=20><input type=submit name="NewPart" value="' . _('Review Prices') . '">'; + echo _('Pricing for part') . ':<input type="text" name="Item" maxsizee=22 value="' . $Item . '" maxlength=20><input type=submit name="NewPart" value="' . _('Review Prices') . '">'; echo '</th></tr></form>'; echo '<tr><th>' . _('Currency') . '</th> Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PricesBasedOnMarkUp.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -148,20 +148,20 @@ } echo '<tr><td>' . _('Rounding Factor') . ':</td> - <td><input type=text class=number name="RoundingFactor" size="6" maxlength="6" value=' . $_POST['RoundingFactor'] . '></td></tr>'; + <td><input type="text" class=number name="RoundingFactor" size="6" maxlength="6" value=' . $_POST['RoundingFactor'] . '></td></tr>'; echo '<tr><td>' . _('New Price To Be Effective From') . ':</td> - <td><input type=text class=date alt="' . $_SESSION['DefaultDateFormat'] . '" name="PriceStartDate" size="10" maxlength="10" value="' . $_POST['PriceStartDate'] . '"></td></tr>'; + <td><input type="text" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" name="PriceStartDate" size="10" maxlength="10" value="' . $_POST['PriceStartDate'] . '"></td></tr>'; echo '<tr><td>' . _('New Price To Be Effective To (Blank = No End Date)') . ':</td> - <td><input type=text class=date alt="' . $_SESSION['DefaultDateFormat'] . '" name="PriceEndDate" size="10" maxlength="10" value="' . $_POST['PriceEndDate'] . '"></td></tr>'; + <td><input type="text" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" name="PriceEndDate" size="10" maxlength="10" value="' . $_POST['PriceEndDate'] . '"></td></tr>'; if (!isset($_POST['IncreasePercent'])){ $_POST['IncreasePercent']=0; } echo '<tr><td>' . _('Percentage Increase (positive) or decrease (negative)') . '</td> - <td><input type=text name="IncreasePercent" class=number size=4 maxlength=4 VALUE="' . $_POST['IncreasePercent'] . '"></td></tr></table>'; + <td><input type="text" name="IncreasePercent" class=number size=4 maxlength=4 VALUE="' . $_POST['IncreasePercent'] . '"></td></tr></table>'; echo '<p><div class="centre"><input type=submit name="UpdatePrices" VALUE="' . _('Update Prices') . '\' onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');"></div>'; Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PurchData.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -471,18 +471,18 @@ $_POST['ConversionFactor'] = 1; } echo '<tr><td>' . _('Conversion Factor (to our UOM)') . ':</td> - <td><input type=text class=number name="ConversionFactor" maxlength=12 size=12 value=' . $_POST['ConversionFactor'] . '></td></tr>'; + <td><input type="text" class=number name="ConversionFactor" maxlength=12 size=12 value=' . $_POST['ConversionFactor'] . '></td></tr>'; echo '<tr><td>' . _('Supplier Stock Code') . ':</td> - <td><input type=text name="SupplierCode" maxlength=15 size=15 value="' . $_POST['SupplierCode'] . '"></td></tr>'; + <td><input type="text" name="SupplierCode" maxlength=15 size=15 value="' . $_POST['SupplierCode'] . '"></td></tr>'; echo '<tr><td>' . _('MinOrderQty') . ':</td> - <td><input type=text class=number name="MinOrderQty" maxlength=15 size=15 value="' . $_POST['MinOrderQty'] . '"></td></tr>'; + <td><input type="text" class=number name="MinOrderQty" maxlength=15 size=15 value="' . $_POST['MinOrderQty'] . '"></td></tr>'; echo '<tr><td>' . _('Supplier Stock Description') . ':</td> - <td><input type=text name="SupplierDescription" maxlength=50 size=51 value="' . $_POST['SupplierDescription'] . '"></td></tr>'; + <td><input type="text" name="SupplierDescription" maxlength=50 size=51 value="' . $_POST['SupplierDescription'] . '"></td></tr>'; if (!isset($_POST['LeadTime']) OR $_POST['LeadTime'] == "") { $_POST['LeadTime'] = 1; } echo '<tr><td>' . _('Lead Time') . ' (' . _('in days from date of order') . '):</td> - <td><input type=text class=number name="LeadTime" maxlength=4 size=5 value=' . $_POST['LeadTime'] . '></td></tr>'; + <td><input type="text" class=number name="LeadTime" maxlength=4 size=5 value=' . $_POST['LeadTime'] . '></td></tr>'; echo '<tr><td>' . _('Preferred Supplier') . ':</td> <td><select name="Preferred">'; if ($_POST['Preferred'] == 1) { Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/ReverseGRN.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -344,7 +344,7 @@ echo '<table class=selection><tr>'; echo '<input type=hidden name="SupplierID" VALUE="' . $_POST['SupplierID'] . '">'; echo '<input type=hidden name="SuppName" VALUE="' . $_POST['SuppName'] . '">'; - echo '<td>'._('Show all goods received after') . ': </td><td><input type=text class=date alt="'. + echo '<td>'._('Show all goods received after') . ': </td><td><input type="text" class=date alt="'. $_SESSION['DefaultDateFormat'].'" name="RecdAfterDate" Value="' . $_POST['RecdAfterDate'] . '" MAXLENGTH =10 size=10></td></tr>';; echo '</table>'; Modified: trunk/SMTPServer.php =================================================================== --- trunk/SMTPServer.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SMTPServer.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -40,11 +40,11 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection>'; echo '<tr><td>'._('Server Host Name').'</td> - <td><input type=text name=host value='.$myrow['host'].'></td></tr>'; + <td><input type="text" name=host value='.$myrow['host'].'></td></tr>'; echo '<tr><td>'._('SMTP port').'</td> - <td><input type=text name=port size=4 class=number value='.$myrow['port'].'></td></tr>'; + <td><input type="text" name=port size=4 class=number value='.$myrow['port'].'></td></tr>'; echo '<tr><td>'._('Helo Command').'</td> - <td><input type=text name=heloaddress value='.$myrow['heloaddress'].'></td></tr>'; + <td><input type="text" name=heloaddress value='.$myrow['heloaddress'].'></td></tr>'; echo '<tr><td>'._('Authorisation Required').'</td><td>'; echo '<select name=auth>'; if ($myrow['auth']==1) { @@ -56,11 +56,11 @@ } echo '</select></td></tr>'; echo '<tr><td>'._('User Name').'</td> - <td><input type=text name=username value='.$myrow['username'].'></td></tr>'; + <td><input type="text" name=username value='.$myrow['username'].'></td></tr>'; echo '<tr><td>'._('Password').'</td> <td><input type=password name=password value='.$myrow['password'].'></td></tr>'; echo '<tr><td>'._('Timeout (seconds)').'</td> - <td><input type=text size=5 name=timeout class=number value='.$myrow['timeout'].'></td></tr>'; + <td><input type="text" size=5 name=timeout class=number value='.$myrow['timeout'].'></td></tr>'; echo '<tr><td colspan=2><div class=centre><input type="submit" name="submit" value="' . _('Update') . '"></div></td></tr>'; echo '</table></form>'; Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SelectCreditItems.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -686,16 +686,16 @@ <td>' . $LineItem->ItemDescription . '</td>'; if ($LineItem->Controlled==0){ - echo '<td><input type=TEXT class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 VALUE=' . $LineItem->Quantity . '></td>'; + echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 VALUE=' . $LineItem->Quantity . '></td>'; } else { echo '<td class=number><a href="' . $rootpath . '/CreditItemsControlled.php?' . SID . '&LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> <input type=hidden name="Quantity_' . $LineItem->LineNumber . '" value=' . $LineItem->Quantity . '></td>'; } echo '<td>' . $LineItem->Units . '</td> - <td><input type=TEXT class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 VALUE=' . $LineItem->Price . '></td> + <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 VALUE=' . $LineItem->Price . '></td> <td><input type="CheckBox" name="Gross" VALUE=False></td> - <td><input type=TEXT class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 VALUE=' . ($LineItem->DiscountPercent * 100) . '>%</td> + <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 VALUE=' . ($LineItem->DiscountPercent * 100) . '>%</td> <td class=number>' . $DisplayLineTotal . '</td>'; @@ -722,7 +722,7 @@ if ($i>0){ echo '<br />'; } - echo '<input type=text class="number" name="' . $LineItem->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength=4 size=4 value="' . $Tax->TaxRate*100 . '">'; + echo '<input type="text" class="number" name="' . $LineItem->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength=4 size=4 value="' . $Tax->TaxRate*100 . '">'; $i++; if ($Tax->TaxOnTax ==1){ $TaxTotals[$Tax->TaxAuthID] += ($Tax->TaxRate * ($LineTotal + $TaxLineTotal)); @@ -763,7 +763,7 @@ echo '<td colspan=2 class=number>'. _('Credit Freight').'</td> - <td><input type=TEXT class="number" size=6 maxlength=6 name=ChargeFreightCost VALUE=' . $_SESSION['CreditItems']->FreightCost . '></td>'; + <td><input type="text" class="number" size=6 maxlength=6 name=ChargeFreightCost VALUE=' . $_SESSION['CreditItems']->FreightCost . '></td>'; $FreightTaxTotal =0; //initialise tax total @@ -786,7 +786,7 @@ echo '<br />'; } - echo '<input type=TEXT class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 VALUE=' . $FreightTaxLine->TaxRate * 100 . '>'; + echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 VALUE=' . $FreightTaxLine->TaxRate * 100 . '>'; if ($FreightTaxLine->TaxOnTax ==1){ $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SelectOrderItems.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -1395,7 +1395,7 @@ echo $RowStarter; if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){ //show the input field only if required - echo '<td><input tabindex=1 type=text name="POLine_' . $OrderLine->LineNumber . '" size=20 maxlength=20 value=' . $OrderLine->POLine . '></td>'; + echo '<td><input tabindex=1 type="text" name="POLine_' . $OrderLine->LineNumber . '" size=20 maxlength=20 value=' . $OrderLine->POLine . '></td>'; } else { echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="">'; } @@ -1413,9 +1413,9 @@ if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ /*OK to display with discount if it is an internal user with appropriate permissions */ - echo '<td><input class="number" type=text name="Price_' . $OrderLine->LineNumber . '" size=16 maxlength=16 value=' . $OrderLine->Price . '></td> - <td><input class="number" type=text name="Discount_' . $OrderLine->LineNumber . '" size=5 maxlength=4 value=' . ($OrderLine->DiscountPercent * 100) . '></td> - <td><input class="number" type=text name="GPPercent_' . $OrderLine->LineNumber . '" size=3 maxlength=40 value=' . $OrderLine->GPPercent . '></td>'; + echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size=16 maxlength=16 value=' . $OrderLine->Price . '></td> + <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size=5 maxlength=4 value=' . ($OrderLine->DiscountPercent * 100) . '></td> + <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size=3 maxlength=40 value=' . $OrderLine->GPPercent . '></td>'; } else { echo '<td class=number>' . $OrderLine->Price . '</td><td></td>'; echo '<input type=hidden name="Price_' . $OrderLine->LineNumber . '" value=' . $OrderLine->Price . '>'; @@ -1432,7 +1432,7 @@ $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->ItemDue= $LineDueDate; } - echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size=10 maxlength=10 value=' . $LineDueDate . '></td>'; + echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size=10 maxlength=10 value=' . $LineDueDate . '></td>'; echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?identifier=' . $identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td></tr>'; Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SelectWorkOrder.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -106,7 +106,7 @@ if (isset($_REQUEST['SelectedStockItem'])) { echo _('For the item') . ': ' . $_REQUEST['SelectedStockItem'] . ' ' . _('and') . " <input type=hidden name='SelectedStockItem' value='" . $_REQUEST['SelectedStockItem'] . "'>"; } - echo _('Work Order number') . ": <input type=text name='WO' MAXLENGTH =8 size=9>  " . _('Processing at') . ":<select name='StockLocation'> "; + echo _('Work Order number') . ": <input type="text" name='WO' MAXLENGTH =8 size=9>  " . _('Processing at') . ":<select name='StockLocation'> "; $sql = 'SELECT loccode, locationname FROM locations'; Modified: trunk/Shipt_Select.php =================================================================== --- trunk/Shipt_Select.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/Shipt_Select.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -103,7 +103,7 @@ if (!isset($ShiptRef) or $ShiptRef==""){ echo '<table class=selection><tr><td>'; - echo _('Shipment Number'). ': <input type=text name="ShiptRef" MAXLENGTH =10 size=10> '. + echo _('Shipment Number'). ': <input type="text" name="ShiptRef" MAXLENGTH =10 size=10> '. _('Into Stock Location').' :<select name="StockLocation"> '; $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockAdjustments.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -334,16 +334,16 @@ } echo '<tr><td>'. _('Stock Code'). ':</td><td>'; if (isset($StockID)) { - echo '<input type=text name="StockID" size=21 value="' . $StockID . '" maxlength=20></td></tr>'; + echo '<input type="text" name="StockID" size=21 value="' . $StockID . '" maxlength=20></td></tr>'; } else { - echo '<input type=text name="StockID" size=21 value="" maxlength=20></td></tr>'; + echo '<input type="text" name="StockID" size=21 value="" maxlength=20></td></tr>'; } -echo '<tr><td>'. _('Partial Description'). ':</td><td><input type=text name="StockText" size=21 value="' . +echo '<tr><td>'. _('Partial Description'). ':</td><td><input type="text" name="StockText" size=21 value="' . $_GET['Description'] .'"> '._('Partial Stock Code'). ':</td><td>'; if (isset($StockID)) { - echo '<input type=text name="StockCode" size=21 value="' . $StockID .'" maxlength=20>'; + echo '<input type="text" name="StockCode" size=21 value="' . $StockID .'" maxlength=20>'; } else { - echo '<input type=text name="StockCode" size=21 value="" maxlength=20>'; + echo '<input type="text" name="StockCode" size=21 value="" maxlength=20>'; } echo '</td><td><input type=submit name="CheckCode" VALUE="'._('Check Part').'"></td></tr>'; if (isset($_SESSION['Adjustment']) and mb_strlen($_SESSION['Adjustment']->ItemDescription)>1){ @@ -377,7 +377,7 @@ } echo '<tr><td>'. _('Comments On Why').':</td> - <td><input type=text name="Narrative" size=32 maxlength=30 value="' . $_SESSION['Adjustment']->Narrative . '"></td></tr>'; + <td><input type="text" name="Narrative" size=32 maxlength=30 value="' . $_SESSION['Adjustment']->Narrative . '"></td></tr>'; echo '<tr><td>'._('Adjustment Quantity').':</td>'; @@ -391,7 +391,7 @@ [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=REMOVE&' . SID . '">'._('Remove').'</a>] [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=ADD&' . SID . '">'._('Add').'</a>]'; } else { - echo '<input type=TEXT class="number" name="Quantity" size=12 maxlength=12 Value="' . $Quantity . '">'; + echo '<input type="text" class="number" name="Quantity" size=12 maxlength=12 Value="' . $Quantity . '">'; } echo '</td></tr>'; //Select the tag Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockCostUpdate.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -152,8 +152,8 @@ if ($myrow['mbflag']=='M'){ echo '<input type=hidden name="MaterialCost" VALUE=' . $myrow['materialcost'] . '>'; echo '<tr><td>' . _('Standard Material Cost Per Unit') .':</td><td class=number>' . number_format($myrow['materialcost'],4) . '</td></tr>'; - echo '<tr><td>' . _('Standard Labour Cost Per Unit') . ':</td><td class=number><input type=text class="number" name="LabourCost" value=' . $myrow['labourcost'] . '></td></tr>'; - echo '<tr><td>' . _('Standard Overhead Cost Per Unit') . ':</td><td class=number><input type=text class="number" name="OverheadCost" value=' . $myrow['overheadcost'] . '></td></tr>'; + echo '<tr><td>' . _('Standard Labour Cost Per Unit') . ':</td><td class=number><input type="text" class="number" name="LabourCost" value=' . $myrow['labourcost'] . '></td></tr>'; + echo '<tr><td>' . _('Standard Overhead Cost Per Unit') . ':</td><td class=number><input type="text" class="number" name="OverheadCost" value=' . $myrow['overheadcost'] . '></td></tr>'; } elseif ($myrow['mbflag']=='B' OR $myrow['mbflag']=='D') { echo '<tr><td>' . _('Standard Cost') .':</td><td class=number><input type="text" class="number" name="MaterialCost" value=' . $myrow['materialcost'] . '></td></tr>'; } else { Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockLocTransfer.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -197,8 +197,8 @@ $k++; echo '<tr> - <td><input type=text name="StockID' . $i .'" size="21" maxlength="20" value="' . $_POST['StockID' . $i] . '"></td> - <td><input type=text name="StockQTY' . $i .'" size="10" maxlength="10" class="number" value="' . $_POST['StockQTY' . $i] . '"></td> + <td><input type="text" name="StockID' . $i .'" size="21" maxlength="20" value="' . $_POST['StockID' . $i] . '"></td> + <td><input type="text" name="StockQTY' . $i .'" size="10" maxlength="10" class="number" value="' . $_POST['StockQTY' . $i] . '"></td> </tr>'; } }else { @@ -215,8 +215,8 @@ $_POST['StockQTY' . $i]=0; } echo '<tr> - <td><input type=text name="StockID' . $i .'" size=21 maxlength=20 value="' . $_POST['StockID' . $i] . '"></td> - <td><input type=text name="StockQTY' . $i .'" size=10 maxlength=10 class="number" value="' . $_POST['StockQTY' . $i] . '"></td> + <td><input type="text" name="StockID' . $i .'" size=21 maxlength=20 value="' . $_POST['StockID' . $i] . '"></td> + <td><input type="text" name="StockQTY' . $i .'" size=10 maxlength=10 class="number" value="' . $_POST['StockQTY' . $i] . '"></td> </tr>'; $i++; } Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockLocTransferReceive.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -468,7 +468,7 @@ if ($TrfLine->Controlled==1){ echo '<td class=number><input type=hidden name="Qty' . $i . '" VALUE="' . $Qty . '"><a href="' . $rootpath .'/StockTransferControlled.php?' . SID . '&TransferItem=' . $i . '">' . $Qty . '</a></td>'; } else { - echo '<td><input type=text class="number" name="Qty' . $i . '" maxlength=10 class="number" size=auto VALUE="' . $Qty . '"></td>'; + echo '<td><input type="text" class="number" name="Qty' . $i . '" maxlength=10 class="number" size=auto VALUE="' . $Qty . '"></td>'; } echo '<td>' . $TrfLine->PartUnit . '</td>'; Modified: trunk/StockMovements.php =================================================================== --- trunk/StockMovements.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockMovements.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -51,8 +51,8 @@ } echo '</select></th></tr>'; -echo '<tr><th colspan=10>' . _('Show Movements before') . ': <input type=text name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['BeforeDate'] . '">'; -echo ' ' . _('But after') . ': <input type=TEXT name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['AfterDate'] . '">'; +echo '<tr><th colspan=10>' . _('Show Movements before') . ': <input type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['BeforeDate'] . '">'; +echo ' ' . _('But after') . ': <input type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['AfterDate'] . '">'; echo ' <input type="submit" name="ShowMoves" value="' . _('Show Stock Movements') . '"></th></tr>'; $SQLBeforeDate = FormatDateForSQL($_POST['BeforeDate']); Modified: trunk/StockReorderLevel.php =================================================================== --- trunk/StockReorderLevel.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockReorderLevel.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -77,7 +77,7 @@ printf("<td>%s</td> <td class=number>%s</td> - <td><input type=text class='number' name=%s maxlength=10 size=10 VALUE=%s></td>", + <td><input type="text" class='number' name=%s maxlength=10 size=10 VALUE=%s></td>", $myrow['locationname'], number_format($myrow['quantity'],$myrow['decimalplaces']), $myrow['loccode'], Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockTransfers.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -444,16 +444,16 @@ } echo '<table class=selection><tr><td>'. _('Stock Code'). ':</td><td>'; if (isset($_POST['StockID'])) { - echo '<input type=text name="StockID" size=21 value="' . $_POST['StockID'] . '" maxlength=20></td></tr>'; + echo '<input type="text" name="StockID" size=21 value="' . $_POST['StockID'] . '" maxlength=20></td></tr>'; } else { - echo '<input type=text name="StockID" size=21 value="" maxlength=20></td></tr>'; + echo '<input type="text" name="StockID" size=21 value="" maxlength=20></td></tr>'; } -echo '<tr><td>'. _('Partial Description'). ':</td><td><input type=text name="StockText" size=21 value="' . +echo '<tr><td>'. _('Partial Description'). ':</td><td><input type="text" name="StockText" size=21 value="' . $_GET['Description'] .'"></td><td>'._('Partial Stock Code'). ':</td><td>'; if (isset($_POST['StockID'])) { - echo '<input type=text name="StockCode" size=21 value="' . $_POST['StockID'] .'" maxlength=20>'; + echo '<input type="text" name="StockCode" size=21 value="' . $_POST['StockID'] .'" maxlength=20>'; } else { - echo '<input type=text name="StockCode" size=21 value="" maxlength=20>'; + echo '<input type="text" name="StockCode" size=21 value="" maxlength=20>'; } echo '</td><td><input type=submit name="CheckCode" value="'._('Check Part').'"></td></tr>'; @@ -510,9 +510,9 @@ echo '<td class=number><input type=hidden name="Quantity" value=' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '><a href="' . $rootpath .'/StockTransferControlled.php?StockLocationFrom='.$_SESSION['Transfer']->StockLocationFrom.'">' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '</a></td></tr>'; } elseif (isset($_SESSION['Transfer']->TransferItem[0]->Controlled)){ - echo '<td><input type=text class="number" name="Quantity" size=12 maxlength=12 value=' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '></td></tr>'; + echo '<td><input type="text" class="number" name="Quantity" size=12 maxlength=12 value=' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '></td></tr>'; } else { - echo '<td><input type=text class="number" name="Quantity" size=12 maxlength=12 Value="0"></td></tr>'; + echo '<td><input type="text" class="number" name="Quantity" size=12 maxlength=12 Value="0"></td></tr>'; } echo '</table><div class="centre"><br /><input type="submit" name="EnterTransfer" value="' . _('Enter Stock Transfer') . '"><br />'; Modified: trunk/StockUsage.php =================================================================== --- trunk/StockUsage.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockUsage.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -55,7 +55,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<tr><td>' . _('Stock Code') . ':<input type=text name="StockID" size="21" maxlength="20" value="' . $StockID . '" />'; +echo '<tr><td>' . _('Stock Code') . ':<input type="text" name="StockID" size="21" maxlength="20" value="' . $StockID . '" />'; echo _('From Stock Location') . ':<select name="StockLocation">'; Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SuppPaymentRun.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -257,9 +257,9 @@ $DefaultToCriteria = $_POST['ToCriteria']; } echo '<tr><td>' . _('From Supplier Code') . ':</font></td> - <td><input Type=text maxlength=6 size=7 name=FromCriteria value="' . $DefaultFromCriteria . '"></td></tr>'; + <td><input type="text" maxlength=6 size=7 name=FromCriteria value="' . $DefaultFromCriteria . '"></td></tr>'; echo '<tr><td>' . _('To Supplier Code') . ':</td> - <td><input Type=text maxlength=6 size=7 name=ToCriteria value="' . $DefaultToCriteria . '"></td></tr>'; + <td><input type="text" maxlength=6 size=7 name=ToCriteria value="' . $DefaultToCriteria . '"></td></tr>'; echo '<tr><td>' . _('For Suppliers Trading in') . ':</td><td><select name="Currency">'; @@ -281,7 +281,7 @@ $DefaultExRate = $_POST['ExRate']; } echo '<tr><td>' . _('Exchange Rate') . ':</td> - <td><input type=text class="number" name="ExRate" maxlength=11 size=12 VALUE=' . $DefaultExRate . '></td></tr>'; + <td><input type="text" class="number" name="ExRate" maxlength=11 size=12 VALUE=' . $DefaultExRate . '></td></tr>'; if (!isset($_POST['AmountsDueBy'])){ $DefaultDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')+1,0 ,Date('y'))); @@ -290,7 +290,7 @@ } echo '<tr><td>' . _('Payments Due To') . ':</td> - <td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="AmountsDueBy" maxlength=11 size=12 VALUE=' . $DefaultDate . '></td></tr>'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="AmountsDueBy" maxlength=11 size=12 VALUE=' . $DefaultDate . '></td></tr>'; $SQL = 'SELECT bankaccountname, accountcode FROM bankaccounts'; @@ -348,7 +348,7 @@ } echo '<tr><td>' . _('Starting Reference no (eg chq no)') . ':</td> - <td><input type=text name="Ref" maxlength=11 size=12 VALUE=' . $_POST['Ref'] . '></td></tr>'; + <td><input type="text" name="Ref" maxlength=11 size=12 VALUE=' . $_POST['Ref'] . '></td></tr>'; echo '</table><br /><div class="centre"><input type=Submit Name="PrintPDF" Value="' . _('Print PDF Only') . '"> <input type=Submit Name="PrintPDFAndProcess" Value="' . _('Print and Process Payments') . '"></div>'; Modified: trunk/SupplierContacts.php =================================================================== --- trunk/SupplierContacts.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SupplierContacts.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -245,13 +245,13 @@ <tr><td>' . _('Position') . ':</td> <td><input type="text" name="Position" size=31 maxlength=30 value="' . $_POST['Position'] . '"></td></tr> <tr><td>' . _('Telephone No') . ':</td> - <td><input type=text name="Tel" size=31 maxlength=30 value="' . $_POST['Tel'] . '"></td></tr> + <td><input type="text" name="Tel" size=31 maxlength=30 value="' . $_POST['Tel'] . '"></td></tr> <tr><td>' . _('Facsimile No') . ':</td> - <td><input type=text name="Fax" size=31 maxlength=30 value="' . $_POST['Fax'] . '"></td></tr> + <td><input type="text" name="Fax" size... [truncated message content] |
From: <dai...@us...> - 2011-07-16 02:59:22
|
Revision: 4632 http://web-erp.svn.sourceforge.net/web-erp/?rev=4632&view=rev Author: daintree Date: 2011-07-16 02:59:14 +0000 (Sat, 16 Jul 2011) Log Message: ----------- type=text quoting Modified Paths: -------------- trunk/AuditTrail.php trunk/Credit_Invoice.php trunk/DeliveryDetails.php trunk/EDIMessageFormat.php trunk/FixedAssetLocations.php trunk/GoodsReceived.php trunk/OutstandingGRNs.php trunk/PDFChequeListing.php trunk/PDFCustTransListing.php trunk/PDFDIFOT.php trunk/PDFDeliveryDifferences.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PDFPickingList.php trunk/PDFRemittanceAdvice.php trunk/PDFStockLocTransfer.php trunk/PDFStockTransfer.php trunk/PDFSuppTransListing.php trunk/PO_Header.php trunk/PO_SelectPurchOrder.php trunk/PcAssignCashToTab.php trunk/Prices.php trunk/PricesBasedOnMarkUp.php trunk/PurchData.php trunk/ReverseGRN.php trunk/SMTPServer.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/SelectWorkOrder.php trunk/Shipt_Select.php trunk/StockAdjustments.php trunk/StockCostUpdate.php trunk/StockLocTransfer.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockReorderLevel.php trunk/StockTransfers.php trunk/StockUsage.php trunk/SuppPaymentRun.php trunk/SupplierContacts.php trunk/SupplierTenders.php trunk/UserSettings.php trunk/WhereUsedInquiry.php trunk/WorkOrderIssue.php trunk/Z_ReverseSuppPaymentRun.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/OutputSerialItems.php Modified: trunk/AuditTrail.php =================================================================== --- trunk/AuditTrail.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/AuditTrail.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -33,9 +33,9 @@ echo '<table class="selection">'; echo '<tr><td>'. _('From Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="1" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value=' .$_POST['FromDate'].'></td></tr>'; + <td><input tabindex="1" type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="FromDate" size="11" maxlength="10" value=' .$_POST['FromDate'].'></td></tr>'; echo '<tr><td>'. _('To Date') . ' ' . $_SESSION['DefaultDateFormat'] .'</td> - <td><input tabindex="2" type=text class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" value=' . $_POST['ToDate'] . '></td></tr>'; + <td><input tabindex="2" type="text" class=date alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" size="11" maxlength="10" value=' . $_POST['ToDate'] . '></td></tr>'; // Show user selections echo '<tr><td>'. _('User ID'). '</td> Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/Credit_Invoice.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -326,8 +326,8 @@ $DisplayLineTotal = number_format($LineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); $j++; - echo '<td><input tabindex=' . $j . ' type=text class=number name="Price_' . $LnItm->LineNumber . '" maxlength=12 size=6 value=' . $LnItm->Price . '></td> - <td><input tabindex=' . $j . ' type=text class="number" name="Discount_' . $LnItm->LineNumber . '" maxlength=3 size=3 value=' . ($LnItm->DiscountPercent * 100) . '></td> + echo '<td><input tabindex=' . $j . ' type="text" class=number name="Price_' . $LnItm->LineNumber . '" maxlength=12 size=6 value=' . $LnItm->Price . '></td> + <td><input tabindex=' . $j . ' type="text" class="number" name="Discount_' . $LnItm->LineNumber . '" maxlength=3 size=3 value=' . ($LnItm->DiscountPercent * 100) . '></td> <td class=number>' . $DisplayLineTotal . '</td>'; /*Need to list the taxes applicable to this line */ @@ -398,7 +398,7 @@ <td class=number>' . number_format($_SESSION['Old_FreightCost'],$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> <td></td> <td colspan=2 class=number>' . _('Credit Freight Cost') . '</td> - <td><input tabindex='.$j.' type=text class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '"></td>'; + <td><input tabindex='.$j.' type="text" class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '"></td>'; echo '<td>'; echo '</td><td>'; @@ -421,7 +421,7 @@ } if (!isset($_POST['ProcessCredit'])) { - echo '<input type=text class=number name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 value=' . $FreightTaxLine->TaxRate * 100 . '>'; + echo '<input type="text" class=number name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 value=' . $FreightTaxLine->TaxRate * 100 . '>'; } if ($FreightTaxLine->TaxOnTax ==1){ $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/DeliveryDetails.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -941,7 +941,7 @@ echo '<br /><table class=selection><tr> <td>'. _('Deliver To') .':</td> - <td><input type=text size=42 maxlength=40 name="DeliverTo" value="' . $_SESSION['Items'.$identifier]->DeliverTo . '"></td> + <td><input type="text" size=42 maxlength=40 name="DeliverTo" value="' . $_SESSION['Items'.$identifier]->DeliverTo . '"></td> </tr>'; echo '<tr> @@ -1011,28 +1011,28 @@ echo '<tr> <td>'. _('Delivery Address 4') . ':</td> - <td><input type=text size=42 maxlength=40 name="BrAdd4" value="' . $_SESSION['Items'.$identifier]->DelAdd4 . '"></td> + <td><input type="text" size=42 maxlength=40 name="BrAdd4" value="' . $_SESSION['Items'.$identifier]->DelAdd4 . '"></td> </tr>'; echo '<tr> <td>'. _('Delivery Address 5') . ':</td> - <td><input type=text size=42 maxlength=40 name="BrAdd5" value="' . $_SESSION['Items'.$identifier]->DelAdd5 . '"></td> + <td><input type="text" size=42 maxlength=40 name="BrAdd5" value="' . $_SESSION['Items'.$identifier]->DelAdd5 . '"></td> </tr>'; echo '<tr> <td>'. _('Delivery Address 6') . ':</td> - <td><input type=text size=42 maxlength=40 name="BrAdd6" value="' . $_SESSION['Items'.$identifier]->DelAdd6 . '"></td> + <td><input type="text" size=42 maxlength=40 name="BrAdd6" value="' . $_SESSION['Items'.$identifier]->DelAdd6 . '"></td> </tr>'; echo '<tr> <td>'. _('Contact Phone Number') .':</td> - <td><input type=text size=25 maxlength=25 name="PhoneNo" value="' . $_SESSION['Items'.$identifier]->PhoneNo . '"></td> + <td><input type="text" size=25 maxlength=25 name="PhoneNo" value="' . $_SESSION['Items'.$identifier]->PhoneNo . '"></td> </tr>'; -echo '<tr><td>' . _('Contact Email') . ':</td><td><input type=text size=40 maxlength=38 name="Email" value="' . $_SESSION['Items'.$identifier]->Email . '"></td></tr>'; +echo '<tr><td>' . _('Contact Email') . ':</td><td><input type="text" size=40 maxlength=38 name="Email" value="' . $_SESSION['Items'.$identifier]->Email . '"></td></tr>'; echo '<tr><td>'. _('Customer Reference') .':</td> - <td><input type=text size=25 maxlength=25 name="CustRef" value="' . $_SESSION['Items'.$identifier]->CustRef . '"></td> + <td><input type="text" size=25 maxlength=25 name="CustRef" value="' . $_SESSION['Items'.$identifier]->CustRef . '"></td> </tr>'; echo '<tr> @@ -1068,7 +1068,7 @@ } echo '<tr><td>'. _('Charge Freight Cost inc tax') .':</td>'; -echo '<td><input type=text class="number" size=10 maxlength=12 name="FreightCost" value="' . $_SESSION['Items'.$identifier]->FreightCost . '"></td>'; +echo '<td><input type="text" class="number" size=10 maxlength=12 name="FreightCost" value="' . $_SESSION['Items'.$identifier]->FreightCost . '"></td>'; if ($_SESSION['DoFreightCalc']==true){ echo '<td><input type=submit name="Update" value="' . _('Recalc Freight Cost') . '"></td></tr>'; Modified: trunk/EDIMessageFormat.php =================================================================== --- trunk/EDIMessageFormat.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/EDIMessageFormat.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -234,7 +234,7 @@ echo '</td></tr>'; echo '<tr><td>Sequence Number:</td>'; -echo '<td><input tabindex=3 type=text name=SequenceNo size=3 maxlength=3 value='.$_POST['SequenceNo'].'>'; +echo '<td><input tabindex=3 type="text" name=SequenceNo size=3 maxlength=3 value='.$_POST['SequenceNo'].'>'; echo '</td></tr>'; echo '<tr><td>' . _('Line Text') . ':' .'</td>'; echo '<td>'; Modified: trunk/FixedAssetLocations.php =================================================================== --- trunk/FixedAssetLocations.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/FixedAssetLocations.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -110,11 +110,11 @@ echo '<input type=hidden name=LocationID value="'.$LocationID.'">'; echo '<td>'.$LocationID.'</td>'; } else { - echo '<td><input type=text name=LocationID size=6 value="'.$LocationID.'"></td></tr>'; + echo '<td><input type="text" name=LocationID size=6 value="'.$LocationID.'"></td></tr>'; } echo '<tr><th style="text-align:left">'._('Location Description').'</th>'; -echo '<td><input type=text name=LocationDescription size=20 value="'.$LocationDescription.'"></td></tr>'; +echo '<td><input type="text" name=LocationDescription size=20 value="'.$LocationDescription.'"></td></tr>'; echo '<tr><th style="text-align:left">'._('Parent Location').'</th>'; echo '<td><select name=ParentLocationID>'; Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/GoodsReceived.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -75,7 +75,7 @@ echo '<table class="selection"> <tr> <td>'. _('Date Goods/Service Received'). ':</td> - <td><input type=text class=date alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength=10 size=10 onChange="return isDate(this, this.value, '."'". + <td><input type="text" class=date alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength=10 size=10 onChange="return isDate(this, this.value, '."'". $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_POST['DefaultReceivedDate'] . '"></td> </tr> </table> @@ -161,7 +161,7 @@ echo '<input type=hidden name="RecvQty_' . $LnItm->LineNo . '" value="' . $LnItm->ReceiveQty . '"><a href="GoodsReceivedControlled.php?identifier=' . $identifier . '&LineNo=' . $LnItm->LineNo . '">' . number_format($LnItm->ReceiveQty,$LnItm->DecimalPlaces) . '</a></td>'; } else { - echo '<input type=text class=number name="RecvQty_' . $LnItm->LineNo . '" maxlength=10 size=10 value="' . $LnItm->ReceiveQty . '"></td>'; + echo '<input type="text" class=number name="RecvQty_' . $LnItm->LineNo . '" maxlength=10 size=10 value="' . $LnItm->ReceiveQty . '"></td>'; } if ($_SESSION['ShowValueOnGRN']==1) { Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/OutstandingGRNs.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -155,9 +155,9 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('From Supplier Code') . ':</td> - <td><input type=text name="FromCriteria" value="0"></td></tr>'; + <td><input type="text" name="FromCriteria" value="0"></td></tr>'; echo '<tr><td>' . _('To Supplier Code'). ':</td> - <td><input type=text name="ToCriteria" value="zzzzzzz"></td></tr>'; + <td><input type="text" name="ToCriteria" value="zzzzzzz"></td></tr>'; echo '</table><br /><div class="centre"><input type=Submit Name="PrintPDF" value="' . _('Print PDF') . '"></div>'; Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFChequeListing.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -39,7 +39,7 @@ <td><input type="text" name="FromDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; echo '<tr><td>' . _('Enter the date to which cheques are to be listed') . ':</td> - <td><input type=text name="ToDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + <td><input type="text" name="ToDate" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; echo '<tr><td>' . _('Bank Account') . '</td><td>'; Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFCustTransListing.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -29,7 +29,7 @@ echo '<table class=selection> <tr> <td>' . _('Enter the date for which the transactions are to be listed') . ':</td> - <td><input type=text name="Date" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + <td><input type="text" name="Date" maxlength="10" size="10" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; echo '<tr><td>' . _('Transaction type') . '</td><td>'; Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFDIFOT.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -29,14 +29,14 @@ echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ":</td><td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ":</td><td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; + echo '<tr><td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ":</td><td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; if (!isset($_POST['DaysAcceptable'])){ $_POST['DaysAcceptable'] = 1; } - echo '<tr><td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ":</td><td><input type=text class=number name='DaysAcceptable' maxlength=2 size=2 VALUE=" . $_POST['DaysAcceptable'] . "></td></tr>"; + echo '<tr><td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ":</td><td><input type="text" class=number name='DaysAcceptable' maxlength=2 size=2 VALUE=" . $_POST['DaysAcceptable'] . "></td></tr>"; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; Modified: trunk/PDFDeliveryDifferences.php =================================================================== --- trunk/PDFDeliveryDifferences.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFDeliveryDifferences.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -29,7 +29,7 @@ echo '<table class=selection> <tr> <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> - <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> </tr>'; echo '<tr> <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td><td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat']. '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFLowGP.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -130,15 +130,15 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<tr><td>' . _('Sales Made From') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size=10 maxlength="10" value="' . $_POST['FromDate'] . '"></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" size=10 maxlength="10" value="' . $_POST['FromDate'] . '"></td> </tr>'; echo '<tr><td>' . _('Sales Made To') . ' (' . _('in the format') . ' ' . $_SESSION['DefaultDateFormat'] . '):</td> - <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '"></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" size="10" maxlength="10" value="' . $_POST['ToDate'] . '"></td> </tr>'; echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ':</td> - <td><input type=text class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> + <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> </tr>'; echo '</table> Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFOrderStatus.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -34,7 +34,7 @@ echo '<table class="selection"> <tr> <td>' . _('Enter the date from which orders are to be listed') . ':</td> - <td><input type=text class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td> + <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td> </tr>'; echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td><td>'; echo '<input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>'; Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFOrdersInvoiced.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -37,7 +37,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ':</td><td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td></tr>'; echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td> - <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + <td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFPeriodStockTransListing.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -33,7 +33,7 @@ </tr>'; echo '<tr> <td>' . _('Enter the date to which the transactions are to be listed') . ':</td> - <td><input type=text name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + <td><input type="text" name="ToDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; echo '<tr><td>' . _('Transaction type') . '</td><td>'; Modified: trunk/PDFPickingList.php =================================================================== --- trunk/PDFPickingList.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFPickingList.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -30,7 +30,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr>'; echo '<td>'._('Create picking lists for all deliveries to be made on').' : '.'</td>'; - echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength=10 size=11 value='.date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)).'></td></tr>'; + echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="TransDate" maxlength=10 size=11 value='.date($_SESSION['DefaultDateFormat'], mktime(date('m'),date('Y'),date('d')+1)).'></td></tr>'; echo '<tr><td>'._('From Warehouse').' : '.'</td> <td><select name="loccode">'; while ($myrow=DB_fetch_array($result)) { Modified: trunk/PDFRemittanceAdvice.php =================================================================== --- trunk/PDFRemittanceAdvice.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFRemittanceAdvice.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -136,9 +136,9 @@ $DefaultToCriteria = $_POST['ToCriteria']; } echo '<tr><td>' . _('From Supplier Code') . ':</font></td> - <td><input Type=text maxlength=6 size=7 name=FromCriteria value="' . $DefaultFromCriteria . '"></td></tr>'; + <td><input type="text" maxlength=6 size=7 name=FromCriteria value="' . $DefaultFromCriteria . '"></td></tr>'; echo '<tr><td>' . _('To Supplier Code') . ':</td> - <td><input Type=text maxlength=6 size=7 name=ToCriteria value="' . $DefaultToCriteria . '"></td></tr>'; + <td><input type="text" maxlength=6 size=7 name=ToCriteria value="' . $DefaultToCriteria . '"></td></tr>'; if (!isset($_POST['PaymentDate'])){ $DefaultDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')+1,0 ,Date('y'))); @@ -147,7 +147,7 @@ } echo '<tr><td>' . _('Date Of Payment') . ':</td> - <td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="PaymentDate" maxlength=11 size=12 VALUE=' . $DefaultDate . '></td></tr>'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="PaymentDate" maxlength=11 size=12 VALUE=' . $DefaultDate . '></td></tr>'; echo '</table><div class="centre"><input type=Submit Name="PrintPDF" Value="' . _('Print PDF') . '"></div>'; Modified: trunk/PDFStockLocTransfer.php =================================================================== --- trunk/PDFStockLocTransfer.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFStockLocTransfer.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -23,7 +23,7 @@ echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table><tr><td>'._('Transfer docket to reprint').'</td>'; - echo '<td><input type=text class=number size=10 name="TransferNo"></td></tr></table>'; + echo '<td><input type="text" class=number size=10 name="TransferNo"></td></tr></table>'; echo '<div class="centre"><input type=submit Name="Print" Value="' . _('Print') .'">'; include ('includes/footer.inc'); exit; Modified: trunk/PDFStockTransfer.php =================================================================== --- trunk/PDFStockTransfer.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFStockTransfer.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -24,7 +24,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="selection"><tr>'; echo '<td>'._('Print Stock Transfer Note').' : '.'</td>'; - echo '<td><input type=text class="number" name="TransferNo" maxlength=10 size=11 /></td></tr>'; + echo '<td><input type="text" class="number" name="TransferNo" maxlength=10 size=11 /></td></tr>'; echo '</table>'; echo '<br /><div class="centre"><input type="submit" name="Process" value="' . _('Print Transfer Note') . '"></div></form>'; include('includes/footer.inc'); Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PDFSuppTransListing.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -29,7 +29,7 @@ echo '<table class=selection> <tr> <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> - <td><input type=text name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> + <td><input type="text" name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> </tr>"; echo '<tr><td>' . _('Transaction type') . '</td><td>'; Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PO_Header.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -816,7 +816,7 @@ echo '</select></td></tr>'; echo '<tr><td>' . _('Status Comment') . ':</td> - <td><input type=text name="StatusComments" size=50></td></tr> + <td><input type="text" name="StatusComments" size=50></td></tr> <tr><td colspan=2><b>' . $_SESSION['PO'.$identifier]->StatusComments .'</b></td></tr>'; echo '<input type="hidden" name="StatusCommentsComplete" value="' . htmlentities($_SESSION['PO'.$identifier]->StatusComments, ENT_QUOTES,'UTF-8') .'" />'; @@ -1063,7 +1063,7 @@ if ($_SESSION['PO'.$identifier]->CurrCode != $_SESSION['CompanyRecord']['currencydefault']) { echo '<tr><td>'. _('Exchange Rate').':'.'</td> - <td><input type=text name="ExRate" value='.$_POST['ExRate'].' class="number" size=11></td> + <td><input type="text" name="ExRate" value='.$_POST['ExRate'].' class="number" size=11></td> </tr>'; } else { echo '<input type=hidden name="ExRate" value="1">'; Modified: trunk/PO_SelectPurchOrder.php =================================================================== --- trunk/PO_SelectPurchOrder.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PO_SelectPurchOrder.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -104,7 +104,7 @@ if (isset($SelectedStockItem)) { echo _('For the part') . ':<b>' . $SelectedStockItem . '</b> ' . _('and') . ' <input type=hidden name="SelectedStockItem" value="' . $SelectedStockItem . '">'; } - echo _('Order Number') . ': <input type=text name="OrderNumber" maxlength=8 size=9> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; + echo _('Order Number') . ': <input type="text" name="OrderNumber" maxlength=8 size=9> ' . _('Into Stock Location') . ':<select name="StockLocation"> '; $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql, $db); while ($myrow = DB_fetch_array($resultStkLocs)) { Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PcAssignCashToTab.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -329,7 +329,7 @@ echo '<tr><td>' . _('Cash Assignation Date') . ':</td>'; - echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size=10 maxlength=10 value=' . $_POST['Date'] . '></td></tr>'; + echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="Date" size=10 maxlength=10 value=' . $_POST['Date'] . '></td></tr>'; if (!isset($_POST['Amount'])) { Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/Prices.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -211,7 +211,7 @@ echo '<table class=selection>'; echo '<tr><th colspan=7><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo _('Pricing for part') . ':<input type=text name="Item" maxsizee=22 value="' . $Item . '" maxlength=20><input type=submit name="NewPart" value="' . _('Review Prices') . '">'; + echo _('Pricing for part') . ':<input type="text" name="Item" maxsizee=22 value="' . $Item . '" maxlength=20><input type=submit name="NewPart" value="' . _('Review Prices') . '">'; echo '</th></tr></form>'; echo '<tr><th>' . _('Currency') . '</th> Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PricesBasedOnMarkUp.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -148,20 +148,20 @@ } echo '<tr><td>' . _('Rounding Factor') . ':</td> - <td><input type=text class=number name="RoundingFactor" size="6" maxlength="6" value=' . $_POST['RoundingFactor'] . '></td></tr>'; + <td><input type="text" class=number name="RoundingFactor" size="6" maxlength="6" value=' . $_POST['RoundingFactor'] . '></td></tr>'; echo '<tr><td>' . _('New Price To Be Effective From') . ':</td> - <td><input type=text class=date alt="' . $_SESSION['DefaultDateFormat'] . '" name="PriceStartDate" size="10" maxlength="10" value="' . $_POST['PriceStartDate'] . '"></td></tr>'; + <td><input type="text" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" name="PriceStartDate" size="10" maxlength="10" value="' . $_POST['PriceStartDate'] . '"></td></tr>'; echo '<tr><td>' . _('New Price To Be Effective To (Blank = No End Date)') . ':</td> - <td><input type=text class=date alt="' . $_SESSION['DefaultDateFormat'] . '" name="PriceEndDate" size="10" maxlength="10" value="' . $_POST['PriceEndDate'] . '"></td></tr>'; + <td><input type="text" class=date alt="' . $_SESSION['DefaultDateFormat'] . '" name="PriceEndDate" size="10" maxlength="10" value="' . $_POST['PriceEndDate'] . '"></td></tr>'; if (!isset($_POST['IncreasePercent'])){ $_POST['IncreasePercent']=0; } echo '<tr><td>' . _('Percentage Increase (positive) or decrease (negative)') . '</td> - <td><input type=text name="IncreasePercent" class=number size=4 maxlength=4 VALUE="' . $_POST['IncreasePercent'] . '"></td></tr></table>'; + <td><input type="text" name="IncreasePercent" class=number size=4 maxlength=4 VALUE="' . $_POST['IncreasePercent'] . '"></td></tr></table>'; echo '<p><div class="centre"><input type=submit name="UpdatePrices" VALUE="' . _('Update Prices') . '\' onclick="return confirm(\'' . _('Are you sure you wish to update or add all the prices according to the criteria selected?') . '\');"></div>'; Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/PurchData.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -471,18 +471,18 @@ $_POST['ConversionFactor'] = 1; } echo '<tr><td>' . _('Conversion Factor (to our UOM)') . ':</td> - <td><input type=text class=number name="ConversionFactor" maxlength=12 size=12 value=' . $_POST['ConversionFactor'] . '></td></tr>'; + <td><input type="text" class=number name="ConversionFactor" maxlength=12 size=12 value=' . $_POST['ConversionFactor'] . '></td></tr>'; echo '<tr><td>' . _('Supplier Stock Code') . ':</td> - <td><input type=text name="SupplierCode" maxlength=15 size=15 value="' . $_POST['SupplierCode'] . '"></td></tr>'; + <td><input type="text" name="SupplierCode" maxlength=15 size=15 value="' . $_POST['SupplierCode'] . '"></td></tr>'; echo '<tr><td>' . _('MinOrderQty') . ':</td> - <td><input type=text class=number name="MinOrderQty" maxlength=15 size=15 value="' . $_POST['MinOrderQty'] . '"></td></tr>'; + <td><input type="text" class=number name="MinOrderQty" maxlength=15 size=15 value="' . $_POST['MinOrderQty'] . '"></td></tr>'; echo '<tr><td>' . _('Supplier Stock Description') . ':</td> - <td><input type=text name="SupplierDescription" maxlength=50 size=51 value="' . $_POST['SupplierDescription'] . '"></td></tr>'; + <td><input type="text" name="SupplierDescription" maxlength=50 size=51 value="' . $_POST['SupplierDescription'] . '"></td></tr>'; if (!isset($_POST['LeadTime']) OR $_POST['LeadTime'] == "") { $_POST['LeadTime'] = 1; } echo '<tr><td>' . _('Lead Time') . ' (' . _('in days from date of order') . '):</td> - <td><input type=text class=number name="LeadTime" maxlength=4 size=5 value=' . $_POST['LeadTime'] . '></td></tr>'; + <td><input type="text" class=number name="LeadTime" maxlength=4 size=5 value=' . $_POST['LeadTime'] . '></td></tr>'; echo '<tr><td>' . _('Preferred Supplier') . ':</td> <td><select name="Preferred">'; if ($_POST['Preferred'] == 1) { Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/ReverseGRN.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -344,7 +344,7 @@ echo '<table class=selection><tr>'; echo '<input type=hidden name="SupplierID" VALUE="' . $_POST['SupplierID'] . '">'; echo '<input type=hidden name="SuppName" VALUE="' . $_POST['SuppName'] . '">'; - echo '<td>'._('Show all goods received after') . ': </td><td><input type=text class=date alt="'. + echo '<td>'._('Show all goods received after') . ': </td><td><input type="text" class=date alt="'. $_SESSION['DefaultDateFormat'].'" name="RecdAfterDate" Value="' . $_POST['RecdAfterDate'] . '" MAXLENGTH =10 size=10></td></tr>';; echo '</table>'; Modified: trunk/SMTPServer.php =================================================================== --- trunk/SMTPServer.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SMTPServer.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -40,11 +40,11 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection>'; echo '<tr><td>'._('Server Host Name').'</td> - <td><input type=text name=host value='.$myrow['host'].'></td></tr>'; + <td><input type="text" name=host value='.$myrow['host'].'></td></tr>'; echo '<tr><td>'._('SMTP port').'</td> - <td><input type=text name=port size=4 class=number value='.$myrow['port'].'></td></tr>'; + <td><input type="text" name=port size=4 class=number value='.$myrow['port'].'></td></tr>'; echo '<tr><td>'._('Helo Command').'</td> - <td><input type=text name=heloaddress value='.$myrow['heloaddress'].'></td></tr>'; + <td><input type="text" name=heloaddress value='.$myrow['heloaddress'].'></td></tr>'; echo '<tr><td>'._('Authorisation Required').'</td><td>'; echo '<select name=auth>'; if ($myrow['auth']==1) { @@ -56,11 +56,11 @@ } echo '</select></td></tr>'; echo '<tr><td>'._('User Name').'</td> - <td><input type=text name=username value='.$myrow['username'].'></td></tr>'; + <td><input type="text" name=username value='.$myrow['username'].'></td></tr>'; echo '<tr><td>'._('Password').'</td> <td><input type=password name=password value='.$myrow['password'].'></td></tr>'; echo '<tr><td>'._('Timeout (seconds)').'</td> - <td><input type=text size=5 name=timeout class=number value='.$myrow['timeout'].'></td></tr>'; + <td><input type="text" size=5 name=timeout class=number value='.$myrow['timeout'].'></td></tr>'; echo '<tr><td colspan=2><div class=centre><input type="submit" name="submit" value="' . _('Update') . '"></div></td></tr>'; echo '</table></form>'; Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SelectCreditItems.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -686,16 +686,16 @@ <td>' . $LineItem->ItemDescription . '</td>'; if ($LineItem->Controlled==0){ - echo '<td><input type=TEXT class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 VALUE=' . $LineItem->Quantity . '></td>'; + echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 VALUE=' . $LineItem->Quantity . '></td>'; } else { echo '<td class=number><a href="' . $rootpath . '/CreditItemsControlled.php?' . SID . '&LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> <input type=hidden name="Quantity_' . $LineItem->LineNumber . '" value=' . $LineItem->Quantity . '></td>'; } echo '<td>' . $LineItem->Units . '</td> - <td><input type=TEXT class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 VALUE=' . $LineItem->Price . '></td> + <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 VALUE=' . $LineItem->Price . '></td> <td><input type="CheckBox" name="Gross" VALUE=False></td> - <td><input type=TEXT class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 VALUE=' . ($LineItem->DiscountPercent * 100) . '>%</td> + <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 VALUE=' . ($LineItem->DiscountPercent * 100) . '>%</td> <td class=number>' . $DisplayLineTotal . '</td>'; @@ -722,7 +722,7 @@ if ($i>0){ echo '<br />'; } - echo '<input type=text class="number" name="' . $LineItem->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength=4 size=4 value="' . $Tax->TaxRate*100 . '">'; + echo '<input type="text" class="number" name="' . $LineItem->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength=4 size=4 value="' . $Tax->TaxRate*100 . '">'; $i++; if ($Tax->TaxOnTax ==1){ $TaxTotals[$Tax->TaxAuthID] += ($Tax->TaxRate * ($LineTotal + $TaxLineTotal)); @@ -763,7 +763,7 @@ echo '<td colspan=2 class=number>'. _('Credit Freight').'</td> - <td><input type=TEXT class="number" size=6 maxlength=6 name=ChargeFreightCost VALUE=' . $_SESSION['CreditItems']->FreightCost . '></td>'; + <td><input type="text" class="number" size=6 maxlength=6 name=ChargeFreightCost VALUE=' . $_SESSION['CreditItems']->FreightCost . '></td>'; $FreightTaxTotal =0; //initialise tax total @@ -786,7 +786,7 @@ echo '<br />'; } - echo '<input type=TEXT class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 VALUE=' . $FreightTaxLine->TaxRate * 100 . '>'; + echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 VALUE=' . $FreightTaxLine->TaxRate * 100 . '>'; if ($FreightTaxLine->TaxOnTax ==1){ $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SelectOrderItems.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -1395,7 +1395,7 @@ echo $RowStarter; if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){ //show the input field only if required - echo '<td><input tabindex=1 type=text name="POLine_' . $OrderLine->LineNumber . '" size=20 maxlength=20 value=' . $OrderLine->POLine . '></td>'; + echo '<td><input tabindex=1 type="text" name="POLine_' . $OrderLine->LineNumber . '" size=20 maxlength=20 value=' . $OrderLine->POLine . '></td>'; } else { echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="">'; } @@ -1413,9 +1413,9 @@ if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ /*OK to display with discount if it is an internal user with appropriate permissions */ - echo '<td><input class="number" type=text name="Price_' . $OrderLine->LineNumber . '" size=16 maxlength=16 value=' . $OrderLine->Price . '></td> - <td><input class="number" type=text name="Discount_' . $OrderLine->LineNumber . '" size=5 maxlength=4 value=' . ($OrderLine->DiscountPercent * 100) . '></td> - <td><input class="number" type=text name="GPPercent_' . $OrderLine->LineNumber . '" size=3 maxlength=40 value=' . $OrderLine->GPPercent . '></td>'; + echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size=16 maxlength=16 value=' . $OrderLine->Price . '></td> + <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size=5 maxlength=4 value=' . ($OrderLine->DiscountPercent * 100) . '></td> + <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size=3 maxlength=40 value=' . $OrderLine->GPPercent . '></td>'; } else { echo '<td class=number>' . $OrderLine->Price . '</td><td></td>'; echo '<input type=hidden name="Price_' . $OrderLine->LineNumber . '" value=' . $OrderLine->Price . '>'; @@ -1432,7 +1432,7 @@ $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->ItemDue= $LineDueDate; } - echo '<td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size=10 maxlength=10 value=' . $LineDueDate . '></td>'; + echo '<td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ItemDue_' . $OrderLine->LineNumber . '" size=10 maxlength=10 value=' . $LineDueDate . '></td>'; echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?identifier=' . $identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td></tr>'; Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SelectWorkOrder.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -106,7 +106,7 @@ if (isset($_REQUEST['SelectedStockItem'])) { echo _('For the item') . ': ' . $_REQUEST['SelectedStockItem'] . ' ' . _('and') . " <input type=hidden name='SelectedStockItem' value='" . $_REQUEST['SelectedStockItem'] . "'>"; } - echo _('Work Order number') . ": <input type=text name='WO' MAXLENGTH =8 size=9>  " . _('Processing at') . ":<select name='StockLocation'> "; + echo _('Work Order number') . ": <input type="text" name='WO' MAXLENGTH =8 size=9>  " . _('Processing at') . ":<select name='StockLocation'> "; $sql = 'SELECT loccode, locationname FROM locations'; Modified: trunk/Shipt_Select.php =================================================================== --- trunk/Shipt_Select.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/Shipt_Select.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -103,7 +103,7 @@ if (!isset($ShiptRef) or $ShiptRef==""){ echo '<table class=selection><tr><td>'; - echo _('Shipment Number'). ': <input type=text name="ShiptRef" MAXLENGTH =10 size=10> '. + echo _('Shipment Number'). ': <input type="text" name="ShiptRef" MAXLENGTH =10 size=10> '. _('Into Stock Location').' :<select name="StockLocation"> '; $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockAdjustments.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -334,16 +334,16 @@ } echo '<tr><td>'. _('Stock Code'). ':</td><td>'; if (isset($StockID)) { - echo '<input type=text name="StockID" size=21 value="' . $StockID . '" maxlength=20></td></tr>'; + echo '<input type="text" name="StockID" size=21 value="' . $StockID . '" maxlength=20></td></tr>'; } else { - echo '<input type=text name="StockID" size=21 value="" maxlength=20></td></tr>'; + echo '<input type="text" name="StockID" size=21 value="" maxlength=20></td></tr>'; } -echo '<tr><td>'. _('Partial Description'). ':</td><td><input type=text name="StockText" size=21 value="' . +echo '<tr><td>'. _('Partial Description'). ':</td><td><input type="text" name="StockText" size=21 value="' . $_GET['Description'] .'"> '._('Partial Stock Code'). ':</td><td>'; if (isset($StockID)) { - echo '<input type=text name="StockCode" size=21 value="' . $StockID .'" maxlength=20>'; + echo '<input type="text" name="StockCode" size=21 value="' . $StockID .'" maxlength=20>'; } else { - echo '<input type=text name="StockCode" size=21 value="" maxlength=20>'; + echo '<input type="text" name="StockCode" size=21 value="" maxlength=20>'; } echo '</td><td><input type=submit name="CheckCode" VALUE="'._('Check Part').'"></td></tr>'; if (isset($_SESSION['Adjustment']) and mb_strlen($_SESSION['Adjustment']->ItemDescription)>1){ @@ -377,7 +377,7 @@ } echo '<tr><td>'. _('Comments On Why').':</td> - <td><input type=text name="Narrative" size=32 maxlength=30 value="' . $_SESSION['Adjustment']->Narrative . '"></td></tr>'; + <td><input type="text" name="Narrative" size=32 maxlength=30 value="' . $_SESSION['Adjustment']->Narrative . '"></td></tr>'; echo '<tr><td>'._('Adjustment Quantity').':</td>'; @@ -391,7 +391,7 @@ [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=REMOVE&' . SID . '">'._('Remove').'</a>] [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=ADD&' . SID . '">'._('Add').'</a>]'; } else { - echo '<input type=TEXT class="number" name="Quantity" size=12 maxlength=12 Value="' . $Quantity . '">'; + echo '<input type="text" class="number" name="Quantity" size=12 maxlength=12 Value="' . $Quantity . '">'; } echo '</td></tr>'; //Select the tag Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockCostUpdate.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -152,8 +152,8 @@ if ($myrow['mbflag']=='M'){ echo '<input type=hidden name="MaterialCost" VALUE=' . $myrow['materialcost'] . '>'; echo '<tr><td>' . _('Standard Material Cost Per Unit') .':</td><td class=number>' . number_format($myrow['materialcost'],4) . '</td></tr>'; - echo '<tr><td>' . _('Standard Labour Cost Per Unit') . ':</td><td class=number><input type=text class="number" name="LabourCost" value=' . $myrow['labourcost'] . '></td></tr>'; - echo '<tr><td>' . _('Standard Overhead Cost Per Unit') . ':</td><td class=number><input type=text class="number" name="OverheadCost" value=' . $myrow['overheadcost'] . '></td></tr>'; + echo '<tr><td>' . _('Standard Labour Cost Per Unit') . ':</td><td class=number><input type="text" class="number" name="LabourCost" value=' . $myrow['labourcost'] . '></td></tr>'; + echo '<tr><td>' . _('Standard Overhead Cost Per Unit') . ':</td><td class=number><input type="text" class="number" name="OverheadCost" value=' . $myrow['overheadcost'] . '></td></tr>'; } elseif ($myrow['mbflag']=='B' OR $myrow['mbflag']=='D') { echo '<tr><td>' . _('Standard Cost') .':</td><td class=number><input type="text" class="number" name="MaterialCost" value=' . $myrow['materialcost'] . '></td></tr>'; } else { Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockLocTransfer.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -197,8 +197,8 @@ $k++; echo '<tr> - <td><input type=text name="StockID' . $i .'" size="21" maxlength="20" value="' . $_POST['StockID' . $i] . '"></td> - <td><input type=text name="StockQTY' . $i .'" size="10" maxlength="10" class="number" value="' . $_POST['StockQTY' . $i] . '"></td> + <td><input type="text" name="StockID' . $i .'" size="21" maxlength="20" value="' . $_POST['StockID' . $i] . '"></td> + <td><input type="text" name="StockQTY' . $i .'" size="10" maxlength="10" class="number" value="' . $_POST['StockQTY' . $i] . '"></td> </tr>'; } }else { @@ -215,8 +215,8 @@ $_POST['StockQTY' . $i]=0; } echo '<tr> - <td><input type=text name="StockID' . $i .'" size=21 maxlength=20 value="' . $_POST['StockID' . $i] . '"></td> - <td><input type=text name="StockQTY' . $i .'" size=10 maxlength=10 class="number" value="' . $_POST['StockQTY' . $i] . '"></td> + <td><input type="text" name="StockID' . $i .'" size=21 maxlength=20 value="' . $_POST['StockID' . $i] . '"></td> + <td><input type="text" name="StockQTY' . $i .'" size=10 maxlength=10 class="number" value="' . $_POST['StockQTY' . $i] . '"></td> </tr>'; $i++; } Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockLocTransferReceive.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -468,7 +468,7 @@ if ($TrfLine->Controlled==1){ echo '<td class=number><input type=hidden name="Qty' . $i . '" VALUE="' . $Qty . '"><a href="' . $rootpath .'/StockTransferControlled.php?' . SID . '&TransferItem=' . $i . '">' . $Qty . '</a></td>'; } else { - echo '<td><input type=text class="number" name="Qty' . $i . '" maxlength=10 class="number" size=auto VALUE="' . $Qty . '"></td>'; + echo '<td><input type="text" class="number" name="Qty' . $i . '" maxlength=10 class="number" size=auto VALUE="' . $Qty . '"></td>'; } echo '<td>' . $TrfLine->PartUnit . '</td>'; Modified: trunk/StockMovements.php =================================================================== --- trunk/StockMovements.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockMovements.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -51,8 +51,8 @@ } echo '</select></th></tr>'; -echo '<tr><th colspan=10>' . _('Show Movements before') . ': <input type=text name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['BeforeDate'] . '">'; -echo ' ' . _('But after') . ': <input type=TEXT name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['AfterDate'] . '">'; +echo '<tr><th colspan=10>' . _('Show Movements before') . ': <input type="text" name="BeforeDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['BeforeDate'] . '">'; +echo ' ' . _('But after') . ': <input type="text" name="AfterDate" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="12" maxlength="12" VALUE="' . $_POST['AfterDate'] . '">'; echo ' <input type="submit" name="ShowMoves" value="' . _('Show Stock Movements') . '"></th></tr>'; $SQLBeforeDate = FormatDateForSQL($_POST['BeforeDate']); Modified: trunk/StockReorderLevel.php =================================================================== --- trunk/StockReorderLevel.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockReorderLevel.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -77,7 +77,7 @@ printf("<td>%s</td> <td class=number>%s</td> - <td><input type=text class='number' name=%s maxlength=10 size=10 VALUE=%s></td>", + <td><input type="text" class='number' name=%s maxlength=10 size=10 VALUE=%s></td>", $myrow['locationname'], number_format($myrow['quantity'],$myrow['decimalplaces']), $myrow['loccode'], Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockTransfers.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -444,16 +444,16 @@ } echo '<table class=selection><tr><td>'. _('Stock Code'). ':</td><td>'; if (isset($_POST['StockID'])) { - echo '<input type=text name="StockID" size=21 value="' . $_POST['StockID'] . '" maxlength=20></td></tr>'; + echo '<input type="text" name="StockID" size=21 value="' . $_POST['StockID'] . '" maxlength=20></td></tr>'; } else { - echo '<input type=text name="StockID" size=21 value="" maxlength=20></td></tr>'; + echo '<input type="text" name="StockID" size=21 value="" maxlength=20></td></tr>'; } -echo '<tr><td>'. _('Partial Description'). ':</td><td><input type=text name="StockText" size=21 value="' . +echo '<tr><td>'. _('Partial Description'). ':</td><td><input type="text" name="StockText" size=21 value="' . $_GET['Description'] .'"></td><td>'._('Partial Stock Code'). ':</td><td>'; if (isset($_POST['StockID'])) { - echo '<input type=text name="StockCode" size=21 value="' . $_POST['StockID'] .'" maxlength=20>'; + echo '<input type="text" name="StockCode" size=21 value="' . $_POST['StockID'] .'" maxlength=20>'; } else { - echo '<input type=text name="StockCode" size=21 value="" maxlength=20>'; + echo '<input type="text" name="StockCode" size=21 value="" maxlength=20>'; } echo '</td><td><input type=submit name="CheckCode" value="'._('Check Part').'"></td></tr>'; @@ -510,9 +510,9 @@ echo '<td class=number><input type=hidden name="Quantity" value=' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '><a href="' . $rootpath .'/StockTransferControlled.php?StockLocationFrom='.$_SESSION['Transfer']->StockLocationFrom.'">' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '</a></td></tr>'; } elseif (isset($_SESSION['Transfer']->TransferItem[0]->Controlled)){ - echo '<td><input type=text class="number" name="Quantity" size=12 maxlength=12 value=' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '></td></tr>'; + echo '<td><input type="text" class="number" name="Quantity" size=12 maxlength=12 value=' . $_SESSION['Transfer']->TransferItem[0]->Quantity . '></td></tr>'; } else { - echo '<td><input type=text class="number" name="Quantity" size=12 maxlength=12 Value="0"></td></tr>'; + echo '<td><input type="text" class="number" name="Quantity" size=12 maxlength=12 Value="0"></td></tr>'; } echo '</table><div class="centre"><br /><input type="submit" name="EnterTransfer" value="' . _('Enter Stock Transfer') . '"><br />'; Modified: trunk/StockUsage.php =================================================================== --- trunk/StockUsage.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/StockUsage.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -55,7 +55,7 @@ echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<tr><td>' . _('Stock Code') . ':<input type=text name="StockID" size="21" maxlength="20" value="' . $StockID . '" />'; +echo '<tr><td>' . _('Stock Code') . ':<input type="text" name="StockID" size="21" maxlength="20" value="' . $StockID . '" />'; echo _('From Stock Location') . ':<select name="StockLocation">'; Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SuppPaymentRun.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -257,9 +257,9 @@ $DefaultToCriteria = $_POST['ToCriteria']; } echo '<tr><td>' . _('From Supplier Code') . ':</font></td> - <td><input Type=text maxlength=6 size=7 name=FromCriteria value="' . $DefaultFromCriteria . '"></td></tr>'; + <td><input type="text" maxlength=6 size=7 name=FromCriteria value="' . $DefaultFromCriteria . '"></td></tr>'; echo '<tr><td>' . _('To Supplier Code') . ':</td> - <td><input Type=text maxlength=6 size=7 name=ToCriteria value="' . $DefaultToCriteria . '"></td></tr>'; + <td><input type="text" maxlength=6 size=7 name=ToCriteria value="' . $DefaultToCriteria . '"></td></tr>'; echo '<tr><td>' . _('For Suppliers Trading in') . ':</td><td><select name="Currency">'; @@ -281,7 +281,7 @@ $DefaultExRate = $_POST['ExRate']; } echo '<tr><td>' . _('Exchange Rate') . ':</td> - <td><input type=text class="number" name="ExRate" maxlength=11 size=12 VALUE=' . $DefaultExRate . '></td></tr>'; + <td><input type="text" class="number" name="ExRate" maxlength=11 size=12 VALUE=' . $DefaultExRate . '></td></tr>'; if (!isset($_POST['AmountsDueBy'])){ $DefaultDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')+1,0 ,Date('y'))); @@ -290,7 +290,7 @@ } echo '<tr><td>' . _('Payments Due To') . ':</td> - <td><input type=text class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="AmountsDueBy" maxlength=11 size=12 VALUE=' . $DefaultDate . '></td></tr>'; + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="AmountsDueBy" maxlength=11 size=12 VALUE=' . $DefaultDate . '></td></tr>'; $SQL = 'SELECT bankaccountname, accountcode FROM bankaccounts'; @@ -348,7 +348,7 @@ } echo '<tr><td>' . _('Starting Reference no (eg chq no)') . ':</td> - <td><input type=text name="Ref" maxlength=11 size=12 VALUE=' . $_POST['Ref'] . '></td></tr>'; + <td><input type="text" name="Ref" maxlength=11 size=12 VALUE=' . $_POST['Ref'] . '></td></tr>'; echo '</table><br /><div class="centre"><input type=Submit Name="PrintPDF" Value="' . _('Print PDF Only') . '"> <input type=Submit Name="PrintPDFAndProcess" Value="' . _('Print and Process Payments') . '"></div>'; Modified: trunk/SupplierContacts.php =================================================================== --- trunk/SupplierContacts.php 2011-07-16 02:55:44 UTC (rev 4631) +++ trunk/SupplierContacts.php 2011-07-16 02:59:14 UTC (rev 4632) @@ -245,13 +245,13 @@ <tr><td>' . _('Position') . ':</td> <td><input type="text" name="Position" size=31 maxlength=30 value="' . $_POST['Position'] . '"></td></tr> <tr><td>' . _('Telephone No') . ':</td> - <td><input type=text name="Tel" size=31 maxlength=30 value="' . $_POST['Tel'] . '"></td></tr> + <td><input type="text" name="Tel" size=31 maxlength=30 value="' . $_POST['Tel'] . '"></td></tr> <tr><td>' . _('Facsimile No') . ':</td> - <td><input type=text name="Fax" size=31 maxlength=30 value="' . $_POST['Fax'] . '"></td></tr> + <td><input type="text" name="Fax" size... [truncated message content] |
From: <dai...@us...> - 2011-07-16 03:38:05
|
Revision: 4633 http://web-erp.svn.sourceforge.net/web-erp/?rev=4633&view=rev Author: daintree Date: 2011-07-16 03:37:58 +0000 (Sat, 16 Jul 2011) Log Message: ----------- type=text quoting Modified Paths: -------------- trunk/PDFDIFOT.php trunk/PDFOrdersInvoiced.php trunk/SelectWorkOrder.php Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2011-07-16 02:59:14 UTC (rev 4632) +++ trunk/PDFDIFOT.php 2011-07-16 03:37:58 UTC (rev 4633) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.4 $ */ - -//$PageSecurity = 3; include ('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -27,45 +24,63 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . _('DIFOT Report') . '</p>'; - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ":</td><td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ":</td><td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<table class=selection> + <tr> + <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> + </tr>'; + echo '<tr> + <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; if (!isset($_POST['DaysAcceptable'])){ $_POST['DaysAcceptable'] = 1; } - echo '<tr><td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ":</td><td><input type="text" class=number name='DaysAcceptable' maxlength=2 size=2 VALUE=" . $_POST['DaysAcceptable'] . "></td></tr>"; + echo '<tr> + <td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ':</td> + <td><input type="text" class="number" name="DaysAcceptable" maxlength=2 size=2 value="' . $_POST['DaysAcceptable'] . '"></td> + </tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); - echo "<select name='CategoryID'>"; - echo "<option selected value='All'>" . _('Over All Categories'); + echo '<select name="CategoryID">'; + echo '<option selected value="All">' . _('Over All Categories') . '</option>'; - while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription']; - } + while ($myrow=DB_fetch_array($result)){ + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + } echo '</select></td></tr>'; - echo '<tr><td>' . _('Inventory Location') . ":</td><td><select name='Location'>"; - echo "<option selected value='All'>" . _('All Locations'); + echo '<tr><td>' . _('Inventory Location') . ':</td> + <td><select name="Location">'; + echo '<option selected value="All">' . _('All Locations') . '</option>'; - $result= DB_query('SELECT loccode, locationname FROM locations',$db); - while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; - } + $result= DB_query("SELECT loccode, locationname FROM locations",$db); + while ($myrow=DB_fetch_array($result)){ + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } echo '</select></td></tr>'; - echo '<tr><td>' . _('Email the report off') . ":</td><td><select name='Email'>"; - echo "<option selected value='No'>" . _('No'); - echo "<option value='Yes'>" . _('Yes'); - echo "</select></td></tr></table><br /><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Email the report off') . ':</td> + <td><select name="Email"> + <option selected value="No">' . _('No') . '</option> + <option value="Yes">' . _('Yes') . '</option> + </select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="Go" value="' . _('Create PDF') . '" /> + </div>'; if ($InputError==1){ prnMsg($msg,'error'); @@ -78,79 +93,79 @@ if ($_POST['CategoryID']=='All' AND $_POST['Location']=='All'){ $sql= "SELECT salesorders.orderno, - salesorders.deliverydate, - salesorderdetails.actualdispatchdate, - TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, - salesorderdetails.quantity, - salesorderdetails.stkcode, - stockmaster.description, - salesorders.debtorno, - salesorders.branchcode - FROM salesorderdetails INNER JOIN stockmaster + salesorders.deliverydate, + salesorderdetails.actualdispatchdate, + TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, + salesorderdetails.quantity, + salesorderdetails.stkcode, + stockmaster.description, + salesorders.debtorno, + salesorders.branchcode + FROM salesorderdetails INNER JOIN stockmaster ON salesorderdetails.stkcode=stockmaster.stockid - INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND (TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable']."'"; + INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND (TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable']."'"; } elseif ($_POST['CategoryID']!='All' AND $_POST['Location']=='All') { $sql= "SELECT salesorders.orderno, - salesorders.deliverydate, - salesorderdetails.actualdispatchdate, - TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, - salesorderdetails.quantity, - salesorderdetails.stkcode, - stockmaster.description, - salesorders.debtorno, - salesorders.branchcode - FROM salesorderdetails INNER JOIN stockmaster - ON salesorderdetails.stkcode=stockmaster.stockid - INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND stockmaster.categoryid='" . $_POST['CategoryID'] ."' - AND (TO_DAYS(salesorderdetails.actualdispatchdate) - - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable']."'"; + salesorders.deliverydate, + salesorderdetails.actualdispatchdate, + TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, + salesorderdetails.quantity, + salesorderdetails.stkcode, + stockmaster.description, + salesorders.debtorno, + salesorders.branchcode + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode=stockmaster.stockid + INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND stockmaster.categoryid='" . $_POST['CategoryID'] ."' + AND (TO_DAYS(salesorderdetails.actualdispatchdate) + - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable']."'"; } elseif ($_POST['CategoryID']=='All' AND $_POST['Location']!='All') { $sql= "SELECT salesorders.orderno, - salesorders.deliverydate, - salesorderdetails.actualdispatchdate, - TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, - salesorderdetails.quantity, - salesorderdetails.stkcode, - stockmaster.description, - salesorders.debtorno, - salesorders.branchcode - FROM salesorderdetails INNER JOIN stockmaster - ON salesorderdetails.stkcode=stockmaster.stockid - INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND salesorders.fromstkloc='" . $_POST['Location'] . "' - AND (TO_DAYS(salesorderdetails.actualdispatchdate) + salesorders.deliverydate, + salesorderdetails.actualdispatchdate, + TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, + salesorderdetails.quantity, + salesorderdetails.stkcode, + stockmaster.description, + salesorders.debtorno, + salesorders.branchcode + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode=stockmaster.stockid + INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND salesorders.fromstkloc='" . $_POST['Location'] . "' + AND (TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable'] . "'"; } elseif ($_POST['CategoryID']!='All' AND $_POST['Location']!='All'){ $sql= "SELECT salesorders.orderno, - salesorders.deliverydate, - salesorderdetails.actualdispatchdate, - TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, - salesorderdetails.quantity, - salesorderdetails.stkcode, - stockmaster.description, - salesorders.debtorno, - salesorders.branchcode - FROM salesorderdetails INNER JOIN stockmaster - ON salesorderdetails.stkcode=stockmaster.stockid - INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND stockmaster.categoryid='" . $_POST['CategoryID'] ."' - AND salesorders.fromstkloc='" . $_POST['Location'] . "' - AND (TO_DAYS(salesorderdetails.actualdispatchdate) + salesorders.deliverydate, + salesorderdetails.actualdispatchdate, + TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, + salesorderdetails.quantity, + salesorderdetails.stkcode, + stockmaster.description, + salesorders.debtorno, + salesorders.branchcode + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode=stockmaster.stockid + INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND stockmaster.categoryid='" . $_POST['CategoryID'] ."' + AND salesorders.fromstkloc='" . $_POST['Location'] . "' + AND (TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable'] . "'"; } Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2011-07-16 02:59:14 UTC (rev 4632) +++ trunk/PDFOrdersInvoiced.php 2011-07-16 03:37:58 UTC (rev 4633) @@ -36,8 +36,8 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ':</td><td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td></tr>'; - echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td> - <td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td> + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; @@ -61,7 +61,9 @@ } echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; + echo '</table> + <br /> + <div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; include('includes/footer.inc'); exit; @@ -195,17 +197,17 @@ WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces"; - + GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces"; + } elseif ($_POST['CategoryID']!='All' AND $_POST['location']!='All'){ $sql= "SELECT salesorders.orderno, @@ -251,7 +253,7 @@ stockmaster.decimalplaces"; } -$sql .= ' ORDER BY salesorders.orderno'; +$sql .= " ORDER BY salesorders.orderno"; $Result=DB_query($sql,$db,'','',false,false); //dont trap errors here @@ -367,16 +369,16 @@ /*OK now get the invoices where the item was charged */ $sql = "SELECT debtortrans.order_, - systypes.typename, - debtortrans.transno, - stockmoves.price, - -stockmoves.qty AS quantity - FROM debtortrans INNER JOIN stockmoves - ON debtortrans.type = stockmoves.type - AND debtortrans.transno=stockmoves.transno - INNER JOIN systypes ON debtortrans.type=systypes.typeid - WHERE debtortrans.order_ ='" . $OrderNo . "' - AND stockmoves.stockid ='" . $myrow['stkcode'] . "'"; + systypes.typename, + debtortrans.transno, + stockmoves.price, + -stockmoves.qty AS quantity + FROM debtortrans INNER JOIN stockmoves + ON debtortrans.type = stockmoves.type + AND debtortrans.transno=stockmoves.transno + INNER JOIN systypes ON debtortrans.type=systypes.typeid + WHERE debtortrans.order_ ='" . $OrderNo . "' + AND stockmoves.stockid ='" . $myrow['stkcode'] . "'"; $InvoicesResult =DB_query($sql,$db); if (DB_num_rows($InvoicesResult)>0){ Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2011-07-16 02:59:14 UTC (rev 4632) +++ trunk/SelectWorkOrder.php 2011-07-16 03:37:58 UTC (rev 4633) @@ -7,7 +7,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; -echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -37,50 +37,50 @@ $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - SUM(locstock.quantity) AS qoh, - stockmaster.units - FROM stockmaster, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.categoryid='" . $_POST['StockCat']. "' - AND stockmaster.mbflag='M' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units - ORDER BY stockmaster.stockid"; + stockmaster.description, + SUM(locstock.quantity) AS qoh, + stockmaster.units + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat']. "' + AND stockmaster.mbflag='M' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units + ORDER BY stockmaster.stockid"; } elseif (isset($_POST['StockCode'])){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - sum(locstock.quantity) as qoh, - stockmaster.units - FROM stockmaster, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - AND stockmaster.mbflag='M' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units - ORDER BY stockmaster.stockid"; + stockmaster.description, + sum(locstock.quantity) as qoh, + stockmaster.units + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + AND stockmaster.mbflag='M' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units + ORDER BY stockmaster.stockid"; } elseif (!isset($_POST['StockCode']) AND !isset($_POST['Keywords'])) { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - sum(locstock.quantity) as qoh, - stockmaster.units - FROM stockmaster, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND stockmaster.categoryid='" . $_POST['StockCat'] ."' - AND stockmaster.mbflag='M' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units - ORDER BY stockmaster.stockid"; + stockmaster.description, + sum(locstock.quantity) as qoh, + stockmaster.units + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.categoryid='" . $_POST['StockCat'] ."' + AND stockmaster.mbflag='M' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units + ORDER BY stockmaster.stockid"; } $ErrMsg = _('No items were returned by the SQL because'); @@ -104,11 +104,11 @@ if (!isset($_REQUEST['WO']) or ($_REQUEST['WO']=='')){ echo '<table class=selection><tr><td>'; if (isset($_REQUEST['SelectedStockItem'])) { - echo _('For the item') . ': ' . $_REQUEST['SelectedStockItem'] . ' ' . _('and') . " <input type=hidden name='SelectedStockItem' value='" . $_REQUEST['SelectedStockItem'] . "'>"; + echo _('For the item') . ': ' . $_REQUEST['SelectedStockItem'] . ' ' . _('and') . ' <input type="hidden" name="SelectedStockItem" value="' . $_REQUEST['SelectedStockItem'] . '" />'; } - echo _('Work Order number') . ": <input type="text" name='WO' MAXLENGTH =8 size=9>  " . _('Processing at') . ":<select name='StockLocation'> "; + echo _('Work Order number') . ': <input type="text" name="WO" maxlength="8" size="9" />  ' . _('Processing at') . ':<select name="StockLocation"> '; - $sql = 'SELECT loccode, locationname FROM locations'; + $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); @@ -142,233 +142,235 @@ } echo '</select>   '; - echo "<input type=submit name='SearchOrders' value='" . _('Search') . "'>"; - echo ' <a href="' . $rootpath . '/WorkOrderEntry.php?' . SID . '">' . _('New Work Order') . '</a></td></tr></table><br />'; + echo '<input type="submit" name="SearchOrders" value="' . _('Search') . '">'; + echo ' <a href="' . $rootpath . '/WorkOrderEntry.php">' . _('New Work Order') . '</a></td></tr></table><br />'; } - $SQL='SELECT categoryid, + $SQL="SELECT categoryid, categorydescription - FROM stockcategory - ORDER BY categorydescription'; + FROM stockcategory + ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); - echo "<table class=selection> - <tr><th colspan=6><font size=3 color=navy>" . _('To search for work orders for a specific item use the item selection facilities below') . "</font></th></tr> - <tr> - <td><font size=1>" . _('Select a stock category') . ":</font> - <select name='StockCat'>"; + echo '<table class="selection"> + <tr> + <th colspan="6"><font size="3" color="navy">' . _('To search for work orders for a specific item use the item selection facilities below') . '</font></th> + </tr> + <tr> + <td><font size="1">' . _('Select a stock category') . ':</font> + <select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } echo '</select> - <td><font size=1>' . _('Enter text extract(s) in the description') . ':</font></td> - <td><input type="Text" name="Keywords" size="20" maxlength="25" /></td> - </tr> + <td><font size="1">' . _('Enter text extract(s) in the description') . ':</font></td> + <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> + </tr> <tr><td></td> <td><font size="3"><b>' . _('OR') . ' </b></font><font size=1>' . _('Enter extract of the Stock Code') . '</b>:</font></td> - <td><input type="Text" name="StockCode" size="15" maxlength="18"></td> + <td><input type="text" name="StockCode" size="15" maxlength="18"></td> </tr> </table><br />'; echo '<div class=centre><input type=submit name="SearchParts" value="' . _('Search Items Now') . '"> <input type=submit name="ResetPart" value="' . _('Show All') . '"></div>'; -if (isset($StockItemsResult)) { - - echo '<br /><table cellpadding=2 colspan=7 class=selection>'; - $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('On Hand') . '</th> - <th>' . _('Units') . '</th> - </tr>'; - echo $TableHeader; - - $j = 1; - $k=0; //row colour counter - - while ($myrow=DB_fetch_array($StockItemsResult)) { - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - - printf("<td><input type=submit name='SelectedStockItem' value='%s'</td> - <td>%s</td> - <td class=number>%s</td> - <td>%s</td> - </tr>", - $myrow['stockid'], - $myrow['description'], - $myrow['qoh'], - $myrow['units']); - - $j++; - if ($j == 12){ - $j=1; - echo $TableHeader; - } -//end of page full new headings if - } -//end of while loop - - echo '</table>'; - -} -//end if stock search results to show - else { - - if (!isset($_POST['StockLocation'])) { - $_POST['StockLocation'] = ''; - } - - //figure out the SQL required from the inputs available - if (isset($_POST['ClosedOrOpen']) and $_POST['ClosedOrOpen']=='Open_Only'){ - $ClosedOrOpen = 0; - } else { - $ClosedOrOpen = 1; - } - if (isset($_REQUEST['WO']) && $_REQUEST['WO'] !='') { - $SQL = "SELECT workorders.wo, - woitems.stockid, - stockmaster.description, - woitems.qtyreqd, - woitems.qtyrecd, - workorders.requiredby - FROM workorders - INNER JOIN woitems ON workorders.wo=woitems.wo - INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid - WHERE workorders.closed='" . $ClosedOrOpen . "' - AND workorders.wo='". $_REQUEST['WO'] ."' - ORDER BY workorders.wo, - woitems.stockid"; - } else { - /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ - - if (isset($_REQUEST['SelectedStockItem'])) { - $SQL = "SELECT workorders.wo, - woitems.stockid, - stockmaster.description, - woitems.qtyreqd, - woitems.qtyrecd, - workorders.requiredby - FROM workorders - INNER JOIN woitems ON workorders.wo=woitems.wo - INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid - WHERE workorders.closed='" . $ClosedOrOpen . "' - AND woitems.stockid='". $_REQUEST['SelectedStockItem'] ."' - AND workorders.loccode='" . $_POST['StockLocation'] . "' - ORDER BY workorders.wo, - woitems.stockid"; + if (isset($StockItemsResult)) { + + echo '<br /> + <table cellpadding="2" colspan="7" class="selection">'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('On Hand') . '</th> + <th>' . _('Units') . '</th> + </tr>'; + echo $TableHeader; + + $j = 1; + $k=0; //row colour counter + + while ($myrow=DB_fetch_array($StockItemsResult)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; } else { - $SQL = "SELECT workorders.wo, - woitems.stockid, - stockmaster.description, - woitems.qtyreqd, - woitems.qtyrecd, - workorders.requiredby - FROM workorders - INNER JOIN woitems ON workorders.wo=woitems.wo - INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid - WHERE workorders.closed='" . $ClosedOrOpen . "' - AND workorders.loccode='" . $_POST['StockLocation'] . "' - ORDER BY workorders.wo, - woitems.stockid"; + echo '<tr class="OddTableRows">'; + $k++; } - } //end not order number selected - - $ErrMsg = _('No works orders were returned by the SQL because'); - $WorkOrdersResult = DB_query($SQL,$db,$ErrMsg); - - /*show a table of the orders returned by the SQL */ - if (DB_num_rows($WorkOrdersResult)>0) { - echo '<br /><table cellpadding=2 colspan=7 width=95% class=selection>'; - - - $tableheader = '<tr> - <th>' . _('Modify') . '</th> - <th>' . _('Status') . '</th> - <th>' . _('Receive') . '</th> - <th>' . _('Issue To') . '</th> - <th>' . _('Costing') . '</th> - <th>' . _('Item') . '</th> - <th>' . _('Quantity Required') . '</th> - <th>' . _('Quantity Received') . '</th> - <th>' . _('Quantity Outstanding') . '</th> - <th>' . _('Required Date') . '</th> - </tr>'; - - echo $tableheader; + + printf('<td><input type="submit" name="SelectedStockItem" value="%s" /></td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>', + $myrow['stockid'], + $myrow['description'], + $myrow['qoh'], + $myrow['units']); + + $j++; + if ($j == 12){ + $j=1; + echo $TableHeader; + } + //end of page full new headings if + } + //end of while loop + + echo '</table>'; + } - $j = 1; - $k=0; //row colour counter - while ($myrow=DB_fetch_array($WorkOrdersResult)) { - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; + //end if stock search results to show + else { + + if (!isset($_POST['StockLocation'])) { + $_POST['StockLocation'] = ''; + } + + //figure out the SQL required from the inputs available + if (isset($_POST['ClosedOrOpen']) and $_POST['ClosedOrOpen']=='Open_Only'){ + $ClosedOrOpen = 0; } else { - echo '<tr class="OddTableRows">'; - $k++; + $ClosedOrOpen = 1; } - - $ModifyPage = $rootpath . '/WorkOrderEntry.php?WO=' . $myrow['wo']; - $Status_WO = $rootpath . '/WorkOrderStatus.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; - $Receive_WO = $rootpath . '/WorkOrderReceive.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; - $Issue_WO = $rootpath . '/WorkOrderIssue.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; - $Costing_WO =$rootpath . '/WorkOrderCosting.php?WO=' .$myrow['wo']; - - $FormatedRequiredByDate = ConvertSQLDate($myrow['requiredby']); - - - printf("<td><a href='%s'>%s</a></td> - <td><a href='%s'>" . _('Status') . "</a></td> - <td><a href='%s'>" . _('Receive') . "</a></td> - <td><a href='%s'>" . _('Issue To') . "</a></td> - <td><a href='%s'>" . _('Costing') . "</a></td> - <td>%s - %s</td> - <td class=number>%s</td> - <td class=number>%s</td> - <td class=number>%s</td> - <td>%s</td> - </tr>", - $ModifyPage, - $myrow['wo'], - $Status_WO, - $Receive_WO, - $Issue_WO, - $Costing_WO, - $myrow['stockid'], - $myrow['description'], - $myrow['qtyreqd'], - $myrow['qtyrecd'], - $myrow['qtyreqd']-$myrow['qtyrecd'], - $FormatedRequiredByDate); - - $j++; - if ($j == 12){ - $j=1; + if (isset($_REQUEST['WO']) && $_REQUEST['WO'] !='') { + $SQL = "SELECT workorders.wo, + woitems.stockid, + stockmaster.description, + woitems.qtyreqd, + woitems.qtyrecd, + workorders.requiredby + FROM workorders + INNER JOIN woitems ON workorders.wo=woitems.wo + INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid + WHERE workorders.closed='" . $ClosedOrOpen . "' + AND workorders.wo='". $_REQUEST['WO'] ."' + ORDER BY workorders.wo, + woitems.stockid"; + } else { + /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ + + if (isset($_REQUEST['SelectedStockItem'])) { + $SQL = "SELECT workorders.wo, + woitems.stockid, + stockmaster.description, + woitems.qtyreqd, + woitems.qtyrecd, + workorders.requiredby + FROM workorders + INNER JOIN woitems ON workorders.wo=woitems.wo + INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid + WHERE workorders.closed='" . $ClosedOrOpen . "' + AND woitems.stockid='". $_REQUEST['SelectedStockItem'] ."' + AND workorders.loccode='" . $_POST['StockLocation'] . "' + ORDER BY workorders.wo, + woitems.stockid"; + } else { + $SQL = "SELECT workorders.wo, + woitems.stockid, + stockmaster.description, + woitems.qtyreqd, + woitems.qtyrecd, + workorders.requiredby + FROM workorders + INNER JOIN woitems ON workorders.wo=woitems.wo + INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid + WHERE workorders.closed='" . $ClosedOrOpen . "' + AND workorders.loccode='" . $_POST['StockLocation'] . "' + ORDER BY workorders.wo, + woitems.stockid"; + } + } //end not order number selected + + $ErrMsg = _('No works orders were returned by the SQL because'); + $WorkOrdersResult = DB_query($SQL,$db,$ErrMsg); + + /*show a table of the orders returned by the SQL */ + if (DB_num_rows($WorkOrdersResult)>0) { + echo '<br /> + <table cellpadding="2" colspan="7" width="95%" class="selection">'; + + + $tableheader = '<tr> + <th>' . _('Modify') . '</th> + <th>' . _('Status') . '</th> + <th>' . _('Receive') . '</th> + <th>' . _('Issue To') . '</th> + <th>' . _('Costing') . '</th> + <th>' . _('Item') . '</th> + <th>' . _('Quantity Required') . '</th> + <th>' . _('Quantity Received') . '</th> + <th>' . _('Quantity Outstanding') . '</th> + <th>' . _('Required Date') . '</th> + </tr>'; + echo $tableheader; } - //end of page full new headings if + $j = 1; + $k=0; //row colour counter + while ($myrow=DB_fetch_array($WorkOrdersResult)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + $ModifyPage = $rootpath . '/WorkOrderEntry.php?WO=' . $myrow['wo']; + $Status_WO = $rootpath . '/WorkOrderStatus.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + $Receive_WO = $rootpath . '/WorkOrderReceive.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + $Issue_WO = $rootpath . '/WorkOrderIssue.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + $Costing_WO =$rootpath . '/WorkOrderCosting.php?WO=' .$myrow['wo']; + + $FormatedRequiredByDate = ConvertSQLDate($myrow['requiredby']); + + + printf('<td><a href="%s">%s</a></td> + <td><a href="%s">' . _('Status') . '</a></td> + <td><a href="%s">' . _('Receive') . '</a></td> + <td><a href="%s">' . _('Issue To') . '</a></td> + <td><a href="%s">' . _('Costing') . '</a></td> + <td>%s - %s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>', + $ModifyPage, + $myrow['wo'], + $Status_WO, + $Receive_WO, + $Issue_WO, + $Costing_WO, + $myrow['stockid'], + $myrow['description'], + $myrow['qtyreqd'], + $myrow['qtyrecd'], + $myrow['qtyreqd']-$myrow['qtyrecd'], + $FormatedRequiredByDate); + + $j++; + if ($j == 12){ + $j=1; + echo $tableheader; + } + //end of page full new headings if + } + //end of while loop + + echo '</table>'; } - //end of while loop - - echo '</table>'; + + echo '<script>defaultControl(document.forms[0].WO);</script>'; + + echo '</form>'; } -echo "<script>defaultControl(document.forms[0].WO);</script>"; - -?> -</form> - -<?php } - include('includes/footer.inc'); ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-16 03:38:05
|
Revision: 4633 http://web-erp.svn.sourceforge.net/web-erp/?rev=4633&view=rev Author: daintree Date: 2011-07-16 03:37:58 +0000 (Sat, 16 Jul 2011) Log Message: ----------- type=text quoting Modified Paths: -------------- trunk/PDFDIFOT.php trunk/PDFOrdersInvoiced.php trunk/SelectWorkOrder.php Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2011-07-16 02:59:14 UTC (rev 4632) +++ trunk/PDFDIFOT.php 2011-07-16 03:37:58 UTC (rev 4633) @@ -2,9 +2,6 @@ /* $Id$*/ -/* $Revision: 1.4 $ */ - -//$PageSecurity = 3; include ('includes/session.inc'); include('includes/SQL_CommonFunctions.inc'); @@ -27,45 +24,63 @@ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' . _('DIFOT Report') . '</p>'; - echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . '?' . sid . "'>"; + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ":</td><td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='FromDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . "'></td></tr>"; - echo '<tr><td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ":</td><td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<table class=selection> + <tr> + <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> + </tr>'; + echo '<tr> + <td>' . _('Enter the date to which variances between orders and deliveries are to be listed') . ':</td> + <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ToDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + </tr>'; if (!isset($_POST['DaysAcceptable'])){ $_POST['DaysAcceptable'] = 1; } - echo '<tr><td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ":</td><td><input type="text" class=number name='DaysAcceptable' maxlength=2 size=2 VALUE=" . $_POST['DaysAcceptable'] . "></td></tr>"; + echo '<tr> + <td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ':</td> + <td><input type="text" class="number" name="DaysAcceptable" maxlength=2 size=2 value="' . $_POST['DaysAcceptable'] . '"></td> + </tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; $result = DB_query($sql,$db); - echo "<select name='CategoryID'>"; - echo "<option selected value='All'>" . _('Over All Categories'); + echo '<select name="CategoryID">'; + echo '<option selected value="All">' . _('Over All Categories') . '</option>'; - while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['categoryid'] . "'>" . $myrow['categorydescription']; - } + while ($myrow=DB_fetch_array($result)){ + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + } echo '</select></td></tr>'; - echo '<tr><td>' . _('Inventory Location') . ":</td><td><select name='Location'>"; - echo "<option selected value='All'>" . _('All Locations'); + echo '<tr><td>' . _('Inventory Location') . ':</td> + <td><select name="Location">'; + echo '<option selected value="All">' . _('All Locations') . '</option>'; - $result= DB_query('SELECT loccode, locationname FROM locations',$db); - while ($myrow=DB_fetch_array($result)){ - echo "<option value='" . $myrow['loccode'] . "'>" . $myrow['locationname']; - } + $result= DB_query("SELECT loccode, locationname FROM locations",$db); + while ($myrow=DB_fetch_array($result)){ + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } echo '</select></td></tr>'; - echo '<tr><td>' . _('Email the report off') . ":</td><td><select name='Email'>"; - echo "<option selected value='No'>" . _('No'); - echo "<option value='Yes'>" . _('Yes'); - echo "</select></td></tr></table><br /><div class='centre'><input type=submit name='Go' value='" . _('Create PDF') . "'></div>"; + echo '<tr><td>' . _('Email the report off') . ':</td> + <td><select name="Email"> + <option selected value="No">' . _('No') . '</option> + <option value="Yes">' . _('Yes') . '</option> + </select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="Go" value="' . _('Create PDF') . '" /> + </div>'; if ($InputError==1){ prnMsg($msg,'error'); @@ -78,79 +93,79 @@ if ($_POST['CategoryID']=='All' AND $_POST['Location']=='All'){ $sql= "SELECT salesorders.orderno, - salesorders.deliverydate, - salesorderdetails.actualdispatchdate, - TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, - salesorderdetails.quantity, - salesorderdetails.stkcode, - stockmaster.description, - salesorders.debtorno, - salesorders.branchcode - FROM salesorderdetails INNER JOIN stockmaster + salesorders.deliverydate, + salesorderdetails.actualdispatchdate, + TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, + salesorderdetails.quantity, + salesorderdetails.stkcode, + stockmaster.description, + salesorders.debtorno, + salesorders.branchcode + FROM salesorderdetails INNER JOIN stockmaster ON salesorderdetails.stkcode=stockmaster.stockid - INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND (TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable']."'"; + INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND (TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable']."'"; } elseif ($_POST['CategoryID']!='All' AND $_POST['Location']=='All') { $sql= "SELECT salesorders.orderno, - salesorders.deliverydate, - salesorderdetails.actualdispatchdate, - TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, - salesorderdetails.quantity, - salesorderdetails.stkcode, - stockmaster.description, - salesorders.debtorno, - salesorders.branchcode - FROM salesorderdetails INNER JOIN stockmaster - ON salesorderdetails.stkcode=stockmaster.stockid - INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND stockmaster.categoryid='" . $_POST['CategoryID'] ."' - AND (TO_DAYS(salesorderdetails.actualdispatchdate) - - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable']."'"; + salesorders.deliverydate, + salesorderdetails.actualdispatchdate, + TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, + salesorderdetails.quantity, + salesorderdetails.stkcode, + stockmaster.description, + salesorders.debtorno, + salesorders.branchcode + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode=stockmaster.stockid + INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND stockmaster.categoryid='" . $_POST['CategoryID'] ."' + AND (TO_DAYS(salesorderdetails.actualdispatchdate) + - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable']."'"; } elseif ($_POST['CategoryID']=='All' AND $_POST['Location']!='All') { $sql= "SELECT salesorders.orderno, - salesorders.deliverydate, - salesorderdetails.actualdispatchdate, - TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, - salesorderdetails.quantity, - salesorderdetails.stkcode, - stockmaster.description, - salesorders.debtorno, - salesorders.branchcode - FROM salesorderdetails INNER JOIN stockmaster - ON salesorderdetails.stkcode=stockmaster.stockid - INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND salesorders.fromstkloc='" . $_POST['Location'] . "' - AND (TO_DAYS(salesorderdetails.actualdispatchdate) + salesorders.deliverydate, + salesorderdetails.actualdispatchdate, + TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, + salesorderdetails.quantity, + salesorderdetails.stkcode, + stockmaster.description, + salesorders.debtorno, + salesorders.branchcode + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode=stockmaster.stockid + INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND salesorders.fromstkloc='" . $_POST['Location'] . "' + AND (TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable'] . "'"; } elseif ($_POST['CategoryID']!='All' AND $_POST['Location']!='All'){ $sql= "SELECT salesorders.orderno, - salesorders.deliverydate, - salesorderdetails.actualdispatchdate, - TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, - salesorderdetails.quantity, - salesorderdetails.stkcode, - stockmaster.description, - salesorders.debtorno, - salesorders.branchcode - FROM salesorderdetails INNER JOIN stockmaster - ON salesorderdetails.stkcode=stockmaster.stockid - INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno - WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' - AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' - AND stockmaster.categoryid='" . $_POST['CategoryID'] ."' - AND salesorders.fromstkloc='" . $_POST['Location'] . "' - AND (TO_DAYS(salesorderdetails.actualdispatchdate) + salesorders.deliverydate, + salesorderdetails.actualdispatchdate, + TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate) AS daydiff, + salesorderdetails.quantity, + salesorderdetails.stkcode, + stockmaster.description, + salesorders.debtorno, + salesorders.branchcode + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode=stockmaster.stockid + INNER JOIN salesorders ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.deliverydate >='" . FormatDateForSQL($_POST['FromDate']) . "' + AND salesorders.deliverydate <='" . FormatDateForSQL($_POST['ToDate']) . "' + AND stockmaster.categoryid='" . $_POST['CategoryID'] ."' + AND salesorders.fromstkloc='" . $_POST['Location'] . "' + AND (TO_DAYS(salesorderdetails.actualdispatchdate) - TO_DAYS(salesorders.deliverydate)) >'" . $_POST['DaysAcceptable'] . "'"; } Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2011-07-16 02:59:14 UTC (rev 4632) +++ trunk/PDFOrdersInvoiced.php 2011-07-16 03:37:58 UTC (rev 4633) @@ -36,8 +36,8 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ':</td><td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td></tr>'; - echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ":</td> - <td><input type="text" class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' maxlength=10 size=10 VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td></tr>"; + echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td> + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; @@ -61,7 +61,9 @@ } echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; + echo '</table> + <br /> + <div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; include('includes/footer.inc'); exit; @@ -195,17 +197,17 @@ WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces"; - + GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces"; + } elseif ($_POST['CategoryID']!='All' AND $_POST['location']!='All'){ $sql= "SELECT salesorders.orderno, @@ -251,7 +253,7 @@ stockmaster.decimalplaces"; } -$sql .= ' ORDER BY salesorders.orderno'; +$sql .= " ORDER BY salesorders.orderno"; $Result=DB_query($sql,$db,'','',false,false); //dont trap errors here @@ -367,16 +369,16 @@ /*OK now get the invoices where the item was charged */ $sql = "SELECT debtortrans.order_, - systypes.typename, - debtortrans.transno, - stockmoves.price, - -stockmoves.qty AS quantity - FROM debtortrans INNER JOIN stockmoves - ON debtortrans.type = stockmoves.type - AND debtortrans.transno=stockmoves.transno - INNER JOIN systypes ON debtortrans.type=systypes.typeid - WHERE debtortrans.order_ ='" . $OrderNo . "' - AND stockmoves.stockid ='" . $myrow['stkcode'] . "'"; + systypes.typename, + debtortrans.transno, + stockmoves.price, + -stockmoves.qty AS quantity + FROM debtortrans INNER JOIN stockmoves + ON debtortrans.type = stockmoves.type + AND debtortrans.transno=stockmoves.transno + INNER JOIN systypes ON debtortrans.type=systypes.typeid + WHERE debtortrans.order_ ='" . $OrderNo . "' + AND stockmoves.stockid ='" . $myrow['stkcode'] . "'"; $InvoicesResult =DB_query($sql,$db); if (DB_num_rows($InvoicesResult)>0){ Modified: trunk/SelectWorkOrder.php =================================================================== --- trunk/SelectWorkOrder.php 2011-07-16 02:59:14 UTC (rev 4632) +++ trunk/SelectWorkOrder.php 2011-07-16 03:37:58 UTC (rev 4633) @@ -7,7 +7,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; -echo '<form action="' . $_SERVER['PHP_SELF'] . '" method=post>'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -37,50 +37,50 @@ $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - SUM(locstock.quantity) AS qoh, - stockmaster.units - FROM stockmaster, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.categoryid='" . $_POST['StockCat']. "' - AND stockmaster.mbflag='M' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units - ORDER BY stockmaster.stockid"; + stockmaster.description, + SUM(locstock.quantity) AS qoh, + stockmaster.units + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat']. "' + AND stockmaster.mbflag='M' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units + ORDER BY stockmaster.stockid"; } elseif (isset($_POST['StockCode'])){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - sum(locstock.quantity) as qoh, - stockmaster.units - FROM stockmaster, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - AND stockmaster.mbflag='M' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units - ORDER BY stockmaster.stockid"; + stockmaster.description, + sum(locstock.quantity) as qoh, + stockmaster.units + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + AND stockmaster.mbflag='M' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units + ORDER BY stockmaster.stockid"; } elseif (!isset($_POST['StockCode']) AND !isset($_POST['Keywords'])) { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - sum(locstock.quantity) as qoh, - stockmaster.units - FROM stockmaster, - locstock - WHERE stockmaster.stockid=locstock.stockid - AND stockmaster.categoryid='" . $_POST['StockCat'] ."' - AND stockmaster.mbflag='M' - GROUP BY stockmaster.stockid, - stockmaster.description, - stockmaster.units - ORDER BY stockmaster.stockid"; + stockmaster.description, + sum(locstock.quantity) as qoh, + stockmaster.units + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.categoryid='" . $_POST['StockCat'] ."' + AND stockmaster.mbflag='M' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units + ORDER BY stockmaster.stockid"; } $ErrMsg = _('No items were returned by the SQL because'); @@ -104,11 +104,11 @@ if (!isset($_REQUEST['WO']) or ($_REQUEST['WO']=='')){ echo '<table class=selection><tr><td>'; if (isset($_REQUEST['SelectedStockItem'])) { - echo _('For the item') . ': ' . $_REQUEST['SelectedStockItem'] . ' ' . _('and') . " <input type=hidden name='SelectedStockItem' value='" . $_REQUEST['SelectedStockItem'] . "'>"; + echo _('For the item') . ': ' . $_REQUEST['SelectedStockItem'] . ' ' . _('and') . ' <input type="hidden" name="SelectedStockItem" value="' . $_REQUEST['SelectedStockItem'] . '" />'; } - echo _('Work Order number') . ": <input type="text" name='WO' MAXLENGTH =8 size=9>  " . _('Processing at') . ":<select name='StockLocation'> "; + echo _('Work Order number') . ': <input type="text" name="WO" maxlength="8" size="9" />  ' . _('Processing at') . ':<select name="StockLocation"> '; - $sql = 'SELECT loccode, locationname FROM locations'; + $sql = "SELECT loccode, locationname FROM locations"; $resultStkLocs = DB_query($sql,$db); @@ -142,233 +142,235 @@ } echo '</select>   '; - echo "<input type=submit name='SearchOrders' value='" . _('Search') . "'>"; - echo ' <a href="' . $rootpath . '/WorkOrderEntry.php?' . SID . '">' . _('New Work Order') . '</a></td></tr></table><br />'; + echo '<input type="submit" name="SearchOrders" value="' . _('Search') . '">'; + echo ' <a href="' . $rootpath . '/WorkOrderEntry.php">' . _('New Work Order') . '</a></td></tr></table><br />'; } - $SQL='SELECT categoryid, + $SQL="SELECT categoryid, categorydescription - FROM stockcategory - ORDER BY categorydescription'; + FROM stockcategory + ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); - echo "<table class=selection> - <tr><th colspan=6><font size=3 color=navy>" . _('To search for work orders for a specific item use the item selection facilities below') . "</font></th></tr> - <tr> - <td><font size=1>" . _('Select a stock category') . ":</font> - <select name='StockCat'>"; + echo '<table class="selection"> + <tr> + <th colspan="6"><font size="3" color="navy">' . _('To search for work orders for a specific item use the item selection facilities below') . '</font></th> + </tr> + <tr> + <td><font size="1">' . _('Select a stock category') . ':</font> + <select name="StockCat">'; while ($myrow1 = DB_fetch_array($result1)) { echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } echo '</select> - <td><font size=1>' . _('Enter text extract(s) in the description') . ':</font></td> - <td><input type="Text" name="Keywords" size="20" maxlength="25" /></td> - </tr> + <td><font size="1">' . _('Enter text extract(s) in the description') . ':</font></td> + <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> + </tr> <tr><td></td> <td><font size="3"><b>' . _('OR') . ' </b></font><font size=1>' . _('Enter extract of the Stock Code') . '</b>:</font></td> - <td><input type="Text" name="StockCode" size="15" maxlength="18"></td> + <td><input type="text" name="StockCode" size="15" maxlength="18"></td> </tr> </table><br />'; echo '<div class=centre><input type=submit name="SearchParts" value="' . _('Search Items Now') . '"> <input type=submit name="ResetPart" value="' . _('Show All') . '"></div>'; -if (isset($StockItemsResult)) { - - echo '<br /><table cellpadding=2 colspan=7 class=selection>'; - $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('On Hand') . '</th> - <th>' . _('Units') . '</th> - </tr>'; - echo $TableHeader; - - $j = 1; - $k=0; //row colour counter - - while ($myrow=DB_fetch_array($StockItemsResult)) { - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - - printf("<td><input type=submit name='SelectedStockItem' value='%s'</td> - <td>%s</td> - <td class=number>%s</td> - <td>%s</td> - </tr>", - $myrow['stockid'], - $myrow['description'], - $myrow['qoh'], - $myrow['units']); - - $j++; - if ($j == 12){ - $j=1; - echo $TableHeader; - } -//end of page full new headings if - } -//end of while loop - - echo '</table>'; - -} -//end if stock search results to show - else { - - if (!isset($_POST['StockLocation'])) { - $_POST['StockLocation'] = ''; - } - - //figure out the SQL required from the inputs available - if (isset($_POST['ClosedOrOpen']) and $_POST['ClosedOrOpen']=='Open_Only'){ - $ClosedOrOpen = 0; - } else { - $ClosedOrOpen = 1; - } - if (isset($_REQUEST['WO']) && $_REQUEST['WO'] !='') { - $SQL = "SELECT workorders.wo, - woitems.stockid, - stockmaster.description, - woitems.qtyreqd, - woitems.qtyrecd, - workorders.requiredby - FROM workorders - INNER JOIN woitems ON workorders.wo=woitems.wo - INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid - WHERE workorders.closed='" . $ClosedOrOpen . "' - AND workorders.wo='". $_REQUEST['WO'] ."' - ORDER BY workorders.wo, - woitems.stockid"; - } else { - /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ - - if (isset($_REQUEST['SelectedStockItem'])) { - $SQL = "SELECT workorders.wo, - woitems.stockid, - stockmaster.description, - woitems.qtyreqd, - woitems.qtyrecd, - workorders.requiredby - FROM workorders - INNER JOIN woitems ON workorders.wo=woitems.wo - INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid - WHERE workorders.closed='" . $ClosedOrOpen . "' - AND woitems.stockid='". $_REQUEST['SelectedStockItem'] ."' - AND workorders.loccode='" . $_POST['StockLocation'] . "' - ORDER BY workorders.wo, - woitems.stockid"; + if (isset($StockItemsResult)) { + + echo '<br /> + <table cellpadding="2" colspan="7" class="selection">'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('On Hand') . '</th> + <th>' . _('Units') . '</th> + </tr>'; + echo $TableHeader; + + $j = 1; + $k=0; //row colour counter + + while ($myrow=DB_fetch_array($StockItemsResult)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; } else { - $SQL = "SELECT workorders.wo, - woitems.stockid, - stockmaster.description, - woitems.qtyreqd, - woitems.qtyrecd, - workorders.requiredby - FROM workorders - INNER JOIN woitems ON workorders.wo=woitems.wo - INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid - WHERE workorders.closed='" . $ClosedOrOpen . "' - AND workorders.loccode='" . $_POST['StockLocation'] . "' - ORDER BY workorders.wo, - woitems.stockid"; + echo '<tr class="OddTableRows">'; + $k++; } - } //end not order number selected - - $ErrMsg = _('No works orders were returned by the SQL because'); - $WorkOrdersResult = DB_query($SQL,$db,$ErrMsg); - - /*show a table of the orders returned by the SQL */ - if (DB_num_rows($WorkOrdersResult)>0) { - echo '<br /><table cellpadding=2 colspan=7 width=95% class=selection>'; - - - $tableheader = '<tr> - <th>' . _('Modify') . '</th> - <th>' . _('Status') . '</th> - <th>' . _('Receive') . '</th> - <th>' . _('Issue To') . '</th> - <th>' . _('Costing') . '</th> - <th>' . _('Item') . '</th> - <th>' . _('Quantity Required') . '</th> - <th>' . _('Quantity Received') . '</th> - <th>' . _('Quantity Outstanding') . '</th> - <th>' . _('Required Date') . '</th> - </tr>'; - - echo $tableheader; + + printf('<td><input type="submit" name="SelectedStockItem" value="%s" /></td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>', + $myrow['stockid'], + $myrow['description'], + $myrow['qoh'], + $myrow['units']); + + $j++; + if ($j == 12){ + $j=1; + echo $TableHeader; + } + //end of page full new headings if + } + //end of while loop + + echo '</table>'; + } - $j = 1; - $k=0; //row colour counter - while ($myrow=DB_fetch_array($WorkOrdersResult)) { - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; + //end if stock search results to show + else { + + if (!isset($_POST['StockLocation'])) { + $_POST['StockLocation'] = ''; + } + + //figure out the SQL required from the inputs available + if (isset($_POST['ClosedOrOpen']) and $_POST['ClosedOrOpen']=='Open_Only'){ + $ClosedOrOpen = 0; } else { - echo '<tr class="OddTableRows">'; - $k++; + $ClosedOrOpen = 1; } - - $ModifyPage = $rootpath . '/WorkOrderEntry.php?WO=' . $myrow['wo']; - $Status_WO = $rootpath . '/WorkOrderStatus.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; - $Receive_WO = $rootpath . '/WorkOrderReceive.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; - $Issue_WO = $rootpath . '/WorkOrderIssue.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; - $Costing_WO =$rootpath . '/WorkOrderCosting.php?WO=' .$myrow['wo']; - - $FormatedRequiredByDate = ConvertSQLDate($myrow['requiredby']); - - - printf("<td><a href='%s'>%s</a></td> - <td><a href='%s'>" . _('Status') . "</a></td> - <td><a href='%s'>" . _('Receive') . "</a></td> - <td><a href='%s'>" . _('Issue To') . "</a></td> - <td><a href='%s'>" . _('Costing') . "</a></td> - <td>%s - %s</td> - <td class=number>%s</td> - <td class=number>%s</td> - <td class=number>%s</td> - <td>%s</td> - </tr>", - $ModifyPage, - $myrow['wo'], - $Status_WO, - $Receive_WO, - $Issue_WO, - $Costing_WO, - $myrow['stockid'], - $myrow['description'], - $myrow['qtyreqd'], - $myrow['qtyrecd'], - $myrow['qtyreqd']-$myrow['qtyrecd'], - $FormatedRequiredByDate); - - $j++; - if ($j == 12){ - $j=1; + if (isset($_REQUEST['WO']) && $_REQUEST['WO'] !='') { + $SQL = "SELECT workorders.wo, + woitems.stockid, + stockmaster.description, + woitems.qtyreqd, + woitems.qtyrecd, + workorders.requiredby + FROM workorders + INNER JOIN woitems ON workorders.wo=woitems.wo + INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid + WHERE workorders.closed='" . $ClosedOrOpen . "' + AND workorders.wo='". $_REQUEST['WO'] ."' + ORDER BY workorders.wo, + woitems.stockid"; + } else { + /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ + + if (isset($_REQUEST['SelectedStockItem'])) { + $SQL = "SELECT workorders.wo, + woitems.stockid, + stockmaster.description, + woitems.qtyreqd, + woitems.qtyrecd, + workorders.requiredby + FROM workorders + INNER JOIN woitems ON workorders.wo=woitems.wo + INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid + WHERE workorders.closed='" . $ClosedOrOpen . "' + AND woitems.stockid='". $_REQUEST['SelectedStockItem'] ."' + AND workorders.loccode='" . $_POST['StockLocation'] . "' + ORDER BY workorders.wo, + woitems.stockid"; + } else { + $SQL = "SELECT workorders.wo, + woitems.stockid, + stockmaster.description, + woitems.qtyreqd, + woitems.qtyrecd, + workorders.requiredby + FROM workorders + INNER JOIN woitems ON workorders.wo=woitems.wo + INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid + WHERE workorders.closed='" . $ClosedOrOpen . "' + AND workorders.loccode='" . $_POST['StockLocation'] . "' + ORDER BY workorders.wo, + woitems.stockid"; + } + } //end not order number selected + + $ErrMsg = _('No works orders were returned by the SQL because'); + $WorkOrdersResult = DB_query($SQL,$db,$ErrMsg); + + /*show a table of the orders returned by the SQL */ + if (DB_num_rows($WorkOrdersResult)>0) { + echo '<br /> + <table cellpadding="2" colspan="7" width="95%" class="selection">'; + + + $tableheader = '<tr> + <th>' . _('Modify') . '</th> + <th>' . _('Status') . '</th> + <th>' . _('Receive') . '</th> + <th>' . _('Issue To') . '</th> + <th>' . _('Costing') . '</th> + <th>' . _('Item') . '</th> + <th>' . _('Quantity Required') . '</th> + <th>' . _('Quantity Received') . '</th> + <th>' . _('Quantity Outstanding') . '</th> + <th>' . _('Required Date') . '</th> + </tr>'; + echo $tableheader; } - //end of page full new headings if + $j = 1; + $k=0; //row colour counter + while ($myrow=DB_fetch_array($WorkOrdersResult)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + $ModifyPage = $rootpath . '/WorkOrderEntry.php?WO=' . $myrow['wo']; + $Status_WO = $rootpath . '/WorkOrderStatus.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + $Receive_WO = $rootpath . '/WorkOrderReceive.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + $Issue_WO = $rootpath . '/WorkOrderIssue.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + $Costing_WO =$rootpath . '/WorkOrderCosting.php?WO=' .$myrow['wo']; + + $FormatedRequiredByDate = ConvertSQLDate($myrow['requiredby']); + + + printf('<td><a href="%s">%s</a></td> + <td><a href="%s">' . _('Status') . '</a></td> + <td><a href="%s">' . _('Receive') . '</a></td> + <td><a href="%s">' . _('Issue To') . '</a></td> + <td><a href="%s">' . _('Costing') . '</a></td> + <td>%s - %s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>', + $ModifyPage, + $myrow['wo'], + $Status_WO, + $Receive_WO, + $Issue_WO, + $Costing_WO, + $myrow['stockid'], + $myrow['description'], + $myrow['qtyreqd'], + $myrow['qtyrecd'], + $myrow['qtyreqd']-$myrow['qtyrecd'], + $FormatedRequiredByDate); + + $j++; + if ($j == 12){ + $j=1; + echo $tableheader; + } + //end of page full new headings if + } + //end of while loop + + echo '</table>'; } - //end of while loop - - echo '</table>'; + + echo '<script>defaultControl(document.forms[0].WO);</script>'; + + echo '</form>'; } -echo "<script>defaultControl(document.forms[0].WO);</script>"; - -?> -</form> - -<?php } - include('includes/footer.inc'); ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-17 03:32:03
|
Revision: 4634 http://web-erp.svn.sourceforge.net/web-erp/?rev=4634&view=rev Author: daintree Date: 2011-07-17 03:31:55 +0000 (Sun, 17 Jul 2011) Log Message: ----------- credit tax cock-up fixed Modified Paths: -------------- trunk/Credit_Invoice.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/doc/Change.log Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-07-16 03:37:58 UTC (rev 4633) +++ trunk/Credit_Invoice.php 2011-07-17 03:31:55 UTC (rev 4634) @@ -181,7 +181,7 @@ } else { /* there are no stock movement records created for that invoice */ - echo '<div class="centre"><a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a></div>'; + echo '<div class="centre"><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a></div>'; prnMsg( _('There are no line items that were retrieved for this invoice') . '. ' . _('The automatic credit program can not create a credit note from this invoice'),'warn'); include('includes/footer.inc'); exit; @@ -350,9 +350,6 @@ $TaxLineTotal =0; //initialise tax total for the line if (is_array($LnItm->Taxes) ){ foreach ($LnItm->Taxes as $Tax) { - $TaxTotals[$Tax->TaxAuthID]=0; - } - foreach ($LnItm->Taxes as $Tax) { if ($i>0){ echo '<br />'; } @@ -673,9 +670,9 @@ if ($MBFlag=='B' OR $MBFlag=='M') { $SQL = "UPDATE locstock - SET locstock.quantity = locstock.quantity + " . $CreditLine->QtyDispatched . " - WHERE locstock.stockid = '" . $CreditLine->StockID . "' - AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; + SET locstock.quantity = locstock.quantity + " . $CreditLine->QtyDispatched . " + WHERE locstock.stockid = '" . $CreditLine->StockID . "' + AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the location stock record was used'); @@ -686,18 +683,17 @@ and of course update the Location stock balances */ $StandardCost =0; /*To start with - accumulate the cost of the comoponents for use in journals later on */ - $sql = "SELECT - bom.component, - bom.quantity, - stockmaster.materialcost - + stockmaster.labourcost - + stockmaster.overheadcost AS standard - FROM bom, - stockmaster - WHERE bom.component=stockmaster.stockid - AND bom.parent='" . $CreditLine->StockID . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + $sql = "SELECT bom.component, + bom.quantity, + stockmaster.materialcost + + stockmaster.labourcost + + stockmaster.overheadcost AS standard + FROM bom, + stockmaster + WHERE bom.component=stockmaster.stockid + AND bom.parent='" . $CreditLine->StockID . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; $ErrMsg = _('Could not retrieve assembly components from the database for') . ' ' . $CreditLine->StockID . ' ' . _('because'); $DbgMsg = _('The SQL that failed was'); Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-16 03:37:58 UTC (rev 4633) +++ trunk/SelectCreditItems.php 2011-07-17 03:31:55 UTC (rev 4634) @@ -20,7 +20,7 @@ if (isset($_POST['ProcessCredit']) AND !isset($_SESSION['CreditItems'])){ prnMsg(_('This credit note has already been processed. Refreshing the page will not enter the credit note again') . '<br />' . _('Please use the navigation links provided rather than using the browser back button and then having to refresh'),'info'); - echo '<br /><a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } @@ -37,62 +37,66 @@ if (!isset($_SESSION['CreditItems'])){ /* It must be a new credit note being created $_SESSION['CreditItems'] would be set up from a previous call*/ - $_SESSION['CreditItems'] = new cart; + $_SESSION['CreditItems'] = new cart; - $_SESSION['RequireCustomerSelection'] = 1; + $_SESSION['RequireCustomerSelection'] = 1; } if (isset($_POST['ChangeCustomer'])){ - $_SESSION['RequireCustomerSelection']=1; + $_SESSION['RequireCustomerSelection']=1; } if (isset($_POST['Quick'])){ - unset($_POST['PartSearch']); + unset($_POST['PartSearch']); } if (isset($_POST['CancelCredit'])) { - unset($_SESSION['CreditItems']->LineItems); - unset($_SESSION['CreditItems']); - $_SESSION['CreditItems'] = new cart; - $_SESSION['RequireCustomerSelection'] = 1; + unset($_SESSION['CreditItems']->LineItems); + unset($_SESSION['CreditItems']); + $_SESSION['CreditItems'] = new cart; + $_SESSION['RequireCustomerSelection'] = 1; } if (isset($_POST['SearchCust']) AND $_SESSION['RequireCustomerSelection']==1){ - if ($_POST['Keywords'] AND $_POST['CustCode']) { + if ($_POST['Keywords'] AND $_POST['CustCode']) { prnMsg( _('Customer name keywords have been used in preference to the customer code extract entered'), 'info' ); - } - if ($_POST['Keywords']=='' AND $_POST['CustCode']=='') { + } + if ($_POST['Keywords']=='' AND $_POST['CustCode']=='') { prnMsg( _('At least one Customer Name keyword OR an extract of a Customer Code must be entered for the search'), 'info' ); - } else { - If (mb_strlen($_POST['Keywords'])>0) { + } else { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - $SQL = 'SELECT - custbranch.debtorno, - custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode - FROM custbranch - WHERE custbranch.brname ' . LIKE . " '" . $SearchString . "' - AND custbranch.disabletrans='0'"; + $SQL = "SELECT debtorsmaster.name, + custbranch.debtorno, + custbranch.brname, + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode + FROM custbranch + INNER JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.brname " . LIKE . " '" . $SearchString . "' + AND custbranch.disabletrans='0'"; } elseif (mb_strlen($_POST['CustCode'])>0){ - $SQL = 'SELECT - custbranch.debtorno, - custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode - FROM custbranch - WHERE custbranch.branchcode ' . LIKE . "'%" . $_POST['CustCode'] . "%' - AND custbranch.disabletrans='0'"; + $SQL = "SELECT debtorsmaster.name, + custbranch.debtorno, + custbranch.brname, + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode + FROM custbranch + INNER JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.debtorno " . LIKE . "'%" . $_POST['CustCode'] . "%' + AND custbranch.disabletrans='0'"; } $ErrMsg = _('Customer branch records requested cannot be retrieved because'); @@ -102,7 +106,8 @@ if (DB_num_rows($result_CustSelect)==1){ $myrow=DB_fetch_array($result_CustSelect); - $_POST['Select'] = $myrow['debtorno'] . ' - ' . $myrow['branchcode']; + $SelectedCustomer = trim($myrow['debtorno']); + $SelectedBranch = trim($myrow['branchcode']); } elseif (DB_num_rows($result_CustSelect)==0){ prnMsg(_('Sorry') . ' ... ' . _('there are no customer branch records contain the selected text') . ' - ' . _('please alter your search criteria and try again'),'info'); } @@ -111,156 +116,156 @@ } /*end of if search button for customers was hit*/ -if (isset($_POST['Select']) AND $_POST['Select']!='') { +if (isset($_POST['JustSelectedACustomer']) AND !isset($SelectedCustomer)){ + /*Need to figure out the number of the form variable that the user clicked on */ + for ($i=1;$i<count($_POST);$i++){ //loop through the returned customers + if(isset($_POST['SubmitCustomerSelection'.$i])){ + break; + } + } + if ($i==count($_POST)){ + prnMsg(_('Unable to identify the selected customer'),'error'); + } else { + $SelectedCustomer = trim($_POST['SelectedCustomer'.$i]); + $SelectedBranch = trim($_POST['SelectedBranch'.$i]); + } +} + +if (isset($SelectedCustomer) AND isset($_POST['JustSelectedACustomer'])) { + /*will only be true if page called from customer selection form -parse the $Select string into customer code and branch code */ + Now retrieve customer information - name, salestype, currency, terms etc +*/ - $_SESSION['CreditItems']->Branch = mb_substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = mb_substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); + $_SESSION['CreditItems']->DebtorNo = $SelectedCustomer; + $_SESSION['CreditItems']->Branch = $SelectedBranch; + $_SESSION['RequireCustomerSelection'] = 0; -/*Now retrieve customer information - name, salestype, currency, terms etc */ +/* default the branch information from the customer branches table CustBranch -particularly where the stock +will be booked back into. */ - $sql = "SELECT - debtorsmaster.name, - debtorsmaster.salestype, - debtorsmaster.currcode, - currencies.rate - FROM debtorsmaster, - currencies - WHERE debtorsmaster.currcode=currencies.currabrev - AND debtorsmaster.debtorno = '" . $_POST['Select'] . "'"; - - $ErrMsg = _('The customer record of the customer selected') . ': ' . $_POST['Select'] . ' ' . _('cannot be retrieved because'); - $DbgMsg = _('The SQL used to retrieve the customer details and failed was'); + $sql = "SELECT debtorsmaster.name, + debtorsmaster.salestype, + debtorsmaster.currcode, + currencies.rate, + currencies.decimalplaces, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.phoneno, + custbranch.email, + custbranch.defaultlocation, + custbranch.taxgroupid, + locations.taxprovinceid + FROM custbranch + INNER JOIN locations ON locations.loccode=custbranch.defaultlocation + INNER JOIN debtorsmaster ON custbranch.debtorno=debtorsmaster.debtorno + INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev + WHERE custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "' + AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "'"; + + $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $SelectedCustomer . ' ' . _('cannot be retrieved because'); + $DbgMsg = _('SQL used to retrieve the branch details was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); - $myrow = DB_fetch_row($result); + $myrow = DB_fetch_array($result); - $_SESSION['CreditItems']->DebtorNo = $_POST['Select']; - $_SESSION['RequireCustomerSelection'] = 0; - $_SESSION['CreditItems']->CustomerName = $myrow[0]; - /* the sales type determines the price list to be used by default the customer of the user is defaulted from the entry of the userid and password. */ - - $_SESSION['CreditItems']->DefaultSalesType = $myrow[1]; - $_SESSION['CreditItems']->DefaultCurrency = $myrow[2]; - $_SESSION['CurrencyRate'] = $myrow[3]; - -/* default the branch information from the customer branches table CustBranch -particularly where the stock -will be booked back into. */ - - $sql = "SELECT - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.phoneno, - custbranch.email, - custbranch.defaultlocation, - custbranch.taxgroupid, - locations.taxprovinceid - FROM custbranch - INNER JOIN locations ON locations.loccode=custbranch.defaultlocation - WHERE custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "' - AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "'"; - - $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_POST['Select'] . ' ' . _('cannot be retrieved because'); - $DbgMsg = _('SQL used to retrieve the branch details was'); - $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); - - $myrow = DB_fetch_array($result); - $_SESSION['CreditItems']->DeliverTo = $myrow['brname']; - $_SESSION['CreditItems']->BrAdd1 = $myrow['braddress1']; - $_SESSION['CreditItems']->BrAdd2 = $myrow['braddress2']; - $_SESSION['CreditItems']->BrAdd3 = $myrow['braddress3']; - $_SESSION['CreditItems']->BrAdd4 = $myrow['braddress4']; - $_SESSION['CreditItems']->BrAdd5 = $myrow['braddress5']; - $_SESSION['CreditItems']->BrAdd6 = $myrow['braddress6']; - $_SESSION['CreditItems']->PhoneNo = $myrow['phoneno']; - $_SESSION['CreditItems']->Email = $myrow['email']; - $_SESSION['CreditItems']->Location = $myrow['defaultlocation']; - $_SESSION['CreditItems']->TaxGroup = $myrow['taxgroupid']; - $_SESSION['CreditItems']->DispatchTaxProvince = $myrow['taxprovinceid']; - $_SESSION['CreditItems']->GetFreightTaxes(); + $_SESSION['CreditItems']->CustomerName = $myrow['name']; + $_SESSION['CreditItems']->DefaultSalesType = $myrow['salestype']; + $_SESSION['CreditItems']->DefaultCurrency = $myrow['currcode']; + $_SESSION['CreditItems']->CurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['CurrencyRate'] = $myrow['rate']; + $_SESSION['CreditItems']->DeliverTo = $myrow['brname']; + $_SESSION['CreditItems']->BrAdd1 = $myrow['braddress1']; + $_SESSION['CreditItems']->BrAdd2 = $myrow['braddress2']; + $_SESSION['CreditItems']->BrAdd3 = $myrow['braddress3']; + $_SESSION['CreditItems']->BrAdd4 = $myrow['braddress4']; + $_SESSION['CreditItems']->BrAdd5 = $myrow['braddress5']; + $_SESSION['CreditItems']->BrAdd6 = $myrow['braddress6']; + $_SESSION['CreditItems']->PhoneNo = $myrow['phoneno']; + $_SESSION['CreditItems']->Email = $myrow['email']; + $_SESSION['CreditItems']->Location = $myrow['defaultlocation']; + $_SESSION['CreditItems']->TaxGroup = $myrow['taxgroupid']; + $_SESSION['CreditItems']->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['CreditItems']->GetFreightTaxes(); } - - /* if the change customer button hit or the customer has not already been selected */ if ($_SESSION['RequireCustomerSelection'] ==1 OR !isset($_SESSION['CreditItems']->DebtorNo) OR $_SESSION['CreditItems']->DebtorNo=='' ) { - echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Select Customer For Credit Note').'</p>'; - echo '<table cellpadding=3 colspan=4 class=selection>'; - echo '<tr><th colspan=5><font size=3 color=navy><b> ' . _('Customer Selection') . '</b></font></th></tr>'; + echo '<table cellpadding="3" colspan="4" class="selection">'; + echo '<tr><th colspan="5"><font size="3" color="navy"><b> ' . _('Customer Selection') . '</b></font></th></tr>'; echo '<tr>'; - echo '<td><font size=1>' . _('Enter text in the customer name') . ':</font></td>'; - echo '<td><input type="Text" name="Keywords" size=20 maxlength=25></td>'; - echo '<td><font size=3><b>' . _('OR') . '</b></font></td>'; - echo '<td><font size=1>' . _('Enter text extract in the customer code') . ':</font></td>'; - echo '<td><input type="Text" name="CustCode" size=15 maxlength=18></td>'; + echo '<td><font size="1">' . _('Enter text in the customer name') . ':</font></td>'; + echo '<td><input type="text" name="Keywords" size=20 maxlength=25></td>'; + echo '<td><font size="3"><b>' . _('OR') . '</b></font></td>'; + echo '<td><font size="1">' . _('Enter text extract in the customer code') . ':</font></td>'; + echo '<td><input type="text" name="CustCode" size="15" maxlength="18"></td>'; echo '</tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type=submit name="SearchCust" VALUE="' . _('Search Now') . '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="SearchCust" value="' . _('Search Now') . '"></div>'; if (isset($result_CustSelect)) { - echo '<br /><table cellpadding=2 colspan=7 class=selection>'; + echo '<table cellpadding="2" colspan="7">'; - $TableHeader = '<tr> - <th>' . _('Code') . '</th> + $TableHeader = '<br /> + <tr> + <th>' . _('Customer') . '</th> <th>' . _('Branch') . '</th> <th>' . _('Contact') . '</th> <th>' . _('Phone') . '</th> <th>' . _('Fax') . '</th> - </tr>'; + </tr>'; + echo $TableHeader; - echo $TableHeader; + $j = 1; + $k = 0; //row counter to determine background colour + $LastCustomer=''; + while ($myrow=DB_fetch_array($result_CustSelect)) { - $j = 1; - $k = 0; //row counter to determine background colour + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" name="SelectParts" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + if ($LastCustomer != $myrow['name']) { + echo '<td>'.$myrow['name'].'</td>'; + } else { + echo '<td></td>'; + } + echo '<td><input tabindex='.($j+5).' type=submit name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '"></td> + <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> + <td>'.$myrow['contactname'].'</td> + <td>'.$myrow['phoneno'].'</td> + <td>'.$myrow['faxno'].'</td> + </tr>'; + $LastCustomer=$myrow['name']; + $j++; + //end of page full new headings if + } //end of while loop + echo '<input type="hidden" name="JustSelectedACustomer" value="Yes">'; + echo '</table></form>'; - while ($myrow=DB_fetch_array($result_CustSelect)) { - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - printf("<td><font size=1><input type=submit name='Select' VALUE='%s - %s'</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - </tr>", - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['brname'], - $myrow['contactname'], - $myrow['phoneno'], - $myrow['faxno']); - -//end of page full new headings if - } -//end of while loop - - echo '</table>'; - - } -//end if results to show - + }//end if results to show + //end if RequireCustomerSelection } else { /* everything below here only do if a customer is selected @@ -424,21 +429,20 @@ if ($AlreadyOnThisCredit!=1){ - $sql = "SELECT - stockmaster.description, - stockmaster.stockid, - stockmaster.units, - stockmaster.volume, - stockmaster.kgs, - (materialcost+labourcost+overheadcost) AS standardcost, - stockmaster.mbflag, - stockmaster.decimalplaces, - stockmaster.controlled, - stockmaster.serialised, - stockmaster.discountcategory, - stockmaster.taxcatid - FROM stockmaster - WHERE stockmaster.stockid = '". $_POST['NewItem'] . "'"; + $sql = "SELECT stockmaster.description, + stockmaster.stockid, + stockmaster.units, + stockmaster.volume, + stockmaster.kgs, + (materialcost+labourcost+overheadcost) AS standardcost, + stockmaster.mbflag, + stockmaster.decimalplaces, + stockmaster.controlled, + stockmaster.serialised, + stockmaster.discountcategory, + stockmaster.taxcatid + FROM stockmaster + WHERE stockmaster.stockid = '". $_POST['NewItem'] . "'"; $ErrMsg = _('There is a problem selecting the part because'); $result1 = DB_query($sql,$db,$ErrMsg); @@ -505,7 +509,7 @@ $_SESSION['CreditItems']->FreightCost = $_POST['ChargeFreightCost']; } - If (isset($_POST['Location']) AND $_POST['Location'] != $_SESSION['CreditItems']->Location){ + if (isset($_POST['Location']) AND $_POST['Location'] != $_SESSION['CreditItems']->Location){ $_SESSION['CreditItems']->Location = $_POST['Location']; @@ -541,7 +545,7 @@ $Price = $_POST['Price_' . $LineItem->LineNumber]; } - $DiscountPercentage = $_POST['Discount_' . $LineItem->LineNumber]; + $DiscountPercentage = $_POST['Discount_' . $LineItem->LineNumber]; foreach ($LineItem->Taxes as $TaxLine) { if (isset($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ @@ -552,7 +556,15 @@ 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 credited to less than 0 or the price less than 0 or the discount more than 100% or less than 0%'),'warn'); } elseif (isset($_POST['Quantity_' . $LineItem->LineNumber])) { - $_SESSION['CreditItems']->update_cart_item($LineItem->LineNumber, $Quantity, $Price, $DiscountPercentage/100, $Narrative, 'No', $LineItem->ItemDue, $LineItem->POLine, 0); + $_SESSION['CreditItems']->update_cart_item($LineItem->LineNumber, + $Quantity, + $Price, + $DiscountPercentage/100, + $Narrative, + 'No', + $LineItem->ItemDue, + $LineItem->POLine, + 0); } } @@ -564,7 +576,7 @@ } } - If (isset($_POST['NewItem'])){ + if (isset($_POST['NewItem'])){ /* get the item details from the database and hold them in the cart object make the quantity 1 by default then add it to the cart */ $AlreadyOnThisCredit =0; @@ -583,19 +595,19 @@ if ($AlreadyOnThisCredit!=1){ $sql = "SELECT stockmaster.description, - stockmaster.stockid, - stockmaster.units, - stockmaster.volume, - stockmaster.kgs, - stockmaster.mbflag, - stockmaster.discountcategory, - stockmaster.controlled, - stockmaster.decimalplaces, - stockmaster.serialised, - (materialcost+labourcost+overheadcost) AS standardcost, - stockmaster.taxcatid - FROM stockmaster - WHERE stockmaster.stockid = '". $_POST['NewItem'] . "'"; + stockmaster.stockid, + stockmaster.units, + stockmaster.volume, + stockmaster.kgs, + stockmaster.mbflag, + stockmaster.discountcategory, + stockmaster.controlled, + stockmaster.decimalplaces, + stockmaster.serialised, + (materialcost+labourcost+overheadcost) AS standardcost, + stockmaster.taxcatid + FROM stockmaster + WHERE stockmaster.stockid = '". $_POST['NewItem'] . "'"; $ErrMsg = _('The item details could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the item details but failed was'); @@ -644,21 +656,21 @@ /* This is where the credit note as selected should be displayed reflecting any deletions or insertions*/ - echo '<table cellpadding=2 colspan=7 class=selection> - <tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> - <th>' . _('Quantity') . '</th> - <th>' . _('Unit') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Gross') . '</th> - <th>' . _('Discount') . '</th> - <th>' . _('Total') . '<br />' . _('Excl Tax') . '</th> - <th>' . _('Tax Authority') . '</th> - <th>' . _('Tax') . '<br />' . _('Rate') . '</th> - <th>' . _('Tax') . '<br />' . _('Amount') . '</th> - <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> - </tr>'; + echo '<table cellpadding="2" colspan="7" class="selection"> + <tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Gross') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Total') . '<br />' . _('Excl Tax') . '</th> + <th>' . _('Tax Authority') . '</th> + <th>' . _('Tax') . '<br />' . _('Rate') . '</th> + <th>' . _('Tax') . '<br />' . _('Amount') . '</th> + <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> + </tr>'; $_SESSION['CreditItems']->total = 0; $_SESSION['CreditItems']->totalVolume = 0; @@ -671,8 +683,8 @@ $k =0; //row colour counter foreach ($_SESSION['CreditItems']->LineItems as $LineItem) { - $LineTotal = $LineItem->Quantity * $LineItem->Price * (1 - $LineItem->DiscountPercent); - $DisplayLineTotal = number_format($LineTotal,2); + $LineTotal = round($LineItem->Quantity * $LineItem->Price * (1 - $LineItem->DiscountPercent),$_SESSION['CreditItems']->CurrDecimalPlaces); + $DisplayLineTotal = number_format($LineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; @@ -686,16 +698,16 @@ <td>' . $LineItem->ItemDescription . '</td>'; if ($LineItem->Controlled==0){ - echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 VALUE=' . $LineItem->Quantity . '></td>'; + echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 value=' . $LineItem->Quantity . '></td>'; } else { - echo '<td class=number><a href="' . $rootpath . '/CreditItemsControlled.php?' . SID . '&LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> + echo '<td class=number><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> <input type=hidden name="Quantity_' . $LineItem->LineNumber . '" value=' . $LineItem->Quantity . '></td>'; } echo '<td>' . $LineItem->Units . '</td> - <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 VALUE=' . $LineItem->Price . '></td> - <td><input type="CheckBox" name="Gross" VALUE=False></td> - <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 VALUE=' . ($LineItem->DiscountPercent * 100) . '>%</td> + <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 value=' . $LineItem->Price . '></td> + <td><input type="CheckBox" name="Gross" value=False></td> + <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 value=' . ($LineItem->DiscountPercent * 100) . '>%</td> <td class=number>' . $DisplayLineTotal . '</td>'; @@ -716,9 +728,6 @@ $TaxLineTotal =0; //initialise tax total for the line foreach ($LineItem->Taxes AS $Tax) { - $TaxTotals[$Tax->TaxAuthID] =0; - } - foreach ($LineItem->Taxes AS $Tax) { if ($i>0){ echo '<br />'; } @@ -737,14 +746,12 @@ $TaxTotal += $TaxLineTotal; - $DisplayTaxAmount = number_format($TaxLineTotal ,2); - $DisplayGrossLineTotal = number_format($LineTotal+ $TaxLineTotal,2); + $DisplayTaxAmount = number_format($TaxLineTotal ,$_SESSION['CreditItems']->CurrDecimalPlaces); + $DisplayGrossLineTotal = number_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); - echo '<td class=number>' . $DisplayTaxAmount . '</td> - <td class=number>' . $DisplayGrossLineTotal . '</td> - <td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '&Delete=' . $LineItem->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this line item from the credit note?') . '\');">' . _('Delete') . '</a></td> - - + echo '<td class="number">' . $DisplayTaxAmount . '</td> + <td class="number">' . $DisplayGrossLineTotal . '</td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $LineItem->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this line item from the credit note?') . '\');">' . _('Delete') . '</a></td> </tr>'; echo $RowStarter; @@ -762,8 +769,8 @@ <td colspan=5></td>'; - echo '<td colspan=2 class=number>'. _('Credit Freight').'</td> - <td><input type="text" class="number" size=6 maxlength=6 name=ChargeFreightCost VALUE=' . $_SESSION['CreditItems']->FreightCost . '></td>'; + echo '<td colspan="2" class="number">'. _('Credit Freight').'</td> + <td><input type="text" class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '" /></td>'; $FreightTaxTotal =0; //initialise tax total @@ -786,7 +793,7 @@ echo '<br />'; } - echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 VALUE=' . $FreightTaxLine->TaxRate * 100 . '>'; + echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 value="' . $FreightTaxLine->TaxRate * 100 . '" />'; if ($FreightTaxLine->TaxOnTax ==1){ $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); @@ -800,38 +807,43 @@ } echo '</td>'; - echo '<td class=number>' . number_format($FreightTaxTotal,2) . '</td> - <td class=number>' . number_format($FreightTaxTotal+ $_SESSION['CreditItems']->FreightCost,2) . '</td> + echo '<td class="number">' . number_format($FreightTaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> + <td class="number">' . number_format($FreightTaxTotal+ $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> </tr>'; $TaxTotal += $FreightTaxTotal; - $DisplayTotal = number_format($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost,2); + $DisplayTotal = number_format($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces); - echo '<tr> - <td colspan=7 class=number>' . _('Credit Totals') . "</td> - <td class=number><b>$DisplayTotal</b></td> - <td colspan=2></td> - <td class=number><b>" . number_format($TaxTotal,2) . "</td> - <td class=number><b>" . number_format($TaxTotal+($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost),2) . "</b></td> - </tr></table>"; + <td colspan="7" class="number">' . _('Credit Totals') . '</td> + <td class="number"><b>' . $DisplayTotal . '</b></td> + <td colspan="2"></td> + <td class="number"><b>' . number_format($TaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> + <td class="number"><b>' . number_format($TaxTotal+($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost),$_SESSION['CreditItems']->CurrDecimalPlaces) . '</b></td> + </tr> + </table>'; /*Now show options for the credit note */ - echo '<br /><table class=selection><tr><td>' . _('Credit Note Type') . ' :</td><td><select name=CreditType>'; + echo '<br /> + <table class="selection"> + <tr> + <td>' . _('Credit Note Type') . ' :</td> + <td><select name="CreditType">'; + if (!isset($_POST['CreditType']) OR $_POST['CreditType']=='Return'){ - echo '<option selected value="Return">' . _('Goods returned to store') . '</option>'; - echo '<option value="WriteOff">' . _('Goods written off') . '</option>'; - echo '<option value="ReverseOverCharge">' . _('Reverse an Overcharge') . '</option>'; + echo '<option selected value="Return">' . _('Goods returned to store') . '</option> + <option value="WriteOff">' . _('Goods written off') . '</option> + <option value="ReverseOverCharge">' . _('Reverse an Overcharge') . '</option>'; } elseif ($_POST['CreditType']=='WriteOff') { - echo '<option selected value="WriteOff">' . _('Goods written off') . '</option>'; - echo '<option value="Return">' . _('Goods returned to store') . '</option>'; - echo '<option value="ReverseOverCharge">' . _('Reverse an Overcharge') . '</option>'; + echo '<option selected value="WriteOff">' . _('Goods written off') . '</option> + <option value="Return">' . _('Goods returned to store') . '</option> + <option value="ReverseOverCharge">' . _('Reverse an Overcharge') . '</option>'; } elseif($_POST['CreditType']=='ReverseOverCharge'){ - echo '<option selected value="ReverseOverCharge">' . _('Reverse Overcharge Only') . '</option>'; - echo '<option value="Return">' . _('Goods Returned To Store') . '</option>'; - echo '<option value="WriteOff">' . _('Good written off') . '</option>'; + echo '<option selected value="ReverseOverCharge">' . _('Reverse Overcharge Only') . '</option> + <option value="Return">' . _('Goods Returned To Store') . '</option> + <option value="WriteOff">' . _('Good written off') . '</option>'; } echo '</select></td></tr>'; @@ -843,7 +855,7 @@ echo '<tr><td>' . _('Goods Returned to Location') . ' :</td><td><select name=Location>'; - $SQL='SELECT loccode, locationname FROM locations'; + $SQL="SELECT loccode, locationname FROM locations"; $Result = DB_query($SQL,$db); if (!isset($_POST['Location'])){ @@ -852,9 +864,9 @@ while ($myrow = DB_fetch_array($Result)) { if ($_POST['Location']==$myrow['loccode']){ - echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr>'; @@ -863,20 +875,20 @@ echo '<tr><td>' . _('Write off the cost of the goods to') . '</td><td><select name=WriteOffGLCode>'; - $SQL='SELECT accountcode, - accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname - AND accountgroups.pandl=1 ORDER BY accountcode'; + $SQL="SELECT accountcode, + accountname + FROM chartmaster, + accountgroups + WHERE chartmaster.group_=accountgroups.groupname + AND accountgroups.pandl=1 ORDER BY accountcode"; $Result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($Result)) { if ($_POST['WriteOffGLCode']==$myrow['accountcode']){ - echo '<option selected VALUE=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } else { - echo '<option VALUE=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } } echo '</select></td></tr>'; @@ -885,7 +897,7 @@ $_POST['CreditText']=''; } echo '<tr><td>' . _('Credit Note Text') . ' :</td> - <td><textarea name=CreditText COLS=31 ROWS=5>' . $_POST['CreditText'] . '</textarea></td> + <td><textarea name="CreditText" COLS="31" rows="5">' . $_POST['CreditText'] . '</textarea></td> </tr> </table><br />'; @@ -895,11 +907,14 @@ prnMsg (_('The GL code to write off the credit value to must be specified. Please select the appropriate GL code for the selection box'),'info'); $OKToProcess = false; } - echo '<div class="centre"><input type=submit name="Update" VALUE="' . _('Update') . '"> - <input type=submit name="CancelCredit" VALUE="' . _('Cancel') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel the whole of this credit note?') . '\');">'; + echo '<div class="centre"> + <input type=submit name="Update" value="' . _('Update') . '" /> + <input type=submit name="CancelCredit" value="' . _('Cancel') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel the whole of this credit note?') . '\');" />'; if (!isset($_POST['ProcessCredit']) AND $OKToProcess == true){ - echo '<input type=submit name="ProcessCredit" VALUE="' . _('Process Credit Note') . '"></div><br />'; + echo '<input type=submit name="ProcessCredit" value="' . _('Process Credit Note') . '" /> + <br />'; } + echo '</div>'; } # end of if lines @@ -907,29 +922,31 @@ if (isset($_POST['PartSearch']) AND $_POST['PartSearch']!="" AND !isset($_POST['ProcessCredit'])){ - echo '<input type="hidden" name="PartSearch" value="' . _('Yes Please') . '">'; + echo '<input type="hidden" name="PartSearch" value="' . _('Yes Please') . '" />'; $SQL="SELECT categoryid, - categorydescription - FROM stockcategory - WHERE stocktype='F' - ORDER BY categorydescription"; + categorydescription + FROM stockcategory + WHERE stocktype='F' + ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); - echo '<br /><table class=selection> - <tr><td>' . _('Select a stock category') . ': <select name="StockCat">'; + echo '<br /> + <table class="selection"> + <tr> + <td>' . _('Select a stock category') . ': <select name="StockCat">'; - echo '<option selected VALUE="All">' . _('All'); + echo '<option selected value="All">' . _('All'); while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $_POST['StockCat']==$myrow1['categoryid']){ - echo '<option selected VALUE=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option selected value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option VALUE=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; } } - echo '</select>'; + echo '</select></td>'; if (!isset($_POST['Keywords'])) { $_POST['Keywords'] = ''; } @@ -940,22 +957,24 @@ echo '<td><input type="Text" name="Keywords" size="20" maxlength="25" value="' . $_POST['Keywords'] . '"></td></tr>'; echo '<tr><td></td>'; echo '<td><font SIZE="3"><b>' ._('OR') . '</b></font> ' . _('Enter extract of the Stock Code') . ': </td>'; - echo '<td><input type="Text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '"></td>'; + echo '<td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '"></td>'; echo '</tr>'; - echo '</table><br /><div class="centre">'; + echo '</table> + <br /> + <div class="centre">'; - echo '<input type=submit name="Search" value="' . _('Search Now') .'">'; - echo '<input type=submit Name="ChangeCustomer" value="' . _('Change Customer') . '">'; - echo '<input type=submit Name="Quick" value="' . _('Quick Entry') . '">'; - echo '</div>'; + echo '<input type=submit name="Search" value="' . _('Search Now') .'" /> + <input type=submit Name="ChangeCustomer" value="' . _('Change Customer') . '" /> + <input type=submit Name="Quick" value="' . _('Quick Entry') . '" /> + </div>'; if (isset($SearchResult)) { - echo '<table cellpadding=2 colspan=7 class=selection>'; + echo '<table cellpadding="2" colspan="7" class="selection">'; $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Units') .'</th> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Units') .'</th> </tr>'; echo $TableHeader; @@ -963,32 +982,31 @@ $k=0; //row colour counter while ($myrow=DB_fetch_array($SearchResult)) { - - $ImageSource = $_SESSION['part_pics_dir'] . '/' . $myrow['stockid'] . '.jpg'; - if (file_exists($ImageSource)){ - $ImageSource = '<img src="'.$ImageSource.'">'; - } else { - $ImageSource = '<i>'._('No Image').'</i>'; - } - /* $_SESSION['part_pics_dir'] is a user defined variable in config.php */ - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - - printf("<td><font size=1><input type=submit name='NewItem' VALUE='%s'></font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td>%s</td></tr>", - $myrow['stockid'], - $myrow['description'], - $myrow['units'], - $ImageSource); - + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + if(file_exists($_SESSION['part_pics_dir'] . '/' .mb_strtoupper($myrow['stockid']).'.jpg') ) { + printf('<td><font size=1><input type=submit name="NewItem" value="%s"></font></td> + <td><font size=1>%s</font></td> + <td><font size=1>%s</font></td> + <td><img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC&StockID=%s&text=&width=120&height=120"></td></tr>', + $myrow['stockid'], + $myrow['description'], + $myrow['units'], + $myrow['stockid']); + } else { //don't try to show the image + printf('<td><font size=1><input type=submit name="NewItem" value="%s"></font></td> + <td><font size=1>%s</font></td> + <td><font size=1>%s</font></td> + <td>' . _('No Image') . '</td></tr>', + $myrow['stockid'], + $myrow['description'], + $myrow['units']); + } #end of page full new headings if } #end of while loop @@ -997,21 +1015,27 @@ } /*end if part searching required */ elseif(!isset($_POST['ProcessCredit'])) { /*quick entry form */ /*FORM VARIABLES TO POST TO THE CREDIT NOTE 10 AT A TIME WITH PART CODE AND QUANTITY */ - echo '<table class=selection>'; - echo '<tr><th colspan=2><font size=3 color=navy><b>' . _('Quick Entry') . '</th></tr>'; + echo '<table class="selection">'; + echo '<tr><th colspan="2"><font size="3" color="navy"><b>' . _('Quick Entry') . '</th></tr>'; echo '<tr> - <th>' . _('Part Code') . '</th> - <th>' . _('Quantity') . '</th> - </tr>'; + <th>' . _('Part Code') . '</th> + <th>' . _('Quantity') . '</th> + </tr>'; for ($i=1;$i<=$_SESSION['QuickEntries'];$i++){ - echo '<tr class="OddTableRows"><td><input type="text" name="part_' . $i . '" size=21 maxlength=20></td> - <td><input type="text" class="number" name="qty_' . $i . '" size=6 maxlength=6></td></tr>'; + echo '<tr class="OddTableRows"> + <td><input type="text" name="part_' . $i . '" size="21" maxlength="20" /></td> + <td><input type="text" class="number" name="qty_' . $i . '" size="6" maxlength="6" /></td> + </tr>'; } - echo '</table><br /><div class="centre"><input type="submit" name="QuickEntry" value="' . _('Process Entries') . '"> - <input type="submit" name="PartSearch" value="' . _('Search Parts') . '"></div>'; + echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="QuickEntry" value="' . _('Process Entries') . '"> + <input type="submit" name="PartSearch" value="' . _('Search Parts') . '"> + </div>'; } @@ -1023,7 +1047,7 @@ First Get the area where the credit note is to from the branches table */ $SQL = "SELECT area - FROM custbranch + FROM custbranch WHERE custbranch.debtorno ='". $_SESSION['CreditItems']->DebtorNo . "' AND custbranch.branchcode = '" . $_SESSION['CreditItems']->Branch . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The area cannot be determined for this customer'); @@ -1742,24 +1766,22 @@ /* The double entry required is to reverse the cost of sales entry as above then debit the expense account the stock is to written off to */ - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $_POST['WriteOffGLCode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', - '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' - )"; - + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $_POST['WriteOffGLCode'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' + )"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of the stock credited GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1767,24 +1789,22 @@ /*the goods are coming back into stock so debit the stock account*/ $StockGLCode = GetStockGLCode($CreditLine->StockID, $db); - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', - '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' - )"; - + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $StockGLCode['stockact'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' + )"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side (or write off) of the cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1800,49 +1820,45 @@ $_SESSION['CreditItems']->DefaultSalesType, $db); - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->Price . "', - '" . ($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate'] . "' - )"; - + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['salesglcode'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->Price . "', + '" . ($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate'] . "' + )"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); if ($CreditLine->DiscountPercent !=0){ - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', - '" . -($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate'] . "' - )"; + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . -($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate'] . "' + )"; + - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1856,45 +1872,40 @@ /*Post credit note transaction to GL credit debtors, debit freight re-charged and debit sales */ if (($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal) !=0) { - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . -($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate'] . "')"; - + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['debtorsact'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . -($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate'] . "')"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting for the credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); } if ($_SESSION['CreditItems']->FreightCost !=0) { - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $_SESSION['CompanyRecord']['freightact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->FreightCost/$_SESSION['CurrencyRate'] . "' - )"; + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['freightact'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . $_SESSION['CreditItems']->FreightCost/$_SESSION['CurrencyRate'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting for this credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1902,24 +1913,20 @@ } foreach ( $TaxTotals as $TaxAuthID => $TaxAmount){ if ($TaxAmount !=0 ){ - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $TaxGLCodes[$TaxAuthID] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . ($TaxAmount/$_SESSION['CurrencyRate']) . "' - )"; + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $TaxGLCodes[$TaxAuthID] . "', + '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . ($TaxAmount/$_SESSION['CurrencyRate']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1940,7 +1947,7 @@ } else { echo '<a href="' . $rootpath . '/PrintCustTransPortrait.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this Credit Note') . '</a>'; } - echo '<p><a href="' . $rootpath . '/SelectCreditItems.php">' . _('Enter Another Credit Note') . '</a>'; + echo '<br /><a href="' . $rootpath . '/SelectCreditItems.php">' . _('Enter Another Credit Note') . '</a>'; } /*end of process credit note */ Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-16 03:37:58 UTC (rev 4633) +++ trunk/SelectOrderItems.php 2011-07-17 03:31:55 UTC (rev 4634) @@ -79,52 +79,52 @@ /*read in all the guff from the selected order into the Items cart */ $OrderHeaderSQL = "SELECT salesorders.debtorno, - debtorsmaster.name, - salesorders.branchcode, - salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.ordertype, - salestypes.sales_type, - salesorders.shipvia, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.contactphone, - salesorders.contactemail, - salesorders.freightcost, - salesorders.deliverydate, - debtorsmaster.currcode, - currencies.decimalplaces, - paymentterms.terms, - salesorders.fromstkloc, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorders.quotation, - salesorders.deliverblind, - debtorsmaster.customerpoline, - locations.locationname, - custbranch.estdeliverydays, - custbranch.salesman - FROM salesorders - INNER JOIN debtorsmaster - ON salesorders.debtorno = debtorsmaster.debtorno - INNER JOIN salestypes - ON salesorders.ordertype=salestypes.typeabbrev - INNER JOIN custbranch - ON salesorders.debtorno = custbranch.debtorno - AND salesorders.branchcode = custbranch.branchcode - INNER JOIN paymentterms - ON debtorsmaster.paymentterms=paymentterms.termsindicator - INNER JOIN locations - ON locations.loccode=salesorders.fromstkloc - INNER JOIN currencies - ON debtorsmaster.currcode=currencies.currabrev - WHERE salesorders.orderno = '" . $_GET['ModifyOrderNumber'] . "'"; + debtorsmaster.name, + salesorders.branchcode, + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.ordertype, + salestypes.sales_type, + salesorders.shipvia, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.contactphone, + salesorders.contactemail, + salesorders.freightcost, + salesorders.deliverydate, + debtorsmaster.currcode, + currencies.decimalplaces, + paymentterms.terms, + salesorders.fromstkloc, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorders.quotation, + salesorders.deliverblind, + debtorsmaster.customerpoline, + locations.locationname, + custbranch.estdeliverydays, + custbranch.salesman + FROM salesorders + INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN salestypes + ON salesorders.ordertype=salestypes.typeabbrev + INNER JOIN custbranch + ON salesorders.debtorno = custbranch.debtorno + AND salesorders.branchcode = custbranch.branchcode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN locations + ON locations.loccode=salesorders.fromstkloc + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE salesorders.orderno = '" . $_GET['ModifyOrderNumber'] . "'"; $ErrMsg = _('The order cannot be retrieved because'); $GetOrdHdrResult = DB_query($OrderHeaderSQL,$db,$ErrMsg); @@ -224,32 +224,32 @@ while ($myrow=db_fetch_array($LineItemsResult)) { if ($myrow['completed']==0){ $_SESSION['Items'.$identifier]->add_to_cart($myrow['stkcode'], - $myrow['quantity'], - $myrow['description'], - $myrow['unitprice'], - $myrow['discountpercent'], - $myrow['units'], - $myrow['volume'], - $myrow['kgs'], - $myrow['qohatloc'], - $myrow['mbflag'], - $myrow['actualdispatchdate'], - $myrow['qtyinvoiced'], - $myrow['discountcategory'], - 0, /*Controlled*/ - ... [truncated message content] |
From: <dai...@us...> - 2011-07-17 03:32:03
|
Revision: 4634 http://web-erp.svn.sourceforge.net/web-erp/?rev=4634&view=rev Author: daintree Date: 2011-07-17 03:31:55 +0000 (Sun, 17 Jul 2011) Log Message: ----------- credit tax cock-up fixed Modified Paths: -------------- trunk/Credit_Invoice.php trunk/SelectCreditItems.php trunk/SelectOrderItems.php trunk/doc/Change.log Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-07-16 03:37:58 UTC (rev 4633) +++ trunk/Credit_Invoice.php 2011-07-17 03:31:55 UTC (rev 4634) @@ -181,7 +181,7 @@ } else { /* there are no stock movement records created for that invoice */ - echo '<div class="centre"><a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a></div>'; + echo '<div class="centre"><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a></div>'; prnMsg( _('There are no line items that were retrieved for this invoice') . '. ' . _('The automatic credit program can not create a credit note from this invoice'),'warn'); include('includes/footer.inc'); exit; @@ -350,9 +350,6 @@ $TaxLineTotal =0; //initialise tax total for the line if (is_array($LnItm->Taxes) ){ foreach ($LnItm->Taxes as $Tax) { - $TaxTotals[$Tax->TaxAuthID]=0; - } - foreach ($LnItm->Taxes as $Tax) { if ($i>0){ echo '<br />'; } @@ -673,9 +670,9 @@ if ($MBFlag=='B' OR $MBFlag=='M') { $SQL = "UPDATE locstock - SET locstock.quantity = locstock.quantity + " . $CreditLine->QtyDispatched . " - WHERE locstock.stockid = '" . $CreditLine->StockID . "' - AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; + SET locstock.quantity = locstock.quantity + " . $CreditLine->QtyDispatched . " + WHERE locstock.stockid = '" . $CreditLine->StockID . "' + AND loccode = '" . $_SESSION['CreditItems']->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the location stock record was used'); @@ -686,18 +683,17 @@ and of course update the Location stock balances */ $StandardCost =0; /*To start with - accumulate the cost of the comoponents for use in journals later on */ - $sql = "SELECT - bom.component, - bom.quantity, - stockmaster.materialcost - + stockmaster.labourcost - + stockmaster.overheadcost AS standard - FROM bom, - stockmaster - WHERE bom.component=stockmaster.stockid - AND bom.parent='" . $CreditLine->StockID . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + $sql = "SELECT bom.component, + bom.quantity, + stockmaster.materialcost + + stockmaster.labourcost + + stockmaster.overheadcost AS standard + FROM bom, + stockmaster + WHERE bom.component=stockmaster.stockid + AND bom.parent='" . $CreditLine->StockID . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; $ErrMsg = _('Could not retrieve assembly components from the database for') . ' ' . $CreditLine->StockID . ' ' . _('because'); $DbgMsg = _('The SQL that failed was'); Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-16 03:37:58 UTC (rev 4633) +++ trunk/SelectCreditItems.php 2011-07-17 03:31:55 UTC (rev 4634) @@ -20,7 +20,7 @@ if (isset($_POST['ProcessCredit']) AND !isset($_SESSION['CreditItems'])){ prnMsg(_('This credit note has already been processed. Refreshing the page will not enter the credit note again') . '<br />' . _('Please use the navigation links provided rather than using the browser back button and then having to refresh'),'info'); - echo '<br /><a href="' . $rootpath . '/index.php?' . SID . '">' . _('Back to the menu') . '</a>'; + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); exit; } @@ -37,62 +37,66 @@ if (!isset($_SESSION['CreditItems'])){ /* It must be a new credit note being created $_SESSION['CreditItems'] would be set up from a previous call*/ - $_SESSION['CreditItems'] = new cart; + $_SESSION['CreditItems'] = new cart; - $_SESSION['RequireCustomerSelection'] = 1; + $_SESSION['RequireCustomerSelection'] = 1; } if (isset($_POST['ChangeCustomer'])){ - $_SESSION['RequireCustomerSelection']=1; + $_SESSION['RequireCustomerSelection']=1; } if (isset($_POST['Quick'])){ - unset($_POST['PartSearch']); + unset($_POST['PartSearch']); } if (isset($_POST['CancelCredit'])) { - unset($_SESSION['CreditItems']->LineItems); - unset($_SESSION['CreditItems']); - $_SESSION['CreditItems'] = new cart; - $_SESSION['RequireCustomerSelection'] = 1; + unset($_SESSION['CreditItems']->LineItems); + unset($_SESSION['CreditItems']); + $_SESSION['CreditItems'] = new cart; + $_SESSION['RequireCustomerSelection'] = 1; } if (isset($_POST['SearchCust']) AND $_SESSION['RequireCustomerSelection']==1){ - if ($_POST['Keywords'] AND $_POST['CustCode']) { + if ($_POST['Keywords'] AND $_POST['CustCode']) { prnMsg( _('Customer name keywords have been used in preference to the customer code extract entered'), 'info' ); - } - if ($_POST['Keywords']=='' AND $_POST['CustCode']=='') { + } + if ($_POST['Keywords']=='' AND $_POST['CustCode']=='') { prnMsg( _('At least one Customer Name keyword OR an extract of a Customer Code must be entered for the search'), 'info' ); - } else { - If (mb_strlen($_POST['Keywords'])>0) { + } else { + if (mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - $SQL = 'SELECT - custbranch.debtorno, - custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode - FROM custbranch - WHERE custbranch.brname ' . LIKE . " '" . $SearchString . "' - AND custbranch.disabletrans='0'"; + $SQL = "SELECT debtorsmaster.name, + custbranch.debtorno, + custbranch.brname, + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode + FROM custbranch + INNER JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.brname " . LIKE . " '" . $SearchString . "' + AND custbranch.disabletrans='0'"; } elseif (mb_strlen($_POST['CustCode'])>0){ - $SQL = 'SELECT - custbranch.debtorno, - custbranch.brname, - custbranch.contactname, - custbranch.phoneno, - custbranch.faxno, - custbranch.branchcode - FROM custbranch - WHERE custbranch.branchcode ' . LIKE . "'%" . $_POST['CustCode'] . "%' - AND custbranch.disabletrans='0'"; + $SQL = "SELECT debtorsmaster.name, + custbranch.debtorno, + custbranch.brname, + custbranch.contactname, + custbranch.phoneno, + custbranch.faxno, + custbranch.branchcode + FROM custbranch + INNER JOIN debtorsmaster + ON custbranch.debtorno=debtorsmaster.debtorno + WHERE custbranch.debtorno " . LIKE . "'%" . $_POST['CustCode'] . "%' + AND custbranch.disabletrans='0'"; } $ErrMsg = _('Customer branch records requested cannot be retrieved because'); @@ -102,7 +106,8 @@ if (DB_num_rows($result_CustSelect)==1){ $myrow=DB_fetch_array($result_CustSelect); - $_POST['Select'] = $myrow['debtorno'] . ' - ' . $myrow['branchcode']; + $SelectedCustomer = trim($myrow['debtorno']); + $SelectedBranch = trim($myrow['branchcode']); } elseif (DB_num_rows($result_CustSelect)==0){ prnMsg(_('Sorry') . ' ... ' . _('there are no customer branch records contain the selected text') . ' - ' . _('please alter your search criteria and try again'),'info'); } @@ -111,156 +116,156 @@ } /*end of if search button for customers was hit*/ -if (isset($_POST['Select']) AND $_POST['Select']!='') { +if (isset($_POST['JustSelectedACustomer']) AND !isset($SelectedCustomer)){ + /*Need to figure out the number of the form variable that the user clicked on */ + for ($i=1;$i<count($_POST);$i++){ //loop through the returned customers + if(isset($_POST['SubmitCustomerSelection'.$i])){ + break; + } + } + if ($i==count($_POST)){ + prnMsg(_('Unable to identify the selected customer'),'error'); + } else { + $SelectedCustomer = trim($_POST['SelectedCustomer'.$i]); + $SelectedBranch = trim($_POST['SelectedBranch'.$i]); + } +} + +if (isset($SelectedCustomer) AND isset($_POST['JustSelectedACustomer'])) { + /*will only be true if page called from customer selection form -parse the $Select string into customer code and branch code */ + Now retrieve customer information - name, salestype, currency, terms etc +*/ - $_SESSION['CreditItems']->Branch = mb_substr($_POST['Select'],mb_strpos($_POST['Select'],' - ')+3); - $_POST['Select'] = mb_substr($_POST['Select'],0,mb_strpos($_POST['Select'],' - ')); + $_SESSION['CreditItems']->DebtorNo = $SelectedCustomer; + $_SESSION['CreditItems']->Branch = $SelectedBranch; + $_SESSION['RequireCustomerSelection'] = 0; -/*Now retrieve customer information - name, salestype, currency, terms etc */ +/* default the branch information from the customer branches table CustBranch -particularly where the stock +will be booked back into. */ - $sql = "SELECT - debtorsmaster.name, - debtorsmaster.salestype, - debtorsmaster.currcode, - currencies.rate - FROM debtorsmaster, - currencies - WHERE debtorsmaster.currcode=currencies.currabrev - AND debtorsmaster.debtorno = '" . $_POST['Select'] . "'"; - - $ErrMsg = _('The customer record of the customer selected') . ': ' . $_POST['Select'] . ' ' . _('cannot be retrieved because'); - $DbgMsg = _('The SQL used to retrieve the customer details and failed was'); + $sql = "SELECT debtorsmaster.name, + debtorsmaster.salestype, + debtorsmaster.currcode, + currencies.rate, + currencies.decimalplaces, + custbranch.brname, + custbranch.braddress1, + custbranch.braddress2, + custbranch.braddress3, + custbranch.braddress4, + custbranch.braddress5, + custbranch.braddress6, + custbranch.phoneno, + custbranch.email, + custbranch.defaultlocation, + custbranch.taxgroupid, + locations.taxprovinceid + FROM custbranch + INNER JOIN locations ON locations.loccode=custbranch.defaultlocation + INNER JOIN debtorsmaster ON custbranch.debtorno=debtorsmaster.debtorno + INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev + WHERE custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "' + AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "'"; + + $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $SelectedCustomer . ' ' . _('cannot be retrieved because'); + $DbgMsg = _('SQL used to retrieve the branch details was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); - $myrow = DB_fetch_row($result); + $myrow = DB_fetch_array($result); - $_SESSION['CreditItems']->DebtorNo = $_POST['Select']; - $_SESSION['RequireCustomerSelection'] = 0; - $_SESSION['CreditItems']->CustomerName = $myrow[0]; - /* the sales type determines the price list to be used by default the customer of the user is defaulted from the entry of the userid and password. */ - - $_SESSION['CreditItems']->DefaultSalesType = $myrow[1]; - $_SESSION['CreditItems']->DefaultCurrency = $myrow[2]; - $_SESSION['CurrencyRate'] = $myrow[3]; - -/* default the branch information from the customer branches table CustBranch -particularly where the stock -will be booked back into. */ - - $sql = "SELECT - custbranch.brname, - custbranch.braddress1, - custbranch.braddress2, - custbranch.braddress3, - custbranch.braddress4, - custbranch.braddress5, - custbranch.braddress6, - custbranch.phoneno, - custbranch.email, - custbranch.defaultlocation, - custbranch.taxgroupid, - locations.taxprovinceid - FROM custbranch - INNER JOIN locations ON locations.loccode=custbranch.defaultlocation - WHERE custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "' - AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "'"; - - $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $_POST['Select'] . ' ' . _('cannot be retrieved because'); - $DbgMsg = _('SQL used to retrieve the branch details was'); - $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); - - $myrow = DB_fetch_array($result); - $_SESSION['CreditItems']->DeliverTo = $myrow['brname']; - $_SESSION['CreditItems']->BrAdd1 = $myrow['braddress1']; - $_SESSION['CreditItems']->BrAdd2 = $myrow['braddress2']; - $_SESSION['CreditItems']->BrAdd3 = $myrow['braddress3']; - $_SESSION['CreditItems']->BrAdd4 = $myrow['braddress4']; - $_SESSION['CreditItems']->BrAdd5 = $myrow['braddress5']; - $_SESSION['CreditItems']->BrAdd6 = $myrow['braddress6']; - $_SESSION['CreditItems']->PhoneNo = $myrow['phoneno']; - $_SESSION['CreditItems']->Email = $myrow['email']; - $_SESSION['CreditItems']->Location = $myrow['defaultlocation']; - $_SESSION['CreditItems']->TaxGroup = $myrow['taxgroupid']; - $_SESSION['CreditItems']->DispatchTaxProvince = $myrow['taxprovinceid']; - $_SESSION['CreditItems']->GetFreightTaxes(); + $_SESSION['CreditItems']->CustomerName = $myrow['name']; + $_SESSION['CreditItems']->DefaultSalesType = $myrow['salestype']; + $_SESSION['CreditItems']->DefaultCurrency = $myrow['currcode']; + $_SESSION['CreditItems']->CurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['CurrencyRate'] = $myrow['rate']; + $_SESSION['CreditItems']->DeliverTo = $myrow['brname']; + $_SESSION['CreditItems']->BrAdd1 = $myrow['braddress1']; + $_SESSION['CreditItems']->BrAdd2 = $myrow['braddress2']; + $_SESSION['CreditItems']->BrAdd3 = $myrow['braddress3']; + $_SESSION['CreditItems']->BrAdd4 = $myrow['braddress4']; + $_SESSION['CreditItems']->BrAdd5 = $myrow['braddress5']; + $_SESSION['CreditItems']->BrAdd6 = $myrow['braddress6']; + $_SESSION['CreditItems']->PhoneNo = $myrow['phoneno']; + $_SESSION['CreditItems']->Email = $myrow['email']; + $_SESSION['CreditItems']->Location = $myrow['defaultlocation']; + $_SESSION['CreditItems']->TaxGroup = $myrow['taxgroupid']; + $_SESSION['CreditItems']->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['CreditItems']->GetFreightTaxes(); } - - /* if the change customer button hit or the customer has not already been selected */ if ($_SESSION['RequireCustomerSelection'] ==1 OR !isset($_SESSION['CreditItems']->DebtorNo) OR $_SESSION['CreditItems']->DebtorNo=='' ) { - echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Select Customer For Credit Note').'</p>'; - echo '<table cellpadding=3 colspan=4 class=selection>'; - echo '<tr><th colspan=5><font size=3 color=navy><b> ' . _('Customer Selection') . '</b></font></th></tr>'; + echo '<table cellpadding="3" colspan="4" class="selection">'; + echo '<tr><th colspan="5"><font size="3" color="navy"><b> ' . _('Customer Selection') . '</b></font></th></tr>'; echo '<tr>'; - echo '<td><font size=1>' . _('Enter text in the customer name') . ':</font></td>'; - echo '<td><input type="Text" name="Keywords" size=20 maxlength=25></td>'; - echo '<td><font size=3><b>' . _('OR') . '</b></font></td>'; - echo '<td><font size=1>' . _('Enter text extract in the customer code') . ':</font></td>'; - echo '<td><input type="Text" name="CustCode" size=15 maxlength=18></td>'; + echo '<td><font size="1">' . _('Enter text in the customer name') . ':</font></td>'; + echo '<td><input type="text" name="Keywords" size=20 maxlength=25></td>'; + echo '<td><font size="3"><b>' . _('OR') . '</b></font></td>'; + echo '<td><font size="1">' . _('Enter text extract in the customer code') . ':</font></td>'; + echo '<td><input type="text" name="CustCode" size="15" maxlength="18"></td>'; echo '</tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type=submit name="SearchCust" VALUE="' . _('Search Now') . '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="SearchCust" value="' . _('Search Now') . '"></div>'; if (isset($result_CustSelect)) { - echo '<br /><table cellpadding=2 colspan=7 class=selection>'; + echo '<table cellpadding="2" colspan="7">'; - $TableHeader = '<tr> - <th>' . _('Code') . '</th> + $TableHeader = '<br /> + <tr> + <th>' . _('Customer') . '</th> <th>' . _('Branch') . '</th> <th>' . _('Contact') . '</th> <th>' . _('Phone') . '</th> <th>' . _('Fax') . '</th> - </tr>'; + </tr>'; + echo $TableHeader; - echo $TableHeader; + $j = 1; + $k = 0; //row counter to determine background colour + $LastCustomer=''; + while ($myrow=DB_fetch_array($result_CustSelect)) { - $j = 1; - $k = 0; //row counter to determine background colour + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" name="SelectParts" method="post">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + if ($LastCustomer != $myrow['name']) { + echo '<td>'.$myrow['name'].'</td>'; + } else { + echo '<td></td>'; + } + echo '<td><input tabindex='.($j+5).' type=submit name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '"></td> + <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> + <td>'.$myrow['contactname'].'</td> + <td>'.$myrow['phoneno'].'</td> + <td>'.$myrow['faxno'].'</td> + </tr>'; + $LastCustomer=$myrow['name']; + $j++; + //end of page full new headings if + } //end of while loop + echo '<input type="hidden" name="JustSelectedACustomer" value="Yes">'; + echo '</table></form>'; - while ($myrow=DB_fetch_array($result_CustSelect)) { - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - printf("<td><font size=1><input type=submit name='Select' VALUE='%s - %s'</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - </tr>", - $myrow['debtorno'], - $myrow['branchcode'], - $myrow['brname'], - $myrow['contactname'], - $myrow['phoneno'], - $myrow['faxno']); - -//end of page full new headings if - } -//end of while loop - - echo '</table>'; - - } -//end if results to show - + }//end if results to show + //end if RequireCustomerSelection } else { /* everything below here only do if a customer is selected @@ -424,21 +429,20 @@ if ($AlreadyOnThisCredit!=1){ - $sql = "SELECT - stockmaster.description, - stockmaster.stockid, - stockmaster.units, - stockmaster.volume, - stockmaster.kgs, - (materialcost+labourcost+overheadcost) AS standardcost, - stockmaster.mbflag, - stockmaster.decimalplaces, - stockmaster.controlled, - stockmaster.serialised, - stockmaster.discountcategory, - stockmaster.taxcatid - FROM stockmaster - WHERE stockmaster.stockid = '". $_POST['NewItem'] . "'"; + $sql = "SELECT stockmaster.description, + stockmaster.stockid, + stockmaster.units, + stockmaster.volume, + stockmaster.kgs, + (materialcost+labourcost+overheadcost) AS standardcost, + stockmaster.mbflag, + stockmaster.decimalplaces, + stockmaster.controlled, + stockmaster.serialised, + stockmaster.discountcategory, + stockmaster.taxcatid + FROM stockmaster + WHERE stockmaster.stockid = '". $_POST['NewItem'] . "'"; $ErrMsg = _('There is a problem selecting the part because'); $result1 = DB_query($sql,$db,$ErrMsg); @@ -505,7 +509,7 @@ $_SESSION['CreditItems']->FreightCost = $_POST['ChargeFreightCost']; } - If (isset($_POST['Location']) AND $_POST['Location'] != $_SESSION['CreditItems']->Location){ + if (isset($_POST['Location']) AND $_POST['Location'] != $_SESSION['CreditItems']->Location){ $_SESSION['CreditItems']->Location = $_POST['Location']; @@ -541,7 +545,7 @@ $Price = $_POST['Price_' . $LineItem->LineNumber]; } - $DiscountPercentage = $_POST['Discount_' . $LineItem->LineNumber]; + $DiscountPercentage = $_POST['Discount_' . $LineItem->LineNumber]; foreach ($LineItem->Taxes as $TaxLine) { if (isset($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ @@ -552,7 +556,15 @@ 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 credited to less than 0 or the price less than 0 or the discount more than 100% or less than 0%'),'warn'); } elseif (isset($_POST['Quantity_' . $LineItem->LineNumber])) { - $_SESSION['CreditItems']->update_cart_item($LineItem->LineNumber, $Quantity, $Price, $DiscountPercentage/100, $Narrative, 'No', $LineItem->ItemDue, $LineItem->POLine, 0); + $_SESSION['CreditItems']->update_cart_item($LineItem->LineNumber, + $Quantity, + $Price, + $DiscountPercentage/100, + $Narrative, + 'No', + $LineItem->ItemDue, + $LineItem->POLine, + 0); } } @@ -564,7 +576,7 @@ } } - If (isset($_POST['NewItem'])){ + if (isset($_POST['NewItem'])){ /* get the item details from the database and hold them in the cart object make the quantity 1 by default then add it to the cart */ $AlreadyOnThisCredit =0; @@ -583,19 +595,19 @@ if ($AlreadyOnThisCredit!=1){ $sql = "SELECT stockmaster.description, - stockmaster.stockid, - stockmaster.units, - stockmaster.volume, - stockmaster.kgs, - stockmaster.mbflag, - stockmaster.discountcategory, - stockmaster.controlled, - stockmaster.decimalplaces, - stockmaster.serialised, - (materialcost+labourcost+overheadcost) AS standardcost, - stockmaster.taxcatid - FROM stockmaster - WHERE stockmaster.stockid = '". $_POST['NewItem'] . "'"; + stockmaster.stockid, + stockmaster.units, + stockmaster.volume, + stockmaster.kgs, + stockmaster.mbflag, + stockmaster.discountcategory, + stockmaster.controlled, + stockmaster.decimalplaces, + stockmaster.serialised, + (materialcost+labourcost+overheadcost) AS standardcost, + stockmaster.taxcatid + FROM stockmaster + WHERE stockmaster.stockid = '". $_POST['NewItem'] . "'"; $ErrMsg = _('The item details could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the item details but failed was'); @@ -644,21 +656,21 @@ /* This is where the credit note as selected should be displayed reflecting any deletions or insertions*/ - echo '<table cellpadding=2 colspan=7 class=selection> - <tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> - <th>' . _('Quantity') . '</th> - <th>' . _('Unit') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Gross') . '</th> - <th>' . _('Discount') . '</th> - <th>' . _('Total') . '<br />' . _('Excl Tax') . '</th> - <th>' . _('Tax Authority') . '</th> - <th>' . _('Tax') . '<br />' . _('Rate') . '</th> - <th>' . _('Tax') . '<br />' . _('Amount') . '</th> - <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> - </tr>'; + echo '<table cellpadding="2" colspan="7" class="selection"> + <tr> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Gross') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Total') . '<br />' . _('Excl Tax') . '</th> + <th>' . _('Tax Authority') . '</th> + <th>' . _('Tax') . '<br />' . _('Rate') . '</th> + <th>' . _('Tax') . '<br />' . _('Amount') . '</th> + <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> + </tr>'; $_SESSION['CreditItems']->total = 0; $_SESSION['CreditItems']->totalVolume = 0; @@ -671,8 +683,8 @@ $k =0; //row colour counter foreach ($_SESSION['CreditItems']->LineItems as $LineItem) { - $LineTotal = $LineItem->Quantity * $LineItem->Price * (1 - $LineItem->DiscountPercent); - $DisplayLineTotal = number_format($LineTotal,2); + $LineTotal = round($LineItem->Quantity * $LineItem->Price * (1 - $LineItem->DiscountPercent),$_SESSION['CreditItems']->CurrDecimalPlaces); + $DisplayLineTotal = number_format($LineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; @@ -686,16 +698,16 @@ <td>' . $LineItem->ItemDescription . '</td>'; if ($LineItem->Controlled==0){ - echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 VALUE=' . $LineItem->Quantity . '></td>'; + echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 value=' . $LineItem->Quantity . '></td>'; } else { - echo '<td class=number><a href="' . $rootpath . '/CreditItemsControlled.php?' . SID . '&LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> + echo '<td class=number><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> <input type=hidden name="Quantity_' . $LineItem->LineNumber . '" value=' . $LineItem->Quantity . '></td>'; } echo '<td>' . $LineItem->Units . '</td> - <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 VALUE=' . $LineItem->Price . '></td> - <td><input type="CheckBox" name="Gross" VALUE=False></td> - <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 VALUE=' . ($LineItem->DiscountPercent * 100) . '>%</td> + <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 value=' . $LineItem->Price . '></td> + <td><input type="CheckBox" name="Gross" value=False></td> + <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 value=' . ($LineItem->DiscountPercent * 100) . '>%</td> <td class=number>' . $DisplayLineTotal . '</td>'; @@ -716,9 +728,6 @@ $TaxLineTotal =0; //initialise tax total for the line foreach ($LineItem->Taxes AS $Tax) { - $TaxTotals[$Tax->TaxAuthID] =0; - } - foreach ($LineItem->Taxes AS $Tax) { if ($i>0){ echo '<br />'; } @@ -737,14 +746,12 @@ $TaxTotal += $TaxLineTotal; - $DisplayTaxAmount = number_format($TaxLineTotal ,2); - $DisplayGrossLineTotal = number_format($LineTotal+ $TaxLineTotal,2); + $DisplayTaxAmount = number_format($TaxLineTotal ,$_SESSION['CreditItems']->CurrDecimalPlaces); + $DisplayGrossLineTotal = number_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); - echo '<td class=number>' . $DisplayTaxAmount . '</td> - <td class=number>' . $DisplayGrossLineTotal . '</td> - <td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID . '&Delete=' . $LineItem->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this line item from the credit note?') . '\');">' . _('Delete') . '</a></td> - - + echo '<td class="number">' . $DisplayTaxAmount . '</td> + <td class="number">' . $DisplayGrossLineTotal . '</td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $LineItem->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this line item from the credit note?') . '\');">' . _('Delete') . '</a></td> </tr>'; echo $RowStarter; @@ -762,8 +769,8 @@ <td colspan=5></td>'; - echo '<td colspan=2 class=number>'. _('Credit Freight').'</td> - <td><input type="text" class="number" size=6 maxlength=6 name=ChargeFreightCost VALUE=' . $_SESSION['CreditItems']->FreightCost . '></td>'; + echo '<td colspan="2" class="number">'. _('Credit Freight').'</td> + <td><input type="text" class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '" /></td>'; $FreightTaxTotal =0; //initialise tax total @@ -786,7 +793,7 @@ echo '<br />'; } - echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 VALUE=' . $FreightTaxLine->TaxRate * 100 . '>'; + echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 value="' . $FreightTaxLine->TaxRate * 100 . '" />'; if ($FreightTaxLine->TaxOnTax ==1){ $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); @@ -800,38 +807,43 @@ } echo '</td>'; - echo '<td class=number>' . number_format($FreightTaxTotal,2) . '</td> - <td class=number>' . number_format($FreightTaxTotal+ $_SESSION['CreditItems']->FreightCost,2) . '</td> + echo '<td class="number">' . number_format($FreightTaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> + <td class="number">' . number_format($FreightTaxTotal+ $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> </tr>'; $TaxTotal += $FreightTaxTotal; - $DisplayTotal = number_format($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost,2); + $DisplayTotal = number_format($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces); - echo '<tr> - <td colspan=7 class=number>' . _('Credit Totals') . "</td> - <td class=number><b>$DisplayTotal</b></td> - <td colspan=2></td> - <td class=number><b>" . number_format($TaxTotal,2) . "</td> - <td class=number><b>" . number_format($TaxTotal+($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost),2) . "</b></td> - </tr></table>"; + <td colspan="7" class="number">' . _('Credit Totals') . '</td> + <td class="number"><b>' . $DisplayTotal . '</b></td> + <td colspan="2"></td> + <td class="number"><b>' . number_format($TaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> + <td class="number"><b>' . number_format($TaxTotal+($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost),$_SESSION['CreditItems']->CurrDecimalPlaces) . '</b></td> + </tr> + </table>'; /*Now show options for the credit note */ - echo '<br /><table class=selection><tr><td>' . _('Credit Note Type') . ' :</td><td><select name=CreditType>'; + echo '<br /> + <table class="selection"> + <tr> + <td>' . _('Credit Note Type') . ' :</td> + <td><select name="CreditType">'; + if (!isset($_POST['CreditType']) OR $_POST['CreditType']=='Return'){ - echo '<option selected value="Return">' . _('Goods returned to store') . '</option>'; - echo '<option value="WriteOff">' . _('Goods written off') . '</option>'; - echo '<option value="ReverseOverCharge">' . _('Reverse an Overcharge') . '</option>'; + echo '<option selected value="Return">' . _('Goods returned to store') . '</option> + <option value="WriteOff">' . _('Goods written off') . '</option> + <option value="ReverseOverCharge">' . _('Reverse an Overcharge') . '</option>'; } elseif ($_POST['CreditType']=='WriteOff') { - echo '<option selected value="WriteOff">' . _('Goods written off') . '</option>'; - echo '<option value="Return">' . _('Goods returned to store') . '</option>'; - echo '<option value="ReverseOverCharge">' . _('Reverse an Overcharge') . '</option>'; + echo '<option selected value="WriteOff">' . _('Goods written off') . '</option> + <option value="Return">' . _('Goods returned to store') . '</option> + <option value="ReverseOverCharge">' . _('Reverse an Overcharge') . '</option>'; } elseif($_POST['CreditType']=='ReverseOverCharge'){ - echo '<option selected value="ReverseOverCharge">' . _('Reverse Overcharge Only') . '</option>'; - echo '<option value="Return">' . _('Goods Returned To Store') . '</option>'; - echo '<option value="WriteOff">' . _('Good written off') . '</option>'; + echo '<option selected value="ReverseOverCharge">' . _('Reverse Overcharge Only') . '</option> + <option value="Return">' . _('Goods Returned To Store') . '</option> + <option value="WriteOff">' . _('Good written off') . '</option>'; } echo '</select></td></tr>'; @@ -843,7 +855,7 @@ echo '<tr><td>' . _('Goods Returned to Location') . ' :</td><td><select name=Location>'; - $SQL='SELECT loccode, locationname FROM locations'; + $SQL="SELECT loccode, locationname FROM locations"; $Result = DB_query($SQL,$db); if (!isset($_POST['Location'])){ @@ -852,9 +864,9 @@ while ($myrow = DB_fetch_array($Result)) { if ($_POST['Location']==$myrow['loccode']){ - echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr>'; @@ -863,20 +875,20 @@ echo '<tr><td>' . _('Write off the cost of the goods to') . '</td><td><select name=WriteOffGLCode>'; - $SQL='SELECT accountcode, - accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname - AND accountgroups.pandl=1 ORDER BY accountcode'; + $SQL="SELECT accountcode, + accountname + FROM chartmaster, + accountgroups + WHERE chartmaster.group_=accountgroups.groupname + AND accountgroups.pandl=1 ORDER BY accountcode"; $Result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($Result)) { if ($_POST['WriteOffGLCode']==$myrow['accountcode']){ - echo '<option selected VALUE=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option selected value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } else { - echo '<option VALUE=' . $myrow['accountcode'] . '>' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; + echo '<option value="' . $myrow['accountcode'] . '">' . $myrow['accountcode'] . ' - ' . $myrow['accountname'] . '</option>'; } } echo '</select></td></tr>'; @@ -885,7 +897,7 @@ $_POST['CreditText']=''; } echo '<tr><td>' . _('Credit Note Text') . ' :</td> - <td><textarea name=CreditText COLS=31 ROWS=5>' . $_POST['CreditText'] . '</textarea></td> + <td><textarea name="CreditText" COLS="31" rows="5">' . $_POST['CreditText'] . '</textarea></td> </tr> </table><br />'; @@ -895,11 +907,14 @@ prnMsg (_('The GL code to write off the credit value to must be specified. Please select the appropriate GL code for the selection box'),'info'); $OKToProcess = false; } - echo '<div class="centre"><input type=submit name="Update" VALUE="' . _('Update') . '"> - <input type=submit name="CancelCredit" VALUE="' . _('Cancel') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel the whole of this credit note?') . '\');">'; + echo '<div class="centre"> + <input type=submit name="Update" value="' . _('Update') . '" /> + <input type=submit name="CancelCredit" value="' . _('Cancel') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel the whole of this credit note?') . '\');" />'; if (!isset($_POST['ProcessCredit']) AND $OKToProcess == true){ - echo '<input type=submit name="ProcessCredit" VALUE="' . _('Process Credit Note') . '"></div><br />'; + echo '<input type=submit name="ProcessCredit" value="' . _('Process Credit Note') . '" /> + <br />'; } + echo '</div>'; } # end of if lines @@ -907,29 +922,31 @@ if (isset($_POST['PartSearch']) AND $_POST['PartSearch']!="" AND !isset($_POST['ProcessCredit'])){ - echo '<input type="hidden" name="PartSearch" value="' . _('Yes Please') . '">'; + echo '<input type="hidden" name="PartSearch" value="' . _('Yes Please') . '" />'; $SQL="SELECT categoryid, - categorydescription - FROM stockcategory - WHERE stocktype='F' - ORDER BY categorydescription"; + categorydescription + FROM stockcategory + WHERE stocktype='F' + ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); - echo '<br /><table class=selection> - <tr><td>' . _('Select a stock category') . ': <select name="StockCat">'; + echo '<br /> + <table class="selection"> + <tr> + <td>' . _('Select a stock category') . ': <select name="StockCat">'; - echo '<option selected VALUE="All">' . _('All'); + echo '<option selected value="All">' . _('All'); while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $_POST['StockCat']==$myrow1['categoryid']){ - echo '<option selected VALUE=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option selected value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option VALUE=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; } } - echo '</select>'; + echo '</select></td>'; if (!isset($_POST['Keywords'])) { $_POST['Keywords'] = ''; } @@ -940,22 +957,24 @@ echo '<td><input type="Text" name="Keywords" size="20" maxlength="25" value="' . $_POST['Keywords'] . '"></td></tr>'; echo '<tr><td></td>'; echo '<td><font SIZE="3"><b>' ._('OR') . '</b></font> ' . _('Enter extract of the Stock Code') . ': </td>'; - echo '<td><input type="Text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '"></td>'; + echo '<td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '"></td>'; echo '</tr>'; - echo '</table><br /><div class="centre">'; + echo '</table> + <br /> + <div class="centre">'; - echo '<input type=submit name="Search" value="' . _('Search Now') .'">'; - echo '<input type=submit Name="ChangeCustomer" value="' . _('Change Customer') . '">'; - echo '<input type=submit Name="Quick" value="' . _('Quick Entry') . '">'; - echo '</div>'; + echo '<input type=submit name="Search" value="' . _('Search Now') .'" /> + <input type=submit Name="ChangeCustomer" value="' . _('Change Customer') . '" /> + <input type=submit Name="Quick" value="' . _('Quick Entry') . '" /> + </div>'; if (isset($SearchResult)) { - echo '<table cellpadding=2 colspan=7 class=selection>'; + echo '<table cellpadding="2" colspan="7" class="selection">'; $TableHeader = '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Units') .'</th> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Units') .'</th> </tr>'; echo $TableHeader; @@ -963,32 +982,31 @@ $k=0; //row colour counter while ($myrow=DB_fetch_array($SearchResult)) { - - $ImageSource = $_SESSION['part_pics_dir'] . '/' . $myrow['stockid'] . '.jpg'; - if (file_exists($ImageSource)){ - $ImageSource = '<img src="'.$ImageSource.'">'; - } else { - $ImageSource = '<i>'._('No Image').'</i>'; - } - /* $_SESSION['part_pics_dir'] is a user defined variable in config.php */ - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - - printf("<td><font size=1><input type=submit name='NewItem' VALUE='%s'></font></td> - <td><font size=1>%s</font></td> - <td><font size=1>%s</font></td> - <td>%s</td></tr>", - $myrow['stockid'], - $myrow['description'], - $myrow['units'], - $ImageSource); - + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + if(file_exists($_SESSION['part_pics_dir'] . '/' .mb_strtoupper($myrow['stockid']).'.jpg') ) { + printf('<td><font size=1><input type=submit name="NewItem" value="%s"></font></td> + <td><font size=1>%s</font></td> + <td><font size=1>%s</font></td> + <td><img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC&StockID=%s&text=&width=120&height=120"></td></tr>', + $myrow['stockid'], + $myrow['description'], + $myrow['units'], + $myrow['stockid']); + } else { //don't try to show the image + printf('<td><font size=1><input type=submit name="NewItem" value="%s"></font></td> + <td><font size=1>%s</font></td> + <td><font size=1>%s</font></td> + <td>' . _('No Image') . '</td></tr>', + $myrow['stockid'], + $myrow['description'], + $myrow['units']); + } #end of page full new headings if } #end of while loop @@ -997,21 +1015,27 @@ } /*end if part searching required */ elseif(!isset($_POST['ProcessCredit'])) { /*quick entry form */ /*FORM VARIABLES TO POST TO THE CREDIT NOTE 10 AT A TIME WITH PART CODE AND QUANTITY */ - echo '<table class=selection>'; - echo '<tr><th colspan=2><font size=3 color=navy><b>' . _('Quick Entry') . '</th></tr>'; + echo '<table class="selection">'; + echo '<tr><th colspan="2"><font size="3" color="navy"><b>' . _('Quick Entry') . '</th></tr>'; echo '<tr> - <th>' . _('Part Code') . '</th> - <th>' . _('Quantity') . '</th> - </tr>'; + <th>' . _('Part Code') . '</th> + <th>' . _('Quantity') . '</th> + </tr>'; for ($i=1;$i<=$_SESSION['QuickEntries'];$i++){ - echo '<tr class="OddTableRows"><td><input type="text" name="part_' . $i . '" size=21 maxlength=20></td> - <td><input type="text" class="number" name="qty_' . $i . '" size=6 maxlength=6></td></tr>'; + echo '<tr class="OddTableRows"> + <td><input type="text" name="part_' . $i . '" size="21" maxlength="20" /></td> + <td><input type="text" class="number" name="qty_' . $i . '" size="6" maxlength="6" /></td> + </tr>'; } - echo '</table><br /><div class="centre"><input type="submit" name="QuickEntry" value="' . _('Process Entries') . '"> - <input type="submit" name="PartSearch" value="' . _('Search Parts') . '"></div>'; + echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="QuickEntry" value="' . _('Process Entries') . '"> + <input type="submit" name="PartSearch" value="' . _('Search Parts') . '"> + </div>'; } @@ -1023,7 +1047,7 @@ First Get the area where the credit note is to from the branches table */ $SQL = "SELECT area - FROM custbranch + FROM custbranch WHERE custbranch.debtorno ='". $_SESSION['CreditItems']->DebtorNo . "' AND custbranch.branchcode = '" . $_SESSION['CreditItems']->Branch . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The area cannot be determined for this customer'); @@ -1742,24 +1766,22 @@ /* The double entry required is to reverse the cost of sales entry as above then debit the expense account the stock is to written off to */ - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $_POST['WriteOffGLCode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', - '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' - )"; - + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $_POST['WriteOffGLCode'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' + )"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of the stock credited GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1767,24 +1789,22 @@ /*the goods are coming back into stock so debit the stock account*/ $StockGLCode = GetStockGLCode($CreditLine->StockID, $db); - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', - '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' - )"; - + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $StockGLCode['stockact'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' + )"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side (or write off) of the cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1800,49 +1820,45 @@ $_SESSION['CreditItems']->DefaultSalesType, $db); - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->Price . "', - '" . ($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate'] . "' - )"; - + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['salesglcode'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->Price . "', + '" . ($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate'] . "' + )"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); if ($CreditLine->DiscountPercent !=0){ - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', - '" . -($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate'] . "' - )"; + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . -($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate'] . "' + )"; + - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1856,45 +1872,40 @@ /*Post credit note transaction to GL credit debtors, debit freight re-charged and debit sales */ if (($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal) !=0) { - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . -($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate'] . "')"; - + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['debtorsact'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . -($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate'] . "')"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting for the credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); } if ($_SESSION['CreditItems']->FreightCost !=0) { - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $_SESSION['CompanyRecord']['freightact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->FreightCost/$_SESSION['CurrencyRate'] . "' - )"; + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $_SESSION['CompanyRecord']['freightact'] . "', + '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . $_SESSION['CreditItems']->FreightCost/$_SESSION['CurrencyRate'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting for this credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1902,24 +1913,20 @@ } foreach ( $TaxTotals as $TaxAuthID => $TaxAmount){ if ($TaxAmount !=0 ){ - $SQL = "INSERT INTO gltrans ( - type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) - VALUES ( - 11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $TaxGLCodes[$TaxAuthID] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . ($TaxAmount/$_SESSION['CurrencyRate']) . "' - )"; + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $TaxGLCodes[$TaxAuthID] . "', + '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . ($TaxAmount/$_SESSION['CurrencyRate']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1940,7 +1947,7 @@ } else { echo '<a href="' . $rootpath . '/PrintCustTransPortrait.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit&PrintPDF=True">' . _('Print this Credit Note') . '</a>'; } - echo '<p><a href="' . $rootpath . '/SelectCreditItems.php">' . _('Enter Another Credit Note') . '</a>'; + echo '<br /><a href="' . $rootpath . '/SelectCreditItems.php">' . _('Enter Another Credit Note') . '</a>'; } /*end of process credit note */ Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-07-16 03:37:58 UTC (rev 4633) +++ trunk/SelectOrderItems.php 2011-07-17 03:31:55 UTC (rev 4634) @@ -79,52 +79,52 @@ /*read in all the guff from the selected order into the Items cart */ $OrderHeaderSQL = "SELECT salesorders.debtorno, - debtorsmaster.name, - salesorders.branchcode, - salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.ordertype, - salestypes.sales_type, - salesorders.shipvia, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.contactphone, - salesorders.contactemail, - salesorders.freightcost, - salesorders.deliverydate, - debtorsmaster.currcode, - currencies.decimalplaces, - paymentterms.terms, - salesorders.fromstkloc, - salesorders.printedpackingslip, - salesorders.datepackingslipprinted, - salesorders.quotation, - salesorders.deliverblind, - debtorsmaster.customerpoline, - locations.locationname, - custbranch.estdeliverydays, - custbranch.salesman - FROM salesorders - INNER JOIN debtorsmaster - ON salesorders.debtorno = debtorsmaster.debtorno - INNER JOIN salestypes - ON salesorders.ordertype=salestypes.typeabbrev - INNER JOIN custbranch - ON salesorders.debtorno = custbranch.debtorno - AND salesorders.branchcode = custbranch.branchcode - INNER JOIN paymentterms - ON debtorsmaster.paymentterms=paymentterms.termsindicator - INNER JOIN locations - ON locations.loccode=salesorders.fromstkloc - INNER JOIN currencies - ON debtorsmaster.currcode=currencies.currabrev - WHERE salesorders.orderno = '" . $_GET['ModifyOrderNumber'] . "'"; + debtorsmaster.name, + salesorders.branchcode, + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.ordertype, + salestypes.sales_type, + salesorders.shipvia, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.contactphone, + salesorders.contactemail, + salesorders.freightcost, + salesorders.deliverydate, + debtorsmaster.currcode, + currencies.decimalplaces, + paymentterms.terms, + salesorders.fromstkloc, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorders.quotation, + salesorders.deliverblind, + debtorsmaster.customerpoline, + locations.locationname, + custbranch.estdeliverydays, + custbranch.salesman + FROM salesorders + INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN salestypes + ON salesorders.ordertype=salestypes.typeabbrev + INNER JOIN custbranch + ON salesorders.debtorno = custbranch.debtorno + AND salesorders.branchcode = custbranch.branchcode + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN locations + ON locations.loccode=salesorders.fromstkloc + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE salesorders.orderno = '" . $_GET['ModifyOrderNumber'] . "'"; $ErrMsg = _('The order cannot be retrieved because'); $GetOrdHdrResult = DB_query($OrderHeaderSQL,$db,$ErrMsg); @@ -224,32 +224,32 @@ while ($myrow=db_fetch_array($LineItemsResult)) { if ($myrow['completed']==0){ $_SESSION['Items'.$identifier]->add_to_cart($myrow['stkcode'], - $myrow['quantity'], - $myrow['description'], - $myrow['unitprice'], - $myrow['discountpercent'], - $myrow['units'], - $myrow['volume'], - $myrow['kgs'], - $myrow['qohatloc'], - $myrow['mbflag'], - $myrow['actualdispatchdate'], - $myrow['qtyinvoiced'], - $myrow['discountcategory'], - 0, /*Controlled*/ - ... [truncated message content] |
From: <dai...@us...> - 2011-07-19 09:35:34
|
Revision: 4635 http://web-erp.svn.sourceforge.net/web-erp/?rev=4635&view=rev Author: daintree Date: 2011-07-19 09:35:25 +0000 (Tue, 19 Jul 2011) Log Message: ----------- consistency Modified Paths: -------------- trunk/CounterSales.php trunk/CustomerInquiry.php trunk/FixedAssetItems.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/Labels.php trunk/Locations.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedWorkOrders.php trunk/MRPShortages.php trunk/MailInventoryValuation.php trunk/MailSalesReport.php trunk/MailSalesReport_csv.php trunk/SelectCustomer.php trunk/css/fresh/default.css trunk/index.php trunk/javascripts/MiscFunctions.js Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/CounterSales.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -84,30 +84,37 @@ include('includes/footer.inc'); exit; } - - $_SESSION['Items'.$identifier]->Branch = $myrow['cashsalebranch']; - $_SESSION['Items'.$identifier]->DebtorNo = $myrow['cashsalecustomer']; + if (isset($_GET['DebtorNo'])) { + $_SESSION['Items'.$identifier]->DebtorNo = $_GET['DebtorNo']; + $_SESSION['Items'.$identifier]->Branch = $_GET['BranchNo']; + } else { + $_SESSION['Items'.$identifier]->Branch = $myrow['cashsalebranch']; + $_SESSION['Items'.$identifier]->DebtorNo = $myrow['cashsalecustomer']; + } + $_SESSION['Items'.$identifier]->LocationName = $myrow['locationname']; $_SESSION['Items'.$identifier]->Location = $_SESSION['UserStockLocation']; $_SESSION['Items'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; // Now check to ensure this account exists and set defaults */ $sql = "SELECT debtorsmaster.name, - holdreasons.dissallowinvoices, - debtorsmaster.salestype, - salestypes.sales_type, - debtorsmaster.currcode, - debtorsmaster.customerpoline, - paymentterms.terms - FROM debtorsmaster, - holdreasons, - salestypes, - paymentterms - WHERE debtorsmaster.salestype=salestypes.typeabbrev - AND debtorsmaster.holdreason=holdreasons.reasoncode - AND debtorsmaster.paymentterms=paymentterms.termsindicator - AND debtorsmaster.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; - + holdreasons.dissallowinvoices, + debtorsmaster.salestype, + salestypes.sales_type, + debtorsmaster.currcode, + debtorsmaster.customerpoline, + paymentterms.terms, + currencies.decimalplaces + FROM debtorsmaster INNER JOIN holdreasons + ON debtorsmaster.holdreason=holdreasons.reasoncode + INNER JOIN salestypes + ON debtorsmaster.salestype=salestypes.typeabbrev + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtorsmaster.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; + $ErrMsg = _('The details of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->DebtorNo . ' ' . _('cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the customer details and failed was') . ':'; // echo $sql; @@ -127,7 +134,7 @@ $_SESSION['Items'.$identifier]->DefaultCurrency = $myrow['currcode']; $_SESSION['Items'.$identifier]->DefaultPOLine = $myrow['customerpoline']; $_SESSION['Items'.$identifier]->PaymentTerms = $myrow['terms']; - + $_SESSION['Items'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; /* now get the branch defaults from the customer branches table CustBranch. */ $sql = "SELECT custbranch.brname, @@ -208,7 +215,7 @@ } else { /*Not cancelling the order */ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Counter Sales') . '" alt="" />' . ' '; - echo _('Counter Sale') . ' - ' . $_SESSION['Items'.$identifier]->LocationName . ' (' . _('all amounts in') . ' ' . $_SESSION['Items'.$identifier]->DefaultCurrency . ')'; + echo $_SESSION['Items'.$identifier]->CustomerName . ' ' . _('Counter Sale') . ' ' ._('from') . ' ' . $_SESSION['Items'.$identifier]->LocationName . ' ' . _('inventory') . ' (' . _('all amounts in') . ' ' . $_SESSION['Items'.$identifier]->DefaultCurrency . ')'; echo '</p>'; } @@ -228,30 +235,30 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else if (mb_strlen($_POST['StockCode'])>0){ @@ -261,55 +268,55 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else { if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } @@ -345,7 +352,7 @@ /* Always do the stuff below */ -echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID .'identifier='.$identifier . '" name="SelectParts" method="post">'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" name="SelectParts" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; //Get The exchange rate used for GPPercent calculations on adding or amending items @@ -373,7 +380,10 @@ $Discount = 0; $i=1; - while ($i<=$_SESSION['QuickEntries'] and isset($_POST['part_' . $i]) and $_POST['part_' . $i]!='') { + while ($i<=$_SESSION['QuickEntries'] + AND isset($_POST['part_' . $i]) + AND $_POST['part_' . $i]!='') { + $QuickEntryCode = 'part_' . $i; $QuickEntryQty = 'qty_' . $i; $QuickEntryPOLine = 'poline_' . $i; @@ -409,9 +419,10 @@ $NewItemDue = DateAdd (Date($_SESSION['DefaultDateFormat']),'d', $_SESSION['Items'.$identifier]->DeliveryDays); } /*Now figure out if the item is a kit set - the field MBFlag='K'*/ - $sql = "SELECT stockmaster.mbflag, stockmaster.controlled - FROM stockmaster - WHERE stockmaster.stockid='". $NewItem ."'"; + $sql = "SELECT stockmaster.mbflag, + stockmaster.controlled + FROM stockmaster + WHERE stockmaster.stockid='". $NewItem ."'"; $ErrMsg = _('Could not determine if the part being ordered was a kitset or not because'); $DbgMsg = _('The sql that was used to determine if the part being ordered was a kitset or not was '); @@ -423,11 +434,11 @@ } elseif ($myrow=DB_fetch_array($KitResult)){ if ($myrow['mbflag']=='K'){ /*It is a kit set item */ $sql = "SELECT bom.component, - bom.quantity - FROM bom - WHERE bom.parent='" . $NewItem . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + bom.quantity + FROM bom + WHERE bom.parent='" . $NewItem . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; $ErrMsg = _('Could not retrieve kitset components from the database because') . ' '; $KitResult = DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -515,9 +526,9 @@ foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { $NewItem=$OrderLine->StockID; $sql = "SELECT stockmaster.mbflag, - stockmaster.controlled - FROM stockmaster - WHERE stockmaster.stockid='". $OrderLine->StockID."'"; + stockmaster.controlled + FROM stockmaster + WHERE stockmaster.stockid='". $OrderLine->StockID."'"; $ErrMsg = _('Could not determine if the part being ordered was a kitset or not because'); $DbgMsg = _('The sql that was used to determine if the part being ordered was a kitset or not was '); @@ -525,12 +536,12 @@ if ($myrow=DB_fetch_array($KitResult)){ if ($myrow['mbflag']=='K'){ /*It is a kit set item */ $sql = "SELECT bom.component, - bom.quantity - FROM bom - WHERE bom.parent='" . $OrderLine->StockID. "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; - + bom.quantity + FROM bom + WHERE bom.parent='" . $OrderLine->StockID. "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + $ErrMsg = _('Could not retrieve kitset components from the database because'); $KitResult = DB_query($sql,$db,$ErrMsg); @@ -559,9 +570,9 @@ * controlled items and ghost/phantom items cannot be selected because the SQL to show items to select doesn't show 'em * */ $sql = "SELECT stockmaster.mbflag, - stockmaster.taxcatid - FROM stockmaster - WHERE stockmaster.stockid='". $NewItem ."'"; + stockmaster.taxcatid + FROM stockmaster + WHERE stockmaster.stockid='". $NewItem ."'"; $ErrMsg = _('Could not determine if the part being ordered was a kitset or not because'); @@ -573,12 +584,12 @@ if ($myrow=DB_fetch_array($KitResult)){ if ($myrow['mbflag']=='K'){ /*It is a kit set item */ $sql = "SELECT bom.component, - bom.quantity - FROM bom - WHERE bom.parent='" . $NewItem . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; - + bom.quantity + FROM bom + WHERE bom.parent='" . $NewItem . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + $ErrMsg = _('Could not retrieve kitset components from the database because'); $KitResult = DB_query($sql,$db,$ErrMsg); @@ -610,8 +621,8 @@ foreach($NewItemArray as $NewItem => $NewItemQty) { if($NewItemQty > 0) { $sql = "SELECT stockmaster.mbflag - FROM stockmaster - WHERE stockmaster.stockid='". $NewItem ."'"; + FROM stockmaster + WHERE stockmaster.stockid='". $NewItem ."'"; $ErrMsg = _('Could not determine if the part being ordered was a kitset or not because'); @@ -625,9 +636,9 @@ $sql = "SELECT bom.component, bom.quantity FROM bom - WHERE bom.parent='" . $NewItem . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + WHERE bom.parent='" . $NewItem . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; $ErrMsg = _('Could not retrieve kitset components from the database because'); $KitResult = DB_query($sql,$db,$ErrMsg); @@ -659,7 +670,7 @@ $counter =0; foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { - if ($OrderLine->DiscCat !="" AND ! in_array($OrderLine->DiscCat,$DiscCatsDone)){ + if ($OrderLine->DiscCat !='' AND ! in_array($OrderLine->DiscCat,$DiscCatsDone)){ $DiscCatsDone[$counter]=$OrderLine->DiscCat; $QuantityOfDiscCat =0; @@ -670,10 +681,10 @@ } } $result = DB_query("SELECT MAX(discountrate) AS discount - FROM discountmatrix - WHERE salestype='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' - AND discountcategory ='" . $OrderLine->DiscCat . "' - AND quantitybreak <'" . $QuantityOfDiscCat . "'",$db); + FROM discountmatrix + WHERE salestype='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' + AND discountcategory ='" . $OrderLine->DiscCat . "' + AND quantitybreak <'" . $QuantityOfDiscCat . "'",$db); $myrow = DB_fetch_row($result); if ($myrow[0]!=0){ /* need to update the lines affected */ foreach ($_SESSION['Items'.$identifier]->LineItems as $StkItems_2) { @@ -686,7 +697,8 @@ } } /* end of discount matrix lookup code */ -if (count($_SESSION['Items'.$identifier]->LineItems)>0 and !isset($_POST['ProcessSale'])){ /*only show order lines if there are any */ +if (count($_SESSION['Items'.$identifier]->LineItems)>0 + AND !isset($_POST['ProcessSale'])){ /*only show order lines if there are any */ /* // ************************************************************************* // T H I S W H E R E T H E S A L E I S D I S P L A Y E D @@ -738,7 +750,7 @@ echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />'; echo '<input type="hidden" name="ItemDue_' . $OrderLine->LineNumber . '" value="'.$OrderLine->ItemDue.'" />'; - echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?' . SID .'identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> + echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> <td>' . $OrderLine->ItemDescription . '</td>'; echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . $OrderLine->Quantity . '" />'; @@ -750,7 +762,7 @@ echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . $OrderLine->Price . '" /></td> <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . ($OrderLine->DiscountPercent * 100) . '" /></td> <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="3" maxlength="40" value="' . $OrderLine->GPPercent . '" /></td>'; - echo '<td class="number">' . number_format($SubTotal,2) . '</td>'; + echo '<td class="number">' . number_format($SubTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; $LineDueDate = $OrderLine->ItemDue; if (!Is_Date($OrderLine->ItemDue)){ $LineDueDate = DateAdd (Date($_SESSION['DefaultDateFormat']),'d', $_SESSION['Items'.$identifier]->DeliveryDays); @@ -776,9 +788,9 @@ $TaxTotal += $TaxLineTotal; $_SESSION['Items'.$identifier]->TaxTotals=$TaxTotals; $_SESSION['Items'.$identifier]->TaxGLCodes=$TaxGLCodes; - echo '<td class="number">' . number_format($TaxLineTotal ,2) . '</td>'; - echo '<td class="number">' . number_format($SubTotal + $TaxLineTotal ,2) . '</td>'; - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID .'&identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; + echo '<td class="number">' . number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; + echo '<td class="number">' . number_format($SubTotal + $TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; if ($_SESSION['AllowOrderLineItemNarrative'] == 1){ echo $RowStarter; @@ -794,9 +806,9 @@ } /* end of loop around items */ echo '<tr class="EvenTableRows"><td colspan="8" class="number"><b>' . _('Total') . '</b></td> - <td class="number">' . number_format(($_SESSION['Items'.$identifier]->total),2) . '</td> - <td class="number">' . number_format($TaxTotal,2) . '</td> - <td class="number">' . number_format(($_SESSION['Items'.$identifier]->total+$TaxTotal),2) . '</td> + <td class="number">' . number_format(($_SESSION['Items'.$identifier]->total),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . number_format($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . number_format(($_SESSION['Items'.$identifier]->total+$TaxTotal),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> </tr> </table>'; echo '<input type="hidden" name="TaxTotal" value="'.$TaxTotal.'" />'; @@ -1938,9 +1950,9 @@ echo '<br /><div class="centre">'; if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTrans.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Landscape') . ')</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTrans.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Landscape') . ')</a><br /><br />'; } else { - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; } echo '<br /><br /><a href="' .$_SERVER['PHP_SELF'] . '">' . _('Start a new Counter Sale') . '</a></div>'; @@ -2077,7 +2089,7 @@ <td style="text-align:center">%s</td> <td style="text-align:center">%s</td> <td style="text-align:center">%s</td> - <td><font size=1><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm'.$myrow['stockid'].'" value="0" /> + <td><font size=1><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm%s" value="0" /> </td> </tr>', $myrow['stockid'], @@ -2087,9 +2099,6 @@ $DemandQty, $OnOrder, $Available, - $ImageSource, - $rootpath, - SID, $myrow['stockid']); if ($j==1) { $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; @@ -2110,20 +2119,20 @@ echo '<table class="selection"><tr><td><b>' . _('Select a Stock Category') . ': </b><select tabindex="1" name="StockCat">'; if (!isset($_POST['StockCat'])){ - echo "<option selected='True' value='All'>" . _('All').'</option>'; + echo '<option selected="true" value="All">' . _('All').'</option>'; $_POST['StockCat'] ='All'; } else { - echo "<option value='All'>" . _('All').'</option>'; + echo '<option value="All">' . _('All').'</option>'; } $SQL="SELECT categoryid, - categorydescription - FROM stockcategory - WHERE stocktype='F' OR stocktype='D' - ORDER BY categorydescription"; + categorydescription + FROM stockcategory + WHERE stocktype='F' OR stocktype='D' + ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); while ($myrow1 = DB_fetch_array($result1)) { if ($_POST['StockCat']==$myrow1['categoryid']){ - echo '<option selected="True" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; + echo '<option selected="true" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; } else { echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; } @@ -2180,22 +2189,22 @@ // Find the quantity in stock at location $QOHSql = "SELECT sum(quantity) AS QOH, - stockmaster.decimalplaces - FROM locstock INNER JOIN stockmaster - WHERE locstock.stockid='" .$myrow['stockid'] . "' - AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; + stockmaster.decimalplaces + FROM locstock INNER JOIN stockmaster + WHERE locstock.stockid='" .$myrow['stockid'] . "' + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $QOHResult = DB_query($QOHSql,$db); $QOHRow = DB_fetch_array($QOHResult); $QOH = $QOHRow['QOH']; // Find the quantity on outstanding sales orders $sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem - FROM salesorderdetails INNER JOIN salesorders - ON salesorders.orderno = salesorderdetails.orderno - WHERE salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "' - AND salesorderdetails.completed=0 - AND salesorders.quotation=0 - AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'"; + FROM salesorderdetails INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "' + AND salesorderdetails.completed=0 + AND salesorders.quotation=0 + AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'"; $ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Items'.$identifier]->Location . ' ' . _('cannot be retrieved because'); $DemandResult = DB_query($sql,$db,$ErrMsg); @@ -2227,8 +2236,8 @@ // Find the quantity on works orders $sql = "SELECT SUM(woitems.qtyreqd - woitems.qtyrecd) AS dedm - FROM woitems - WHERE stockid='" . $myrow['stockid'] ."'"; + FROM woitems + WHERE stockid='" . $myrow['stockid'] ."'"; $ErrMsg = _('The order details for this product cannot be retrieved because'); $WoResult = db_query($sql,$db,$ErrMsg); @@ -2251,26 +2260,22 @@ $Available = $qoh - $DemandQty + $OnOrder; printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm'.$myrow['stockid'].'" value="0" /> - </font></td> - </tr>', - $myrow['stockid'], - $myrow['description'], - $myrow['units'], - number_format($QOH, $QOHRow['decimalplaces']), - number_format($DemandQty, $QOHRow['decimalplaces']), - number_format($OnOrder, $QOHRow['decimalplaces']), - number_format($Available, $QOHRow['decimalplaces']), - $ImageSource, - $rootpath, - SID, - $myrow['stockid']); + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm%s" value="0" /></font></td> + </tr>', + $myrow['stockid'], + $myrow['description'], + $myrow['units'], + number_format($QOH, $QOHRow['decimalplaces']), + number_format($DemandQty, $QOHRow['decimalplaces']), + number_format($OnOrder, $QOHRow['decimalplaces']), + number_format($Available, $QOHRow['decimalplaces']), + $myrow['stockid']); if ($j==1) { $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; } @@ -2295,12 +2300,12 @@ else { /* show the quick entry form variable */ echo '<div class="page_help_text"><b>' . _('Use this form to add items quickly if the item codes are already known') . '</b></div><br /> - <table border="1"> - <tr>'; + <table border="1"> + <tr>'; /*do not display colum unless customer requires po line number by sales order line*/ echo '<th>' . _('Item Code') . '</th> - <th>' . _('Quantity') . '</th> - </tr>'; + <th>' . _('Quantity') . '</th> + </tr>'; $DefaultDeliveryDate = DateAdd(Date($_SESSION['DefaultDateFormat']),'d',$_SESSION['Items'.$identifier]->DeliveryDays); if (count($_SESSION['Items'.$identifier]->LineItems)==0) { echo '<input type="hidden" name="CustRef" value="'.$_SESSION['Items'.$identifier]->CustRef.'" />'; @@ -2315,8 +2320,7 @@ /* Do not display colum unless customer requires po line number by sales order line*/ echo '<td><input type="text" name="part_' . $i . '" size="21" maxlength="20" /></td> <td><input type="text" class="number" name="qty_' . $i . '" size="6" maxlength="6" /></td> - <input type="hidden" class="date" name="ItemDue_' . $i . '" - value="' . $DefaultDeliveryDate . '" /></tr>'; + <input type="hidden" class="date" name="ItemDue_' . $i . '" value="' . $DefaultDeliveryDate . '" /></tr>'; } echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.part_1);}</script>'; @@ -2330,4 +2334,4 @@ } echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/CustomerInquiry.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -103,7 +103,7 @@ INNER JOIN holdreasons ON debtorsmaster.holdreason = holdreasons.reasoncode INNER JOIN currencies - debtorsmaster.currcode = currencies.currabrev + ON debtorsmaster.currcode = currencies.currabrev WHERE debtorsmaster.debtorno = '" . $CustomerID . "'"; $ErrMsg =_('The customer details could not be retrieved by the SQL because'); Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/FixedAssetItems.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -123,28 +123,35 @@ $result = DB_Txn_Begin($db); /*Need to check if changing the balance sheet codes - as will need to do journals for the cost and accum depn of the asset to the new category */ - $result = DB_query("SELECT assetcategoryid, cost, accumdepn, costact, accumdepnact FROM fixedassets INNER JOIN fixedassetcategories WHERE assetid='" . $AssetID . "'",$db); + $result = DB_query("SELECT assetcategoryid, + cost, + accumdepn, + costact, + accumdepnact + FROM fixedassets INNER JOIN fixedassetcategories + ON fixedassets.assetcategoryid=fixedassetcategories.categoryid + WHERE assetid='" . $AssetID . "'",$db); $OldDetails = DB_fetch_array($result); if ($OldDetails['assetcategoryid'] !=$_POST['AssetCategoryID'] AND $OldDetails['cost']!=0){ $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); /* Get the new account codes for the new asset category */ $result = DB_query("SELECT costact, - accumdepnact - FROM fixedassetcategories - WHERE categoryid='" . $_POST['AssetCategoryID'] . "'",$db); + accumdepnact + FROM fixedassetcategories + WHERE categoryid='" . $_POST['AssetCategoryID'] . "'",$db); $NewAccounts = DB_fetch_array($result); $TransNo = GetNextTransNo( 42, $db); /* transaction type is asset category change */ //credit cost for the old category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('42', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -159,12 +166,12 @@ //debit cost for the new category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('42', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -179,12 +186,12 @@ if ($OldDetails['accumdepn']!=0) { //debit accumdepn for the old category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('42', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -199,12 +206,12 @@ //credit accum depn for the new category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('42', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -237,13 +244,13 @@ echo '<br />'; } else { //it is a NEW part $sql = "INSERT INTO fixedassets (description, - longdescription, - assetcategoryid, - assetlocation, - depntype, - depnrate, - barcode, - serialno) + longdescription, + assetcategoryid, + assetlocation, + depntype, + depnrate, + barcode, + serialno) VALUES ( '" . $_POST['Description'] . "', '" . $_POST['LongDescription'] . "', @@ -278,12 +285,12 @@ $CancelDelete = 0; //what validation is required before allowing deletion of assets .... maybe there should be no deletion option? $result = DB_query("SELECT cost, - accumdepn, - accumdepnact, - costact - FROM fixedassets INNER JOIN fixedassetcategories - ON fixedassets.assetcategoryid=fixedassetcategories.categoryid - WHERE assetid='" . $AssetID . "'", $db); + accumdepn, + accumdepnact, + costact + FROM fixedassets INNER JOIN fixedassetcategories + ON fixedassets.assetcategoryid=fixedassetcategories.categoryid + WHERE assetid='" . $AssetID . "'", $db); $AssetRow = DB_fetch_array($result); $NBV = $AssetRow['cost'] -$AssetRow['accumdepn']; if ($NBV!=0) { @@ -309,12 +316,12 @@ if ($AssetRow['cost'] > 0){ //credit cost for the asset deleted $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('43', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -329,12 +336,12 @@ //debit accumdepn for the depreciation removed on deletion of this asset $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('43', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -394,19 +401,19 @@ } elseif ($InputError!=1) { // Must be modifying an existing item and no changes made yet - need to lookup the details $sql = "SELECT assetid, - description, - longdescription, - assetcategoryid, - serialno, - assetlocation, - datepurchased, - depntype, - depnrate, - cost, - accumdepn, - barcode - FROM fixedassets - WHERE assetid ='" . $AssetID . "'"; + description, + longdescription, + assetcategoryid, + serialno, + assetlocation, + datepurchased, + depntype, + depnrate, + cost, + accumdepn, + barcode + FROM fixedassets + WHERE assetid ='" . $AssetID . "'"; $result = DB_query($sql, $db); $AssetRow = DB_fetch_array($result); @@ -441,14 +448,14 @@ } else { $LongDescription =''; } -echo '<tr><td>' . _('Asset Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'."\n"; +echo '<tr><td>' . _('Asset Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'; if (!isset($New) ) { //ie not new at all! echo '<tr><td>'. _('Image File (.jpg)') . ':</td><td><input type="file" id="ItemPicture" name="ItemPicture"></td>'; if (function_exists('imagecreatefromjpg')){ - $StockImgLink = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. + $AssetImgLink = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. '&AssetID='.urlencode($AssetID). '&text='. '&width=64'. @@ -473,16 +480,16 @@ echo '<tr><td>' . _('Asset Category') . ':</td><td><select name="AssetCategoryID">'; -$sql = 'SELECT categoryid, categorydescription FROM fixedassetcategories'; +$sql = "SELECT categoryid, categorydescription FROM fixedassetcategories"; $ErrMsg = _('The asset categories could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve stock categories and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); while ($myrow=DB_fetch_array($result)){ if (!isset($_POST['AssetCategoryID']) or $myrow['categoryid']==$_POST['AssetCategoryID']){ - echo '<option selected VALUE="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + echo '<option selected value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option VALUE="'. $myrow['categoryid'] . '">' . $myrow['categorydescription']. '</option>'; + echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription']. '</option>'; } $category=$myrow['categoryid']; } @@ -495,7 +502,7 @@ echo '<tr><td>' . _('Date Purchased') . ':</td><td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td></tr>'; } -$sql = 'SELECT locationid, locationdescription FROM fixedassetlocations'; +$sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; $ErrMsg = _('The asset locations could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve asset locations and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -536,17 +543,17 @@ /*Get the last period depreciation (depn is transtype =44) was posted for */ echo '<table><tr><th colspan=2>' . _('Asset Financial Summary') . '</th></tr>'; -echo '<tr><td>' . _('Accumulated Costs') . ':</td><td class="number">' . number_format($AssetRow['cost'],2) . '</td></tr>'; -echo '<tr><td>' . _('Accumulated Depreciation') . ':</td><td class="number">' . number_format($AssetRow['accumdepn'],2) . '</td></tr>'; -echo '<tr><td>' . _('Net Book Value') . ':</td><td class="number">' . number_format($AssetRow['cost']-$AssetRow['accumdepn'],2) . '</td></tr>'; +echo '<tr><td>' . _('Accumulated Costs') . ':</td><td class="number">' . number_format($AssetRow['cost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; +echo '<tr><td>' . _('Accumulated Depreciation') . ':</td><td class="number">' . number_format($AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; +echo '<tr><td>' . _('Net Book Value') . ':</td><td class="number">' . number_format($AssetRow['cost']-$AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; -$result = DB_query('SELECT periods.lastdate_in_period, +$result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period - ORDER BY periods.lastdate_in_period DESC',$db); + ORDER BY periods.lastdate_in_period DESC",$db); $LastDepnRun = DB_fetch_row($result); if(DB_num_rows($result)==0){ @@ -559,13 +566,13 @@ if (isset($New)) { - echo '<div class=centre><br /><input type="Submit" name="submit" value="' . _('Insert New Fixed Asset') . '">'; + echo '<div class="centre"><br /><input type="submit" name="submit" value="' . _('Insert New Fixed Asset') . '">'; } else { - echo '<br /><div class=centre><input type="submit" name="submit" value="' . _('Update') . '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Update') . '"></div>'; prnMsg( _('Only click the Delete button if you are sure you wish to delete the asset. Only assets with a zero book value can be deleted'), 'warn', _('WARNING')); - echo '<br /><div class=centre><input type="Submit" name="delete" value="' . _('Delete This Asset') . '" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');"></div>'; + echo '<br /><div class="centre"><input type="submit" name="delete" value="' . _('Delete This Asset') . '" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');"></div>'; } echo '</form></div>'; Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/FixedAssetRegister.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -73,10 +73,10 @@ } elseif (isset($_POST['csv'])) { $csv_output = "'Asset ID','Description','Serial Number','Location','Date Acquired','Cost B/Fwd','Period Additions','Depn B/Fwd','Period Depreciation','Cost C/Fwd', 'Accum Depn C/Fwd','NBV','Disposal Value'\n"; } else { - echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class=selection>'; + echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="centre">' ._('From') . ':' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate'] . '</div>'; - echo '<br /><table width=80% cellspacing="1" class=selection><tr>'; + echo '<br /><table width=80% cellspacing="1" class="selection"><tr>'; echo '<th>' . _('Asset ID') . '</th>'; echo '<th>' . _('Description') . '</th>'; echo '<th>' . _('Serial Number') . '</th>'; @@ -196,13 +196,13 @@ if (isset($_POST['pdf'])) { $LeftOvers = $pdf->addTextWrap($XPos, $YPos, 300 - $Left_Margin, $FontSize, _('TOTAL')); - $LeftOvers = $pdf->addTextWrap($XPos + 270, $YPos, 70, $FontSize, number_format($TotalCostBfwd, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 340, $YPos, 70, $FontSize, number_format($TotalDepnBfwd, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 410, $YPos, 70, $FontSize, number_format($TotalAdditions, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 480, $YPos, 70, $FontSize, number_format($TotalDepn, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 550, $YPos, 70, $FontSize, number_format($TotalCostCfwd, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 620, $YPos, 70, $FontSize, number_format($TotalDepnCfwd, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 690, $YPos, 70, $FontSize, number_format($TotalNBV, 0), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 270, $YPos, 70, $FontSize, number_format($TotalCostBfwd, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 340, $YPos, 70, $FontSize, number_format($TotalDepnBfwd, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 410, $YPos, 70, $FontSize, number_format($TotalAdditions, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 480, $YPos, 70, $FontSize, number_format($TotalDepn, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 550, $YPos, 70, $FontSize, number_format($TotalCostCfwd, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 620, $YPos, 70, $FontSize, number_format($TotalDepnCfwd, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 690, $YPos, 70, $FontSize, number_format($TotalNBV, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); $pdf->Output($_SESSION['DatabaseName'] . '_Asset Register_' . date('Y-m-d') . '.pdf', 'I'); exit; @@ -213,11 +213,11 @@ header('Location: ' .$_SESSION['reports_dir'] . '/FixedAssetRegister_' . Date('Y-m-d') .'.csv'); } else { - echo '<input type=hidden name=FromDate value="' . $_POST['FromDate'] . '">'; - echo '<input type=hidden name=ToDate value=' . $_POST['ToDate'] . '>'; - echo '<input type=hidden name=AssetCategory value=' . $_POST['AssetCategory'] . '>'; - echo '<input type=hidden name=AssetID value=' . $_POST['AssetID'] . '>'; - echo '<input type=hidden name=AssetLocation value=' . $_POST['AssetLocation'] . '>'; + echo '<input type=hidden name="FromDate" value="' . $_POST['FromDate'] . '">'; + echo '<input type=hidden name="ToDate" value=' . $_POST['ToDate'] . '>'; + echo '<input type=hidden name="AssetCategory" value=' . $_POST['AssetCategory'] . '>'; + echo '<input type=hidden name="AssetID" value=' . $_POST['AssetID'] . '>'; + echo '<input type=hidden name="AssetLocation" value=' . $_POST['AssetLocation'] . '>'; //Total Values echo '<tr><th style="vertical-align:top" colspan="5">' . _('TOTAL') . '</th>'; echo '<th style="text-align:right">' . number_format($TotalCostBfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; @@ -253,7 +253,7 @@ $sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; $result = DB_query($sql, $db); echo '<tr><th>' . _('Asset Location') . '</th>'; - echo '<td><select name=AssetLocation>'; + echo '<td><select name="AssetLocation">'; echo '<option value="%">' . _('ALL') . '</option>'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['AssetLocation']) AND $myrow['locationid'] == $_POST['AssetLocation']) { @@ -290,7 +290,7 @@ </table> <br />'; - echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Show Assets') . '"> '; + echo '<div class="centre"><input type="submit" name="submit" value="' . _('Show Assets') . '"> '; echo '<input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name = "csv" value= "' . _('Print as CSV') . '"></div>'; echo '</form>'; Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/FixedAssetTransfer.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -24,25 +24,25 @@ } else if (isset($_POST['AssetID'])) { $AssetID=$_POST['AssetID']; } else { - $sql='SELECT categoryid, categorydescription FROM fixedassetcategories'; + $sql="SELECT categoryid, categorydescription FROM fixedassetcategories"; $result=DB_query($sql, $db); echo '<form action="'. $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<table class=selection><tr>'; + echo '<table class="selection"><tr>'; echo '<td>'. _('In Asset Category') . ': '; echo '<select name="AssetCat">'; if (!isset($_POST['AssetCat'])) { - $_POST['AssetCat'] = ""; + $_POST['AssetCat'] = ''; } while ($myrow = DB_fetch_array($result)) { if ($myrow['categoryid'] == $_POST['AssetCat']) { - echo '<option selected VALUE="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } } @@ -88,14 +88,14 @@ } $sql= "SELECT fixedassets.assetid, - fixedassets.cost, - fixedassets.accumdepn, - fixedassets.description, - fixedassets.depntype, - fixedassets.serialno, - fixedassets.barcode, - fixedassets.assetlocation, - fixedassetlocations.locationdescription + fixedassets.cost, + fixedassets.accumdepn, + fixedassets.description, + fixedassets.depntype, + fixedassets.serialno, + fixedassets.barcode, + fixedassets.assetlocation, + fixedassetlocations.locationdescription FROM fixedassets INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid @@ -115,7 +115,7 @@ <th>' . _('Move To :') . '</th> </tr>'; - $locationsql='SELECT locationid, locationdescription from fixedassetlocations'; + $locationsql="SELECT locationid, locationdescription from fixedassetlocations"; $LocationResult=DB_query($locationsql, $db); while ($myrow=DB_fetch_array($Result)) { @@ -123,8 +123,8 @@ echo '<tr><td>'.$myrow['assetid'].'</td> <td>'.$myrow['description'].'</td> <td>'.$myrow['serialno'].'</td> - <td class=number>'.number_format($myrow['cost'],2).'</td> - <td class=number>'.number_format($myrow['accumdepn'],2).'</td> + <td class="number">'.number_format($myrow['cost'],$_SESSION['CompanyRecord']['decimalplaces']).'</td> + <td class="number">'.number_format($myrow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']).'</td> <td>'.$myrow['locationdescription'].'</td>'; echo '<td><select name="Location'.$myrow['assetid'].'" onChange="ReloadForm(Move'.$myrow['assetid'].')">'; echo '<option></option>'; @@ -141,7 +141,7 @@ echo '<input type="hidden" name="Keywords" value="' . $_POST['Keywords'].'"'; echo '<input type="hidden" name="AssetID" value="' . $_POST['AssetID'].'"'; echo '<input type="hidden" name="Search" value="' . $_POST['Search'].'"'; - echo '<td><input type="submit" name="Move'.$myrow['assetid'].'" value=Move></td>'; + echo '<td><input type="submit" name="Move'.$myrow['assetid'].'" value="Move"></td>'; echo '</tr>'; } echo '</table></form>'; Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/InventoryPlanning.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -2,7 +2,6 @@ /* $Id$ */ -//$PageSecurity = 2; include('includes/session.inc'); if (isset($_POST['PrintPDF']) @@ -53,26 +52,26 @@ need QOH, QOO, QDem, Sales Mth -1, Sales Mth -2, Sales Mth -3, Sales Mth -4*/ if ($_POST['Location']=='All'){ $SQL = "SELECT stockmaster.categoryid, - stockmaster.description, - stockcategory.categorydescription, - locstock.stockid, - SUM(locstock.quantity) AS qoh - FROM locstock, - stockmaster, - stockcategory - WHERE locstock.stockid=stockmaster.stockid - AND stockmaster.discontinued = 0 - AND stockmaster.categoryid=stockcategory.categoryid - AND (stockmaster.mbflag='B' OR stockmaster.mbflag='M') - AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' - GROUP BY stockmaster.categoryid, - stockmaster.description, - stockcategory.categorydescription, - locstock.stockid, - stockmaster.stockid - ORDER BY stockmaster.categoryid, - stockmaster.stockid"; + stockmaster.description, + stockcategory.categorydescription, + locstock.stockid, + SUM(locstock.quantity) AS qoh + FROM locstock, + stockmaster, + stockcategory + WHERE locstock.stockid=stockmaster.stockid + AND stockmaster.discontinued = 0 + AND stockmaster.categoryid=stockcategory.categoryid + AND (stockmaster.mbflag='B' OR stockmaster.mbflag='M') + AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' + AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + GROUP BY stockmaster.categoryid, + stockmaster.description, + stockcategory.categorydescription, + locstock.stockid, + stockmaster.stockid + ORDER BY stockmaster.categoryid, + stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.categoryid, locstock.stockid, @@ -99,9 +98,9 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br />$SQL"; + echo '<br />'.$SQL; } include('includes/footer.inc'); exit; @@ -145,27 +144,27 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM(CASE WHEN prd='" . $CurrentPeriod . "' THEN -qty ELSE 0 END) AS prd0, - SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, - SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, - SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, - SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, - SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 - FROM stockmoves - WHERE stockid='" . $InventoryPlan['stockid'] . "' - AND (type=10 OR type=11) - AND stockmoves.hidemovt=0"; + SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, + SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, + SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, + SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, + SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 + FROM stockmoves + WHERE stockid='" . $InventoryPlan['stockid'] . "' + AND (type=10 OR type=11) + AND stockmoves.hidemovt=0"; } else { $SQL = "SELECT SUM(CASE WHEN prd='" . $CurrentPeriod . "' THEN -qty ELSE 0 END) AS prd0, - SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, - SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, - SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, - SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, - SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 - FROM stockmoves - WHERE stockid='" . $InventoryPlan['stockid'] . "' - AND stockmoves.loccode ='" . $_POST['Location'] . "' - AND (stockmoves.type=10 OR stockmoves.type=11) - AND stockmoves.hidemovt=0"; + SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, + SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, + SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, + SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, + SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 + FROM stockmoves + WHERE stockid='" . $InventoryPlan['stockid'] . "' + AND stockmoves.loccode ='" . $_POST['Location'] . "' + AND (stockmoves.type=10 OR stockmoves.type=11) + AND stockmoves.hidemovt=0"; } $SalesResult = DB_query($SQL,$db,'','', false, false); @@ -174,9 +173,9 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br />$SQL"; + echo '<br />' .$SQL; } include('includes/footer.inc'); @@ -209,9 +208,9 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br />$SQL"; + echo '<br />'.$SQL; } include('includes/footer.inc'); exit; @@ -257,9 +256,9 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br />$SQL"; + echo '<br />'.$SQL; } include('includes/footer.inc'); exit; @@ -267,23 +266,23 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder - FROM purchorderdetails INNER JOIN purchorders - ON purchorderdetails.orderno = purchorders.orderno - WHERE purchorderdetails.itemcode = '" . $InventoryPlan['stockid'] . "' - AND purchorderdetails.completed = 0 - AND purchorders.status <> 'Cancelled' - AND purchorders.status <> 'Rejected' - AND purchorders.status <> 'Pending'"; + FROM purchorderdetails INNER JOIN purchorders + ON purchorderdetails.orderno = purchorders.orderno + WHERE purchorderdetails.itemcode = '" . $InventoryPlan['stockid'] . "' + AND purchorderdetails.completed = 0 + AND purchorders.status <> 'Cancelled' + AND purchorders.status <> 'Rejected' + AND purchorders.status <> 'Pending'"; } else { $SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder - FROM purchorderdetails INNER JOIN purchorders - ON purchorderdetails.orderno = purchorders.orderno - WHERE purchorderdetails.itemcode = '" . $InventoryPlan['stockid'] . "' - AND purchorderdetails.completed = 0 - AND purchorders.intostoc... [truncated message content] |
From: <dai...@us...> - 2011-07-19 09:35:34
|
Revision: 4635 http://web-erp.svn.sourceforge.net/web-erp/?rev=4635&view=rev Author: daintree Date: 2011-07-19 09:35:25 +0000 (Tue, 19 Jul 2011) Log Message: ----------- consistency Modified Paths: -------------- trunk/CounterSales.php trunk/CustomerInquiry.php trunk/FixedAssetItems.php trunk/FixedAssetRegister.php trunk/FixedAssetTransfer.php trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/InventoryQuantities.php trunk/InventoryValuation.php trunk/Labels.php trunk/Locations.php trunk/MRP.php trunk/MRPCalendar.php trunk/MRPCreateDemands.php trunk/MRPDemandTypes.php trunk/MRPDemands.php trunk/MRPPlannedWorkOrders.php trunk/MRPShortages.php trunk/MailInventoryValuation.php trunk/MailSalesReport.php trunk/MailSalesReport_csv.php trunk/SelectCustomer.php trunk/css/fresh/default.css trunk/index.php trunk/javascripts/MiscFunctions.js Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/CounterSales.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -84,30 +84,37 @@ include('includes/footer.inc'); exit; } - - $_SESSION['Items'.$identifier]->Branch = $myrow['cashsalebranch']; - $_SESSION['Items'.$identifier]->DebtorNo = $myrow['cashsalecustomer']; + if (isset($_GET['DebtorNo'])) { + $_SESSION['Items'.$identifier]->DebtorNo = $_GET['DebtorNo']; + $_SESSION['Items'.$identifier]->Branch = $_GET['BranchNo']; + } else { + $_SESSION['Items'.$identifier]->Branch = $myrow['cashsalebranch']; + $_SESSION['Items'.$identifier]->DebtorNo = $myrow['cashsalecustomer']; + } + $_SESSION['Items'.$identifier]->LocationName = $myrow['locationname']; $_SESSION['Items'.$identifier]->Location = $_SESSION['UserStockLocation']; $_SESSION['Items'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; // Now check to ensure this account exists and set defaults */ $sql = "SELECT debtorsmaster.name, - holdreasons.dissallowinvoices, - debtorsmaster.salestype, - salestypes.sales_type, - debtorsmaster.currcode, - debtorsmaster.customerpoline, - paymentterms.terms - FROM debtorsmaster, - holdreasons, - salestypes, - paymentterms - WHERE debtorsmaster.salestype=salestypes.typeabbrev - AND debtorsmaster.holdreason=holdreasons.reasoncode - AND debtorsmaster.paymentterms=paymentterms.termsindicator - AND debtorsmaster.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; - + holdreasons.dissallowinvoices, + debtorsmaster.salestype, + salestypes.sales_type, + debtorsmaster.currcode, + debtorsmaster.customerpoline, + paymentterms.terms, + currencies.decimalplaces + FROM debtorsmaster INNER JOIN holdreasons + ON debtorsmaster.holdreason=holdreasons.reasoncode + INNER JOIN salestypes + ON debtorsmaster.salestype=salestypes.typeabbrev + INNER JOIN paymentterms + ON debtorsmaster.paymentterms=paymentterms.termsindicator + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtorsmaster.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "'"; + $ErrMsg = _('The details of the customer selected') . ': ' . $_SESSION['Items'.$identifier]->DebtorNo . ' ' . _('cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the customer details and failed was') . ':'; // echo $sql; @@ -127,7 +134,7 @@ $_SESSION['Items'.$identifier]->DefaultCurrency = $myrow['currcode']; $_SESSION['Items'.$identifier]->DefaultPOLine = $myrow['customerpoline']; $_SESSION['Items'.$identifier]->PaymentTerms = $myrow['terms']; - + $_SESSION['Items'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; /* now get the branch defaults from the customer branches table CustBranch. */ $sql = "SELECT custbranch.brname, @@ -208,7 +215,7 @@ } else { /*Not cancelling the order */ echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Counter Sales') . '" alt="" />' . ' '; - echo _('Counter Sale') . ' - ' . $_SESSION['Items'.$identifier]->LocationName . ' (' . _('all amounts in') . ' ' . $_SESSION['Items'.$identifier]->DefaultCurrency . ')'; + echo $_SESSION['Items'.$identifier]->CustomerName . ' ' . _('Counter Sale') . ' ' ._('from') . ' ' . $_SESSION['Items'.$identifier]->LocationName . ' ' . _('inventory') . ' (' . _('all amounts in') . ' ' . $_SESSION['Items'.$identifier]->DefaultCurrency . ')'; echo '</p>'; } @@ -228,30 +235,30 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, + stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else if (mb_strlen($_POST['StockCode'])>0){ @@ -261,55 +268,55 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else { if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units + FROM stockmaster, stockcategory + WHERE stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } @@ -345,7 +352,7 @@ /* Always do the stuff below */ -echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID .'identifier='.$identifier . '" name="SelectParts" method="post">'; +echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" name="SelectParts" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; //Get The exchange rate used for GPPercent calculations on adding or amending items @@ -373,7 +380,10 @@ $Discount = 0; $i=1; - while ($i<=$_SESSION['QuickEntries'] and isset($_POST['part_' . $i]) and $_POST['part_' . $i]!='') { + while ($i<=$_SESSION['QuickEntries'] + AND isset($_POST['part_' . $i]) + AND $_POST['part_' . $i]!='') { + $QuickEntryCode = 'part_' . $i; $QuickEntryQty = 'qty_' . $i; $QuickEntryPOLine = 'poline_' . $i; @@ -409,9 +419,10 @@ $NewItemDue = DateAdd (Date($_SESSION['DefaultDateFormat']),'d', $_SESSION['Items'.$identifier]->DeliveryDays); } /*Now figure out if the item is a kit set - the field MBFlag='K'*/ - $sql = "SELECT stockmaster.mbflag, stockmaster.controlled - FROM stockmaster - WHERE stockmaster.stockid='". $NewItem ."'"; + $sql = "SELECT stockmaster.mbflag, + stockmaster.controlled + FROM stockmaster + WHERE stockmaster.stockid='". $NewItem ."'"; $ErrMsg = _('Could not determine if the part being ordered was a kitset or not because'); $DbgMsg = _('The sql that was used to determine if the part being ordered was a kitset or not was '); @@ -423,11 +434,11 @@ } elseif ($myrow=DB_fetch_array($KitResult)){ if ($myrow['mbflag']=='K'){ /*It is a kit set item */ $sql = "SELECT bom.component, - bom.quantity - FROM bom - WHERE bom.parent='" . $NewItem . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + bom.quantity + FROM bom + WHERE bom.parent='" . $NewItem . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; $ErrMsg = _('Could not retrieve kitset components from the database because') . ' '; $KitResult = DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -515,9 +526,9 @@ foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { $NewItem=$OrderLine->StockID; $sql = "SELECT stockmaster.mbflag, - stockmaster.controlled - FROM stockmaster - WHERE stockmaster.stockid='". $OrderLine->StockID."'"; + stockmaster.controlled + FROM stockmaster + WHERE stockmaster.stockid='". $OrderLine->StockID."'"; $ErrMsg = _('Could not determine if the part being ordered was a kitset or not because'); $DbgMsg = _('The sql that was used to determine if the part being ordered was a kitset or not was '); @@ -525,12 +536,12 @@ if ($myrow=DB_fetch_array($KitResult)){ if ($myrow['mbflag']=='K'){ /*It is a kit set item */ $sql = "SELECT bom.component, - bom.quantity - FROM bom - WHERE bom.parent='" . $OrderLine->StockID. "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; - + bom.quantity + FROM bom + WHERE bom.parent='" . $OrderLine->StockID. "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + $ErrMsg = _('Could not retrieve kitset components from the database because'); $KitResult = DB_query($sql,$db,$ErrMsg); @@ -559,9 +570,9 @@ * controlled items and ghost/phantom items cannot be selected because the SQL to show items to select doesn't show 'em * */ $sql = "SELECT stockmaster.mbflag, - stockmaster.taxcatid - FROM stockmaster - WHERE stockmaster.stockid='". $NewItem ."'"; + stockmaster.taxcatid + FROM stockmaster + WHERE stockmaster.stockid='". $NewItem ."'"; $ErrMsg = _('Could not determine if the part being ordered was a kitset or not because'); @@ -573,12 +584,12 @@ if ($myrow=DB_fetch_array($KitResult)){ if ($myrow['mbflag']=='K'){ /*It is a kit set item */ $sql = "SELECT bom.component, - bom.quantity - FROM bom - WHERE bom.parent='" . $NewItem . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; - + bom.quantity + FROM bom + WHERE bom.parent='" . $NewItem . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + $ErrMsg = _('Could not retrieve kitset components from the database because'); $KitResult = DB_query($sql,$db,$ErrMsg); @@ -610,8 +621,8 @@ foreach($NewItemArray as $NewItem => $NewItemQty) { if($NewItemQty > 0) { $sql = "SELECT stockmaster.mbflag - FROM stockmaster - WHERE stockmaster.stockid='". $NewItem ."'"; + FROM stockmaster + WHERE stockmaster.stockid='". $NewItem ."'"; $ErrMsg = _('Could not determine if the part being ordered was a kitset or not because'); @@ -625,9 +636,9 @@ $sql = "SELECT bom.component, bom.quantity FROM bom - WHERE bom.parent='" . $NewItem . "' - AND bom.effectiveto > '" . Date('Y-m-d') . "' - AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + WHERE bom.parent='" . $NewItem . "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; $ErrMsg = _('Could not retrieve kitset components from the database because'); $KitResult = DB_query($sql,$db,$ErrMsg); @@ -659,7 +670,7 @@ $counter =0; foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { - if ($OrderLine->DiscCat !="" AND ! in_array($OrderLine->DiscCat,$DiscCatsDone)){ + if ($OrderLine->DiscCat !='' AND ! in_array($OrderLine->DiscCat,$DiscCatsDone)){ $DiscCatsDone[$counter]=$OrderLine->DiscCat; $QuantityOfDiscCat =0; @@ -670,10 +681,10 @@ } } $result = DB_query("SELECT MAX(discountrate) AS discount - FROM discountmatrix - WHERE salestype='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' - AND discountcategory ='" . $OrderLine->DiscCat . "' - AND quantitybreak <'" . $QuantityOfDiscCat . "'",$db); + FROM discountmatrix + WHERE salestype='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' + AND discountcategory ='" . $OrderLine->DiscCat . "' + AND quantitybreak <'" . $QuantityOfDiscCat . "'",$db); $myrow = DB_fetch_row($result); if ($myrow[0]!=0){ /* need to update the lines affected */ foreach ($_SESSION['Items'.$identifier]->LineItems as $StkItems_2) { @@ -686,7 +697,8 @@ } } /* end of discount matrix lookup code */ -if (count($_SESSION['Items'.$identifier]->LineItems)>0 and !isset($_POST['ProcessSale'])){ /*only show order lines if there are any */ +if (count($_SESSION['Items'.$identifier]->LineItems)>0 + AND !isset($_POST['ProcessSale'])){ /*only show order lines if there are any */ /* // ************************************************************************* // T H I S W H E R E T H E S A L E I S D I S P L A Y E D @@ -738,7 +750,7 @@ echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />'; echo '<input type="hidden" name="ItemDue_' . $OrderLine->LineNumber . '" value="'.$OrderLine->ItemDue.'" />'; - echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?' . SID .'identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> + echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> <td>' . $OrderLine->ItemDescription . '</td>'; echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . $OrderLine->Quantity . '" />'; @@ -750,7 +762,7 @@ echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . $OrderLine->Price . '" /></td> <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . ($OrderLine->DiscountPercent * 100) . '" /></td> <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="3" maxlength="40" value="' . $OrderLine->GPPercent . '" /></td>'; - echo '<td class="number">' . number_format($SubTotal,2) . '</td>'; + echo '<td class="number">' . number_format($SubTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; $LineDueDate = $OrderLine->ItemDue; if (!Is_Date($OrderLine->ItemDue)){ $LineDueDate = DateAdd (Date($_SESSION['DefaultDateFormat']),'d', $_SESSION['Items'.$identifier]->DeliveryDays); @@ -776,9 +788,9 @@ $TaxTotal += $TaxLineTotal; $_SESSION['Items'.$identifier]->TaxTotals=$TaxTotals; $_SESSION['Items'.$identifier]->TaxGLCodes=$TaxGLCodes; - echo '<td class="number">' . number_format($TaxLineTotal ,2) . '</td>'; - echo '<td class="number">' . number_format($SubTotal + $TaxLineTotal ,2) . '</td>'; - echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID .'&identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; + echo '<td class="number">' . number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; + echo '<td class="number">' . number_format($SubTotal + $TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; + echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; if ($_SESSION['AllowOrderLineItemNarrative'] == 1){ echo $RowStarter; @@ -794,9 +806,9 @@ } /* end of loop around items */ echo '<tr class="EvenTableRows"><td colspan="8" class="number"><b>' . _('Total') . '</b></td> - <td class="number">' . number_format(($_SESSION['Items'.$identifier]->total),2) . '</td> - <td class="number">' . number_format($TaxTotal,2) . '</td> - <td class="number">' . number_format(($_SESSION['Items'.$identifier]->total+$TaxTotal),2) . '</td> + <td class="number">' . number_format(($_SESSION['Items'.$identifier]->total),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . number_format($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . number_format(($_SESSION['Items'.$identifier]->total+$TaxTotal),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> </tr> </table>'; echo '<input type="hidden" name="TaxTotal" value="'.$TaxTotal.'" />'; @@ -1938,9 +1950,9 @@ echo '<br /><div class="centre">'; if ($_SESSION['InvoicePortraitFormat']==0){ - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTrans.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Landscape') . ')</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTrans.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Landscape') . ')</a><br /><br />'; } else { - echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?' . SID . 'FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; + echo '<img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a target="_blank" href="'.$rootpath.'/PrintCustTransPortrait.php?FromTransNo='.$InvoiceNo.'&InvOrCredit=Invoice&PrintPDF=True">'. _('Print this invoice'). ' (' . _('Portrait') . ')</a><br /><br />'; } echo '<br /><br /><a href="' .$_SERVER['PHP_SELF'] . '">' . _('Start a new Counter Sale') . '</a></div>'; @@ -2077,7 +2089,7 @@ <td style="text-align:center">%s</td> <td style="text-align:center">%s</td> <td style="text-align:center">%s</td> - <td><font size=1><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm'.$myrow['stockid'].'" value="0" /> + <td><font size=1><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm%s" value="0" /> </td> </tr>', $myrow['stockid'], @@ -2087,9 +2099,6 @@ $DemandQty, $OnOrder, $Available, - $ImageSource, - $rootpath, - SID, $myrow['stockid']); if ($j==1) { $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; @@ -2110,20 +2119,20 @@ echo '<table class="selection"><tr><td><b>' . _('Select a Stock Category') . ': </b><select tabindex="1" name="StockCat">'; if (!isset($_POST['StockCat'])){ - echo "<option selected='True' value='All'>" . _('All').'</option>'; + echo '<option selected="true" value="All">' . _('All').'</option>'; $_POST['StockCat'] ='All'; } else { - echo "<option value='All'>" . _('All').'</option>'; + echo '<option value="All">' . _('All').'</option>'; } $SQL="SELECT categoryid, - categorydescription - FROM stockcategory - WHERE stocktype='F' OR stocktype='D' - ORDER BY categorydescription"; + categorydescription + FROM stockcategory + WHERE stocktype='F' OR stocktype='D' + ORDER BY categorydescription"; $result1 = DB_query($SQL,$db); while ($myrow1 = DB_fetch_array($result1)) { if ($_POST['StockCat']==$myrow1['categoryid']){ - echo '<option selected="True" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; + echo '<option selected="true" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; } else { echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'].'</option>'; } @@ -2180,22 +2189,22 @@ // Find the quantity in stock at location $QOHSql = "SELECT sum(quantity) AS QOH, - stockmaster.decimalplaces - FROM locstock INNER JOIN stockmaster - WHERE locstock.stockid='" .$myrow['stockid'] . "' - AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; + stockmaster.decimalplaces + FROM locstock INNER JOIN stockmaster + WHERE locstock.stockid='" .$myrow['stockid'] . "' + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $QOHResult = DB_query($QOHSql,$db); $QOHRow = DB_fetch_array($QOHResult); $QOH = $QOHRow['QOH']; // Find the quantity on outstanding sales orders $sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem - FROM salesorderdetails INNER JOIN salesorders - ON salesorders.orderno = salesorderdetails.orderno - WHERE salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "' - AND salesorderdetails.completed=0 - AND salesorders.quotation=0 - AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'"; + FROM salesorderdetails INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "' + AND salesorderdetails.completed=0 + AND salesorders.quotation=0 + AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'"; $ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Items'.$identifier]->Location . ' ' . _('cannot be retrieved because'); $DemandResult = DB_query($sql,$db,$ErrMsg); @@ -2227,8 +2236,8 @@ // Find the quantity on works orders $sql = "SELECT SUM(woitems.qtyreqd - woitems.qtyrecd) AS dedm - FROM woitems - WHERE stockid='" . $myrow['stockid'] ."'"; + FROM woitems + WHERE stockid='" . $myrow['stockid'] ."'"; $ErrMsg = _('The order details for this product cannot be retrieved because'); $WoResult = db_query($sql,$db,$ErrMsg); @@ -2251,26 +2260,22 @@ $Available = $qoh - $DemandQty + $OnOrder; printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm'.$myrow['stockid'].'" value="0" /> - </font></td> - </tr>', - $myrow['stockid'], - $myrow['description'], - $myrow['units'], - number_format($QOH, $QOHRow['decimalplaces']), - number_format($DemandQty, $QOHRow['decimalplaces']), - number_format($OnOrder, $QOHRow['decimalplaces']), - number_format($Available, $QOHRow['decimalplaces']), - $ImageSource, - $rootpath, - SID, - $myrow['stockid']); + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><font size="1"><input class="number" tabindex="'.number_format($j+7).'" type="textbox" size="6" name="itm%s" value="0" /></font></td> + </tr>', + $myrow['stockid'], + $myrow['description'], + $myrow['units'], + number_format($QOH, $QOHRow['decimalplaces']), + number_format($DemandQty, $QOHRow['decimalplaces']), + number_format($OnOrder, $QOHRow['decimalplaces']), + number_format($Available, $QOHRow['decimalplaces']), + $myrow['stockid']); if ($j==1) { $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; } @@ -2295,12 +2300,12 @@ else { /* show the quick entry form variable */ echo '<div class="page_help_text"><b>' . _('Use this form to add items quickly if the item codes are already known') . '</b></div><br /> - <table border="1"> - <tr>'; + <table border="1"> + <tr>'; /*do not display colum unless customer requires po line number by sales order line*/ echo '<th>' . _('Item Code') . '</th> - <th>' . _('Quantity') . '</th> - </tr>'; + <th>' . _('Quantity') . '</th> + </tr>'; $DefaultDeliveryDate = DateAdd(Date($_SESSION['DefaultDateFormat']),'d',$_SESSION['Items'.$identifier]->DeliveryDays); if (count($_SESSION['Items'.$identifier]->LineItems)==0) { echo '<input type="hidden" name="CustRef" value="'.$_SESSION['Items'.$identifier]->CustRef.'" />'; @@ -2315,8 +2320,7 @@ /* Do not display colum unless customer requires po line number by sales order line*/ echo '<td><input type="text" name="part_' . $i . '" size="21" maxlength="20" /></td> <td><input type="text" class="number" name="qty_' . $i . '" size="6" maxlength="6" /></td> - <input type="hidden" class="date" name="ItemDue_' . $i . '" - value="' . $DefaultDeliveryDate . '" /></tr>'; + <input type="hidden" class="date" name="ItemDue_' . $i . '" value="' . $DefaultDeliveryDate . '" /></tr>'; } echo '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.part_1);}</script>'; @@ -2330,4 +2334,4 @@ } echo '</form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/CustomerInquiry.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -103,7 +103,7 @@ INNER JOIN holdreasons ON debtorsmaster.holdreason = holdreasons.reasoncode INNER JOIN currencies - debtorsmaster.currcode = currencies.currabrev + ON debtorsmaster.currcode = currencies.currabrev WHERE debtorsmaster.debtorno = '" . $CustomerID . "'"; $ErrMsg =_('The customer details could not be retrieved by the SQL because'); Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/FixedAssetItems.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -123,28 +123,35 @@ $result = DB_Txn_Begin($db); /*Need to check if changing the balance sheet codes - as will need to do journals for the cost and accum depn of the asset to the new category */ - $result = DB_query("SELECT assetcategoryid, cost, accumdepn, costact, accumdepnact FROM fixedassets INNER JOIN fixedassetcategories WHERE assetid='" . $AssetID . "'",$db); + $result = DB_query("SELECT assetcategoryid, + cost, + accumdepn, + costact, + accumdepnact + FROM fixedassets INNER JOIN fixedassetcategories + ON fixedassets.assetcategoryid=fixedassetcategories.categoryid + WHERE assetid='" . $AssetID . "'",$db); $OldDetails = DB_fetch_array($result); if ($OldDetails['assetcategoryid'] !=$_POST['AssetCategoryID'] AND $OldDetails['cost']!=0){ $PeriodNo = GetPeriod(Date($_SESSION['DefaultDateFormat']),$db); /* Get the new account codes for the new asset category */ $result = DB_query("SELECT costact, - accumdepnact - FROM fixedassetcategories - WHERE categoryid='" . $_POST['AssetCategoryID'] . "'",$db); + accumdepnact + FROM fixedassetcategories + WHERE categoryid='" . $_POST['AssetCategoryID'] . "'",$db); $NewAccounts = DB_fetch_array($result); $TransNo = GetNextTransNo( 42, $db); /* transaction type is asset category change */ //credit cost for the old category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('42', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -159,12 +166,12 @@ //debit cost for the new category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('42', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -179,12 +186,12 @@ if ($OldDetails['accumdepn']!=0) { //debit accumdepn for the old category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('42', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -199,12 +206,12 @@ //credit accum depn for the new category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('42', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -237,13 +244,13 @@ echo '<br />'; } else { //it is a NEW part $sql = "INSERT INTO fixedassets (description, - longdescription, - assetcategoryid, - assetlocation, - depntype, - depnrate, - barcode, - serialno) + longdescription, + assetcategoryid, + assetlocation, + depntype, + depnrate, + barcode, + serialno) VALUES ( '" . $_POST['Description'] . "', '" . $_POST['LongDescription'] . "', @@ -278,12 +285,12 @@ $CancelDelete = 0; //what validation is required before allowing deletion of assets .... maybe there should be no deletion option? $result = DB_query("SELECT cost, - accumdepn, - accumdepnact, - costact - FROM fixedassets INNER JOIN fixedassetcategories - ON fixedassets.assetcategoryid=fixedassetcategories.categoryid - WHERE assetid='" . $AssetID . "'", $db); + accumdepn, + accumdepnact, + costact + FROM fixedassets INNER JOIN fixedassetcategories + ON fixedassets.assetcategoryid=fixedassetcategories.categoryid + WHERE assetid='" . $AssetID . "'", $db); $AssetRow = DB_fetch_array($result); $NBV = $AssetRow['cost'] -$AssetRow['accumdepn']; if ($NBV!=0) { @@ -309,12 +316,12 @@ if ($AssetRow['cost'] > 0){ //credit cost for the asset deleted $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('43', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -329,12 +336,12 @@ //debit accumdepn for the depreciation removed on deletion of this asset $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES ('43', '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -394,19 +401,19 @@ } elseif ($InputError!=1) { // Must be modifying an existing item and no changes made yet - need to lookup the details $sql = "SELECT assetid, - description, - longdescription, - assetcategoryid, - serialno, - assetlocation, - datepurchased, - depntype, - depnrate, - cost, - accumdepn, - barcode - FROM fixedassets - WHERE assetid ='" . $AssetID . "'"; + description, + longdescription, + assetcategoryid, + serialno, + assetlocation, + datepurchased, + depntype, + depnrate, + cost, + accumdepn, + barcode + FROM fixedassets + WHERE assetid ='" . $AssetID . "'"; $result = DB_query($sql, $db); $AssetRow = DB_fetch_array($result); @@ -441,14 +448,14 @@ } else { $LongDescription =''; } -echo '<tr><td>' . _('Asset Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'."\n"; +echo '<tr><td>' . _('Asset Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'; if (!isset($New) ) { //ie not new at all! echo '<tr><td>'. _('Image File (.jpg)') . ':</td><td><input type="file" id="ItemPicture" name="ItemPicture"></td>'; if (function_exists('imagecreatefromjpg')){ - $StockImgLink = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. + $AssetImgLink = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. '&AssetID='.urlencode($AssetID). '&text='. '&width=64'. @@ -473,16 +480,16 @@ echo '<tr><td>' . _('Asset Category') . ':</td><td><select name="AssetCategoryID">'; -$sql = 'SELECT categoryid, categorydescription FROM fixedassetcategories'; +$sql = "SELECT categoryid, categorydescription FROM fixedassetcategories"; $ErrMsg = _('The asset categories could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve stock categories and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); while ($myrow=DB_fetch_array($result)){ if (!isset($_POST['AssetCategoryID']) or $myrow['categoryid']==$_POST['AssetCategoryID']){ - echo '<option selected VALUE="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + echo '<option selected value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option VALUE="'. $myrow['categoryid'] . '">' . $myrow['categorydescription']. '</option>'; + echo '<option value="'. $myrow['categoryid'] . '">' . $myrow['categorydescription']. '</option>'; } $category=$myrow['categoryid']; } @@ -495,7 +502,7 @@ echo '<tr><td>' . _('Date Purchased') . ':</td><td>' . ConvertSQLDate($AssetRow['datepurchased']) . '</td></tr>'; } -$sql = 'SELECT locationid, locationdescription FROM fixedassetlocations'; +$sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; $ErrMsg = _('The asset locations could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve asset locations and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); @@ -536,17 +543,17 @@ /*Get the last period depreciation (depn is transtype =44) was posted for */ echo '<table><tr><th colspan=2>' . _('Asset Financial Summary') . '</th></tr>'; -echo '<tr><td>' . _('Accumulated Costs') . ':</td><td class="number">' . number_format($AssetRow['cost'],2) . '</td></tr>'; -echo '<tr><td>' . _('Accumulated Depreciation') . ':</td><td class="number">' . number_format($AssetRow['accumdepn'],2) . '</td></tr>'; -echo '<tr><td>' . _('Net Book Value') . ':</td><td class="number">' . number_format($AssetRow['cost']-$AssetRow['accumdepn'],2) . '</td></tr>'; +echo '<tr><td>' . _('Accumulated Costs') . ':</td><td class="number">' . number_format($AssetRow['cost'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; +echo '<tr><td>' . _('Accumulated Depreciation') . ':</td><td class="number">' . number_format($AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; +echo '<tr><td>' . _('Net Book Value') . ':</td><td class="number">' . number_format($AssetRow['cost']-$AssetRow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td></tr>'; -$result = DB_query('SELECT periods.lastdate_in_period, +$result = DB_query("SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period - ORDER BY periods.lastdate_in_period DESC',$db); + ORDER BY periods.lastdate_in_period DESC",$db); $LastDepnRun = DB_fetch_row($result); if(DB_num_rows($result)==0){ @@ -559,13 +566,13 @@ if (isset($New)) { - echo '<div class=centre><br /><input type="Submit" name="submit" value="' . _('Insert New Fixed Asset') . '">'; + echo '<div class="centre"><br /><input type="submit" name="submit" value="' . _('Insert New Fixed Asset') . '">'; } else { - echo '<br /><div class=centre><input type="submit" name="submit" value="' . _('Update') . '"></div>'; + echo '<br /><div class="centre"><input type="submit" name="submit" value="' . _('Update') . '"></div>'; prnMsg( _('Only click the Delete button if you are sure you wish to delete the asset. Only assets with a zero book value can be deleted'), 'warn', _('WARNING')); - echo '<br /><div class=centre><input type="Submit" name="delete" value="' . _('Delete This Asset') . '" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');"></div>'; + echo '<br /><div class="centre"><input type="submit" name="delete" value="' . _('Delete This Asset') . '" onclick="return confirm(\'' . _('Are You Sure? Only assets with a zero book value can be deleted.') . '\');"></div>'; } echo '</form></div>'; Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/FixedAssetRegister.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -73,10 +73,10 @@ } elseif (isset($_POST['csv'])) { $csv_output = "'Asset ID','Description','Serial Number','Location','Date Acquired','Cost B/Fwd','Period Additions','Depn B/Fwd','Period Depreciation','Cost C/Fwd', 'Accum Depn C/Fwd','NBV','Disposal Value'\n"; } else { - echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class=selection>'; + echo '<form name="RegisterForm" method="post" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '"><table class="selection">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<div class="centre">' ._('From') . ':' . $_POST['FromDate'] . ' ' . _('to') . ' ' . $_POST['ToDate'] . '</div>'; - echo '<br /><table width=80% cellspacing="1" class=selection><tr>'; + echo '<br /><table width=80% cellspacing="1" class="selection"><tr>'; echo '<th>' . _('Asset ID') . '</th>'; echo '<th>' . _('Description') . '</th>'; echo '<th>' . _('Serial Number') . '</th>'; @@ -196,13 +196,13 @@ if (isset($_POST['pdf'])) { $LeftOvers = $pdf->addTextWrap($XPos, $YPos, 300 - $Left_Margin, $FontSize, _('TOTAL')); - $LeftOvers = $pdf->addTextWrap($XPos + 270, $YPos, 70, $FontSize, number_format($TotalCostBfwd, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 340, $YPos, 70, $FontSize, number_format($TotalDepnBfwd, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 410, $YPos, 70, $FontSize, number_format($TotalAdditions, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 480, $YPos, 70, $FontSize, number_format($TotalDepn, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 550, $YPos, 70, $FontSize, number_format($TotalCostCfwd, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 620, $YPos, 70, $FontSize, number_format($TotalDepnCfwd, 0), 'right'); - $LeftOvers = $pdf->addTextWrap($XPos + 690, $YPos, 70, $FontSize, number_format($TotalNBV, 0), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 270, $YPos, 70, $FontSize, number_format($TotalCostBfwd, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 340, $YPos, 70, $FontSize, number_format($TotalDepnBfwd, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 410, $YPos, 70, $FontSize, number_format($TotalAdditions, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 480, $YPos, 70, $FontSize, number_format($TotalDepn, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 550, $YPos, 70, $FontSize, number_format($TotalCostCfwd, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 620, $YPos, 70, $FontSize, number_format($TotalDepnCfwd, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($XPos + 690, $YPos, 70, $FontSize, number_format($TotalNBV, $_SESSION['CompanyRecord']['decimalplaces']), 'right'); $pdf->Output($_SESSION['DatabaseName'] . '_Asset Register_' . date('Y-m-d') . '.pdf', 'I'); exit; @@ -213,11 +213,11 @@ header('Location: ' .$_SESSION['reports_dir'] . '/FixedAssetRegister_' . Date('Y-m-d') .'.csv'); } else { - echo '<input type=hidden name=FromDate value="' . $_POST['FromDate'] . '">'; - echo '<input type=hidden name=ToDate value=' . $_POST['ToDate'] . '>'; - echo '<input type=hidden name=AssetCategory value=' . $_POST['AssetCategory'] . '>'; - echo '<input type=hidden name=AssetID value=' . $_POST['AssetID'] . '>'; - echo '<input type=hidden name=AssetLocation value=' . $_POST['AssetLocation'] . '>'; + echo '<input type=hidden name="FromDate" value="' . $_POST['FromDate'] . '">'; + echo '<input type=hidden name="ToDate" value=' . $_POST['ToDate'] . '>'; + echo '<input type=hidden name="AssetCategory" value=' . $_POST['AssetCategory'] . '>'; + echo '<input type=hidden name="AssetID" value=' . $_POST['AssetID'] . '>'; + echo '<input type=hidden name="AssetLocation" value=' . $_POST['AssetLocation'] . '>'; //Total Values echo '<tr><th style="vertical-align:top" colspan="5">' . _('TOTAL') . '</th>'; echo '<th style="text-align:right">' . number_format($TotalCostBfwd, $_SESSION['CompanyRecord']['decimalplaces']) . '</th>'; @@ -253,7 +253,7 @@ $sql = "SELECT locationid, locationdescription FROM fixedassetlocations"; $result = DB_query($sql, $db); echo '<tr><th>' . _('Asset Location') . '</th>'; - echo '<td><select name=AssetLocation>'; + echo '<td><select name="AssetLocation">'; echo '<option value="%">' . _('ALL') . '</option>'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['AssetLocation']) AND $myrow['locationid'] == $_POST['AssetLocation']) { @@ -290,7 +290,7 @@ </table> <br />'; - echo '<div class="centre"><input type="Submit" name="submit" value="' . _('Show Assets') . '"> '; + echo '<div class="centre"><input type="submit" name="submit" value="' . _('Show Assets') . '"> '; echo '<input type="Submit" name="pdf" value="' . _('Print as a pdf') . '"> '; echo '<input type="Submit" name = "csv" value= "' . _('Print as CSV') . '"></div>'; echo '</form>'; Modified: trunk/FixedAssetTransfer.php =================================================================== --- trunk/FixedAssetTransfer.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/FixedAssetTransfer.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -24,25 +24,25 @@ } else if (isset($_POST['AssetID'])) { $AssetID=$_POST['AssetID']; } else { - $sql='SELECT categoryid, categorydescription FROM fixedassetcategories'; + $sql="SELECT categoryid, categorydescription FROM fixedassetcategories"; $result=DB_query($sql, $db); echo '<form action="'. $_SERVER['PHP_SELF'] . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; - echo '<table class=selection><tr>'; + echo '<table class="selection"><tr>'; echo '<td>'. _('In Asset Category') . ': '; echo '<select name="AssetCat">'; if (!isset($_POST['AssetCat'])) { - $_POST['AssetCat'] = ""; + $_POST['AssetCat'] = ''; } while ($myrow = DB_fetch_array($result)) { if ($myrow['categoryid'] == $_POST['AssetCat']) { - echo '<option selected VALUE="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } } @@ -88,14 +88,14 @@ } $sql= "SELECT fixedassets.assetid, - fixedassets.cost, - fixedassets.accumdepn, - fixedassets.description, - fixedassets.depntype, - fixedassets.serialno, - fixedassets.barcode, - fixedassets.assetlocation, - fixedassetlocations.locationdescription + fixedassets.cost, + fixedassets.accumdepn, + fixedassets.description, + fixedassets.depntype, + fixedassets.serialno, + fixedassets.barcode, + fixedassets.assetlocation, + fixedassetlocations.locationdescription FROM fixedassets INNER JOIN fixedassetlocations ON fixedassets.assetlocation=fixedassetlocations.locationid @@ -115,7 +115,7 @@ <th>' . _('Move To :') . '</th> </tr>'; - $locationsql='SELECT locationid, locationdescription from fixedassetlocations'; + $locationsql="SELECT locationid, locationdescription from fixedassetlocations"; $LocationResult=DB_query($locationsql, $db); while ($myrow=DB_fetch_array($Result)) { @@ -123,8 +123,8 @@ echo '<tr><td>'.$myrow['assetid'].'</td> <td>'.$myrow['description'].'</td> <td>'.$myrow['serialno'].'</td> - <td class=number>'.number_format($myrow['cost'],2).'</td> - <td class=number>'.number_format($myrow['accumdepn'],2).'</td> + <td class="number">'.number_format($myrow['cost'],$_SESSION['CompanyRecord']['decimalplaces']).'</td> + <td class="number">'.number_format($myrow['accumdepn'],$_SESSION['CompanyRecord']['decimalplaces']).'</td> <td>'.$myrow['locationdescription'].'</td>'; echo '<td><select name="Location'.$myrow['assetid'].'" onChange="ReloadForm(Move'.$myrow['assetid'].')">'; echo '<option></option>'; @@ -141,7 +141,7 @@ echo '<input type="hidden" name="Keywords" value="' . $_POST['Keywords'].'"'; echo '<input type="hidden" name="AssetID" value="' . $_POST['AssetID'].'"'; echo '<input type="hidden" name="Search" value="' . $_POST['Search'].'"'; - echo '<td><input type="submit" name="Move'.$myrow['assetid'].'" value=Move></td>'; + echo '<td><input type="submit" name="Move'.$myrow['assetid'].'" value="Move"></td>'; echo '</tr>'; } echo '</table></form>'; Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2011-07-17 03:31:55 UTC (rev 4634) +++ trunk/InventoryPlanning.php 2011-07-19 09:35:25 UTC (rev 4635) @@ -2,7 +2,6 @@ /* $Id$ */ -//$PageSecurity = 2; include('includes/session.inc'); if (isset($_POST['PrintPDF']) @@ -53,26 +52,26 @@ need QOH, QOO, QDem, Sales Mth -1, Sales Mth -2, Sales Mth -3, Sales Mth -4*/ if ($_POST['Location']=='All'){ $SQL = "SELECT stockmaster.categoryid, - stockmaster.description, - stockcategory.categorydescription, - locstock.stockid, - SUM(locstock.quantity) AS qoh - FROM locstock, - stockmaster, - stockcategory - WHERE locstock.stockid=stockmaster.stockid - AND stockmaster.discontinued = 0 - AND stockmaster.categoryid=stockcategory.categoryid - AND (stockmaster.mbflag='B' OR stockmaster.mbflag='M') - AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' - AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' - GROUP BY stockmaster.categoryid, - stockmaster.description, - stockcategory.categorydescription, - locstock.stockid, - stockmaster.stockid - ORDER BY stockmaster.categoryid, - stockmaster.stockid"; + stockmaster.description, + stockcategory.categorydescription, + locstock.stockid, + SUM(locstock.quantity) AS qoh + FROM locstock, + stockmaster, + stockcategory + WHERE locstock.stockid=stockmaster.stockid + AND stockmaster.discontinued = 0 + AND stockmaster.categoryid=stockcategory.categoryid + AND (stockmaster.mbflag='B' OR stockmaster.mbflag='M') + AND stockmaster.categoryid >= '" . $_POST['FromCriteria'] . "' + AND stockmaster.categoryid <= '" . $_POST['ToCriteria'] . "' + GROUP BY stockmaster.categoryid, + stockmaster.description, + stockcategory.categorydescription, + locstock.stockid, + stockmaster.stockid + ORDER BY stockmaster.categoryid, + stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.categoryid, locstock.stockid, @@ -99,9 +98,9 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg(_('The inventory quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br />$SQL"; + echo '<br />'.$SQL; } include('includes/footer.inc'); exit; @@ -145,27 +144,27 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM(CASE WHEN prd='" . $CurrentPeriod . "' THEN -qty ELSE 0 END) AS prd0, - SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, - SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, - SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, - SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, - SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 - FROM stockmoves - WHERE stockid='" . $InventoryPlan['stockid'] . "' - AND (type=10 OR type=11) - AND stockmoves.hidemovt=0"; + SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, + SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, + SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, + SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, + SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 + FROM stockmoves + WHERE stockid='" . $InventoryPlan['stockid'] . "' + AND (type=10 OR type=11) + AND stockmoves.hidemovt=0"; } else { $SQL = "SELECT SUM(CASE WHEN prd='" . $CurrentPeriod . "' THEN -qty ELSE 0 END) AS prd0, - SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, - SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, - SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, - SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, - SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 - FROM stockmoves - WHERE stockid='" . $InventoryPlan['stockid'] . "' - AND stockmoves.loccode ='" . $_POST['Location'] . "' - AND (stockmoves.type=10 OR stockmoves.type=11) - AND stockmoves.hidemovt=0"; + SUM(CASE WHEN prd='" . $Period_1 . "' THEN -qty ELSE 0 END) AS prd1, + SUM(CASE WHEN prd='" . $Period_2 . "' THEN -qty ELSE 0 END) AS prd2, + SUM(CASE WHEN prd='" . $Period_3 . "' THEN -qty ELSE 0 END) AS prd3, + SUM(CASE WHEN prd='" . $Period_4 . "' THEN -qty ELSE 0 END) AS prd4, + SUM(CASE WHEN prd='" . $Period_5 . "' THEN -qty ELSE 0 END) AS prd5 + FROM stockmoves + WHERE stockid='" . $InventoryPlan['stockid'] . "' + AND stockmoves.loccode ='" . $_POST['Location'] . "' + AND (stockmoves.type=10 OR stockmoves.type=11) + AND stockmoves.hidemovt=0"; } $SalesResult = DB_query($SQL,$db,'','', false, false); @@ -174,9 +173,9 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='" .$rootpath .'/index.php?' . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br />$SQL"; + echo '<br />' .$SQL; } include('includes/footer.inc'); @@ -209,9 +208,9 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br />$SQL"; + echo '<br />'.$SQL; } include('includes/footer.inc'); exit; @@ -257,9 +256,9 @@ $title = _('Inventory Planning') . ' - ' . _('Problem Report') . '....'; include('includes/header.inc'); prnMsg( _('The sales order demand quantities from parent assemblies could not be retrieved by the SQL because') . ' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='" .$rootpath ."/index.php?" . SID . "'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' .$rootpath .'/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - echo "<br />$SQL"; + echo '<br />'.$SQL; } include('includes/footer.inc'); exit; @@ -267,23 +266,23 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder - FROM purchorderdetails INNER JOIN purchorders - ON purchorderdetails.orderno = purchorders.orderno - WHERE purchorderdetails.itemcode = '" . $InventoryPlan['stockid'] . "' - AND purchorderdetails.completed = 0 - AND purchorders.status <> 'Cancelled' - AND purchorders.status <> 'Rejected' - AND purchorders.status <> 'Pending'"; + FROM purchorderdetails INNER JOIN purchorders + ON purchorderdetails.orderno = purchorders.orderno + WHERE purchorderdetails.itemcode = '" . $InventoryPlan['stockid'] . "' + AND purchorderdetails.completed = 0 + AND purchorders.status <> 'Cancelled' + AND purchorders.status <> 'Rejected' + AND purchorders.status <> 'Pending'"; } else { $SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder - FROM purchorderdetails INNER JOIN purchorders - ON purchorderdetails.orderno = purchorders.orderno - WHERE purchorderdetails.itemcode = '" . $InventoryPlan['stockid'] . "' - AND purchorderdetails.completed = 0 - AND purchorders.intostoc... [truncated message content] |
From: <dai...@us...> - 2011-07-24 00:14:36
|
Revision: 4636 http://web-erp.svn.sourceforge.net/web-erp/?rev=4636&view=rev Author: daintree Date: 2011-07-24 00:14:27 +0000 (Sun, 24 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/CustLoginSetup.php trunk/CustomerBranches.php trunk/OrderDetails.php trunk/OutstandingGRNs.php trunk/PDFCustTransListing.php trunk/PDFDIFOT.php trunk/PDFGrn.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PageSecurity.php trunk/PaymentAllocations.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php trunk/SelectOrderItems.php trunk/SuppLoginSetup.php trunk/doc/Change.log trunk/doc/Manual/ManualPrices.html trunk/includes/DefinePaymentClass.php trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/CustLoginSetup.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -22,11 +22,6 @@ '" alt="" />' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName. _(' has been selected') . '</p><br />'; -if (isset($_GET['SelectedUser'])){ - $SelectedUser = $_GET['SelectedUser']; -} elseif (isset($_POST['SelectedUser'])){ - $SelectedUser = $_POST['SelectedUser']; -} if (isset($_POST['submit'])) { @@ -48,7 +43,7 @@ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); } - } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ + } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= false){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { @@ -60,7 +55,7 @@ // check that the entered branch is valid for the customer code $sql = "SELECT defaultlocation FROM custbranch - WHERE debtorno='" . $_POST['Cust'] . "' + WHERE debtorno='" . $_SESSION['CustomerID'] . "' AND branchcode='" . $_POST['BranchCode'] . "'"; $ErrMsg = _('The check on validity of the customer code and branch failed because'); @@ -75,47 +70,25 @@ $InventoryLocation = $myrow[0]; } - if (isset($SelectedUser) AND $InputError !=1) { + if ($InputError !=1) { - $UpdatePassword = ''; - if ($_POST['Password'] != ""){ - $UpdatePassword = "password='" . CryptPass($_POST['Password']) . "',"; - } - - $sql = "UPDATE www_users SET realname='" . $_POST['RealName'] . "', - phone='" . $_POST['Phone'] ."', - email='" . $_POST['Email'] ."', - ".$UpdatePassword." - branchcode='" . $_POST['BranchCode'] . "', - pagesize='" . $_POST['PageSize'] . "', - theme='" . $_POST['Theme'] . "', - language ='" . $_POST['UserLanguage'] . "', - defaultlocation='" . $InventoryLocation ."', - blocked='" . $_POST['Blocked'] . "' - WHERE userid = '".$SelectedUser."'"; - - prnMsg( _('The selected user record has been updated'), 'success' ); - - - } else { //no selected user so it's an insert of new user - - $sql = "INSERT INTO www_users (userid, - realname, - customerid, - branchcode, - password, - phone, - email, - pagesize, - fullaccess, - defaultlocation, - modulesallowed, - displayrecordsmax, - theme, - language) - VALUES ('" . $_POST['UserID'] . "', + $sql = "INSERT INTO www_users (userid, + realname, + customerid, + branchcode, + password, + phone, + email, + pagesize, + fullaccess, + defaultlocation, + modulesallowed, + displayrecordsmax, + theme, + language) + VALUES ('" . $_POST['UserID'] . "', '" . $_POST['RealName'] ."', - '" . $_POST['Cust'] ."', + '" . $_SESSION['CustomerID'] ."', '" . $_POST['BranchCode'] ."', '" . CryptPass($_POST['Password']) ."', '" . $_POST['Phone'] . "', @@ -127,166 +100,27 @@ '" . $_SESSION['DefaultDisplayRecordsMax'] . "', '" . $_POST['Theme'] . "', '". $_POST['UserLanguage'] ."')"; - prnMsg( _('A new user record has been inserted'), 'success' ); + + $ErrMsg = _('The user could not be added because'); + $DbgMsg = _('The SQL that was used to insert the new user and failed was'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + prnMsg( _('A new customer login has been created'), 'success' ); + include('includes/footer.inc'); + exit; } } - if ($InputError!=1){ - //run the SQL from either of the above possibilites - $ErrMsg = _('The user alterations could not be processed because'); - $DbgMsg = _('The SQL that was used to update the user and failed was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); - - unset($_POST['UserID']); - unset($_POST['RealName']); - unset($_POST['Cust']); - unset($_POST['BranchCode']); - unset($_POST['Phone']); - unset($_POST['Email']); - unset($_POST['Password']); - unset($_POST['PageSize']); - unset($_POST['Theme']); - unset($_POST['UserLanguage']); - unset($_POST['Blocked']); - unset($SelectedUser); - } - -} elseif (isset($_GET['delete'])) { -//the link to delete a selected record was clicked instead of the submit button - - $sql="SELECT userid FROM audittrail where userid='". $SelectedUser ."'"; - $result=DB_query($sql, $db); - if (DB_num_rows($result)!=0) { - prnMsg(_('Cannot delete user as entries already exist in the audit trail'), 'warn'); - } else { - - $sql="DELETE FROM www_users WHERE userid='".$SelectedUser."'"; - $ErrMsg = _('The User could not be deleted because');; - $result = DB_query($sql,$db,$ErrMsg); - prnMsg(_('User Deleted'),'info'); - } - unset($SelectedUser); } -if (!isset($SelectedUser)) { - -/* If its the first time the page has been displayed with no parameters then none of the above are true and the list of Users will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - - $sql = "SELECT userid, - realname, - phone, - email, - customerid, - branchcode, - lastvisitdate, - pagesize, - theme, - language - FROM www_users WHERE customerid = '" . $_SESSION['CustomerID'] . "'"; - $result = DB_query($sql,$db); - - echo '<table class="selection>"'; - - echo '<tr><th>' . _('User Login') . '</th> - <th>' . _('Full Name') . '</th> - <th>' . _('Telephone') . '</th> - <th>' . _('Email') . '</th> - <th>' . _('Last Visit') . '</th> - <th>' . _('Report Size') .'</th> - <th>' . _('Theme') .'</th> - <th>' . _('Language') .'</th> - </tr>'; - - $k=0; //row colour counter - - while ($myrow = DB_fetch_array($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%s&SelectedUser=%s">' . _('Edit') . '</a></td> - <td><a href="%s&SelectedUser=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this user login?') . '\');">' . _('Delete') . '</a></td> - </tr>', - $myrow['userid'], - $myrow['realname'], - $myrow['phone'], - $myrow['email'], - $LastVisitDate, - $myrow['pagesize'], - $myrow['theme'], - $LanguagesArray[$myrow['language']], - $_SERVER['PHP_SELF'] . '?', - $myrow['userid'], - $_SERVER['PHP_SELF'] . '?', - $myrow['userid']); - - } //END WHILE LIST LOOP - echo '</table><br />'; -} //end of if there is no selected user - - -if (isset($SelectedUser)) { - echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Review Existing Users') . '</a></div><br />'; -} echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -if (isset($SelectedUser)) { - //editing an existing User +echo '<table class="selection"> + <tr> + <td>' . _('User Login') . ':</td> + <td><input type="text" name="UserID" size="22" maxlength="20" /></td> + </tr>'; - $sql = "SELECT userid, - realname, - phone, - email, - customerid, - password, - branchcode, - pagesize, - theme, - language - FROM www_users - WHERE userid='" . $SelectedUser . "'"; - - $result = DB_query($sql, $db); - $myrow = DB_fetch_array($result); - - $_POST['UserID'] = $myrow['userid']; - $_POST['RealName'] = $myrow['realname']; - $_POST['Phone'] = $myrow['phone']; - $_POST['Email'] = $myrow['email']; - $_POST['PageSize'] = $myrow['pagesize']; - $_POST['Theme'] = $myrow['theme']; - $_POST['UserLanguage'] = $myrow['language']; - - echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '">'; - echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '">'; - - echo '<table class="selection"> - <tr> - <td>' . _('User code') . ':</td> - <td>' . $_POST['UserID'] . '</td> - </tr>'; - -} else { //end of if $SelectedUser only do the else when a new record is being entered - echo '<table class="selection"> - <tr> - <td>' . _('User Login') . ':</td> - <td><input type="text" name="UserID" size="22" maxlength="20" /></td> - </tr>'; -} - if (!isset($_POST['Password'])) { $_POST['Password']=''; } @@ -312,15 +146,11 @@ //Customer is fixed by selection of customer -$_POST['Cust']=$_SESSION['CustomerID']; -echo '<input type="hidden" name="Cust" value="' . $_POST['Cust'] . '">'; -echo '<tr><td>'._('Customer Code').':</td> - <td>' . $_POST['Cust'] . '</td></tr>'; echo '<tr><td>' . _('Branch Code') . ':</td> <td><select name="BranchCode">'; -$sql = "SELECT branchcode FROM custbranch WHERE debtorno = '" . $_POST['Cust'] . "'"; +$sql = "SELECT branchcode FROM custbranch WHERE debtorno = '" . $_SESSION['CustomerID'] . "'"; $result = DB_query($sql,$db); while ($myrow=DB_fetch_array($result)){ @@ -420,20 +250,8 @@ echo '<option value="' . $LanguageEntry . '">' . $LanguageName .'</option>'; } } - - echo '</select></td></tr>'; -echo '<tr><td>' . _('Account Status') . ':</td> - <td><select name="Blocked">'; -if ($_POST['Blocked']==0){ - echo '<option selected value="0">' . _('Open') . '</option> - <option value="1">' . _('Blocked') . '</option>'; -} else { - echo '<option value="0">' . _('Open') . '</option> - <option selected value="1">' . _('Blocked') . '</option>'; -} -echo '</select></td></tr>'; echo '</table><br /> <div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '"></div> Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/CustomerBranches.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -431,14 +431,14 @@ echo '<b>'.($TotalEnable+$TotalDisable). '</b> ' . _('Total Branches') . '</div></td></tr></table>'; } else { $sql = "SELECT debtorsmaster.name, - address1, - address2, - address3, - address4, - address5, - address6 - FROM debtorsmaster - WHERE debtorno = '".$DebtorNo."'"; + address1, + address2, + address3, + address4, + address5, + address6 + FROM debtorsmaster + WHERE debtorno = '".$DebtorNo."'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -463,35 +463,35 @@ //editing an existing branch $sql = "SELECT branchcode, - brname, - braddress1, - braddress2, - braddress3, - braddress4, - braddress5, - braddress6, - specialinstructions, - estdeliverydays, - fwddate, - salesman, - area, - phoneno, - faxno, - contactname, - email, - taxgroupid, - defaultlocation, - brpostaddr1, - brpostaddr2, - brpostaddr3, - brpostaddr4, - disabletrans, - defaultshipvia, - custbranchcode, - deliverblind - FROM custbranch - WHERE branchcode='".$SelectedBranch."' - AND debtorno='".$DebtorNo."'"; + brname, + braddress1, + braddress2, + braddress3, + braddress4, + braddress5, + braddress6, + specialinstructions, + estdeliverydays, + fwddate, + salesman, + area, + phoneno, + faxno, + contactname, + email, + taxgroupid, + defaultlocation, + brpostaddr1, + brpostaddr2, + brpostaddr3, + brpostaddr4, + disabletrans, + defaultshipvia, + custbranchcode, + deliverblind + FROM custbranch + WHERE branchcode='".$SelectedBranch."' + AND debtorno='".$DebtorNo."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -547,12 +547,12 @@ */ if (isset($_GET['BranchCode'])){ $sql="SELECT name, - address1, - address2, - address3, - address4, - address5, - address6 + address1, + address2, + address3, + address4, + address5, + address6 FROM debtorsmaster WHERE debtorno='".$_GET['BranchCode']."'"; @@ -579,22 +579,7 @@ $_POST['DeliverBlind'] = $_SESSION['DefaultBlindPackNote']; } - //SQL to poulate account selection boxes - $sql = "SELECT salesmanname, - salesmancode - FROM salesman - WHERE current = 1"; - $result = DB_query($sql,$db); - - if (DB_num_rows($result)==0){ - echo '</table>'; - prnMsg(_('There are no sales people defined as yet') . ' - ' . _('customer branches must be allocated to a sales person') . '. ' . _('Please use the link below to define at least one sales person'),'error'); - echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php">'._('Define Sales People') . '</a>'; - include('includes/footer.inc'); - exit; - } - echo '<input type=hidden name="DebtorNo" value="'. $DebtorNo . '" />'; @@ -636,6 +621,23 @@ if (!isset($_POST['FwdDate'])) {$_POST['FwdDate']=0;} echo '<td><input ' .(in_array('FwdDate',$Errors) ? 'class="inputerror"' : '' ) .' tabindex=12 type="text" class=number name="FwdDate" size=4 maxlength=2 value='. $_POST['FwdDate'].'></td></tr>'; + + //SQL to poulate account selection boxes + $sql = "SELECT salesmanname, + salesmancode + FROM salesman + WHERE current = 1"; + + $result = DB_query($sql,$db); + + if (DB_num_rows($result)==0){ + echo '</table>'; + prnMsg(_('There are no sales people defined as yet') . ' - ' . _('customer branches must be allocated to a sales person') . '. ' . _('Please use the link below to define at least one sales person'),'error'); + echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php">'._('Define Sales People') . '</a>'; + include('includes/footer.inc'); + exit; + } + echo '<tr><td>'._('Salesperson').':</td>'; echo '<td><select tabindex=13 name="Salesman">'; @@ -717,15 +719,22 @@ //only display email link if there is an email address echo '<td><input tabindex=18 type="text" name="Email" size=56 maxlength=55 value="'. $_POST['Email'].'"></td></tr>'; - echo '<tr><td>'._('Tax Group').':</td>'; - echo '<td><select tabindex=19 name="TaxGroup">'; DB_data_seek($result,0); $sql = "SELECT taxgroupid, taxgroupdescription FROM taxgroups"; - $result = DB_query($sql,$db); - - while ($myrow = DB_fetch_array($result)) { + $TaxGroupResults = DB_query($sql,$db); + if (DB_num_rows($TaxGroupResults)==0){ + echo '</table>'; + prnMsg(_('There are no tax groups defined - these must be set up first before any branches can be set up') . ' + <br /><a href="' . $rootpath . '/TaxGroups.php">' . _('Define Tax Groups') . '</a>','error'); + include('includes/footer.inc'); + exit; + } + echo '<tr><td>'._('Tax Group').':</td> + <td><select tabindex=19 name="TaxGroup">'; + + while ($myrow = DB_fetch_array($TaxGroupResults)) { if (isset($_POST['TaxGroup']) and $myrow['taxgroupid']==$_POST['TaxGroup']) { echo '<option selected value="'; } else { @@ -748,10 +757,18 @@ echo ' </select></td></tr>'; + + $SQL = "SELECT shipper_id, shippername FROM shippers"; + $ShipperResults = DB_query($SQL,$db); + if (DB_num_rows($ShipperResults)==0){ + echo '</table>'; + prnMsg(_('There are no shippers defined - these must be set up first before any branches can be set up') . ' + <br /><a href="' . $rootpath . '/Shippers.php">' . _('Define Shippers') . '</a>','error'); + include('includes/footer.inc'); + exit; + } echo '<tr><td>'._('Default freight/shipper method') . ':</td> <td><select tabindex=21 name="DefaultShipVia">'; - $SQL = "SELECT shipper_id, shippername FROM shippers"; - $ShipperResults = DB_query($SQL,$db); while ($myrow=DB_fetch_array($ShipperResults)){ if (isset($_POST['DefaultShipVia'])and $myrow['shipper_id']==$_POST['DefaultShipVia']){ echo '<option selected value=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; Modified: trunk/OrderDetails.php =================================================================== --- trunk/OrderDetails.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/OrderDetails.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.25 $ */ + /* $Id$*/ -//$PageSecurity = 2; - /* Session started in header.inc for password checking and authorisation level check */ include('includes/session.inc'); @@ -21,34 +19,33 @@ include('includes/header.inc'); -$OrderHeaderSQL = "SELECT - salesorders.debtorno, - debtorsmaster.name, - salesorders.branchcode, - salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.ordertype, - salesorders.shipvia, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.contactphone, - salesorders.contactemail, - salesorders.freightcost, - salesorders.deliverydate, - debtorsmaster.currcode, - salesorders.fromstkloc - FROM - salesorders, - debtorsmaster - WHERE - salesorders.debtorno = debtorsmaster.debtorno - AND salesorders.orderno = '" . $_GET['OrderNumber'] . "'"; +$OrderHeaderSQL = "SELECT salesorders.debtorno, + debtorsmaster.name, + salesorders.branchcode, + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.ordertype, + salesorders.shipvia, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.contactphone, + salesorders.contactemail, + salesorders.freightcost, + salesorders.deliverydate, + debtorsmaster.currcode, + salesorders.fromstkloc, + currencies.decimalplaces + FROM salesorders INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE salesorders.orderno = '" . $_GET['OrderNumber'] . "'"; $ErrMsg = _('The order cannot be retrieved because'); $DbgMsg = _('The SQL that failed to get the order header was'); @@ -59,7 +56,9 @@ _('Order Details') . '" alt="" />' . ' ' . $title . '</p>'; $myrow = DB_fetch_array($GetOrdHdrResult); - echo '<table class=selection>'; + $CurrDecimalPlaces = $myrow['decimalplaces']; + + echo '<table class="selection">'; echo '<tr><th colspan=4><font color=blue>'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</font></th></tr>'; echo '<tr> <th style="text-align: left">' . _('Customer Code') . ':</th> @@ -118,24 +117,24 @@ /*Now get the line items */ - $LineItemsSQL = "SELECT - stkcode, - stockmaster.description, - stockmaster.volume, - stockmaster.kgs, - stockmaster.decimalplaces, - stockmaster.mbflag, - stockmaster.units, - stockmaster.discountcategory, - stockmaster.controlled, - stockmaster.serialised, - unitprice, - quantity, - discountpercent, - actualdispatchdate, - qtyinvoiced - FROM salesorderdetails, stockmaster - WHERE salesorderdetails.stkcode = stockmaster.stockid AND orderno ='" . $_GET['OrderNumber'] . "'"; + $LineItemsSQL = "SELECT stkcode, + stockmaster.description, + stockmaster.volume, + stockmaster.kgs, + stockmaster.decimalplaces, + stockmaster.mbflag, + stockmaster.units, + stockmaster.discountcategory, + stockmaster.controlled, + stockmaster.serialised, + unitprice, + quantity, + discountpercent, + actualdispatchdate, + qtyinvoiced + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + WHERE orderno ='" . $_GET['OrderNumber'] . "'"; $ErrMsg = _('The line items of the order cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the line items, that failed was'); @@ -150,15 +149,15 @@ echo '<br /><table cellpadding=2 colspan=9 class=selection>'; echo '<tr><th colspan=9><font color=blue>'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].'</font></th></tr>'; echo '<tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> - <th>' . _('Quantity') . '</th> - <th>' . _('Unit') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Discount') . '</th> - <th>' . _('Total') . '</th> - <th>' . _('Qty Del') . '</th> - <th>' . _('Last Del') . '</th> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Total') . '</th> + <th>' . _('Qty Del') . '</th> + <th>' . _('Last Del') . '</th> </tr>'; $k=0; while ($myrow=db_fetch_array($LineItemsResult)) { @@ -181,10 +180,10 @@ <td>' . $myrow['description'] . '</td> <td class=number>' . $myrow['quantity'] . '</td> <td>' . $myrow['units'] . '</td> - <td class=number>' . number_format($myrow['unitprice'],2) . '</td> + <td class=number>' . number_format($myrow['unitprice'],$CurrDecimalPlaces) . '</td> <td class=number>' . number_format(($myrow['discountpercent'] * 100),2) . '%' . '</td> - <td class=number>' . number_format($myrow['quantity'] * $myrow['unitprice'] * (1 - $myrow['discountpercent']),2) . '</td> - <td class=number>' . number_format($myrow['qtyinvoiced'],2) . '</td> + <td class=number>' . number_format($myrow['quantity'] * $myrow['unitprice'] * (1 - $myrow['discountpercent']),$CurrDecimalPlaces) . '</td> + <td class=number>' . number_format($myrow['qtyinvoiced'],$myrow['decimalplaces']) . '</td> <td>' . $DisplayActualDeliveryDate . '</td> </tr>'; @@ -193,7 +192,7 @@ $OrderTotalWeight = $OrderTotalWeight + $myrow['quantity'] * $myrow['kgs']; } - $DisplayTotal = number_format($OrderTotal,2); + $DisplayTotal = number_format($OrderTotal,$CurrDecimalPlaces); $DisplayVolume = number_format($OrderTotalVolume,2); $DisplayWeight = number_format($OrderTotalWeight,2); Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/OutstandingGRNs.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -30,13 +30,18 @@ quantityinv, grns.stdcostunit, actprice, - unitprice - FROM grns, - purchorderdetails, - suppliers - WHERE grns.supplierid=suppliers.supplierid - AND grns.podetailitem = purchorderdetails.podetailitem - AND qtyrecd-quantityinv>0 + unitprice, + currencies.decimalplaces as currdecimalplaces, + stockmaster.decimalplaces as itemdecimalplaces + FROM grns INNER JOIN purchorderdetails + ON grns.podetailitem = purchorderdetails.podetailitem + INNER JOIN suppliers + ON grns.supplierid=suppliers.supplierid + INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev + LEFT JOIN stockmaster + ON grns.itemcode=stockmaster.stockid + WHERE qtyrecd-quantityinv>0 AND grns.supplierid >='" . $_POST['FromCriteria'] . "' AND grns.supplierid <='" . $_POST['ToCriteria'] . "' ORDER BY supplierid, @@ -81,7 +86,7 @@ /* need to print the total of previous supplier */ $YPos -= (2*$line_height); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,260-$Left_Margin,$FontSize,_('Total for') . ' ' . $Supplier . ' - ' . $SupplierName); - $DisplaySuppTotVal = number_format($SuppTot_Val,2); + $DisplaySuppTotVal = number_format($SuppTot_Val,$GRNs['decimalplaces']); $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplaySuppTotVal, 'right'); $YPos -=$line_height; $pdf->line($Left_Margin, $YPos+$line_height-2,$Page_Width-$Right_Margin, $YPos+$line_height-2); @@ -93,16 +98,21 @@ $SupplierName = $GRNs['suppname']; } $YPos -=$line_height; - + + if ($GRNs['itemdecimalplaces']==null){ + $ItemDecimalPlaces = 2; + } else { + $ItemDecimalPlaces = $GRNs['itemdecimalplaces']; + } $LeftOvers = $pdf->addTextWrap(32,$YPos,40,$FontSize,$GRNs['grnno']); $LeftOvers = $pdf->addTextWrap(70,$YPos,40,$FontSize,$GRNs['orderno']); $LeftOvers = $pdf->addTextWrap(110,$YPos,200,$FontSize,$GRNs['itemcode'] . ' - ' . $GRNs['itemdescription']); - $DisplayStdCost = number_format($GRNs['stdcostunit'],2); - $DisplayQtyRecd = number_format($GRNs['qtyrecd'],2); - $DisplayQtyInv = number_format($GRNs['quantityinv'],2); - $DisplayQtyOstg = number_format($GRNs['qtyrecd']- $GRNs['quantityinv'],2); + $DisplayStdCost = number_format($GRNs['stdcostunit'],$_SESSION['CompanyRecord']['decimalplaces']); + $DisplayQtyRecd = number_format($GRNs['qtyrecd'],$ItemDecimalPlaces); + $DisplayQtyInv = number_format($GRNs['quantityinv'],$ItemDecimalPlaces); + $DisplayQtyOstg = number_format($GRNs['qtyrecd']- $GRNs['quantityinv'],$ItemDecimalPlaces); $LineValue = ($GRNs['qtyrecd']- $GRNs['quantityinv'])*$GRNs['stdcostunit']; - $DisplayValue = number_format($LineValue,2); + $DisplayValue = number_format($LineValue,$_SESSION['CompanyRecord']['decimalplaces']); $LeftOvers = $pdf->addTextWrap(310,$YPos,50,$FontSize,$DisplayQtyRecd,'right'); $LeftOvers = $pdf->addTextWrap(360,$YPos,50,$FontSize,$DisplayQtyInv, 'right'); Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFCustTransListing.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -54,15 +54,20 @@ } $sql= "SELECT type, - debtorno, - transno, - trandate, - ovamount, - ovgst, - invtext - FROM debtortrans - WHERE type='" . $_POST['TransType'] . "' - AND date_format(inputdate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; + debtortrans.debtorno, + transno, + trandate, + ovamount, + ovgst, + invtext, + debtortrans.rate, + decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE type='" . $_POST['TransType'] . "' + AND date_format(inputdate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; $result=DB_query($sql,$db,'','',false,false); @@ -70,8 +75,8 @@ $title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the transactions'),'error'); - if ($Debug==1){ - prnMsg(_('The SQL used to get the transaction information that failed was') . ':<br />' . $SQL,'error'); + if ($debug==1){ + prnMsg(_('The SQL used to get the transaction information that failed was') . ':<br />' . $sql,'error'); } include('includes/footer.inc'); exit; @@ -92,7 +97,7 @@ $pdf->addInfo('Subject',_('Customer transaction listing from') . ' ' . $_POST['Date'] ); $line_height=12; $PageNumber = 1; -$TotalCheques = 0; +$TotalAmount = 0; include ('includes/PDFCustTransListingPageHeader.inc'); @@ -105,12 +110,12 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$supplierrow['name'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['transno'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['ovamount'],2), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,number_format($myrow['ovgst'],2), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($myrow['ovamount']+$myrow['ovgst'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['ovamount'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,number_format($myrow['ovgst'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($myrow['ovamount']+$myrow['ovgst'],$myrow['decimalplaces']), 'right'); $YPos -= ($line_height); - $TotalCheques = $TotalCheques - $myrow['ovamount']; + $TotalAmount = $TotalAmount + ($myrow['ovamount']/$myrow['rate']); if ($YPos - (2 *$line_height) < $Bottom_Margin){ /*Then set up a new page */ @@ -121,8 +126,8 @@ $YPos-=$line_height; -$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format(-$TotalCheques,2), 'right'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions'), 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($TotalAmount,$_SESSION['CompanyRecord']['decimalplaces']), 'right'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['CurrencyDefault'], 'left'); $ReportFileName = $_SESSION['DatabaseName'] . '_CustTransListing_' . date('Y-m-d').'.pdf'; $pdf->OutputD($ReportFileName); Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFDIFOT.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -26,7 +26,7 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection> + echo '<table class="selection"> <tr> <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> @@ -41,9 +41,9 @@ } echo '<tr> - <td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ':</td> - <td><input type="text" class="number" name="DaysAcceptable" maxlength=2 size=2 value="' . $_POST['DaysAcceptable'] . '"></td> - </tr>'; + <td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ':</td> + <td><input type="text" class="number" name="DaysAcceptable" maxlength=2 size=2 value="' . $_POST['DaysAcceptable'] . '"></td> + </tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; @@ -57,7 +57,6 @@ echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } - echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Location') . ':</td> @@ -99,6 +98,7 @@ salesorderdetails.quantity, salesorderdetails.stkcode, stockmaster.description, + stockmaster.decimalplaces, salesorders.debtorno, salesorders.branchcode FROM salesorderdetails INNER JOIN stockmaster @@ -116,6 +116,7 @@ salesorderdetails.quantity, salesorderdetails.stkcode, stockmaster.description, + stockmaster.decimalplaces, salesorders.debtorno, salesorders.branchcode FROM salesorderdetails INNER JOIN stockmaster @@ -136,6 +137,7 @@ salesorderdetails.quantity, salesorderdetails.stkcode, stockmaster.description, + stockmaster.decimalplaces, salesorders.debtorno, salesorders.branchcode FROM salesorderdetails INNER JOIN stockmaster @@ -156,6 +158,7 @@ salesorderdetails.quantity, salesorderdetails.stkcode, stockmaster.description, + stockmaster.decimalplaces, salesorders.debtorno, salesorders.branchcode FROM salesorderdetails INNER JOIN stockmaster @@ -214,7 +217,7 @@ if ($DaysDiff > $_POST['DaysAcceptable']){ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,40,$FontSize,$myrow['orderno'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,200,$FontSize,$myrow['stkcode'] .' - ' . $myrow['description'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,50,$FontSize,number_format($myrow['quantity']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,50,$FontSize,number_format($myrow['quantity'],$myrow['decimalplaces']), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+295,$YPos,50,$FontSize,$myrow['debtorno'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+345,$YPos,50,$FontSize,$myrow['branchcode'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+395,$YPos,50,$FontSize,ConvertSQLDate($myrow['actualdispatchdate']), 'left'); @@ -286,14 +289,14 @@ $ReportFileName = $_SESSION['DatabaseName'] . '_DIFOT_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN -$pdf->__destruct(); //UldisN +$pdf->OutputD($ReportFileName); +$pdf->__destruct(); if ($_POST['Email']=='Yes'){ if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ unlink($_SESSION['reports_dir'] . '/'.$ReportFileName); } - $fp = fopen( $_SESSION['reports_dir'] . '/'.$ReportFileName,'wb'); + $fp = fopen( $_SESSION['reports_dir'] . '/'.$ReportFileName,'wb'); fwrite ($fp, $pdfcode); fclose ($fp); Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFGrn.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -41,35 +41,35 @@ } else { //NOT PREVIEW $sql="SELECT grns.itemcode, - grns.grnno, - grns.deliverydate, - grns.itemdescription, - grns.qtyrecd, - grns.supplierid, - purchorderdetails.suppliersunit, - purchorderdetails.conversionfactor, - stockmaster.units, - stockmaster.decimalplaces - FROM grns INNER JOIN purchorderdetails - ON grns.podetailitem=purchorderdetails.podetailitem - LEFT JOIN stockmaster - ON grns.itemcode=stockmaster.stockid - WHERE grnbatch='".$GRNNo."'"; + grns.grnno, + grns.deliverydate, + grns.itemdescription, + grns.qtyrecd, + grns.supplierid, + purchorderdetails.suppliersunit, + purchorderdetails.conversionfactor, + stockmaster.units, + stockmaster.decimalplaces + FROM grns INNER JOIN purchorderdetails + ON grns.podetailitem=purchorderdetails.podetailitem + LEFT JOIN stockmaster + ON grns.itemcode=stockmaster.stockid + WHERE grnbatch='".$GRNNo."'"; $GRNResult=DB_query($sql, $db); $NoOfGRNs = DB_num_rows($GRNResult); if($NoOfGRNs>0) { //there are GRNs to print $sql = "SELECT suppliers.suppname, - suppliers.address1, - suppliers.address2 , - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6 - FROM grns INNER JOIN suppliers - ON grns.supplierid=suppliers.supplierid - WHERE grnbatch='".$GRNNo."'"; + suppliers.address1, + suppliers.address2 , + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6 + FROM grns INNER JOIN suppliers + ON grns.supplierid=suppliers.supplierid + WHERE grnbatch='".$GRNNo."'"; $SuppResult = DB_query($sql,$db,_('Could not get the supplier of the selected GRN')); $SuppRow = DB_fetch_array($SuppResult); } Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFLowGP.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -28,27 +28,26 @@ /*Now figure out the data to report for the category range under review */ $SQL = "SELECT stockmaster.categoryid, - stockmaster.stockid, - stockmoves.transno, - stockmoves.trandate, - systypes.typename, - stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost as unitcost, - stockmoves.qty, - stockmoves.debtorno, - stockmoves.branchcode, - stockmoves.price*(1-stockmoves.discountpercent) as sellingprice, - (stockmoves.price*(1-stockmoves.discountpercent)) - (stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost) AS gp, - debtorsmaster.name - FROM stockmaster, - stockmoves, - systypes, - debtorsmaster - WHERE stockmoves.type=systypes.typeid - AND stockmaster.stockid=stockmoves.stockid - AND stockmoves.trandate >= '" . FormatDateForSQL($_POST['FromDate']) . "' + stockmaster.stockid, + stockmoves.transno, + stockmoves.trandate, + systypes.typename, + stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost as unitcost, + stockmoves.qty, + stockmoves.debtorno, + stockmoves.branchcode, + stockmoves.price*(1-stockmoves.discountpercent) as sellingprice, + (stockmoves.price*(1-stockmoves.discountpercent)) - (stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost) AS gp, + debtorsmaster.name + FROM stockmaster INNER JOIN stockmoves + ON stockmaster.stockid=stockmoves.stockid + INNER JOIN systypes + ON stockmoves.type=systypes.typeid + INNER JOIN debtorsmaster + ON stockmoves.debtorno=debtorsmaster.debtorno + WHERE stockmoves.trandate >= '" . FormatDateForSQL($_POST['FromDate']) . "' AND stockmoves.trandate <= '" . FormatDateForSQL($_POST['ToDate']) . "' AND ((stockmoves.price*(1-stockmoves.discountpercent)) - (stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost))/(stockmoves.price*(1-stockmoves.discountpercent)) <=" . ($_POST['GPMin']/100) . " - AND stockmoves.debtorno=debtorsmaster.debtorno ORDER BY stockmaster.stockid"; $LowGPSalesResult = DB_query($SQL,$db,'','',false,false); @@ -90,9 +89,9 @@ $LeftOvers = $pdf->addTextWrap(100,$YPos,30,$FontSize,$LowGPItems['transno']); $LeftOvers = $pdf->addTextWrap(130,$YPos,50,$FontSize,$LowGPItems['stockid']); $LeftOvers = $pdf->addTextWrap(220,$YPos,50,$FontSize,$LowGPItems['name']); - $DisplayUnitCost = number_format($LowGPItems['unitcost'],2); - $DisplaySellingPrice = number_format($LowGPItems['sellingprice'],2); - $DisplayGP = number_format($LowGPItems['gp'],2); + $DisplayUnitCost = number_format($LowGPItems['unitcost'],$_SESSION['CompanyRecord']['decimalplaces']); + $DisplaySellingPrice = number_format($LowGPItems['sellingprice'],$_SESSION['CompanyRecord']['decimalplaces']); + $DisplayGP = number_format($LowGPItems['gp'],$_SESSION['CompanyRecord']['decimalplaces']); $DisplayGPPercent = number_format(($LowGPItems['gp']*100)/$LowGPItems['sellingprice'],1); $LeftOvers = $pdf->addTextWrap(330,$YPos,60,$FontSize,$DisplaySellingPrice,'right'); @@ -138,11 +137,14 @@ </tr>'; echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ':</td> - <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> - </tr>'; + <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> + </tr>'; echo '</table> - <br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"> + </div>'; } include('includes/footer.inc'); Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFOrderStatus.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -61,13 +61,17 @@ } echo '</select></td></tr>'; - echo '<tr><td>' . _('Back Order Only') . ':</td><td><select name="BackOrders">'; - echo '<option selected value="Yes">' . _('Only Show Back Orders') . '</option>'; - echo '<option value="No">' . _('Show All Orders') . '</option>'; - echo '</select></td> - </tr> - </table> - <br /><div class="centre"><input type=submit name="Go" value="' . _('Create PDF') . '"></div>'; + echo '<tr><td>' . _('Back Order Only') . ':</td> + <td><select name="BackOrders"> + <option selected value="Yes">' . _('Only Show Back Orders') . '</option> + <option value="No">' . _('Show All Orders') . '</option> + </select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type=submit name="Go" value="' . _('Create PDF') . '"> + </div>'; include('includes/footer.inc'); exit; @@ -228,7 +232,6 @@ AND salesorders.orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND salesorders.orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' AND salesorders.quotation=0"; - } if ($_POST['BackOrders']=='Yes'){ Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFOrdersInvoiced.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -35,7 +35,11 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ':</td><td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td></tr>'; + echo '<table class="selection"> + <tr> + <td>' . _('Enter the date from which orders are to be listed') . ':</td> + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td> + </tr>'; echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; @@ -55,7 +59,7 @@ echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">'; echo '<option selected value="All">' . _('All Locations') . '</option>'; - $result= DB_query('SELECT loccode, locationname FROM locations',$db); + $result= DB_query("SELECT loccode, locationname FROM locations",$db); while ($myrow=DB_fetch_array($result)){ echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } @@ -108,16 +112,16 @@ ON salesorders.fromstkloc=locations.loccode WHERE orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces"; + GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces"; } elseif ($_POST['CategoryID']!='All' AND $_POST['Location']=='All') { @@ -153,17 +157,17 @@ WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces"; - + GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces"; + } elseif ($_POST['CategoryID']=='All' AND $_POST['Location']!='All') { $sql= "SELECT salesorders.orderno, salesorders.debtorno, @@ -227,7 +231,7 @@ SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced INNER JOIN locations ON salesorders.fromstkloc=locations.loccode - FROM salesorders + FROM salesorders INNER JOIN salesorderdetails ON salesorders.orderno = salesorderdetails.orderno INNER JOIN stockmaster @@ -237,20 +241,20 @@ INNER JOIN custbranch ON custbranch.debtorno=salesorders.debtorno AND custbranch.branchcode=salesorders.branchcode - WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' + WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' AND salesorders.fromstkloc ='" . $_POST['Location'] . "' AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces"; + GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces"; } $sql .= " ORDER BY salesorders.orderno"; Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFPeriodStockTransListing.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -1,7 +1,6 @@ <?php /* $Id: PDFPeriodStockTransListing.php 4307 2010-12-22 16:06:03Z tim_schofield $*/ - include('includes/SQL_CommonFunctions.inc'); include ('includes/session.inc'); @@ -17,8 +16,9 @@ $title = _('Stock Transaction Listing'); include ('includes/header.inc'); - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' ' - . _('Stock Transaction Listing').'</img></p></div>'; + echo '<div class="centre"> + <p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' '. _('Stock Transaction Listing').'</img></p> + </div>'; if ($InputError==1){ prnMsg($msg,'error'); @@ -26,8 +26,8 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection>'; - echo '<tr> + echo '<table class="selection">'; + echo '<tr> <td>' . _('Enter the date from which the transactions are to be listed') . ':</td> <td><input type="text" name="FromDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; @@ -55,24 +55,28 @@ echo '<tr><td>' . _('For Stock Location') . ':</td> <td><select name="StockLocation">'; - echo '<option VALUE="All">' . _('All') . '</option>'; + echo '<option value="All">' . _('All') . '</option>'; while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; $_POST['StockLocation']=$myrow['loccode']; } else { - echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type=submit name="Go" value="' . _('Create PDF') . '"></div>'; + echo '</table> + <br /> + <div class="centre"> + <input type=submit name="Go" value="' . _('Create PDF') . '" /> + </div>'; include('includes/footer.inc'); exit; @@ -84,43 +88,43 @@ if ($_POST['StockLocation']=='All') { $sql= "SELECT stockmoves.type, - stockmoves.stockid, - stockmaster.description, - stockmaster.decimalplaces, - stockmoves.transno, - stockmoves.trandate, - stockmoves.qty, - stockmoves.reference, - stockmoves.narrative, - locations.locationname - FROM stockmoves - LEFT JOIN stockmaster - ON stockmoves.stockid=stockmaster.stockid - LEFT JOIN locations - ON stockmoves.loccode=locations.loccode - WHERE type='" . $_POST['TransType'] . "' - AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' - AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."'"; + stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmoves.transno, + stockmoves.trandate, + stockmoves.qty, + stockmoves.reference, + stockmoves.narrative, + locations.locationname + FROM stockmoves + LEFT JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + LEFT JOIN locations + ON stockmoves.loccode=locations.loccode + WHERE type='" . $_POST['TransType'] . "' + AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' + AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."'"; } else { $sql= "SELECT stockmoves.type, - stockmoves.stockid, - stockmaster.description, - stockmaster.decimalplaces, - stockmoves.transno, - stockmoves.trandate, - stockmoves.qty, - stockmoves.reference, - stockmoves.narrative, - locations.locationname - FROM stockmoves - LEFT JOIN stockmaster - ON stockmoves.stockid=stockmaster.stockid - LEFT JOIN locations - ON stockmoves.loccode=locations.loccode - WHERE type='" . $_POST['TransType'] . "' - AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' - AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."' - AND stockmoves.loccode='" . $_POST['StockLocation'] . "'"; + stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmoves.transno, + stockmoves.trandate, + stockmoves.qty, + stockmoves.reference, + stockmoves.narrative, + locations.locationname + FROM stockmoves + LEFT JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + LEFT JOIN locations + ON stockmoves.loccode=locations.loccode + WHERE type='" . $_POST['TransType'] . "' + AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' + AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."' + AND stockmoves.loccode='" . $_POST['StockLocation'] . "'"; } $result=DB_query($sql,$db,'','',false,false); Modified: trunk/PageSecurity.php =================================================================== --- trunk/PageSecurity.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PageSecurity.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -53,7 +53,11 @@ echo '</table><br />'; -echo '<div class="centre"><input type="submit" name="Update" value="'._('Update Security Levels').'" /></div><br /></form>'; +echo '<div class="centre"> + <input type="submit" name="Update" value="'._('Update Security Levels').'" /> + </div> + <br /> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PaymentAllocations.php =================================================================== --- trunk/PaymentAllocations.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PaymentAllocations.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -1,14 +1,11 @@ <?php /* $Id$*/ -/* $Revision: 1.6 $ */ + /* This page is called from SupplierInquiry.php when the 'view payments' button is selected */ - -//$PageSecurity = 5; - include('includes/session.inc'); $title = _('Payment Allocations'); @@ -16,17 +13,17 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); - if (!isset($_GET['SuppID'])){ - prnMsg( _('Supplier ID Number is not Set, can not display result'),'warn'); - include('includes/footer.inc'); - exit; - } +if (!isset($_GET['SuppID'])){ + prnMsg( _('Supplier ID Number is not Set, can not display result'),'warn'); + include('includes/footer.inc'); + exit; +} - if (!isset($_GET['InvID'])){ - prnMsg( _('Invoice Number is not Set, can not display result'),'warn'); - include('includes/footer.inc'); - exit; - } +if (!isset($_GET['InvID'])){ + prnMsg( _('Invoice Number is not Set, can not display result'),'warn'); + include('includes/footer.inc'); + exit; +} $SuppID = $_GET['SuppID']; $InvID = $_GET['InvID']; @@ -34,48 +31,37 @@ echo '<div class="page_help_text">' . _('This shows how the payment to the supplier was allocated') . '<a href="SupplierInquiry.php?&SupplierID=' . $SuppID . '"><br /> ' . _('Back to supplier inquiry') . '</a></div><br />'; -//echo "<br /><font size=4 color=BLUE>Payment Allocation for Supplier: '$SuppID' and Invoice: '$InvID'</font>"; - -// $_SESSION['SuppID'] = new SupplierID; -// $_SESSION['InvID'] = new InvoiceID; - $SQL= "SELECT supptrans.supplierno, - supptrans.suppreference, - supptrans.trandate, - supptrans.alloc - FROM supptrans - WHERE supptrans.id IN (SELECT suppallocs.transid_allocfrom - FROM supptrans, suppallocs - WHERE supptrans.supplierno = '$SuppID' - AND supptrans.suppreference = '$InvID' - AND supptrans.id = suppallocs.transid_allocto)"; + supptrans.suppreference, + supptrans.trandate, + supptrans.alloc, + currencies.decimalplaces + FROM supptrans INNER JOIN suppliers + ON supptrans.supplierno=suppliers.supplierid + INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev + WHERE supptrans.id IN (SELECT suppallocs.transid_allocfrom + FROM supptrans, suppallocs + WHERE supptrans.supplierno = '" . $SuppID . "' + AND supptrans.suppreference = '" . $InvID . "' + AND supptrans.id = suppallocs.transid_allocto)"; -/* -Might be a way of doing this query without a subquery -$SQL= "SELECT supptrans.supplierno, - supptrans.suppreference, - supptrans.trandate, - supptrans.alloc - FROM supptrans INNER JOIN suppallocs ON supptrans.id=suppallocs.transid_allocfrom - WHERE supptrans.supplierno = '$SuppID' - AND supptrans.suppreference = '$InvID' -*/ - $Result = DB_query($SQL, $db); if (DB_num_rows($Result) == 0){ prnMsg(_('There may be a problem retrieving the information. No data is returned'),'warn'); - echo '<br /><a HREF ="javascript:history.back()">' . _('Go back') . '</a>'; + echo '<br /><a href ="javascript:history.back()">' . _('Go back') . '</a>'; include('includes/foooter.inc'); exit; } -echo '<table cellpadding=2 colspan=7 width=80% class=selection>'; -$TableHeader = "<tr> -<th>" . _('Supplier Number') . '<br />' . _('Reference') . "</th> -<th>" . _('Payment') .'<br />' . _('Reference') . "</th> -<th>" . _('Payment') . '<br />' . _('Date') . "</th> -<th>" . _('Total Payment') . '<br />' . _('Amount') . '</th></tr>'; +echo '<table cellpadding="2" colspan="7 width="80%" class="selection">'; +$TableHeader = '<tr> + <th>' . _('Supplier Number') . '<br />' . _('Reference') . '</th> + <th>' . _('Payment') .'<br />' . _('Reference') . '</th> + <th>' . _('Payment') . '<br />' . _('Date') . '</th> + <th>' . _('Total Payment') . '<br />' . _('Amount') . '</th> + </tr>'; echo $TableHeader; @@ -93,7 +79,7 @@ echo '<td>'.$myrow['supplierno'].'</td> <td>'.$myrow['suppreference'].'</td> <td>'.ConvertSQLDate($myrow['trandate']).'</td> - <td class=number>'.number_format($myrow['alloc'],2).'</td> + <td class="number">'.number_format($myrow['alloc'],$myrow['decimalplaces']).'</td> </tr>'; $j++; @@ -106,4 +92,4 @@ echo '</table>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PaymentMethods.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -62,17 +62,17 @@ // Get the old name and check that the record still exists need to be very careful here $sql = "SELECT paymentname FROM paymentmethods - WHERE paymentid = '" . $SelectedPaymentID . "'"; + WHERE paymentid = '" . $SelectedPaymentID . "'"; $result = DB_query($sql,$db); if ( DB_num_rows($result) != 0 ) { $myrow = DB_fetch_row($result); $OldName = $myrow[0]; $sql = "UPDATE paymentmethods - SET paymentname='" . $_POST['MethodName'] . "', - paymenttype = '" . $_POST['ForPayment'] . "', - receipttype = '" . $_POST['ForReceipt'] . "', - usepreprintedstationery = '" . $_POST['UsePrePrintedStationery']. "' - WHERE paymentname " . LIKE . " '".$OldName."'"; + SET paymentname='" . $_POST['MethodName'] . "', + paymenttype = '" . $_POST['ForPayment'] . "', + receipttype = '" . $_POST['ForReceipt'] . "', + usepreprintedstationery = '" . $_POST['UsePrePrintedStationery']. "' + WHERE paymentname " . LIKE . " '".$OldName."'"; } else { $InputError = 1; @@ -91,17 +91,14 @@ $InputError = 1; prnMsg( _('The payment method can not be created because another with the same name already exists.'),'error'); } else { - $sql = "INSERT INTO paymentmethods ( - paymentname, - paymenttype, - receipttype, - usepreprintedstationery) - VALUES ( - '" . $_POST['MethodName'] ."', - '" . $_POST['ForPayment'] ."', - '" . $_POST['ForReceipt'] ."', - '" . $_POST['UsePrePrintedStationery'] ."' - )"; + $sql = "INSERT INTO paymentmethods ( paymentname, + paymenttype, + receipttype, + usepreprintedstationery) + VALUES ('" . $_POST['MethodName'] ."', + '" . $_POS... [truncated message content] |
From: <dai...@us...> - 2011-07-24 00:14:36
|
Revision: 4636 http://web-erp.svn.sourceforge.net/web-erp/?rev=4636&view=rev Author: daintree Date: 2011-07-24 00:14:27 +0000 (Sun, 24 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/CustLoginSetup.php trunk/CustomerBranches.php trunk/OrderDetails.php trunk/OutstandingGRNs.php trunk/PDFCustTransListing.php trunk/PDFDIFOT.php trunk/PDFGrn.php trunk/PDFLowGP.php trunk/PDFOrderStatus.php trunk/PDFOrdersInvoiced.php trunk/PDFPeriodStockTransListing.php trunk/PageSecurity.php trunk/PaymentAllocations.php trunk/PaymentMethods.php trunk/PaymentTerms.php trunk/Payments.php trunk/SelectOrderItems.php trunk/SuppLoginSetup.php trunk/doc/Change.log trunk/doc/Manual/ManualPrices.html trunk/includes/DefinePaymentClass.php trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/CustLoginSetup.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -22,11 +22,6 @@ '" alt="" />' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName. _(' has been selected') . '</p><br />'; -if (isset($_GET['SelectedUser'])){ - $SelectedUser = $_GET['SelectedUser']; -} elseif (isset($_POST['SelectedUser'])){ - $SelectedUser = $_POST['SelectedUser']; -} if (isset($_POST['submit'])) { @@ -48,7 +43,7 @@ $InputError = 1; prnMsg(_('The password entered must be at least 5 characters long'),'error'); } - } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= False){ + } elseif (mb_strstr($_POST['Password'],$_POST['UserID'])!= false){ $InputError = 1; prnMsg(_('The password cannot contain the user id'),'error'); } elseif ((mb_strlen($_POST['Cust'])>0) AND (mb_strlen($_POST['BranchCode'])==0)) { @@ -60,7 +55,7 @@ // check that the entered branch is valid for the customer code $sql = "SELECT defaultlocation FROM custbranch - WHERE debtorno='" . $_POST['Cust'] . "' + WHERE debtorno='" . $_SESSION['CustomerID'] . "' AND branchcode='" . $_POST['BranchCode'] . "'"; $ErrMsg = _('The check on validity of the customer code and branch failed because'); @@ -75,47 +70,25 @@ $InventoryLocation = $myrow[0]; } - if (isset($SelectedUser) AND $InputError !=1) { + if ($InputError !=1) { - $UpdatePassword = ''; - if ($_POST['Password'] != ""){ - $UpdatePassword = "password='" . CryptPass($_POST['Password']) . "',"; - } - - $sql = "UPDATE www_users SET realname='" . $_POST['RealName'] . "', - phone='" . $_POST['Phone'] ."', - email='" . $_POST['Email'] ."', - ".$UpdatePassword." - branchcode='" . $_POST['BranchCode'] . "', - pagesize='" . $_POST['PageSize'] . "', - theme='" . $_POST['Theme'] . "', - language ='" . $_POST['UserLanguage'] . "', - defaultlocation='" . $InventoryLocation ."', - blocked='" . $_POST['Blocked'] . "' - WHERE userid = '".$SelectedUser."'"; - - prnMsg( _('The selected user record has been updated'), 'success' ); - - - } else { //no selected user so it's an insert of new user - - $sql = "INSERT INTO www_users (userid, - realname, - customerid, - branchcode, - password, - phone, - email, - pagesize, - fullaccess, - defaultlocation, - modulesallowed, - displayrecordsmax, - theme, - language) - VALUES ('" . $_POST['UserID'] . "', + $sql = "INSERT INTO www_users (userid, + realname, + customerid, + branchcode, + password, + phone, + email, + pagesize, + fullaccess, + defaultlocation, + modulesallowed, + displayrecordsmax, + theme, + language) + VALUES ('" . $_POST['UserID'] . "', '" . $_POST['RealName'] ."', - '" . $_POST['Cust'] ."', + '" . $_SESSION['CustomerID'] ."', '" . $_POST['BranchCode'] ."', '" . CryptPass($_POST['Password']) ."', '" . $_POST['Phone'] . "', @@ -127,166 +100,27 @@ '" . $_SESSION['DefaultDisplayRecordsMax'] . "', '" . $_POST['Theme'] . "', '". $_POST['UserLanguage'] ."')"; - prnMsg( _('A new user record has been inserted'), 'success' ); + + $ErrMsg = _('The user could not be added because'); + $DbgMsg = _('The SQL that was used to insert the new user and failed was'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); + prnMsg( _('A new customer login has been created'), 'success' ); + include('includes/footer.inc'); + exit; } } - if ($InputError!=1){ - //run the SQL from either of the above possibilites - $ErrMsg = _('The user alterations could not be processed because'); - $DbgMsg = _('The SQL that was used to update the user and failed was'); - $result = DB_query($sql,$db,$ErrMsg,$DbgMsg); - - unset($_POST['UserID']); - unset($_POST['RealName']); - unset($_POST['Cust']); - unset($_POST['BranchCode']); - unset($_POST['Phone']); - unset($_POST['Email']); - unset($_POST['Password']); - unset($_POST['PageSize']); - unset($_POST['Theme']); - unset($_POST['UserLanguage']); - unset($_POST['Blocked']); - unset($SelectedUser); - } - -} elseif (isset($_GET['delete'])) { -//the link to delete a selected record was clicked instead of the submit button - - $sql="SELECT userid FROM audittrail where userid='". $SelectedUser ."'"; - $result=DB_query($sql, $db); - if (DB_num_rows($result)!=0) { - prnMsg(_('Cannot delete user as entries already exist in the audit trail'), 'warn'); - } else { - - $sql="DELETE FROM www_users WHERE userid='".$SelectedUser."'"; - $ErrMsg = _('The User could not be deleted because');; - $result = DB_query($sql,$db,$ErrMsg); - prnMsg(_('User Deleted'),'info'); - } - unset($SelectedUser); } -if (!isset($SelectedUser)) { - -/* If its the first time the page has been displayed with no parameters then none of the above are true and the list of Users will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ - - $sql = "SELECT userid, - realname, - phone, - email, - customerid, - branchcode, - lastvisitdate, - pagesize, - theme, - language - FROM www_users WHERE customerid = '" . $_SESSION['CustomerID'] . "'"; - $result = DB_query($sql,$db); - - echo '<table class="selection>"'; - - echo '<tr><th>' . _('User Login') . '</th> - <th>' . _('Full Name') . '</th> - <th>' . _('Telephone') . '</th> - <th>' . _('Email') . '</th> - <th>' . _('Last Visit') . '</th> - <th>' . _('Report Size') .'</th> - <th>' . _('Theme') .'</th> - <th>' . _('Language') .'</th> - </tr>'; - - $k=0; //row colour counter - - while ($myrow = DB_fetch_array($result)) { - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td><a href="%s&SelectedUser=%s">' . _('Edit') . '</a></td> - <td><a href="%s&SelectedUser=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this user login?') . '\');">' . _('Delete') . '</a></td> - </tr>', - $myrow['userid'], - $myrow['realname'], - $myrow['phone'], - $myrow['email'], - $LastVisitDate, - $myrow['pagesize'], - $myrow['theme'], - $LanguagesArray[$myrow['language']], - $_SERVER['PHP_SELF'] . '?', - $myrow['userid'], - $_SERVER['PHP_SELF'] . '?', - $myrow['userid']); - - } //END WHILE LIST LOOP - echo '</table><br />'; -} //end of if there is no selected user - - -if (isset($SelectedUser)) { - echo '<div class="centre"><a href="' . $_SERVER['PHP_SELF'] .'">' . _('Review Existing Users') . '</a></div><br />'; -} echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -if (isset($SelectedUser)) { - //editing an existing User +echo '<table class="selection"> + <tr> + <td>' . _('User Login') . ':</td> + <td><input type="text" name="UserID" size="22" maxlength="20" /></td> + </tr>'; - $sql = "SELECT userid, - realname, - phone, - email, - customerid, - password, - branchcode, - pagesize, - theme, - language - FROM www_users - WHERE userid='" . $SelectedUser . "'"; - - $result = DB_query($sql, $db); - $myrow = DB_fetch_array($result); - - $_POST['UserID'] = $myrow['userid']; - $_POST['RealName'] = $myrow['realname']; - $_POST['Phone'] = $myrow['phone']; - $_POST['Email'] = $myrow['email']; - $_POST['PageSize'] = $myrow['pagesize']; - $_POST['Theme'] = $myrow['theme']; - $_POST['UserLanguage'] = $myrow['language']; - - echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '">'; - echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '">'; - - echo '<table class="selection"> - <tr> - <td>' . _('User code') . ':</td> - <td>' . $_POST['UserID'] . '</td> - </tr>'; - -} else { //end of if $SelectedUser only do the else when a new record is being entered - echo '<table class="selection"> - <tr> - <td>' . _('User Login') . ':</td> - <td><input type="text" name="UserID" size="22" maxlength="20" /></td> - </tr>'; -} - if (!isset($_POST['Password'])) { $_POST['Password']=''; } @@ -312,15 +146,11 @@ //Customer is fixed by selection of customer -$_POST['Cust']=$_SESSION['CustomerID']; -echo '<input type="hidden" name="Cust" value="' . $_POST['Cust'] . '">'; -echo '<tr><td>'._('Customer Code').':</td> - <td>' . $_POST['Cust'] . '</td></tr>'; echo '<tr><td>' . _('Branch Code') . ':</td> <td><select name="BranchCode">'; -$sql = "SELECT branchcode FROM custbranch WHERE debtorno = '" . $_POST['Cust'] . "'"; +$sql = "SELECT branchcode FROM custbranch WHERE debtorno = '" . $_SESSION['CustomerID'] . "'"; $result = DB_query($sql,$db); while ($myrow=DB_fetch_array($result)){ @@ -420,20 +250,8 @@ echo '<option value="' . $LanguageEntry . '">' . $LanguageName .'</option>'; } } - - echo '</select></td></tr>'; -echo '<tr><td>' . _('Account Status') . ':</td> - <td><select name="Blocked">'; -if ($_POST['Blocked']==0){ - echo '<option selected value="0">' . _('Open') . '</option> - <option value="1">' . _('Blocked') . '</option>'; -} else { - echo '<option value="0">' . _('Open') . '</option> - <option selected value="1">' . _('Blocked') . '</option>'; -} -echo '</select></td></tr>'; echo '</table><br /> <div class="centre"><input type="submit" name="submit" value="' . _('Enter Information') . '"></div> Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/CustomerBranches.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -431,14 +431,14 @@ echo '<b>'.($TotalEnable+$TotalDisable). '</b> ' . _('Total Branches') . '</div></td></tr></table>'; } else { $sql = "SELECT debtorsmaster.name, - address1, - address2, - address3, - address4, - address5, - address6 - FROM debtorsmaster - WHERE debtorno = '".$DebtorNo."'"; + address1, + address2, + address3, + address4, + address5, + address6 + FROM debtorsmaster + WHERE debtorno = '".$DebtorNo."'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -463,35 +463,35 @@ //editing an existing branch $sql = "SELECT branchcode, - brname, - braddress1, - braddress2, - braddress3, - braddress4, - braddress5, - braddress6, - specialinstructions, - estdeliverydays, - fwddate, - salesman, - area, - phoneno, - faxno, - contactname, - email, - taxgroupid, - defaultlocation, - brpostaddr1, - brpostaddr2, - brpostaddr3, - brpostaddr4, - disabletrans, - defaultshipvia, - custbranchcode, - deliverblind - FROM custbranch - WHERE branchcode='".$SelectedBranch."' - AND debtorno='".$DebtorNo."'"; + brname, + braddress1, + braddress2, + braddress3, + braddress4, + braddress5, + braddress6, + specialinstructions, + estdeliverydays, + fwddate, + salesman, + area, + phoneno, + faxno, + contactname, + email, + taxgroupid, + defaultlocation, + brpostaddr1, + brpostaddr2, + brpostaddr3, + brpostaddr4, + disabletrans, + defaultshipvia, + custbranchcode, + deliverblind + FROM custbranch + WHERE branchcode='".$SelectedBranch."' + AND debtorno='".$DebtorNo."'"; $result = DB_query($sql, $db); $myrow = DB_fetch_array($result); @@ -547,12 +547,12 @@ */ if (isset($_GET['BranchCode'])){ $sql="SELECT name, - address1, - address2, - address3, - address4, - address5, - address6 + address1, + address2, + address3, + address4, + address5, + address6 FROM debtorsmaster WHERE debtorno='".$_GET['BranchCode']."'"; @@ -579,22 +579,7 @@ $_POST['DeliverBlind'] = $_SESSION['DefaultBlindPackNote']; } - //SQL to poulate account selection boxes - $sql = "SELECT salesmanname, - salesmancode - FROM salesman - WHERE current = 1"; - $result = DB_query($sql,$db); - - if (DB_num_rows($result)==0){ - echo '</table>'; - prnMsg(_('There are no sales people defined as yet') . ' - ' . _('customer branches must be allocated to a sales person') . '. ' . _('Please use the link below to define at least one sales person'),'error'); - echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php">'._('Define Sales People') . '</a>'; - include('includes/footer.inc'); - exit; - } - echo '<input type=hidden name="DebtorNo" value="'. $DebtorNo . '" />'; @@ -636,6 +621,23 @@ if (!isset($_POST['FwdDate'])) {$_POST['FwdDate']=0;} echo '<td><input ' .(in_array('FwdDate',$Errors) ? 'class="inputerror"' : '' ) .' tabindex=12 type="text" class=number name="FwdDate" size=4 maxlength=2 value='. $_POST['FwdDate'].'></td></tr>'; + + //SQL to poulate account selection boxes + $sql = "SELECT salesmanname, + salesmancode + FROM salesman + WHERE current = 1"; + + $result = DB_query($sql,$db); + + if (DB_num_rows($result)==0){ + echo '</table>'; + prnMsg(_('There are no sales people defined as yet') . ' - ' . _('customer branches must be allocated to a sales person') . '. ' . _('Please use the link below to define at least one sales person'),'error'); + echo '<p align="center"><a href="' . $rootpath . '/SalesPeople.php">'._('Define Sales People') . '</a>'; + include('includes/footer.inc'); + exit; + } + echo '<tr><td>'._('Salesperson').':</td>'; echo '<td><select tabindex=13 name="Salesman">'; @@ -717,15 +719,22 @@ //only display email link if there is an email address echo '<td><input tabindex=18 type="text" name="Email" size=56 maxlength=55 value="'. $_POST['Email'].'"></td></tr>'; - echo '<tr><td>'._('Tax Group').':</td>'; - echo '<td><select tabindex=19 name="TaxGroup">'; DB_data_seek($result,0); $sql = "SELECT taxgroupid, taxgroupdescription FROM taxgroups"; - $result = DB_query($sql,$db); - - while ($myrow = DB_fetch_array($result)) { + $TaxGroupResults = DB_query($sql,$db); + if (DB_num_rows($TaxGroupResults)==0){ + echo '</table>'; + prnMsg(_('There are no tax groups defined - these must be set up first before any branches can be set up') . ' + <br /><a href="' . $rootpath . '/TaxGroups.php">' . _('Define Tax Groups') . '</a>','error'); + include('includes/footer.inc'); + exit; + } + echo '<tr><td>'._('Tax Group').':</td> + <td><select tabindex=19 name="TaxGroup">'; + + while ($myrow = DB_fetch_array($TaxGroupResults)) { if (isset($_POST['TaxGroup']) and $myrow['taxgroupid']==$_POST['TaxGroup']) { echo '<option selected value="'; } else { @@ -748,10 +757,18 @@ echo ' </select></td></tr>'; + + $SQL = "SELECT shipper_id, shippername FROM shippers"; + $ShipperResults = DB_query($SQL,$db); + if (DB_num_rows($ShipperResults)==0){ + echo '</table>'; + prnMsg(_('There are no shippers defined - these must be set up first before any branches can be set up') . ' + <br /><a href="' . $rootpath . '/Shippers.php">' . _('Define Shippers') . '</a>','error'); + include('includes/footer.inc'); + exit; + } echo '<tr><td>'._('Default freight/shipper method') . ':</td> <td><select tabindex=21 name="DefaultShipVia">'; - $SQL = "SELECT shipper_id, shippername FROM shippers"; - $ShipperResults = DB_query($SQL,$db); while ($myrow=DB_fetch_array($ShipperResults)){ if (isset($_POST['DefaultShipVia'])and $myrow['shipper_id']==$_POST['DefaultShipVia']){ echo '<option selected value=' . $myrow['shipper_id'] . '>' . $myrow['shippername'] . '</option>'; Modified: trunk/OrderDetails.php =================================================================== --- trunk/OrderDetails.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/OrderDetails.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -1,9 +1,7 @@ <?php -/* $Revision: 1.25 $ */ + /* $Id$*/ -//$PageSecurity = 2; - /* Session started in header.inc for password checking and authorisation level check */ include('includes/session.inc'); @@ -21,34 +19,33 @@ include('includes/header.inc'); -$OrderHeaderSQL = "SELECT - salesorders.debtorno, - debtorsmaster.name, - salesorders.branchcode, - salesorders.customerref, - salesorders.comments, - salesorders.orddate, - salesorders.ordertype, - salesorders.shipvia, - salesorders.deliverto, - salesorders.deladd1, - salesorders.deladd2, - salesorders.deladd3, - salesorders.deladd4, - salesorders.deladd5, - salesorders.deladd6, - salesorders.contactphone, - salesorders.contactemail, - salesorders.freightcost, - salesorders.deliverydate, - debtorsmaster.currcode, - salesorders.fromstkloc - FROM - salesorders, - debtorsmaster - WHERE - salesorders.debtorno = debtorsmaster.debtorno - AND salesorders.orderno = '" . $_GET['OrderNumber'] . "'"; +$OrderHeaderSQL = "SELECT salesorders.debtorno, + debtorsmaster.name, + salesorders.branchcode, + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.ordertype, + salesorders.shipvia, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.contactphone, + salesorders.contactemail, + salesorders.freightcost, + salesorders.deliverydate, + debtorsmaster.currcode, + salesorders.fromstkloc, + currencies.decimalplaces + FROM salesorders INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE salesorders.orderno = '" . $_GET['OrderNumber'] . "'"; $ErrMsg = _('The order cannot be retrieved because'); $DbgMsg = _('The SQL that failed to get the order header was'); @@ -59,7 +56,9 @@ _('Order Details') . '" alt="" />' . ' ' . $title . '</p>'; $myrow = DB_fetch_array($GetOrdHdrResult); - echo '<table class=selection>'; + $CurrDecimalPlaces = $myrow['decimalplaces']; + + echo '<table class="selection">'; echo '<tr><th colspan=4><font color=blue>'._('Order Header Details For Order No').' '.$_GET['OrderNumber'].'</font></th></tr>'; echo '<tr> <th style="text-align: left">' . _('Customer Code') . ':</th> @@ -118,24 +117,24 @@ /*Now get the line items */ - $LineItemsSQL = "SELECT - stkcode, - stockmaster.description, - stockmaster.volume, - stockmaster.kgs, - stockmaster.decimalplaces, - stockmaster.mbflag, - stockmaster.units, - stockmaster.discountcategory, - stockmaster.controlled, - stockmaster.serialised, - unitprice, - quantity, - discountpercent, - actualdispatchdate, - qtyinvoiced - FROM salesorderdetails, stockmaster - WHERE salesorderdetails.stkcode = stockmaster.stockid AND orderno ='" . $_GET['OrderNumber'] . "'"; + $LineItemsSQL = "SELECT stkcode, + stockmaster.description, + stockmaster.volume, + stockmaster.kgs, + stockmaster.decimalplaces, + stockmaster.mbflag, + stockmaster.units, + stockmaster.discountcategory, + stockmaster.controlled, + stockmaster.serialised, + unitprice, + quantity, + discountpercent, + actualdispatchdate, + qtyinvoiced + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + WHERE orderno ='" . $_GET['OrderNumber'] . "'"; $ErrMsg = _('The line items of the order cannot be retrieved because'); $DbgMsg = _('The SQL used to retrieve the line items, that failed was'); @@ -150,15 +149,15 @@ echo '<br /><table cellpadding=2 colspan=9 class=selection>'; echo '<tr><th colspan=9><font color=blue>'._('Order Line Details For Order No').' '.$_GET['OrderNumber'].'</font></th></tr>'; echo '<tr> - <th>' . _('Item Code') . '</th> - <th>' . _('Item Description') . '</th> - <th>' . _('Quantity') . '</th> - <th>' . _('Unit') . '</th> - <th>' . _('Price') . '</th> - <th>' . _('Discount') . '</th> - <th>' . _('Total') . '</th> - <th>' . _('Qty Del') . '</th> - <th>' . _('Last Del') . '</th> + <th>' . _('Item Code') . '</th> + <th>' . _('Item Description') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> + <th>' . _('Price') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Total') . '</th> + <th>' . _('Qty Del') . '</th> + <th>' . _('Last Del') . '</th> </tr>'; $k=0; while ($myrow=db_fetch_array($LineItemsResult)) { @@ -181,10 +180,10 @@ <td>' . $myrow['description'] . '</td> <td class=number>' . $myrow['quantity'] . '</td> <td>' . $myrow['units'] . '</td> - <td class=number>' . number_format($myrow['unitprice'],2) . '</td> + <td class=number>' . number_format($myrow['unitprice'],$CurrDecimalPlaces) . '</td> <td class=number>' . number_format(($myrow['discountpercent'] * 100),2) . '%' . '</td> - <td class=number>' . number_format($myrow['quantity'] * $myrow['unitprice'] * (1 - $myrow['discountpercent']),2) . '</td> - <td class=number>' . number_format($myrow['qtyinvoiced'],2) . '</td> + <td class=number>' . number_format($myrow['quantity'] * $myrow['unitprice'] * (1 - $myrow['discountpercent']),$CurrDecimalPlaces) . '</td> + <td class=number>' . number_format($myrow['qtyinvoiced'],$myrow['decimalplaces']) . '</td> <td>' . $DisplayActualDeliveryDate . '</td> </tr>'; @@ -193,7 +192,7 @@ $OrderTotalWeight = $OrderTotalWeight + $myrow['quantity'] * $myrow['kgs']; } - $DisplayTotal = number_format($OrderTotal,2); + $DisplayTotal = number_format($OrderTotal,$CurrDecimalPlaces); $DisplayVolume = number_format($OrderTotalVolume,2); $DisplayWeight = number_format($OrderTotalWeight,2); Modified: trunk/OutstandingGRNs.php =================================================================== --- trunk/OutstandingGRNs.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/OutstandingGRNs.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -30,13 +30,18 @@ quantityinv, grns.stdcostunit, actprice, - unitprice - FROM grns, - purchorderdetails, - suppliers - WHERE grns.supplierid=suppliers.supplierid - AND grns.podetailitem = purchorderdetails.podetailitem - AND qtyrecd-quantityinv>0 + unitprice, + currencies.decimalplaces as currdecimalplaces, + stockmaster.decimalplaces as itemdecimalplaces + FROM grns INNER JOIN purchorderdetails + ON grns.podetailitem = purchorderdetails.podetailitem + INNER JOIN suppliers + ON grns.supplierid=suppliers.supplierid + INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev + LEFT JOIN stockmaster + ON grns.itemcode=stockmaster.stockid + WHERE qtyrecd-quantityinv>0 AND grns.supplierid >='" . $_POST['FromCriteria'] . "' AND grns.supplierid <='" . $_POST['ToCriteria'] . "' ORDER BY supplierid, @@ -81,7 +86,7 @@ /* need to print the total of previous supplier */ $YPos -= (2*$line_height); $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,260-$Left_Margin,$FontSize,_('Total for') . ' ' . $Supplier . ' - ' . $SupplierName); - $DisplaySuppTotVal = number_format($SuppTot_Val,2); + $DisplaySuppTotVal = number_format($SuppTot_Val,$GRNs['decimalplaces']); $LeftOvers = $pdf->addTextWrap(500,$YPos,60,$FontSize,$DisplaySuppTotVal, 'right'); $YPos -=$line_height; $pdf->line($Left_Margin, $YPos+$line_height-2,$Page_Width-$Right_Margin, $YPos+$line_height-2); @@ -93,16 +98,21 @@ $SupplierName = $GRNs['suppname']; } $YPos -=$line_height; - + + if ($GRNs['itemdecimalplaces']==null){ + $ItemDecimalPlaces = 2; + } else { + $ItemDecimalPlaces = $GRNs['itemdecimalplaces']; + } $LeftOvers = $pdf->addTextWrap(32,$YPos,40,$FontSize,$GRNs['grnno']); $LeftOvers = $pdf->addTextWrap(70,$YPos,40,$FontSize,$GRNs['orderno']); $LeftOvers = $pdf->addTextWrap(110,$YPos,200,$FontSize,$GRNs['itemcode'] . ' - ' . $GRNs['itemdescription']); - $DisplayStdCost = number_format($GRNs['stdcostunit'],2); - $DisplayQtyRecd = number_format($GRNs['qtyrecd'],2); - $DisplayQtyInv = number_format($GRNs['quantityinv'],2); - $DisplayQtyOstg = number_format($GRNs['qtyrecd']- $GRNs['quantityinv'],2); + $DisplayStdCost = number_format($GRNs['stdcostunit'],$_SESSION['CompanyRecord']['decimalplaces']); + $DisplayQtyRecd = number_format($GRNs['qtyrecd'],$ItemDecimalPlaces); + $DisplayQtyInv = number_format($GRNs['quantityinv'],$ItemDecimalPlaces); + $DisplayQtyOstg = number_format($GRNs['qtyrecd']- $GRNs['quantityinv'],$ItemDecimalPlaces); $LineValue = ($GRNs['qtyrecd']- $GRNs['quantityinv'])*$GRNs['stdcostunit']; - $DisplayValue = number_format($LineValue,2); + $DisplayValue = number_format($LineValue,$_SESSION['CompanyRecord']['decimalplaces']); $LeftOvers = $pdf->addTextWrap(310,$YPos,50,$FontSize,$DisplayQtyRecd,'right'); $LeftOvers = $pdf->addTextWrap(360,$YPos,50,$FontSize,$DisplayQtyInv, 'right'); Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFCustTransListing.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -54,15 +54,20 @@ } $sql= "SELECT type, - debtorno, - transno, - trandate, - ovamount, - ovgst, - invtext - FROM debtortrans - WHERE type='" . $_POST['TransType'] . "' - AND date_format(inputdate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; + debtortrans.debtorno, + transno, + trandate, + ovamount, + ovgst, + invtext, + debtortrans.rate, + decimalplaces + FROM debtortrans INNER JOIN debtorsmaster + ON debtortrans.debtorno=debtorsmaster.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE type='" . $_POST['TransType'] . "' + AND date_format(inputdate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; $result=DB_query($sql,$db,'','',false,false); @@ -70,8 +75,8 @@ $title = _('Payment Listing'); include('includes/header.inc'); prnMsg(_('An error occurred getting the transactions'),'error'); - if ($Debug==1){ - prnMsg(_('The SQL used to get the transaction information that failed was') . ':<br />' . $SQL,'error'); + if ($debug==1){ + prnMsg(_('The SQL used to get the transaction information that failed was') . ':<br />' . $sql,'error'); } include('includes/footer.inc'); exit; @@ -92,7 +97,7 @@ $pdf->addInfo('Subject',_('Customer transaction listing from') . ' ' . $_POST['Date'] ); $line_height=12; $PageNumber = 1; -$TotalCheques = 0; +$TotalAmount = 0; include ('includes/PDFCustTransListingPageHeader.inc'); @@ -105,12 +110,12 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$supplierrow['name'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['transno'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['ovamount'],2), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,number_format($myrow['ovgst'],2), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($myrow['ovamount']+$myrow['ovgst'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['ovamount'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,number_format($myrow['ovgst'],$myrow['decimalplaces']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($myrow['ovamount']+$myrow['ovgst'],$myrow['decimalplaces']), 'right'); $YPos -= ($line_height); - $TotalCheques = $TotalCheques - $myrow['ovamount']; + $TotalAmount = $TotalAmount + ($myrow['ovamount']/$myrow['rate']); if ($YPos - (2 *$line_height) < $Bottom_Margin){ /*Then set up a new page */ @@ -121,8 +126,8 @@ $YPos-=$line_height; -$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format(-$TotalCheques,2), 'right'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions'), 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($TotalAmount,$_SESSION['CompanyRecord']['decimalplaces']), 'right'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['CurrencyDefault'], 'left'); $ReportFileName = $_SESSION['DatabaseName'] . '_CustTransListing_' . date('Y-m-d').'.pdf'; $pdf->OutputD($ReportFileName); Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFDIFOT.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -26,7 +26,7 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection> + echo '<table class="selection"> <tr> <td>' . _('Enter the date from which variances between orders and deliveries are to be listed') . ':</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="FromDate" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m')-1,0,Date('y'))) . '"></td> @@ -41,9 +41,9 @@ } echo '<tr> - <td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ':</td> - <td><input type="text" class="number" name="DaysAcceptable" maxlength=2 size=2 value="' . $_POST['DaysAcceptable'] . '"></td> - </tr>'; + <td>' . _('Enter the number of days considered acceptable between delivery requested date and invoice date(ie the date dispatched)') . ':</td> + <td><input type="text" class="number" name="DaysAcceptable" maxlength=2 size=2 value="' . $_POST['DaysAcceptable'] . '"></td> + </tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; $sql = "SELECT categorydescription, categoryid FROM stockcategory WHERE stocktype<>'D' AND stocktype<>'L'"; @@ -57,7 +57,6 @@ echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } - echo '</select></td></tr>'; echo '<tr><td>' . _('Inventory Location') . ':</td> @@ -99,6 +98,7 @@ salesorderdetails.quantity, salesorderdetails.stkcode, stockmaster.description, + stockmaster.decimalplaces, salesorders.debtorno, salesorders.branchcode FROM salesorderdetails INNER JOIN stockmaster @@ -116,6 +116,7 @@ salesorderdetails.quantity, salesorderdetails.stkcode, stockmaster.description, + stockmaster.decimalplaces, salesorders.debtorno, salesorders.branchcode FROM salesorderdetails INNER JOIN stockmaster @@ -136,6 +137,7 @@ salesorderdetails.quantity, salesorderdetails.stkcode, stockmaster.description, + stockmaster.decimalplaces, salesorders.debtorno, salesorders.branchcode FROM salesorderdetails INNER JOIN stockmaster @@ -156,6 +158,7 @@ salesorderdetails.quantity, salesorderdetails.stkcode, stockmaster.description, + stockmaster.decimalplaces, salesorders.debtorno, salesorders.branchcode FROM salesorderdetails INNER JOIN stockmaster @@ -214,7 +217,7 @@ if ($DaysDiff > $_POST['DaysAcceptable']){ $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,40,$FontSize,$myrow['orderno'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+40,$YPos,200,$FontSize,$myrow['stkcode'] .' - ' . $myrow['description'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,50,$FontSize,number_format($myrow['quantity']), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+240,$YPos,50,$FontSize,number_format($myrow['quantity'],$myrow['decimalplaces']), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+295,$YPos,50,$FontSize,$myrow['debtorno'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+345,$YPos,50,$FontSize,$myrow['branchcode'], 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+395,$YPos,50,$FontSize,ConvertSQLDate($myrow['actualdispatchdate']), 'left'); @@ -286,14 +289,14 @@ $ReportFileName = $_SESSION['DatabaseName'] . '_DIFOT_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName);//UldisN -$pdf->__destruct(); //UldisN +$pdf->OutputD($ReportFileName); +$pdf->__destruct(); if ($_POST['Email']=='Yes'){ if (file_exists($_SESSION['reports_dir'] . '/'.$ReportFileName)){ unlink($_SESSION['reports_dir'] . '/'.$ReportFileName); } - $fp = fopen( $_SESSION['reports_dir'] . '/'.$ReportFileName,'wb'); + $fp = fopen( $_SESSION['reports_dir'] . '/'.$ReportFileName,'wb'); fwrite ($fp, $pdfcode); fclose ($fp); Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFGrn.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -41,35 +41,35 @@ } else { //NOT PREVIEW $sql="SELECT grns.itemcode, - grns.grnno, - grns.deliverydate, - grns.itemdescription, - grns.qtyrecd, - grns.supplierid, - purchorderdetails.suppliersunit, - purchorderdetails.conversionfactor, - stockmaster.units, - stockmaster.decimalplaces - FROM grns INNER JOIN purchorderdetails - ON grns.podetailitem=purchorderdetails.podetailitem - LEFT JOIN stockmaster - ON grns.itemcode=stockmaster.stockid - WHERE grnbatch='".$GRNNo."'"; + grns.grnno, + grns.deliverydate, + grns.itemdescription, + grns.qtyrecd, + grns.supplierid, + purchorderdetails.suppliersunit, + purchorderdetails.conversionfactor, + stockmaster.units, + stockmaster.decimalplaces + FROM grns INNER JOIN purchorderdetails + ON grns.podetailitem=purchorderdetails.podetailitem + LEFT JOIN stockmaster + ON grns.itemcode=stockmaster.stockid + WHERE grnbatch='".$GRNNo."'"; $GRNResult=DB_query($sql, $db); $NoOfGRNs = DB_num_rows($GRNResult); if($NoOfGRNs>0) { //there are GRNs to print $sql = "SELECT suppliers.suppname, - suppliers.address1, - suppliers.address2 , - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6 - FROM grns INNER JOIN suppliers - ON grns.supplierid=suppliers.supplierid - WHERE grnbatch='".$GRNNo."'"; + suppliers.address1, + suppliers.address2 , + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6 + FROM grns INNER JOIN suppliers + ON grns.supplierid=suppliers.supplierid + WHERE grnbatch='".$GRNNo."'"; $SuppResult = DB_query($sql,$db,_('Could not get the supplier of the selected GRN')); $SuppRow = DB_fetch_array($SuppResult); } Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFLowGP.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -28,27 +28,26 @@ /*Now figure out the data to report for the category range under review */ $SQL = "SELECT stockmaster.categoryid, - stockmaster.stockid, - stockmoves.transno, - stockmoves.trandate, - systypes.typename, - stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost as unitcost, - stockmoves.qty, - stockmoves.debtorno, - stockmoves.branchcode, - stockmoves.price*(1-stockmoves.discountpercent) as sellingprice, - (stockmoves.price*(1-stockmoves.discountpercent)) - (stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost) AS gp, - debtorsmaster.name - FROM stockmaster, - stockmoves, - systypes, - debtorsmaster - WHERE stockmoves.type=systypes.typeid - AND stockmaster.stockid=stockmoves.stockid - AND stockmoves.trandate >= '" . FormatDateForSQL($_POST['FromDate']) . "' + stockmaster.stockid, + stockmoves.transno, + stockmoves.trandate, + systypes.typename, + stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost as unitcost, + stockmoves.qty, + stockmoves.debtorno, + stockmoves.branchcode, + stockmoves.price*(1-stockmoves.discountpercent) as sellingprice, + (stockmoves.price*(1-stockmoves.discountpercent)) - (stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost) AS gp, + debtorsmaster.name + FROM stockmaster INNER JOIN stockmoves + ON stockmaster.stockid=stockmoves.stockid + INNER JOIN systypes + ON stockmoves.type=systypes.typeid + INNER JOIN debtorsmaster + ON stockmoves.debtorno=debtorsmaster.debtorno + WHERE stockmoves.trandate >= '" . FormatDateForSQL($_POST['FromDate']) . "' AND stockmoves.trandate <= '" . FormatDateForSQL($_POST['ToDate']) . "' AND ((stockmoves.price*(1-stockmoves.discountpercent)) - (stockmaster.materialcost + stockmaster.labourcost + stockmaster.overheadcost))/(stockmoves.price*(1-stockmoves.discountpercent)) <=" . ($_POST['GPMin']/100) . " - AND stockmoves.debtorno=debtorsmaster.debtorno ORDER BY stockmaster.stockid"; $LowGPSalesResult = DB_query($SQL,$db,'','',false,false); @@ -90,9 +89,9 @@ $LeftOvers = $pdf->addTextWrap(100,$YPos,30,$FontSize,$LowGPItems['transno']); $LeftOvers = $pdf->addTextWrap(130,$YPos,50,$FontSize,$LowGPItems['stockid']); $LeftOvers = $pdf->addTextWrap(220,$YPos,50,$FontSize,$LowGPItems['name']); - $DisplayUnitCost = number_format($LowGPItems['unitcost'],2); - $DisplaySellingPrice = number_format($LowGPItems['sellingprice'],2); - $DisplayGP = number_format($LowGPItems['gp'],2); + $DisplayUnitCost = number_format($LowGPItems['unitcost'],$_SESSION['CompanyRecord']['decimalplaces']); + $DisplaySellingPrice = number_format($LowGPItems['sellingprice'],$_SESSION['CompanyRecord']['decimalplaces']); + $DisplayGP = number_format($LowGPItems['gp'],$_SESSION['CompanyRecord']['decimalplaces']); $DisplayGPPercent = number_format(($LowGPItems['gp']*100)/$LowGPItems['sellingprice'],1); $LeftOvers = $pdf->addTextWrap(330,$YPos,60,$FontSize,$DisplaySellingPrice,'right'); @@ -138,11 +137,14 @@ </tr>'; echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ':</td> - <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> - </tr>'; + <td><input type="text" class="number" name="GPMin" maxlength="3" size="3" value="' . $_POST['GPMin'] . '"></td> + </tr>'; echo '</table> - <br /><div class="centre"><input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"></div>'; + <br /> + <div class="centre"> + <input type="submit" name="PrintPDF" value="' . _('Print PDF') . '"> + </div>'; } include('includes/footer.inc'); Modified: trunk/PDFOrderStatus.php =================================================================== --- trunk/PDFOrderStatus.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFOrderStatus.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -61,13 +61,17 @@ } echo '</select></td></tr>'; - echo '<tr><td>' . _('Back Order Only') . ':</td><td><select name="BackOrders">'; - echo '<option selected value="Yes">' . _('Only Show Back Orders') . '</option>'; - echo '<option value="No">' . _('Show All Orders') . '</option>'; - echo '</select></td> - </tr> - </table> - <br /><div class="centre"><input type=submit name="Go" value="' . _('Create PDF') . '"></div>'; + echo '<tr><td>' . _('Back Order Only') . ':</td> + <td><select name="BackOrders"> + <option selected value="Yes">' . _('Only Show Back Orders') . '</option> + <option value="No">' . _('Show All Orders') . '</option> + </select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type=submit name="Go" value="' . _('Create PDF') . '"> + </div>'; include('includes/footer.inc'); exit; @@ -228,7 +232,6 @@ AND salesorders.orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND salesorders.orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' AND salesorders.quotation=0"; - } if ($_POST['BackOrders']=='Yes'){ Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFOrdersInvoiced.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -35,7 +35,11 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection><tr><td>' . _('Enter the date from which orders are to be listed') . ':</td><td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td></tr>'; + echo '<table class="selection"> + <tr> + <td>' . _('Enter the date from which orders are to be listed') . ':</td> + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" name="FromDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))) . '"></td> + </tr>'; echo '<tr><td>' . _('Enter the date to which orders are to be listed') . ':</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td></tr>'; echo '<tr><td>' . _('Inventory Category') . '</td><td>'; @@ -55,7 +59,7 @@ echo '<tr><td>' . _('Inventory Location') . ':</td><td><select name="Location">'; echo '<option selected value="All">' . _('All Locations') . '</option>'; - $result= DB_query('SELECT loccode, locationname FROM locations',$db); + $result= DB_query("SELECT loccode, locationname FROM locations",$db); while ($myrow=DB_fetch_array($result)){ echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } @@ -108,16 +112,16 @@ ON salesorders.fromstkloc=locations.loccode WHERE orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces"; + GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces"; } elseif ($_POST['CategoryID']!='All' AND $_POST['Location']=='All') { @@ -153,17 +157,17 @@ WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces"; - + GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces"; + } elseif ($_POST['CategoryID']=='All' AND $_POST['Location']!='All') { $sql= "SELECT salesorders.orderno, salesorders.debtorno, @@ -227,7 +231,7 @@ SUM(salesorderdetails.qtyinvoiced) AS totqtyinvoiced INNER JOIN locations ON salesorders.fromstkloc=locations.loccode - FROM salesorders + FROM salesorders INNER JOIN salesorderdetails ON salesorders.orderno = salesorderdetails.orderno INNER JOIN stockmaster @@ -237,20 +241,20 @@ INNER JOIN custbranch ON custbranch.debtorno=salesorders.debtorno AND custbranch.branchcode=salesorders.branchcode - WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' + WHERE stockmaster.categoryid ='" . $_POST['CategoryID'] . "' AND salesorders.fromstkloc ='" . $_POST['Location'] . "' AND orddate >='" . FormatDateForSQL($_POST['FromDate']) . "' AND orddate <='" . FormatDateForSQL($_POST['ToDate']) . "' - GROUP BY salesorders.orderno, - salesorders.debtorno, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.fromstkloc, - salesorderdetails.stkcode, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces"; + GROUP BY salesorders.orderno, + salesorders.debtorno, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.fromstkloc, + salesorderdetails.stkcode, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces"; } $sql .= " ORDER BY salesorders.orderno"; Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PDFPeriodStockTransListing.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -1,7 +1,6 @@ <?php /* $Id: PDFPeriodStockTransListing.php 4307 2010-12-22 16:06:03Z tim_schofield $*/ - include('includes/SQL_CommonFunctions.inc'); include ('includes/session.inc'); @@ -17,8 +16,9 @@ $title = _('Stock Transaction Listing'); include ('includes/header.inc'); - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' ' - . _('Stock Transaction Listing').'</img></p></div>'; + echo '<div class="centre"> + <p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="">' . ' '. _('Stock Transaction Listing').'</img></p> + </div>'; if ($InputError==1){ prnMsg($msg,'error'); @@ -26,8 +26,8 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection>'; - echo '<tr> + echo '<table class="selection">'; + echo '<tr> <td>' . _('Enter the date from which the transactions are to be listed') . ':</td> <td><input type="text" name="FromDate" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> </tr>'; @@ -55,24 +55,28 @@ echo '<tr><td>' . _('For Stock Location') . ':</td> <td><select name="StockLocation">'; - echo '<option VALUE="All">' . _('All') . '</option>'; + echo '<option value="All">' . _('All') . '</option>'; while ($myrow=DB_fetch_array($resultStkLocs)){ if (isset($_POST['StockLocation']) AND $_POST['StockLocation']!='All'){ if ($myrow['loccode'] == $_POST['StockLocation']){ - echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ - echo '<option selected VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option selected value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; $_POST['StockLocation']=$myrow['loccode']; } else { - echo '<option VALUE="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; } } echo '</select></td></tr>'; - echo '</table><br /><div class="centre"><input type=submit name="Go" value="' . _('Create PDF') . '"></div>'; + echo '</table> + <br /> + <div class="centre"> + <input type=submit name="Go" value="' . _('Create PDF') . '" /> + </div>'; include('includes/footer.inc'); exit; @@ -84,43 +88,43 @@ if ($_POST['StockLocation']=='All') { $sql= "SELECT stockmoves.type, - stockmoves.stockid, - stockmaster.description, - stockmaster.decimalplaces, - stockmoves.transno, - stockmoves.trandate, - stockmoves.qty, - stockmoves.reference, - stockmoves.narrative, - locations.locationname - FROM stockmoves - LEFT JOIN stockmaster - ON stockmoves.stockid=stockmaster.stockid - LEFT JOIN locations - ON stockmoves.loccode=locations.loccode - WHERE type='" . $_POST['TransType'] . "' - AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' - AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."'"; + stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmoves.transno, + stockmoves.trandate, + stockmoves.qty, + stockmoves.reference, + stockmoves.narrative, + locations.locationname + FROM stockmoves + LEFT JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + LEFT JOIN locations + ON stockmoves.loccode=locations.loccode + WHERE type='" . $_POST['TransType'] . "' + AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' + AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."'"; } else { $sql= "SELECT stockmoves.type, - stockmoves.stockid, - stockmaster.description, - stockmaster.decimalplaces, - stockmoves.transno, - stockmoves.trandate, - stockmoves.qty, - stockmoves.reference, - stockmoves.narrative, - locations.locationname - FROM stockmoves - LEFT JOIN stockmaster - ON stockmoves.stockid=stockmaster.stockid - LEFT JOIN locations - ON stockmoves.loccode=locations.loccode - WHERE type='" . $_POST['TransType'] . "' - AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' - AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."' - AND stockmoves.loccode='" . $_POST['StockLocation'] . "'"; + stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmoves.transno, + stockmoves.trandate, + stockmoves.qty, + stockmoves.reference, + stockmoves.narrative, + locations.locationname + FROM stockmoves + LEFT JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + LEFT JOIN locations + ON stockmoves.loccode=locations.loccode + WHERE type='" . $_POST['TransType'] . "' + AND date_format(trandate, '%Y-%m-%d')>='".FormatDateForSQL($_POST['FromDate'])."' + AND date_format(trandate, '%Y-%m-%d')<='".FormatDateForSQL($_POST['ToDate'])."' + AND stockmoves.loccode='" . $_POST['StockLocation'] . "'"; } $result=DB_query($sql,$db,'','',false,false); Modified: trunk/PageSecurity.php =================================================================== --- trunk/PageSecurity.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PageSecurity.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -53,7 +53,11 @@ echo '</table><br />'; -echo '<div class="centre"><input type="submit" name="Update" value="'._('Update Security Levels').'" /></div><br /></form>'; +echo '<div class="centre"> + <input type="submit" name="Update" value="'._('Update Security Levels').'" /> + </div> + <br /> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/PaymentAllocations.php =================================================================== --- trunk/PaymentAllocations.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PaymentAllocations.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -1,14 +1,11 @@ <?php /* $Id$*/ -/* $Revision: 1.6 $ */ + /* This page is called from SupplierInquiry.php when the 'view payments' button is selected */ - -//$PageSecurity = 5; - include('includes/session.inc'); $title = _('Payment Allocations'); @@ -16,17 +13,17 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); - if (!isset($_GET['SuppID'])){ - prnMsg( _('Supplier ID Number is not Set, can not display result'),'warn'); - include('includes/footer.inc'); - exit; - } +if (!isset($_GET['SuppID'])){ + prnMsg( _('Supplier ID Number is not Set, can not display result'),'warn'); + include('includes/footer.inc'); + exit; +} - if (!isset($_GET['InvID'])){ - prnMsg( _('Invoice Number is not Set, can not display result'),'warn'); - include('includes/footer.inc'); - exit; - } +if (!isset($_GET['InvID'])){ + prnMsg( _('Invoice Number is not Set, can not display result'),'warn'); + include('includes/footer.inc'); + exit; +} $SuppID = $_GET['SuppID']; $InvID = $_GET['InvID']; @@ -34,48 +31,37 @@ echo '<div class="page_help_text">' . _('This shows how the payment to the supplier was allocated') . '<a href="SupplierInquiry.php?&SupplierID=' . $SuppID . '"><br /> ' . _('Back to supplier inquiry') . '</a></div><br />'; -//echo "<br /><font size=4 color=BLUE>Payment Allocation for Supplier: '$SuppID' and Invoice: '$InvID'</font>"; - -// $_SESSION['SuppID'] = new SupplierID; -// $_SESSION['InvID'] = new InvoiceID; - $SQL= "SELECT supptrans.supplierno, - supptrans.suppreference, - supptrans.trandate, - supptrans.alloc - FROM supptrans - WHERE supptrans.id IN (SELECT suppallocs.transid_allocfrom - FROM supptrans, suppallocs - WHERE supptrans.supplierno = '$SuppID' - AND supptrans.suppreference = '$InvID' - AND supptrans.id = suppallocs.transid_allocto)"; + supptrans.suppreference, + supptrans.trandate, + supptrans.alloc, + currencies.decimalplaces + FROM supptrans INNER JOIN suppliers + ON supptrans.supplierno=suppliers.supplierid + INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev + WHERE supptrans.id IN (SELECT suppallocs.transid_allocfrom + FROM supptrans, suppallocs + WHERE supptrans.supplierno = '" . $SuppID . "' + AND supptrans.suppreference = '" . $InvID . "' + AND supptrans.id = suppallocs.transid_allocto)"; -/* -Might be a way of doing this query without a subquery -$SQL= "SELECT supptrans.supplierno, - supptrans.suppreference, - supptrans.trandate, - supptrans.alloc - FROM supptrans INNER JOIN suppallocs ON supptrans.id=suppallocs.transid_allocfrom - WHERE supptrans.supplierno = '$SuppID' - AND supptrans.suppreference = '$InvID' -*/ - $Result = DB_query($SQL, $db); if (DB_num_rows($Result) == 0){ prnMsg(_('There may be a problem retrieving the information. No data is returned'),'warn'); - echo '<br /><a HREF ="javascript:history.back()">' . _('Go back') . '</a>'; + echo '<br /><a href ="javascript:history.back()">' . _('Go back') . '</a>'; include('includes/foooter.inc'); exit; } -echo '<table cellpadding=2 colspan=7 width=80% class=selection>'; -$TableHeader = "<tr> -<th>" . _('Supplier Number') . '<br />' . _('Reference') . "</th> -<th>" . _('Payment') .'<br />' . _('Reference') . "</th> -<th>" . _('Payment') . '<br />' . _('Date') . "</th> -<th>" . _('Total Payment') . '<br />' . _('Amount') . '</th></tr>'; +echo '<table cellpadding="2" colspan="7 width="80%" class="selection">'; +$TableHeader = '<tr> + <th>' . _('Supplier Number') . '<br />' . _('Reference') . '</th> + <th>' . _('Payment') .'<br />' . _('Reference') . '</th> + <th>' . _('Payment') . '<br />' . _('Date') . '</th> + <th>' . _('Total Payment') . '<br />' . _('Amount') . '</th> + </tr>'; echo $TableHeader; @@ -93,7 +79,7 @@ echo '<td>'.$myrow['supplierno'].'</td> <td>'.$myrow['suppreference'].'</td> <td>'.ConvertSQLDate($myrow['trandate']).'</td> - <td class=number>'.number_format($myrow['alloc'],2).'</td> + <td class="number">'.number_format($myrow['alloc'],$myrow['decimalplaces']).'</td> </tr>'; $j++; @@ -106,4 +92,4 @@ echo '</table>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/PaymentMethods.php =================================================================== --- trunk/PaymentMethods.php 2011-07-19 09:35:25 UTC (rev 4635) +++ trunk/PaymentMethods.php 2011-07-24 00:14:27 UTC (rev 4636) @@ -62,17 +62,17 @@ // Get the old name and check that the record still exists need to be very careful here $sql = "SELECT paymentname FROM paymentmethods - WHERE paymentid = '" . $SelectedPaymentID . "'"; + WHERE paymentid = '" . $SelectedPaymentID . "'"; $result = DB_query($sql,$db); if ( DB_num_rows($result) != 0 ) { $myrow = DB_fetch_row($result); $OldName = $myrow[0]; $sql = "UPDATE paymentmethods - SET paymentname='" . $_POST['MethodName'] . "', - paymenttype = '" . $_POST['ForPayment'] . "', - receipttype = '" . $_POST['ForReceipt'] . "', - usepreprintedstationery = '" . $_POST['UsePrePrintedStationery']. "' - WHERE paymentname " . LIKE . " '".$OldName."'"; + SET paymentname='" . $_POST['MethodName'] . "', + paymenttype = '" . $_POST['ForPayment'] . "', + receipttype = '" . $_POST['ForReceipt'] . "', + usepreprintedstationery = '" . $_POST['UsePrePrintedStationery']. "' + WHERE paymentname " . LIKE . " '".$OldName."'"; } else { $InputError = 1; @@ -91,17 +91,14 @@ $InputError = 1; prnMsg( _('The payment method can not be created because another with the same name already exists.'),'error'); } else { - $sql = "INSERT INTO paymentmethods ( - paymentname, - paymenttype, - receipttype, - usepreprintedstationery) - VALUES ( - '" . $_POST['MethodName'] ."', - '" . $_POST['ForPayment'] ."', - '" . $_POST['ForReceipt'] ."', - '" . $_POST['UsePrePrintedStationery'] ."' - )"; + $sql = "INSERT INTO paymentmethods ( paymentname, + paymenttype, + receipttype, + usepreprintedstationery) + VALUES ('" . $_POST['MethodName'] ."', + '" . $_POS... [truncated message content] |
From: <dai...@us...> - 2011-07-24 03:17:14
|
Revision: 4637 http://web-erp.svn.sourceforge.net/web-erp/?rev=4637&view=rev Author: daintree Date: 2011-07-24 03:17:05 +0000 (Sun, 24 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/install/save.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-24 00:14:27 UTC (rev 4636) +++ trunk/UpgradeDatabase.php 2011-07-24 03:17:05 UTC (rev 4637) @@ -9,7 +9,7 @@ if (!isset($_POST['DoUpgrade'])){ - prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts'),'info'); + prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('You should do a backup now before proceeding!'),'info'); echo '<p><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-24 00:14:27 UTC (rev 4636) +++ trunk/doc/Change.log 2011-07-24 03:17:05 UTC (rev 4637) @@ -1,7 +1,10 @@ webERP Change Log -23/7/11 Phil: CustLoginSetup.php and SuppLoginSetup can no longer edit user accounts - only add -23/7/11 Phil: Updated Hungarian/German/Portuguese/Japanese translations from launchpad. +24/7/11 Version 4.04.5 + +24/7/11 Phil: CustomerBranches.php check for existance of Shippers and TaxGroups +24/7/11 Phil: CustLoginSetup.php and SuppLoginSetup can no longer edit user accounts - only add +24/7/11 Phil: Updated Hungarian/German/Portuguese/Japanese translations from launchpad. 22/7/11 Phil: Make link from SelectCustomer.php to CounterSales.php so that sales together with payment can be entered directly against a selected customer. 22/7/11 Phil: Change SelectCreditItems.php and SelectCustomer.php to select customer and branch using form variables in the same way as SelectOrderItems.php to avoid difficulties with spaces and hyphens - and to be consistent. 17/7/11 Phil: error in taxes GL posting SelectCreditItems.php Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-07-24 00:14:27 UTC (rev 4636) +++ trunk/install/save.php 2011-07-24 03:17:05 UTC (rev 4637) @@ -264,7 +264,6 @@ //$msg holds the text of the new config.php file $msg = "<?php\n\n"; -$msg .= "/* \$Revision: 1.7 $ */\n"; $msg .= "// User configurable variables\n"; $msg .= "//---------------------------------------------------\n\n"; $msg .= "//DefaultLanguage to use for the login screen and the setup of new users - the users language selection will override\n"; Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-07-24 00:14:27 UTC (rev 4636) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-07-24 03:17:05 UTC (rev 4637) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-07-02 20:11+1200\n" +"POT-Creation-Date: 2011-07-24 12:24+1200\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -122,7 +122,7 @@ msgid "The SQL that was used to insert the account group was" msgstr "SQL, který byl použit pro vložení na účet skupina byla" -#: AccountGroups.php:158 AccountSections.php:116 PaymentMethods.php:106 +#: AccountGroups.php:158 AccountSections.php:116 PaymentMethods.php:103 msgid "Record inserted" msgstr "Záznam vložen" @@ -144,16 +144,16 @@ #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 #: CustomerBranches.php:316 Customers.php:312 Customers.php:321 #: Customers.php:329 Customers.php:337 CustomerTypes.php:147 -#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:130 -#: GLAccounts.php:80 GLAccounts.php:94 Locations.php:244 Locations.php:252 -#: Locations.php:261 Locations.php:269 Locations.php:277 Locations.php:285 -#: Locations.php:293 Locations.php:301 MRPDemandTypes.php:87 -#: PaymentMethods.php:140 PaymentTerms.php:147 PaymentTerms.php:154 +#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:129 +#: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 +#: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 +#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 +#: PaymentMethods.php:138 PaymentTerms.php:144 PaymentTerms.php:151 #: PcExpenses.php:152 SalesCategories.php:125 SalesCategories.php:133 #: SalesPeople.php:149 SalesPeople.php:156 SalesTypes.php:150 #: SalesTypes.php:160 Shippers.php:82 Shippers.php:94 StockCategories.php:179 -#: Stocks.php:475 Stocks.php:484 Stocks.php:492 Stocks.php:500 Stocks.php:508 -#: Stocks.php:516 Suppliers.php:609 Suppliers.php:618 Suppliers.php:626 +#: Stocks.php:481 Stocks.php:490 Stocks.php:498 Stocks.php:506 Stocks.php:514 +#: Stocks.php:522 Suppliers.php:609 Suppliers.php:618 Suppliers.php:626 #: SupplierTypes.php:145 TaxCategories.php:131 TaxGroups.php:127 #: TaxGroups.php:134 TaxProvinces.php:125 UnitsOfMeasure.php:138 #: WorkCentres.php:89 WorkCentres.php:95 WWW_Access.php:83 @@ -207,16 +207,16 @@ #: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 #: BOMExtendedQty.php:259 BOMIndented.php:246 BOMIndentedReverse.php:236 #: BOMInquiry.php:171 BOMListing.php:112 BOMs.php:208 BOMs.php:798 -#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:1983 -#: CounterSales.php:2107 Credit_Invoice.php:255 CreditStatus.php:20 +#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:1995 +#: CounterSales.php:2116 Credit_Invoice.php:255 CreditStatus.php:20 #: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:10 -#: DebtorsAtPeriodEnd.php:124 DiscountCategories.php:10 -#: DiscountCategories.php:128 DiscountMatrix.php:16 EDIMessageFormat.php:104 +#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 +#: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 #: FixedAssetLocations.php:9 FixedAssetRegister.php:13 -#: FixedAssetRegister.php:238 FixedAssetTransfer.php:31 FormDesigner.php:129 +#: FixedAssetRegister.php:237 FixedAssetTransfer.php:31 FormDesigner.php:129 #: GLBalanceSheet.php:351 GLBudgets.php:28 GLJournal.php:228 -#: InventoryPlanning.php:374 InventoryPlanningPrefSupplier.php:474 -#: Labels.php:117 Labels.php:273 MRPReport.php:515 OutstandingGRNs.php:150 +#: InventoryPlanning.php:373 InventoryPlanningPrefSupplier.php:467 +#: Labels.php:115 Labels.php:270 MRPReport.php:515 OutstandingGRNs.php:160 #: PcAssignCashToTab.php:56 PcAssignCashToTab.php:130 #: PcAssignCashToTab.php:146 PcAssignCashToTab.php:183 PDFPickingList.php:28 #: PDFPrintLabel.php:131 PDFStockLocTransfer.php:21 @@ -226,10 +226,10 @@ #: PurchData.php:268 RecurringSalesOrders.php:310 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 -#: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:202 -#: SelectCreditItems.php:270 SelectCustomer.php:323 SelectGLAccount.php:19 -#: SelectGLAccount.php:79 SelectOrderItems.php:618 SelectOrderItems.php:1463 -#: SelectOrderItems.php:1583 SelectProduct.php:485 SelectSalesOrder.php:454 +#: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:208 +#: SelectCreditItems.php:275 SelectCustomer.php:339 SelectGLAccount.php:19 +#: SelectGLAccount.php:79 SelectOrderItems.php:618 SelectOrderItems.php:1511 +#: SelectOrderItems.php:1633 SelectProduct.php:485 SelectSalesOrder.php:454 #: SelectSupplier.php:9 SelectSupplier.php:192 SelectWorkOrder.php:9 #: SelectWorkOrder.php:145 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 @@ -256,7 +256,7 @@ msgstr "V pořadí TB" #: AccountGroups.php:232 AccountGroups.php:378 GLProfit_Loss.php:6 -#: GLProfit_Loss.php:105 GLProfit_Loss.php:106 GLProfit_Loss.php:157 +#: GLProfit_Loss.php:113 GLProfit_Loss.php:114 GLProfit_Loss.php:165 #: SelectGLAccount.php:45 SelectGLAccount.php:59 msgid "Profit and Loss" msgstr "Zisky a ztráty" @@ -272,12 +272,12 @@ #: CompanyPreferences.php:469 CompanyPreferences.php:471 #: ContractCosting.php:194 CustomerBranches.php:410 Customers.php:597 #: Customers.php:865 Customers.php:873 Customers.php:876 -#: DeliveryDetails.php:1064 DeliveryDetails.php:1104 DeliveryDetails.php:1107 -#: GLTransInquiry.php:69 MRPCalendar.php:220 MRP.php:529 MRP.php:533 -#: MRP.php:537 MRP.php:541 PaymentMethods.php:199 PaymentMethods.php:200 -#: PaymentMethods.php:201 PaymentMethods.php:264 PaymentMethods.php:270 -#: PaymentMethods.php:276 PcAuthorizeExpenses.php:239 PDFChequeListing.php:62 -#: PDFDeliveryDifferences.php:64 PDFDIFOT.php:67 +#: DeliveryDetails.php:1063 DeliveryDetails.php:1103 DeliveryDetails.php:1106 +#: GLTransInquiry.php:68 MRPCalendar.php:221 MRP.php:529 MRP.php:533 +#: MRP.php:537 MRP.php:541 PaymentMethods.php:197 PaymentMethods.php:198 +#: PaymentMethods.php:199 PaymentMethods.php:262 PaymentMethods.php:268 +#: PaymentMethods.php:275 PcAuthorizeExpenses.php:239 PDFChequeListing.php:62 +#: PDFDeliveryDifferences.php:65 PDFDIFOT.php:75 #: PO_AuthorisationLevels.php:132 PO_AuthorisationLevels.php:137 #: PO_Header.php:761 PO_PDFPurchOrder.php:370 PO_PDFPurchOrder.php:373 #: PurchData.php:187 PurchData.php:489 PurchData.php:492 @@ -286,17 +286,16 @@ #: SalesAnalReptCols.php:404 SalesAnalRepts.php:404 SalesAnalRepts.php:407 #: SalesAnalRepts.php:430 SalesAnalRepts.php:433 SalesAnalRepts.php:456 #: SalesAnalRepts.php:459 SalesPeople.php:208 SalesPeople.php:316 -#: SalesPeople.php:318 SelectProduct.php:374 ShipmentCosting.php:627 -#: Stocks.php:878 Stocks.php:880 Stocks.php:898 Stocks.php:900 -#: SuppContractChgs.php:83 SuppLoginSetup.php:508 SuppLoginSetup.php:510 -#: SystemParameters.php:383 SystemParameters.php:406 SystemParameters.php:422 -#: SystemParameters.php:485 SystemParameters.php:493 SystemParameters.php:533 -#: SystemParameters.php:606 SystemParameters.php:615 SystemParameters.php:623 -#: SystemParameters.php:641 SystemParameters.php:648 SystemParameters.php:775 -#: SystemParameters.php:906 SystemParameters.php:908 SystemParameters.php:918 -#: SystemParameters.php:920 SystemParameters.php:974 SystemParameters.php:986 -#: SystemParameters.php:988 TaxGroups.php:293 TaxGroups.php:296 -#: TaxGroups.php:345 WWW_Users.php:592 WWW_Users.php:594 +#: SalesPeople.php:318 SelectProduct.php:374 ShipmentCosting.php:630 +#: Stocks.php:888 Stocks.php:890 Stocks.php:908 Stocks.php:910 +#: SuppContractChgs.php:83 SystemParameters.php:383 SystemParameters.php:406 +#: SystemParameters.php:422 SystemParameters.php:485 SystemParameters.php:493 +#: SystemParameters.php:533 SystemParameters.php:606 SystemParameters.php:615 +#: SystemParameters.php:623 SystemParameters.php:641 SystemParameters.php:648 +#: SystemParameters.php:775 SystemParameters.php:906 SystemParameters.php:908 +#: SystemParameters.php:918 SystemParameters.php:920 SystemParameters.php:974 +#: SystemParameters.php:986 SystemParameters.php:988 TaxGroups.php:293 +#: TaxGroups.php:296 TaxGroups.php:345 WWW_Users.php:592 WWW_Users.php:594 msgid "Yes" msgstr "Ano" @@ -308,12 +307,12 @@ #: CompanyPreferences.php:468 CompanyPreferences.php:472 #: ContractCosting.php:192 CustomerBranches.php:410 Customers.php:596 #: Customers.php:861 Customers.php:872 Customers.php:875 -#: DeliveryDetails.php:1065 DeliveryDetails.php:1105 DeliveryDetails.php:1108 -#: GLTransInquiry.php:123 MRPCalendar.php:222 MRP.php:527 MRP.php:531 -#: MRP.php:535 MRP.php:539 PaymentMethods.php:199 PaymentMethods.php:200 -#: PaymentMethods.php:201 PaymentMethods.php:265 PaymentMethods.php:271 -#: PaymentMethods.php:277 PcAuthorizeExpenses.php:237 PDFChequeListing.php:61 -#: PDFDeliveryDifferences.php:63 PDFDIFOT.php:66 +#: DeliveryDetails.php:1064 DeliveryDetails.php:1104 DeliveryDetails.php:1107 +#: GLTransInquiry.php:122 MRPCalendar.php:223 MRP.php:527 MRP.php:531 +#: MRP.php:535 MRP.php:539 PaymentMethods.php:197 PaymentMethods.php:198 +#: PaymentMethods.php:199 PaymentMethods.php:263 PaymentMethods.php:269 +#: PaymentMethods.php:276 PcAuthorizeExpenses.php:237 PDFChequeListing.php:61 +#: PDFDeliveryDifferences.php:64 PDFDIFOT.php:74 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 #: PO_Header.php:760 PO_PDFPurchOrder.php:371 PO_PDFPurchOrder.php:374 #: PurchData.php:190 PurchData.php:490 PurchData.php:493 @@ -322,17 +321,16 @@ #: SalesAnalReptCols.php:405 SalesAnalRepts.php:403 SalesAnalRepts.php:406 #: SalesAnalRepts.php:429 SalesAnalRepts.php:432 SalesAnalRepts.php:455 #: SalesAnalRepts.php:458 SalesPeople.php:208 SalesPeople.php:321 -#: SalesPeople.php:323 SelectProduct.php:376 ShipmentCosting.php:628 -#: Stocks.php:873 Stocks.php:875 Stocks.php:893 Stocks.php:895 -#: SuppContractChgs.php:85 SuppLoginSetup.php:507 SuppLoginSetup.php:511 -#: SystemParameters.php:384 SystemParameters.php:407 SystemParameters.php:423 -#: SystemParameters.php:486 SystemParameters.php:494 SystemParameters.php:534 -#: SystemParameters.php:607 SystemParameters.php:616 SystemParameters.php:624 -#: SystemParameters.php:642 SystemParameters.php:649 SystemParameters.php:776 -#: SystemParameters.php:905 SystemParameters.php:909 SystemParameters.php:917 -#: SystemParameters.php:921 SystemParameters.php:975 SystemParameters.php:985 -#: SystemParameters.php:989 TaxGroups.php:294 TaxGroups.php:297 -#: TaxGroups.php:347 WWW_Users.php:591 WWW_Users.php:595 +#: SalesPeople.php:323 SelectProduct.php:376 ShipmentCosting.php:631 +#: Stocks.php:883 Stocks.php:885 Stocks.php:903 Stocks.php:905 +#: SuppContractChgs.php:85 SystemParameters.php:384 SystemParameters.php:407 +#: SystemParameters.php:423 SystemParameters.php:486 SystemParameters.php:494 +#: SystemParameters.php:534 SystemParameters.php:607 SystemParameters.php:616 +#: SystemParameters.php:624 SystemParameters.php:642 SystemParameters.php:649 +#: SystemParameters.php:776 SystemParameters.php:905 SystemParameters.php:909 +#: SystemParameters.php:917 SystemParameters.php:921 SystemParameters.php:975 +#: SystemParameters.php:985 SystemParameters.php:989 TaxGroups.php:294 +#: TaxGroups.php:297 TaxGroups.php:347 WWW_Users.php:591 WWW_Users.php:595 #: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" @@ -341,58 +339,61 @@ #: AddCustomerNotes.php:132 AddCustomerTypeNotes.php:123 Areas.php:164 #: BankAccounts.php:223 BOMs.php:144 COGSGLPostings.php:107 #: COGSGLPostings.php:204 CreditStatus.php:172 Currencies.php:269 -#: CustLoginSetup.php:219 CustomerBranches.php:414 Customers.php:940 -#: Customers.php:973 CustomerTypes.php:202 EDIMessageFormat.php:150 -#: Factors.php:299 FixedAssetCategories.php:180 FixedAssetLocations.php:102 -#: FreightCosts.php:240 GeocodeSetup.php:170 GLAccounts.php:308 GLTags.php:82 -#: Labels.php:414 Locations.php:377 MRPDemands.php:305 MRPDemandTypes.php:120 -#: PaymentMethods.php:202 PaymentTerms.php:203 PcAssignCashToTab.php:255 +#: CustomerBranches.php:414 Customers.php:940 Customers.php:973 +#: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:300 +#: FixedAssetCategories.php:182 FixedAssetLocations.php:102 +#: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:83 +#: Labels.php:411 Locations.php:381 MRPDemands.php:305 MRPDemandTypes.php:120 +#: PaymentMethods.php:200 PaymentTerms.php:201 PcAssignCashToTab.php:255 #: PcClaimExpensesFromTab.php:252 PcExpenses.php:208 PcTabs.php:234 #: PcTypeTabs.php:172 PO_AuthorisationLevels.php:149 Prices_Customer.php:280 #: Prices.php:246 PurchData.php:202 SalesCategories.php:256 #: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:219 -#: SalesTypes.php:216 SecurityTokens.php:110 SelectCustomer.php:614 -#: SelectCustomer.php:632 SelectCustomer.php:656 SelectCustomer.php:673 -#: SelectCustomer.php:696 SelectCustomer.php:712 Shippers.php:144 +#: SalesTypes.php:216 SecurityTokens.php:110 SelectCustomer.php:668 +#: SelectCustomer.php:686 SelectCustomer.php:710 SelectCustomer.php:727 +#: SelectCustomer.php:751 SelectCustomer.php:768 Shippers.php:144 #: StockCategories.php:240 SupplierContacts.php:157 SupplierTypes.php:189 -#: SuppLoginSetup.php:271 SuppTransGLAnalysis.php:118 TaxAuthorities.php:172 -#: TaxCategories.php:182 TaxGroups.php:178 TaxProvinces.php:176 -#: UnitsOfMeasure.php:188 WorkCentres.php:137 WWW_Access.php:123 -#: WWW_Users.php:306 includes/InputSerialItems.php:88 -#: includes/OutputSerialItems.php:21 +#: SuppTransGLAnalysis.php:118 TaxAuthorities.php:172 TaxCategories.php:182 +#: TaxGroups.php:178 TaxProvinces.php:176 UnitsOfMeasure.php:188 +#: WorkCentres.php:137 WWW_Access.php:123 WWW_Users.php:306 +#: includes/InputSerialItems.php:88 includes/OutputSerialItems.php:21 #, php-format msgid "Edit" msgstr "Upravit" +#: AccountGroups.php:265 +#, fuzzy +msgid "Are you sure you wish to delete this account group?" +msgstr "Jste si jisti, že chcete smazat tento obor?" + #: AccountGroups.php:265 AccountSections.php:200 AddCustomerContacts.php:150 #: AddCustomerNotes.php:133 AddCustomerTypeNotes.php:124 Areas.php:165 #: BankAccounts.php:224 BOMs.php:146 COGSGLPostings.php:108 #: COGSGLPostings.php:205 ContractBOM.php:266 ContractOtherReqts.php:117 -#: CounterSales.php:781 Credit_Invoice.php:384 CreditStatus.php:173 -#: Currencies.php:272 CustLoginSetup.php:220 CustomerReceipt.php:863 -#: Customers.php:974 CustomerTypes.php:203 DiscountCategories.php:215 -#: DiscountMatrix.php:173 EDIMessageFormat.php:151 -#: FixedAssetCategories.php:181 FreightCosts.php:241 GeocodeSetup.php:171 -#: GLAccounts.php:309 GLJournal.php:382 GLTags.php:83 Labels.php:414 -#: Locations.php:378 MRPDemands.php:306 MRPDemandTypes.php:121 -#: PaymentMethods.php:203 Payments.php:1006 PaymentTerms.php:204 +#: CounterSales.php:793 Credit_Invoice.php:381 CreditStatus.php:173 +#: Currencies.php:272 CustomerReceipt.php:863 Customers.php:974 +#: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:175 +#: EDIMessageFormat.php:151 FixedAssetCategories.php:183 FreightCosts.php:241 +#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:382 GLTags.php:84 +#: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:121 +#: PaymentMethods.php:201 Payments.php:1015 PaymentTerms.php:202 #: PcAssignCashToTab.php:259 PcClaimExpensesFromTab.php:253 PcExpenses.php:209 #: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 -#: PO_AuthorisationLevels.php:151 PO_Items.php:688 Prices_Customer.php:281 +#: PO_AuthorisationLevels.php:151 PO_Items.php:684 Prices_Customer.php:281 #: Prices.php:247 PurchData.php:203 SalesAnalReptCols.php:294 #: SalesAnalRepts.php:302 SalesCategories.php:257 SalesGLPostings.php:133 #: SalesGLPostings.php:246 SalesPeople.php:220 SalesTypes.php:217 -#: SecurityTokens.php:111 SelectCreditItems.php:745 SelectCustomer.php:615 -#: SelectCustomer.php:633 SelectCustomer.php:657 SelectCustomer.php:674 -#: SelectCustomer.php:697 SelectCustomer.php:713 SelectOrderItems.php:1390 +#: SecurityTokens.php:111 SelectCreditItems.php:754 SelectCustomer.php:669 +#: SelectCustomer.php:687 SelectCustomer.php:711 SelectCustomer.php:728 +#: SelectCustomer.php:752 SelectCustomer.php:769 SelectOrderItems.php:1430 #: Shipments.php:423 Shippers.php:145 SpecialOrder.php:581 #: StockCategories.php:241 StockCategories.php:535 SuppContractChgs.php:91 #: SuppCreditGRNs.php:92 SuppFixedAssetChgs.php:84 SuppInvGRNs.php:132 -#: SupplierContacts.php:158 SupplierTypes.php:191 SuppLoginSetup.php:272 -#: SuppShiptChgs.php:89 SuppTransGLAnalysis.php:119 TaxAuthorities.php:173 -#: TaxCategories.php:183 TaxGroups.php:179 TaxProvinces.php:177 -#: UnitsOfMeasure.php:189 WorkCentres.php:138 WOSerialNos.php:303 -#: WWW_Access.php:124 WWW_Users.php:307 includes/InputSerialItemsKeyed.php:59 +#: SupplierContacts.php:158 SupplierTypes.php:191 SuppShiptChgs.php:89 +#: SuppTransGLAnalysis.php:119 TaxAuthorities.php:173 TaxCategories.php:183 +#: TaxGroups.php:179 TaxProvinces.php:177 UnitsOfMeasure.php:189 +#: WorkCentres.php:138 WOSerialNos.php:303 WWW_Access.php:124 +#: WWW_Users.php:307 includes/InputSerialItemsKeyed.php:59 #: includes/OutputSerialItems.php:98 #, php-format msgid "Delete" @@ -418,7 +419,7 @@ msgid "The account group name does not exist in the database" msgstr "Účet jméno skupiny neexistuje v databázi" -#: AccountGroups.php:313 GLAccounts.php:239 GLAccounts.php:288 +#: AccountGroups.php:313 GLAccounts.php:243 GLAccounts.php:292 #: Z_ImportGLAccountGroups.php:26 msgid "Account Group" msgstr "Účetní skupina" @@ -438,16 +439,16 @@ #: AccountGroups.php:399 AccountSections.php:264 AddCustomerContacts.php:244 #: AddCustomerNotes.php:211 AddCustomerTypeNotes.php:191 Areas.php:220 #: BankAccounts.php:391 BOMs.php:730 COGSGLPostings.php:342 -#: CreditStatus.php:250 Currencies.php:393 CustLoginSetup.php:439 +#: CreditStatus.php:250 Currencies.php:393 CustLoginSetup.php:257 #: DiscountMatrix.php:136 EDIMessageFormat.php:247 #: FixedAssetCategories.php:322 FixedAssetLocations.php:148 -#: FreightCosts.php:339 GeocodeSetup.php:267 GLAccounts.php:258 -#: Locations.php:561 MRPDemands.php:411 MRPDemandTypes.php:180 +#: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 +#: Locations.php:567 MRPDemands.php:411 MRPDemandTypes.php:185 #: OffersReceived.php:52 OffersReceived.php:129 PaymentMethods.php:282 -#: PaymentTerms.php:284 PO_AuthorisationLevels.php:244 Prices_Customer.php:350 +#: PaymentTerms.php:293 PO_AuthorisationLevels.php:244 Prices_Customer.php:350 #: SalesAnalReptCols.php:510 SalesAnalRepts.php:494 SalesGLPostings.php:416 #: SalesPeople.php:329 Shippers.php:196 StockCategories.php:557 -#: SupplierContacts.php:258 SuppLoginSetup.php:529 TaxAuthorities.php:312 +#: SupplierContacts.php:258 SuppLoginSetup.php:287 TaxAuthorities.php:312 #: TaxCategories.php:233 TaxProvinces.php:227 UnitsOfMeasure.php:240 #: WorkCentres.php:261 WWW_Users.php:625 msgid "Enter Information" @@ -514,8 +515,8 @@ msgid "Could not retrieve the requested section please try again." msgstr "Nepodařilo se získat požadovanou sekci prosím zkuste to znovu." -#: AddCustomerContacts.php:6 AddCustomerContacts.php:61 SelectCustomer.php:607 -#: SelectCustomer.php:639 +#: AddCustomerContacts.php:6 AddCustomerContacts.php:61 SelectCustomer.php:661 +#: SelectCustomer.php:693 msgid "Customer Contacts" msgstr "Zákazník Kontakty" @@ -558,10 +559,10 @@ #: AddCustomerContacts.php:61 AddCustomerNotes.php:50 #: AddCustomerTypeNotes.php:48 Areas.php:73 CustomerTypes.php:69 -#: DeliveryDetails.php:771 Factors.php:105 FixedAssetItems.php:236 +#: DeliveryDetails.php:770 Factors.php:105 FixedAssetItems.php:243 #: PcAssignCashToTab.php:88 PcClaimExpensesFromTab.php:79 PcExpenses.php:93 -#: PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:356 SalesAnalReptCols.php:129 -#: SalesPeople.php:96 SalesTypes.php:66 Stocks.php:355 Suppliers.php:510 +#: PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:354 SalesAnalReptCols.php:129 +#: SalesPeople.php:96 SalesTypes.php:66 Stocks.php:361 Suppliers.php:510 #: SupplierTypes.php:67 msgid "has been updated" msgstr "byla aktualizována" @@ -576,7 +577,7 @@ #: AddCustomerContacts.php:128 CompanyPreferences.php:222 #: CustomerBranches.php:368 Customers.php:928 Customers.php:935 -#: SalesPeople.php:191 SelectCustomer.php:609 StockDispatch.php:185 +#: SalesPeople.php:191 SelectCustomer.php:663 StockDispatch.php:185 #: StockDispatch.php:197 SupplierContacts.php:145 SupplierCredit.php:441 #: SupplierInvoice.php:408 SuppTransGLAnalysis.php:103 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 @@ -585,7 +586,7 @@ msgstr "Název" #: AddCustomerContacts.php:129 AddCustomerContacts.php:220 Customers.php:929 -#: Customers.php:936 SelectCustomer.php:610 WWW_Access.php:107 +#: Customers.php:936 SelectCustomer.php:664 WWW_Access.php:107 #: WWW_Access.php:168 msgid "Role" msgstr "Roli" @@ -595,15 +596,14 @@ msgstr "Telefonní číslo" #: AddCustomerContacts.php:131 AddCustomerContacts.php:232 -#: CustLoginSetup.php:193 CustomerBranches.php:374 CustomerBranches.php:716 -#: CustomerInquiry.php:249 Customers.php:931 Customers.php:938 -#: EmailCustTrans.php:15 EmailCustTrans.php:63 Factors.php:226 Factors.php:263 -#: Locations.php:533 OrderDetails.php:105 PDFRemittanceAdvice.php:251 -#: PO_PDFPurchOrder.php:357 PO_PDFPurchOrder.php:360 PrintCustTrans.php:694 -#: PrintCustTrans.php:914 PrintCustTrans.php:961 -#: PrintCustTransPortrait.php:715 PrintCustTransPortrait.php:935 -#: PrintCustTransPortrait.php:979 SelectCustomer.php:612 -#: SupplierContacts.php:149 SupplierContacts.php:253 SuppLoginSetup.php:237 +#: CustomerBranches.php:374 CustomerBranches.php:718 CustomerInquiry.php:249 +#: Customers.php:931 Customers.php:938 EmailCustTrans.php:15 +#: EmailCustTrans.php:63 Factors.php:225 Factors.php:263 Locations.php:539 +#: OrderDetails.php:104 PDFRemittanceAdvice.php:251 PO_PDFPurchOrder.php:357 +#: PO_PDFPurchOrder.php:360 PrintCustTrans.php:709 PrintCustTrans.php:931 +#: PrintCustTrans.php:980 PrintCustTransPortrait.php:728 +#: PrintCustTransPortrait.php:949 PrintCustTransPortrait.php:997 +#: SelectCustomer.php:666 SupplierContacts.php:149 SupplierContacts.php:253 #: UserSettings.php:180 WWW_Users.php:262 includes/PDFPickingListHeader.inc:25 #: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:82 #: includes/PDFTransPageHeaderPortrait.inc:109 @@ -614,7 +614,7 @@ #: AddCustomerContacts.php:132 AddCustomerContacts.php:238 Customers.php:932 #: Customers.php:939 PcAssignCashToTab.php:220 PcAssignCashToTab.php:346 #: PcAuthorizeExpenses.php:91 PcClaimExpensesFromTab.php:214 -#: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:613 +#: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:667 #: SystemParameters.php:322 WOSerialNos.php:280 WOSerialNos.php:282 msgid "Notes" msgstr "Bere na vědomí" @@ -632,20 +632,20 @@ msgid "Contact Code" msgstr "Kontakt kód" -#: AddCustomerContacts.php:214 Factors.php:220 SupplierContacts.php:225 +#: AddCustomerContacts.php:214 Factors.php:219 SupplierContacts.php:225 msgid "Contact Name" msgstr "Jméno kontaktní osoby" #: AddCustomerContacts.php:226 Contracts.php:777 PDFRemittanceAdvice.php:247 -#: PO_Header.php:965 PO_Header.php:1035 SelectCreditItems.php:223 -#: SelectCustomer.php:463 SelectOrderItems.php:647 +#: PO_Header.php:965 PO_Header.php:1035 SelectCreditItems.php:230 +#: SelectCustomer.php:487 SelectOrderItems.php:647 #: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:81 #: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" msgstr "Telefon" -#: AddCustomerNotes.php:6 AddCustomerNotes.php:50 SelectCustomer.php:649 -#: SelectCustomer.php:680 +#: AddCustomerNotes.php:6 AddCustomerNotes.php:50 SelectCustomer.php:703 +#: SelectCustomer.php:734 msgid "Customer Notes" msgstr "Zákazník bere na vědomí" @@ -682,17 +682,17 @@ #: BankMatching.php:231 BankReconciliation.php:198 BankReconciliation.php:270 #: ContractCosting.php:169 CustomerAllocations.php:331 #: CustomerAllocations.php:357 CustomerInquiry.php:192 -#: CustomerTransInquiry.php:90 GLAccountInquiry.php:154 -#: GLAccountReport.php:369 GLTransInquiry.php:41 MRPCalendar.php:215 -#: PaymentAllocations.php:77 PcAssignCashToTab.php:216 +#: CustomerTransInquiry.php:90 GLAccountInquiry.php:152 +#: GLAccountReport.php:349 GLTransInquiry.php:40 MRPCalendar.php:216 +#: PaymentAllocations.php:62 PcAssignCashToTab.php:216 #: PcAuthorizeExpenses.php:87 PDFRemittanceAdvice.php:308 -#: PrintCustTrans.php:793 PrintCustTransPortrait.php:817 ReverseGRN.php:378 -#: ShipmentCosting.php:508 ShipmentCosting.php:579 Shipments.php:466 +#: PrintCustTrans.php:809 PrintCustTransPortrait.php:829 ReverseGRN.php:378 +#: ShipmentCosting.php:510 ShipmentCosting.php:581 Shipments.php:466 #: StockDispatch.php:187 StockDispatch.php:199 StockLocMovements.php:83 #: StockMovements.php:92 StockSerialItemResearch.php:79 #: SupplierAllocations.php:454 SupplierAllocations.php:559 #: SupplierAllocations.php:630 SupplierInquiry.php:201 -#: SupplierTransInquiry.php:89 includes/PDFQuotationPageHeader.inc:91 +#: SupplierTransInquiry.php:89 includes/PDFQuotationPageHeader.inc:92 #: includes/PDFQuotationPortraitPageHeader.inc:90 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 #: includes/PDFTransPageHeader.inc:48 @@ -701,7 +701,7 @@ msgstr "Datum" #: AddCustomerNotes.php:114 AddCustomerTypeNotes.php:105 PcReportTab.php:173 -#: Stocks.php:882 UpgradeDatabase.php:171 UpgradeDatabase.php:174 +#: Stocks.php:892 UpgradeDatabase.php:171 UpgradeDatabase.php:174 #: UpgradeDatabase.php:177 UpgradeDatabase.php:180 UpgradeDatabase.php:183 #: UpgradeDatabase.php:186 UpgradeDatabase.php:189 UpgradeDatabase.php:192 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 @@ -733,7 +733,7 @@ msgid "Contact Note" msgstr "Kontakt Poznámka:" -#: AddCustomerTypeNotes.php:5 SelectCustomer.php:689 +#: AddCustomerTypeNotes.php:5 SelectCustomer.php:744 msgid "Customer Type (Group) Notes" msgstr "Typ zákazníka (Group) Poznámky" @@ -741,7 +741,7 @@ msgid "The Contact priority must be an integer." msgstr "Prioritou Kontakt musí být celé číslo." -#: AddCustomerTypeNotes.php:48 SelectCustomer.php:719 +#: AddCustomerTypeNotes.php:48 SelectCustomer.php:775 msgid "Customer Group Notes" msgstr "Zákaznická skupina bere na vědomí" @@ -793,21 +793,21 @@ #: AgedDebtors.php:270 AgedDebtors.php:369 AgedDebtors.php:434 #: AgedSuppliers.php:107 BOMExtendedQty.php:149 BOMIndented.php:150 #: BOMIndentedReverse.php:141 BOMListing.php:44 BOMListing.php:55 -#: DebtorsAtPeriodEnd.php:56 DebtorsAtPeriodEnd.php:68 GLBalanceSheet.php:90 -#: GLBalanceSheet.php:128 GLProfit_Loss.php:157 GLTagProfit_Loss.php:172 -#: GLTrialBalance.php:151 InventoryPlanning.php:99 InventoryPlanning.php:174 -#: InventoryPlanning.php:209 InventoryPlanning.php:257 -#: InventoryPlanning.php:295 InventoryPlanningPrefSupplier.php:208 -#: InventoryPlanningPrefSupplier.php:276 InventoryPlanningPrefSupplier.php:310 -#: InventoryPlanningPrefSupplier.php:355 InventoryPlanningPrefSupplier.php:401 -#: InventoryQuantities.php:81 InventoryValuation.php:78 -#: MailInventoryValuation.php:115 MRPPlannedPurchaseOrders.php:114 -#: MRPPlannedWorkOrders.php:105 MRPReport.php:147 MRPReport.php:508 +#: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:90 +#: GLBalanceSheet.php:128 GLProfit_Loss.php:165 GLTagProfit_Loss.php:186 +#: GLTrialBalance.php:155 InventoryPlanning.php:98 InventoryPlanning.php:173 +#: InventoryPlanning.php:208 InventoryPlanning.php:256 +#: InventoryPlanning.php:294 InventoryPlanningPrefSupplier.php:201 +#: InventoryPlanningPrefSupplier.php:269 InventoryPlanningPrefSupplier.php:303 +#: InventoryPlanningPrefSupplier.php:348 InventoryPlanningPrefSupplier.php:394 +#: InventoryQuantities.php:84 InventoryValuation.php:78 +#: MailInventoryValuation.php:114 MRPPlannedPurchaseOrders.php:114 +#: MRPPlannedWorkOrders.php:106 MRPReport.php:147 MRPReport.php:508 #: MRPReschedules.php:45 MRPReschedules.php:57 MRPShortages.php:155 -#: MRPShortages.php:167 OutstandingGRNs.php:48 OutstandingGRNs.php:60 +#: MRPShortages.php:167 OutstandingGRNs.php:53 OutstandingGRNs.php:65 #: PDFCustomerList.php:18 PDFCustomerList.php:230 PDFCustomerList.php:242 -#: PDFLowGP.php:20 PDFStockCheckComparison.php:35 -#: PDFStockCheckComparison.php:61 PDFStockCheckComparison.php:262 +#: PDFLowGP.php:20 PDFStockCheckComparison.php:32 +#: PDFStockCheckComparison.php:58 PDFStockCheckComparison.php:263 #: ReorderLevel.php:57 SelectAsset.php:37 SelectProduct.php:39 #: StockCheck.php:65 StockCheck.php:139 SupplierTenders.php:326 #: SuppPriceList.php:118 includes/PDFPaymentRun_PymtFooter.php:149 @@ -815,7 +815,7 @@ msgstr "Problém" #: AgedDebtors.php:272 CustomerInquiry.php:85 CustomerInquiry.php:109 -#: DebtorsAtPeriodEnd.php:58 +#: DebtorsAtPeriodEnd.php:59 msgid "The customer details could not be retrieved by the SQL because" msgstr "Zákazník podrobnosti se nepodařilo získat do SQL, protože" @@ -823,29 +823,29 @@ #: AgedSuppliers.php:110 AgedSuppliers.php:192 BOMExtendedQty.php:152 #: BOMExtendedQty.php:246 BOMIndented.php:153 BOMIndented.php:234 #: BOMIndentedReverse.php:145 BOMIndentedReverse.php:222 BOMListing.php:47 -#: Credit_Invoice.php:184 DebtorsAtPeriodEnd.php:59 DebtorsAtPeriodEnd.php:71 +#: Credit_Invoice.php:184 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 #: FTP_RadioBeacon.php:187 GetStockImage.php:154 GLBalanceSheet.php:93 -#: GLBalanceSheet.php:131 GLBalanceSheet.php:294 GLProfit_Loss.php:160 -#: GLProfit_Loss.php:172 GLTagProfit_Loss.php:175 GLTagProfit_Loss.php:187 -#: GLTrialBalance.php:154 GLTrialBalance.php:166 InventoryPlanning.php:102 -#: InventoryPlanning.php:177 InventoryPlanning.php:212 -#: InventoryPlanning.php:260 InventoryPlanning.php:298 -#: InventoryPlanning.php:361 InventoryPlanningPrefSupplier.php:211 -#: InventoryPlanningPrefSupplier.php:279 InventoryPlanningPrefSupplier.php:313 -#: InventoryPlanningPrefSupplier.php:358 InventoryPlanningPrefSupplier.php:404 -#: InventoryPlanningPrefSupplier.php:460 InventoryQuantities.php:84 -#: InventoryQuantities.php:95 InventoryValuation.php:81 -#: InventoryValuation.php:92 MailInventoryValuation.php:118 -#: MailInventoryValuation.php:214 MRPPlannedPurchaseOrders.php:117 -#: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:108 -#: MRPPlannedWorkOrders.php:119 MRPPlannedWorkOrders.php:306 MRPReport.php:39 +#: GLBalanceSheet.php:131 GLBalanceSheet.php:294 GLProfit_Loss.php:168 +#: GLProfit_Loss.php:180 GLTagProfit_Loss.php:190 GLTagProfit_Loss.php:203 +#: GLTrialBalance.php:158 GLTrialBalance.php:170 InventoryPlanning.php:101 +#: InventoryPlanning.php:176 InventoryPlanning.php:211 +#: InventoryPlanning.php:259 InventoryPlanning.php:297 +#: InventoryPlanning.php:360 InventoryPlanningPrefSupplier.php:204 +#: InventoryPlanningPrefSupplier.php:272 InventoryPlanningPrefSupplier.php:306 +#: InventoryPlanningPrefSupplier.php:351 InventoryPlanningPrefSupplier.php:397 +#: InventoryPlanningPrefSupplier.php:453 InventoryQuantities.php:87 +#: InventoryQuantities.php:98 InventoryValuation.php:81 +#: InventoryValuation.php:92 MailInventoryValuation.php:117 +#: MailInventoryValuation.php:213 MRPPlannedPurchaseOrders.php:117 +#: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:109 +#: MRPPlannedWorkOrders.php:120 MRPPlannedWorkOrders.php:307 MRPReport.php:39 #: MRPReport.php:50 MRPReport.php:150 MRPReschedules.php:48 #: MRPReschedules.php:60 MRPShortages.php:158 MRPShortages.php:170 -#: OutstandingGRNs.php:51 OutstandingGRNs.php:63 PDFCustomerList.php:233 -#: PDFCustomerList.php:245 PDFGrn.php:123 PDFLowGP.php:60 PDFLowGP.php:72 -#: PDFPriceList.php:124 PDFQuotation.php:234 PDFQuotationPortrait.php:235 -#: PDFRemittanceAdvice.php:84 PDFStockCheckComparison.php:39 -#: PDFStockCheckComparison.php:65 PDFStockCheckComparison.php:266 +#: OutstandingGRNs.php:56 OutstandingGRNs.php:68 PDFCustomerList.php:233 +#: PDFCustomerList.php:245 PDFGrn.php:123 PDFLowGP.php:59 PDFLowGP.php:71 +#: PDFPriceList.php:124 PDFQuotation.php:250 PDFQuotationPortrait.php:264 +#: PDFRemittanceAdvice.php:84 PDFStockCheckComparison.php:36 +#: PDFStockCheckComparison.php:62 PDFStockCheckComparison.php:267 #: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:149 #: PrintCustOrder_generic.php:243 PrintCustOrder.php:198 ReorderLevel.php:60 #: ReorderLevel.php:149 SalesAnalysis_UserDefined.php:28 @@ -875,8 +875,8 @@ msgstr "Podrobnosti o nesplacených transakcí pro zákazníka" #: AgedDebtors.php:371 AgedSuppliers.php:191 GLAccountCSV.php:168 -#: GLAccountInquiry.php:145 GLAccountReport.php:93 PO_Items.php:416 -#: PO_Items.php:539 PO_Items.php:563 SalesAnalReptCols.php:356 +#: GLAccountInquiry.php:143 GLAccountReport.php:94 PO_Items.php:414 +#: PO_Items.php:535 PO_Items.php:559 SalesAnalReptCols.php:356 #: SpecialOrder.php:370 StockLocTransferReceive.php:373 #: StockQuantityByDate.php:110 includes/SelectOrderItems_IntoCart.inc:53 msgid "could not be retrieved because" @@ -884,13 +884,13 @@ #: AgedDebtors.php:374 AgedSuppliers.php:194 Areas.php:95 #: ConfirmDispatch_Invoice.php:150 ConfirmDispatch_Invoice.php:957 -#: ConfirmDispatch_Invoice.php:971 Contracts.php:581 CounterSales.php:1323 -#: CounterSales.php:1337 Credit_Invoice.php:703 Credit_Invoice.php:725 +#: ConfirmDispatch_Invoice.php:971 Contracts.php:581 CounterSales.php:1335 +#: CounterSales.php:1349 Credit_Invoice.php:699 Credit_Invoice.php:721 #: CustomerReceipt.php:523 CustomerReceipt.php:655 CustomerReceipt.php:683 -#: CustomerTransInquiry.php:82 DeliveryDetails.php:393 GLProfit_Loss.php:579 -#: GLTagProfit_Loss.php:488 Payments.php:312 PDFRemittanceAdvice.php:86 +#: CustomerTransInquiry.php:82 DeliveryDetails.php:393 GLProfit_Loss.php:587 +#: GLTagProfit_Loss.php:507 Payments.php:319 PDFRemittanceAdvice.php:86 #: PurchData.php:87 PurchData.php:105 PurchData.php:237 ReverseGRN.php:191 -#: ReverseGRN.php:205 ReverseGRN.php:366 SelectCreditItems.php:1372 +#: ReverseGRN.php:205 ReverseGRN.php:366 SelectCreditItems.php:1396 #: SelectSalesOrder.php:113 SelectSalesOrder.php:277 StockCheck.php:225 #: StockCostUpdate.php:76 StockCostUpdate.php:86 StockLocStatus.php:147 #: StockMovements.php:85 StockQuantityByDate.php:86 StockReorderLevel.php:39 @@ -899,7 +899,7 @@ #: SupplierInquiry.php:130 SupplierInquiry.php:182 SupplierTransInquiry.php:81 #: SuppPaymentRun.php:111 SuppPaymentRun.php:186 SuppPaymentRun.php:216 #: WorkOrderCosting.php:399 WorkOrderReceive.php:270 WOSerialNos.php:45 -#: Z_ChangeBranchCode.php:108 Z_ChangeCustomerCode.php:92 +#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:92 #: Z_DeleteCreditNote.php:58 Z_DeleteInvoice.php:87 #: includes/PDFPaymentRun_PymtFooter.php:59 #: includes/PDFPaymentRun_PymtFooter.php:89 @@ -918,11 +918,11 @@ msgid "Aged Debtor Analysis" msgstr "Ve věku dlužníka analýza" -#: AgedDebtors.php:464 DebtorsAtPeriodEnd.php:135 +#: AgedDebtors.php:464 DebtorsAtPeriodEnd.php:136 msgid "From Customer Code" msgstr "Od kódu zákazníka" -#: AgedDebtors.php:467 DebtorsAtPeriodEnd.php:138 +#: AgedDebtors.php:467 DebtorsAtPeriodEnd.php:139 msgid "To Customer Code" msgstr "Do kódu zákazníka" @@ -969,14 +969,14 @@ #: AgedDebtors.php:515 AgedSuppliers.php:312 BOMExtendedQty.php:282 #: BOMIndented.php:272 BOMIndentedReverse.php:250 BOMListing.php:132 -#: DebtorsAtPeriodEnd.php:156 InventoryPlanning.php:442 -#: InventoryPlanningPrefSupplier.php:518 InventoryQuantities.php:187 -#: InventoryValuation.php:251 MRPPlannedPurchaseOrders.php:282 -#: MRPPlannedWorkOrders.php:335 MRPReschedules.php:140 MRPShortages.php:290 -#: OutstandingGRNs.php:162 PDFCustomerList.php:410 PDFLowGP.php:145 +#: DebtorsAtPeriodEnd.php:157 InventoryPlanning.php:442 +#: InventoryPlanningPrefSupplier.php:516 InventoryQuantities.php:203 +#: InventoryValuation.php:255 MRPPlannedPurchaseOrders.php:282 +#: MRPPlannedWorkOrders.php:336 MRPReschedules.php:140 MRPShortages.php:302 +#: OutstandingGRNs.php:172 PDFCustomerList.php:410 PDFLowGP.php:146 #: PDFPriceList.php:301 PDFRemittanceAdvice.php:152 -#: PDFStockCheckComparison.php:379 PrintCustTrans.php:536 -#: PrintCustTransPortrait.php:558 ReorderLevel.php:217 StockDispatch.php:308 +#: PDFStockCheckComparison.php:357 PrintCustTrans.php:542 +#: PrintCustTransPortrait.php:562 ReorderLevel.php:217 StockDispatch.php:308 #: SupplierBalsAtPeriodEnd.php:150 SuppPriceList.php:228 Tax.php:344 msgid "Print PDF" msgstr "Tisknout PDF" @@ -1009,12 +1009,12 @@ msgid "Aged Supplier Analysis" msgstr "Dodavatel ve věku analýza" -#: AgedSuppliers.php:278 OutstandingGRNs.php:157 PDFRemittanceAdvice.php:138 +#: AgedSuppliers.php:278 OutstandingGRNs.php:167 PDFRemittanceAdvice.php:138 #: SupplierBalsAtPeriodEnd.php:131 SuppPaymentRun.php:259 msgid "From Supplier Code" msgstr "Od kódu dodavatele" -#: AgedSuppliers.php:281 OutstandingGRNs.php:159 PDFRemittanceAdvice.php:140 +#: AgedSuppliers.php:281 OutstandingGRNs.php:169 PDFRemittanceAdvice.php:140 #: SupplierBalsAtPeriodEnd.php:133 SuppPaymentRun.php:261 msgid "To Supplier Code" msgstr "Do kódu dodavatele" @@ -1100,7 +1100,7 @@ msgstr "Kód oblasti" #: Areas.php:132 CustomerTypes.php:164 Factors.php:140 -#: FixedAssetCategories.php:135 GLAccounts.php:193 Locations.php:325 +#: FixedAssetCategories.php:134 GLAccounts.php:197 Locations.php:328 #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:160 PcExpensesTypeTab.php:101 PcTabs.php:166 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:137 @@ -1135,12 +1135,12 @@ msgstr "Nesprávné datum používaného formátu, prosím, re-zadání" #: AuditTrail.php:35 BOMIndented.php:310 BOMIndentedReverse.php:289 -#: MRPCalendar.php:258 +#: MRPCalendar.php:260 msgid "From Date" msgstr "Od data" #: AuditTrail.php:37 BOMIndented.php:311 BOMIndentedReverse.php:290 -#: MRPCalendar.php:260 +#: MRPCalendar.php:262 msgid "To Date" msgstr "To Date" @@ -1151,18 +1151,18 @@ msgstr "ID uživatele" #: AuditTrail.php:43 AuditTrail.php:56 ContractBOM.php:298 -#: CounterSales.php:2113 CounterSales.php:2116 CustomerTransInquiry.php:29 +#: CounterSales.php:2122 CounterSales.php:2125 CustomerTransInquiry.php:29 #: DailySalesInquiry.php:41 DailySalesInquiry.php:43 FixedAssetRegister.php:56 -#: FixedAssetRegister.php:65 InventoryQuantities.php:153 -#: InventoryQuantities.php:175 InventoryQuantities.php:177 MRP.php:564 +#: FixedAssetRegister.php:65 InventoryQuantities.php:163 +#: InventoryQuantities.php:188 InventoryQuantities.php:190 MRP.php:564 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:135 #: PDFPeriodStockTransListing.php:58 PDFPriceList.php:194 -#: PDFPrintLabel.php:239 PO_Items.php:884 POReport.php:1548 +#: PDFPrintLabel.php:239 PO_Items.php:880 POReport.php:1548 #: ReorderLevel.php:175 ReorderLevel.php:177 ReorderLevel.php:205 #: ReorderLevel.php:207 SalesGraph.php:91 SalesGraph.php:93 SalesGraph.php:111 #: SalesGraph.php:113 SalesGraph.php:134 SalesGraph.php:136 SalesGraph.php:168 -#: SalesInquiry.php:1053 SalesInquiry.php:1092 SelectCreditItems.php:923 -#: SelectOrderItems.php:1589 SelectOrderItems.php:1592 SelectProduct.php:493 +#: SalesInquiry.php:1053 SalesInquiry.php:1092 SelectCreditItems.php:940 +#: SelectOrderItems.php:1639 SelectOrderItems.php:1642 SelectProduct.php:493 #: SelectProduct.php:495 StockDispatch.php:282 StockDispatch.php:284 #: StockLocStatus.php:67 StockLocStatus.php:69 StockLocStatus.php:87 #: StockLocStatus.php:91 StockLocStatus.php:95 StockQuantityByDate.php:21 @@ -1194,10 +1194,10 @@ #: AuditTrail.php:146 BankReconciliation.php:199 BankReconciliation.php:271 #: CustomerAllocations.php:355 CustomerInquiry.php:190 #: CustomerTransInquiry.php:18 CustomerTransInquiry.php:88 -#: CustWhereAlloc.php:17 CustWhereAlloc.php:88 DailyBankTransactions.php:104 -#: GLAccountInquiry.php:152 GLAccountReport.php:367 GLJournal.php:240 +#: CustWhereAlloc.php:18 CustWhereAlloc.php:92 DailyBankTransactions.php:105 +#: GLAccountInquiry.php:150 GLAccountReport.php:347 GLJournal.php:240 #: MRPReschedules.php:178 SalesByTypePeriodInquiry.php:327 -#: SelectCustomer.php:462 ShipmentCosting.php:506 ShipmentCosting.php:577 +#: SelectCustomer.php:486 ShipmentCosting.php:508 ShipmentCosting.php:579 #: StockCategories.php:215 StockLocMovements.php:81 StockMovements.php:90 #: SupplierAllocations.php:452 SupplierInquiry.php:199 #: SupplierTransInquiry.php:19 SupplierTransInquiry.php:86 @@ -1213,7 +1213,7 @@ msgstr "Tabulka" #: AuditTrail.php:148 api/api_xml-rpc.php:314 api/api_xml-rpc.php:729 -#: api/api_xml-rpc.php:1892 +#: api/api_xml-rpc.php:1914 msgid "Field Name" msgstr "Název pole" @@ -1394,7 +1394,7 @@ msgid "Bank Account Matching - Receipts" msgstr "Bankovní účet odpovídající - Příjmy" -#: BankMatching.php:20 PaymentAllocations.php:33 PaymentMethods.php:11 +#: BankMatching.php:20 PaymentAllocations.php:30 PaymentMethods.php:11 #: PDFSuppTransListing.php:41 msgid "Payments" msgstr "Platby" @@ -1439,7 +1439,7 @@ "zjistíte, odpovídající transakce." #: BankMatching.php:87 BankReconciliation.php:101 CustomerReceipt.php:726 -#: DailyBankTransactions.php:29 Payments.php:737 PDFChequeListing.php:44 +#: DailyBankTransactions.php:29 Payments.php:734 PDFChequeListing.php:44 #: TaxAuthorities.php:149 TaxAuthorities.php:305 msgid "Bank Account" msgstr "Bankovní účet" @@ -1448,8 +1448,8 @@ msgid "Show" msgstr "Zobrazit" -#: BankMatching.php:110 CreditItemsControlled.php:78 FreightCosts.php:267 -#: GoodsReceivedControlled.php:65 GoodsReceived.php:65 +#: BankMatching.php:110 CounterSales.php:218 CreditItemsControlled.php:78 +#: FreightCosts.php:267 GoodsReceivedControlled.php:65 GoodsReceived.php:65 #: StockLocTransferReceive.php:426 SupplierAllocations.php:434 #: SuppShiptChgs.php:129 msgid "from" @@ -1457,18 +1457,18 @@ #: BankMatching.php:113 ConfirmDispatchControlled_Invoice.php:58 #: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 -#: GLAccountCSV.php:171 GLAccountReport.php:102 Payments.php:717 +#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:714 #: PcReportTab.php:102 PDFChequeListing.php:107 PDFChequeListing.php:117 -#: PDFChequeListing.php:192 PDFDeliveryDifferences.php:166 -#: PDFDeliveryDifferences.php:179 PDFDeliveryDifferences.php:287 -#: PDFDIFOT.php:172 PDFDIFOT.php:185 PDFDIFOT.php:289 PDFOrdersInvoiced.php:71 -#: PDFOrdersInvoiced.php:268 PDFOrderStatus.php:78 PDFOrderStatus.php:253 +#: PDFChequeListing.php:192 PDFDeliveryDifferences.php:172 +#: PDFDeliveryDifferences.php:185 PDFDeliveryDifferences.php:281 +#: PDFDIFOT.php:190 PDFDIFOT.php:203 PDFDIFOT.php:307 PDFOrdersInvoiced.php:77 +#: PDFOrdersInvoiced.php:274 PDFOrderStatus.php:82 PDFOrderStatus.php:256 #: PO_PDFPurchOrder.php:323 PricesBasedOnMarkUp.php:216 -#: PricesBasedOnMarkUp.php:355 PrintCustStatements.php:50 +#: PricesBasedOnMarkUp.php:355 PrintCustStatements.php:45 #: PrintCustTrans.php:60 PrintCustTrans.php:63 PrintCustTransPortrait.php:58 #: PrintCustTransPortrait.php:61 SalesGraph.php:200 SalesGraph.php:229 #: SalesGraph.php:233 StockLocTransferReceive.php:310 -#: StockLocTransferReceive.php:426 Stocks.php:231 Stocks.php:236 +#: StockLocTransferReceive.php:426 Stocks.php:234 Stocks.php:239 #: StockStatus.php:309 StockStatus.php:350 StockTransfers.php:426 #: includes/PDFAgedDebtorsPageHeader.inc:18 #: includes/PDFAgedSuppliersPageHeader.inc:17 @@ -1564,19 +1564,19 @@ msgid "The payments with the selected criteria could not be retrieved because" msgstr "Platby podle zadaných kriterií se nepodařilo získat, protože" -#: BankMatching.php:229 ShipmentCosting.php:507 ShipmentCosting.php:578 +#: BankMatching.php:229 ShipmentCosting.php:509 ShipmentCosting.php:580 #: SupplierAllocations.php:455 msgid "Ref" msgstr "Ref" #: BankMatching.php:232 ConfirmDispatch_Invoice.php:274 Credit_Invoice.php:279 #: CustomerAllocations.php:358 CustomerReceipt.php:842 -#: CustomerTransInquiry.php:97 CustWhereAlloc.php:92 PaymentAllocations.php:78 -#: Payments.php:969 Payments.php:972 Payments.php:984 +#: CustomerTransInquiry.php:97 CustWhereAlloc.php:96 PaymentAllocations.php:63 +#: Payments.php:972 Payments.php:976 Payments.php:992 #: PcAssignCashToTab.php:218 PcAssignCashToTab.php:339 #: PcAuthorizeExpenses.php:89 PcClaimExpensesFromTab.php:212 #: PcClaimExpensesFromTab.php:365 PcReportTab.php:172 PcReportTab.php:326 -#: PrintCheque.php:70 PrintCheque.php:84 SelectCreditItems.php:659 +#: PrintCheque.php:64 PrintCheque.php:78 SelectCreditItems.php:671 #: SuppContractChgs.php:73 SuppContractChgs.php:142 SuppFixedAssetChgs.php:74 #: SuppFixedAssetChgs.php:140 SupplierAllocations.php:456 #: SupplierCredit.php:344 SupplierCredit.php:374 SupplierCredit.php:406 @@ -1590,7 +1590,7 @@ msgstr "Částka" #: BankMatching.php:233 BankReconciliation.php:203 BankReconciliation.php:275 -#: PDFOrdersInvoiced.php:345 PDFOrderStatus.php:319 +#: PDFOrdersInvoiced.php:351 PDFOrderStatus.php:322 #: PO_SelectOSPurchOrder.php:213 PO_SelectPurchOrder.php:180 #: Shipt_Select.php:182 SuppCreditGRNs.php:227 #: includes/PDFStatementPageHeader.inc:173 @@ -1653,7 +1653,7 @@ msgstr "Bankovní účty se nepodařilo získat na SQL, protože" #: BankReconciliation.php:98 CustomerReceipt.php:717 -#: DailyBankTransactions.php:26 Payments.php:734 SuppPaymentRun.php:302 +#: DailyBankTransactions.php:26 Payments.php:731 SuppPaymentRun.php:302 msgid "The SQL used to retrieve the bank accounts was" msgstr "SQL slouží k získání bankovní účty byly" @@ -1666,12 +1666,12 @@ msgstr "Musíte nejprve" #: BankReconciliation.php:108 CustomerReceipt.php:731 -#: DailyBankTransactions.php:34 Payments.php:742 SuppPaymentRun.php:310 +#: DailyBankTransactions.php:35 Payments.php:739 SuppPaymentRun.php:310 msgid "define the bank accounts" msgstr "definovat bankovních účtů" #: BankReconciliation.php:108 CustomerReceipt.php:731 -#: DailyBankTransactions.php:34 Payments.php:742 SuppPaymentRun.php:310 +#: DailyBankTransactions.php:35 Payments.php:739 SuppPaymentRun.php:310 msgid "and general ledger accounts to be affected" msgstr "a účtů hlavní knihy mohly být postiženy" @@ -1703,15 +1703,15 @@ #: BankReconciliation.php:200 BankReconciliation.php:272 #: CustomerAllocations.php:330 CustomerAllocations.php:356 -#: CustomerInquiry.php:191 CustomerTransInquiry.php:89 CustWhereAlloc.php:89 -#: EmailCustTrans.php:15 GLAccountInquiry.php:153 PrintCustTrans.php:480 -#: PrintCustTrans.php:681 PrintCustTrans.php:901 PrintCustTrans.php:948 -#: PrintCustTransPortrait.php:502 PrintCustTransPortrait.php:703 -#: PrintCustTransPortrait.php:922 PrintCustTransPortrait.php:967 +#: CustomerInquiry.php:191 CustomerTransInquiry.php:89 CustWhereAlloc.php:93 +#: EmailCustTrans.php:15 GLAccountInquiry.php:151 PrintCustTrans.php:486 +#: PrintCustTrans.php:696 PrintCustTrans.php:918 PrintCustTrans.php:967 +#: PrintCustTransPortrait.php:506 PrintCustTransPortrait.php:716 +#: PrintCustTransPortrait.php:936 PrintCustTransPortrait.php:983 #: StockMovements.php:91 SupplierAllocations.php:453 #: SupplierAllocations.php:558 SupplierAllocations.php:629 #: SupplierTransInquiry.php:87 Z_CheckAllocs.php:58 -#: Z_CheckGLTransBalance.php:12 includes/PDFQuotationPageHeader.inc:87 +#: Z_CheckGLTransBalance.php:12 includes/PDFQuotationPageHeader.inc:88 #: includes/PDFQuotationPortraitPageHeader.inc:86 #: includes/PDFStatementPageHeader.inc:168 #: includes/PDFStatementPageHeader.inc:179 includes/PDFTransPageHeader.inc:44 @@ -1721,8 +1721,8 @@ #: BankReconciliation.php:201 BankReconciliation.php:273 #: ContractCosting.php:168 CustomerInquiry.php:194 CustomerTransInquiry.php:93 -#: CustWhereAlloc.php:90 DailyBankTransactions.php:105 GLAccountReport.php:368 -#: PaymentAllocations.php:75 PaymentAllocations.php:76 +#: CustWhereAlloc.php:94 DailyBankTransactions.php:106 GLAccountReport.php:348 +#: PaymentAllocations.php:60 PaymentAllocations.php:61 #: PDFRemittanceAdvice.php:309 ShiptsList.php:37 StockCounts.php:99 #: StockCounts.php:135 StockLocMovements.php:86 StockMovements.php:96 #: Z_CheckAllocs.php:59 includes/PDFBankingSummaryPageHeader.inc:40 @@ -1776,8 +1776,8 @@ "zůstatek na účtu. Je důležité, že směnný kurz výše odráží současnou hodnotu " "měny bankovního účtu" -#: BankReconciliation.php:331 CounterSales.php:781 Customers.php:1000 -#: SelectOrderItems.php:1401 Stocks.php:1041 WorkOrderCosting.php:518 +#: BankReconciliation.php:331 CounterSales.php:793 Customers.php:1000 +#: SelectOrderItems.php:1441 Stocks.php:1051 WorkOrderCosting.php:518 #: WorkOrderEntry.php:548 msgid "Are You Sure?" msgstr "Opravdu provést?" @@ -1844,26 +1844,26 @@ #: BOMIndentedReverse.php:288 BOMInquiry.php:178 BOMs.php:522 BOMs.php:685 #: ContractBOM.php:237 ContractBOM.php:345 ContractCosting.php:77 #: ContractCosting.php:83 ContractCosting.php:148 ContractOtherReqts.php:92 -#: Contracts.php:938 Contracts.php:973 CounterSales.php:701 -#: CounterSales.php:1994 CounterSales.php:2174 CounterSales.php:2302 -#: Credit_Invoice.php:273 DeliveryDetails.php:822 DeliveryDetails.php:887 -#: GoodsReceived.php:88 GoodsReceived.php:92 GoodsReceived.php:95 -#: InventoryPlanningPrefSupplier.php:83 InventoryQuantities.php:223 +#: Contracts.php:938 Contracts.php:973 CounterSales.php:713 +#: CounterSales.php:2006 CounterSales.php:2183 CounterSales.php:2307 +#: Credit_Invoice.php:273 DeliveryDetails.php:821 DeliveryDetails.php:886 +#: GoodsReceived.php:92 GoodsReceived.php:96 GoodsReceived.php:99 +#: InventoryPlanningPrefSupplier.php:78 InventoryQuantities.php:240 #: MRPDemands.php:293 MRPDemands.php:383 MRPPlannedPurchaseOrders.php:326 -#: MRPPlannedWorkOrders.php:258 MRPPlannedWorkOrders.php:379 MRPReport.php:413 +#: MRPPlannedWorkOrders.php:259 MRPPlannedWorkOrders.php:380 MRPReport.php:413 #: MRPReport.php:419 MRPReschedules.php:179 OffersReceived.php:95 -#: OffersReceived.php:197 OffersReceived.php:244 OrderDetails.php:155 -#: PDFOrdersInvoiced.php:384 POReport.php:743 POReport.php:1428 -#: PrintCustTrans.php:831 PrintCustTrans.php:919 PrintCustTrans.php:966 -#: PrintCustTransPortrait.php:857 PrintCustTransPortrait.php:940 -#: PrintCustTransPortrait.php:984 RecurringSalesOrders.php:321 +#: OffersReceived.php:197 OffersReceived.php:244 OrderDetails.php:154 +#: PDFOrdersInvoiced.php:390 POReport.php:743 POReport.php:1428 +#: PrintCustTrans.php:848 PrintCustTrans.php:937 PrintCustTrans.php:986 +#: PrintCustTransPortrait.php:870 PrintCustTransPortrait.php:955 +#: PrintCustTransPortrait.php:1005 RecurringSalesOrders.php:321 #: ReorderLevel.php:256 ReverseGRN.php:379 ReverseGRN.php:380 #: SalesAnalReptCols.php:18 SalesAnalReptCols.php:20 SalesGraph.php:177 #: SalesGraph.php:258 SalesInquiry.php:965 SalesTopItemsInquiry.php:222 -#: SelectCreditItems.php:651 SelectCreditItems.php:1004 -#: SelectOrderItems.php:1325 SelectOrderItems.php:1474 -#: SelectOrderItems.php:1654 SelectOrderItems.php:1778 ShipmentCosting.php:144 -#: ShipmentCosting.php:145 Shipments.php:385 Shipments.php:387 +#: SelectCreditItems.php:663 SelectCreditItems.php:1022 +#: SelectOrderItems.php:1365 SelectOrderItems.php:1523 +#: SelectOrderItems.php:1705 SelectOrderItems.php:1830 ShipmentCosting.php:145 +#: ShipmentCosting.php:146 Shipments.php:385 Shipments.php:387 #: Shipments.php:388 Shipments.php:463 Shipments.php:465 SpecialOrder.php:542 #: StockCounts.php:98 StockLocMovements.php:85 StockLocTransfer.php:185 #: StockMovements.php:95 StockStatus.php:312 StockUsageGraph.php:12 @@ -1879,14 +1879,14 @@ #: includes/PDFOrderPageHeader_generic.inc:93 #: includes/PDFPeriodStockTransListingPageHeader.inc:50 #: includes/PDFPickingListHeader.inc:74 -#: includes/PDFQuotationPageHeader.inc:102 -#: includes/PDFQuotationPortraitPageHeader.inc:101 +#: includes/PDFQuotationPageHeader.inc:103 +#: includes/PDFQuotationPortraitPageHeader.inc:103 #: includes/PDFSalesOrder_generic.inc:95 #: includes/PDFStockCheckPageHeader.inc:44 #: includes/PDFStockNegativesHeader.inc:33 #: includes/PDFStockTransferHeader.inc:39 includes/PDFTransPageHeader.inc:209 -#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2235 -#: api/api_xml-rpc.php:2281 api/api_xml-rpc.php:2477 +#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2260 +#: api/api_xml-rpc.php:2306 api/api_xml-rpc.php:2502 msgid "Quantity" msgstr "Množství" @@ -1903,20 +1903,20 @@ msgstr "Zobrazit pouze Nedostatky" #: BOMExtendedQty.php:273 BOMIndented.php:264 BOMIndentedReverse.php:244 -#: MRPPlannedPurchaseOrders.php:276 MRPPlannedWorkOrders.php:327 -#: MRPReschedules.php:130 MRPShortages.php:286 +#: MRPPlannedPurchaseOrders.php:276 MRPPlannedWorkOrders.php:328 +#: MRPReschedules.php:130 MRPShortages.php:292 msgid "Print Option" msgstr "Možnost tisku" #: BOMExtendedQty.php:275 BOMIndented.php:266 BOMIndentedReverse.php:246 -#: MRPPlannedPurchaseOrders.php:277 MRPPlannedWorkOrders.php:328 -#: MRPReschedules.php:131 MRPShortages.php:287 +#: MRPPlannedPurchaseOrders.php:277 MRPPlannedWorkOrders.php:329 +#: MRPReschedules.php:131 MRPShortages.php:294 msgid "Print With Alternating Highlighted Lines" msgstr "Tisk se střídavými Zvýrazněné Lines" #: BOMExtendedQty.php:276 BOMIndented.php:267 BOMIndentedReverse.php:247 -#: MRPPlannedPurchaseOrders.php:278 MRPPlannedWorkOrders.php:329 -#: MRPReschedules.php:132 MRPShortages.php:288 +#: MRPPlannedPurchaseOrders.php:278 MRPPlannedWorkOrders.php:330 +#: MRPReschedules.php:132 MRPShortages.php:295 msgid "Plain Print" msgstr "Prostý Tisk" @@ -1925,10 +1925,10 @@ msgstr "Rozšířená Množství kusovníku výpis " #: BOMExtendedQty.php:307 BOMIndented.php:296 BOMIndentedReverse.php:275 -#: GLAccountReport.php:353 InventoryPlanningPrefSupplier.php:63 -#: InventoryQuantities.php:209 MRPPlannedPurchaseOrders.php:305 -#: MRPPlannedWorkOrders.php:358 MRPReport.php:805 MRPReschedules.php:164 -#: MRPShortages.php:318 PDFOrderStatus.php:302 PDFPriceList.php:331 +#: GLAccountReport.php:3... [truncated message content] |
From: <dai...@us...> - 2011-07-24 03:17:15
|
Revision: 4637 http://web-erp.svn.sourceforge.net/web-erp/?rev=4637&view=rev Author: daintree Date: 2011-07-24 03:17:05 +0000 (Sun, 24 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/install/save.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-24 00:14:27 UTC (rev 4636) +++ trunk/UpgradeDatabase.php 2011-07-24 03:17:05 UTC (rev 4637) @@ -9,7 +9,7 @@ if (!isset($_POST['DoUpgrade'])){ - prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts'),'info'); + prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('You should do a backup now before proceeding!'),'info'); echo '<p><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-24 00:14:27 UTC (rev 4636) +++ trunk/doc/Change.log 2011-07-24 03:17:05 UTC (rev 4637) @@ -1,7 +1,10 @@ webERP Change Log -23/7/11 Phil: CustLoginSetup.php and SuppLoginSetup can no longer edit user accounts - only add -23/7/11 Phil: Updated Hungarian/German/Portuguese/Japanese translations from launchpad. +24/7/11 Version 4.04.5 + +24/7/11 Phil: CustomerBranches.php check for existance of Shippers and TaxGroups +24/7/11 Phil: CustLoginSetup.php and SuppLoginSetup can no longer edit user accounts - only add +24/7/11 Phil: Updated Hungarian/German/Portuguese/Japanese translations from launchpad. 22/7/11 Phil: Make link from SelectCustomer.php to CounterSales.php so that sales together with payment can be entered directly against a selected customer. 22/7/11 Phil: Change SelectCreditItems.php and SelectCustomer.php to select customer and branch using form variables in the same way as SelectOrderItems.php to avoid difficulties with spaces and hyphens - and to be consistent. 17/7/11 Phil: error in taxes GL posting SelectCreditItems.php Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-07-24 00:14:27 UTC (rev 4636) +++ trunk/install/save.php 2011-07-24 03:17:05 UTC (rev 4637) @@ -264,7 +264,6 @@ //$msg holds the text of the new config.php file $msg = "<?php\n\n"; -$msg .= "/* \$Revision: 1.7 $ */\n"; $msg .= "// User configurable variables\n"; $msg .= "//---------------------------------------------------\n\n"; $msg .= "//DefaultLanguage to use for the login screen and the setup of new users - the users language selection will override\n"; Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-07-24 00:14:27 UTC (rev 4636) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-07-24 03:17:05 UTC (rev 4637) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-07-02 20:11+1200\n" +"POT-Creation-Date: 2011-07-24 12:24+1200\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -122,7 +122,7 @@ msgid "The SQL that was used to insert the account group was" msgstr "SQL, který byl použit pro vložení na účet skupina byla" -#: AccountGroups.php:158 AccountSections.php:116 PaymentMethods.php:106 +#: AccountGroups.php:158 AccountSections.php:116 PaymentMethods.php:103 msgid "Record inserted" msgstr "Záznam vložen" @@ -144,16 +144,16 @@ #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 #: CustomerBranches.php:316 Customers.php:312 Customers.php:321 #: Customers.php:329 Customers.php:337 CustomerTypes.php:147 -#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:130 -#: GLAccounts.php:80 GLAccounts.php:94 Locations.php:244 Locations.php:252 -#: Locations.php:261 Locations.php:269 Locations.php:277 Locations.php:285 -#: Locations.php:293 Locations.php:301 MRPDemandTypes.php:87 -#: PaymentMethods.php:140 PaymentTerms.php:147 PaymentTerms.php:154 +#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:129 +#: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 +#: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 +#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 +#: PaymentMethods.php:138 PaymentTerms.php:144 PaymentTerms.php:151 #: PcExpenses.php:152 SalesCategories.php:125 SalesCategories.php:133 #: SalesPeople.php:149 SalesPeople.php:156 SalesTypes.php:150 #: SalesTypes.php:160 Shippers.php:82 Shippers.php:94 StockCategories.php:179 -#: Stocks.php:475 Stocks.php:484 Stocks.php:492 Stocks.php:500 Stocks.php:508 -#: Stocks.php:516 Suppliers.php:609 Suppliers.php:618 Suppliers.php:626 +#: Stocks.php:481 Stocks.php:490 Stocks.php:498 Stocks.php:506 Stocks.php:514 +#: Stocks.php:522 Suppliers.php:609 Suppliers.php:618 Suppliers.php:626 #: SupplierTypes.php:145 TaxCategories.php:131 TaxGroups.php:127 #: TaxGroups.php:134 TaxProvinces.php:125 UnitsOfMeasure.php:138 #: WorkCentres.php:89 WorkCentres.php:95 WWW_Access.php:83 @@ -207,16 +207,16 @@ #: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 #: BOMExtendedQty.php:259 BOMIndented.php:246 BOMIndentedReverse.php:236 #: BOMInquiry.php:171 BOMListing.php:112 BOMs.php:208 BOMs.php:798 -#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:1983 -#: CounterSales.php:2107 Credit_Invoice.php:255 CreditStatus.php:20 +#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:1995 +#: CounterSales.php:2116 Credit_Invoice.php:255 CreditStatus.php:20 #: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:10 -#: DebtorsAtPeriodEnd.php:124 DiscountCategories.php:10 -#: DiscountCategories.php:128 DiscountMatrix.php:16 EDIMessageFormat.php:104 +#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 +#: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 #: FixedAssetLocations.php:9 FixedAssetRegister.php:13 -#: FixedAssetRegister.php:238 FixedAssetTransfer.php:31 FormDesigner.php:129 +#: FixedAssetRegister.php:237 FixedAssetTransfer.php:31 FormDesigner.php:129 #: GLBalanceSheet.php:351 GLBudgets.php:28 GLJournal.php:228 -#: InventoryPlanning.php:374 InventoryPlanningPrefSupplier.php:474 -#: Labels.php:117 Labels.php:273 MRPReport.php:515 OutstandingGRNs.php:150 +#: InventoryPlanning.php:373 InventoryPlanningPrefSupplier.php:467 +#: Labels.php:115 Labels.php:270 MRPReport.php:515 OutstandingGRNs.php:160 #: PcAssignCashToTab.php:56 PcAssignCashToTab.php:130 #: PcAssignCashToTab.php:146 PcAssignCashToTab.php:183 PDFPickingList.php:28 #: PDFPrintLabel.php:131 PDFStockLocTransfer.php:21 @@ -226,10 +226,10 @@ #: PurchData.php:268 RecurringSalesOrders.php:310 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 -#: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:202 -#: SelectCreditItems.php:270 SelectCustomer.php:323 SelectGLAccount.php:19 -#: SelectGLAccount.php:79 SelectOrderItems.php:618 SelectOrderItems.php:1463 -#: SelectOrderItems.php:1583 SelectProduct.php:485 SelectSalesOrder.php:454 +#: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:208 +#: SelectCreditItems.php:275 SelectCustomer.php:339 SelectGLAccount.php:19 +#: SelectGLAccount.php:79 SelectOrderItems.php:618 SelectOrderItems.php:1511 +#: SelectOrderItems.php:1633 SelectProduct.php:485 SelectSalesOrder.php:454 #: SelectSupplier.php:9 SelectSupplier.php:192 SelectWorkOrder.php:9 #: SelectWorkOrder.php:145 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 @@ -256,7 +256,7 @@ msgstr "V pořadí TB" #: AccountGroups.php:232 AccountGroups.php:378 GLProfit_Loss.php:6 -#: GLProfit_Loss.php:105 GLProfit_Loss.php:106 GLProfit_Loss.php:157 +#: GLProfit_Loss.php:113 GLProfit_Loss.php:114 GLProfit_Loss.php:165 #: SelectGLAccount.php:45 SelectGLAccount.php:59 msgid "Profit and Loss" msgstr "Zisky a ztráty" @@ -272,12 +272,12 @@ #: CompanyPreferences.php:469 CompanyPreferences.php:471 #: ContractCosting.php:194 CustomerBranches.php:410 Customers.php:597 #: Customers.php:865 Customers.php:873 Customers.php:876 -#: DeliveryDetails.php:1064 DeliveryDetails.php:1104 DeliveryDetails.php:1107 -#: GLTransInquiry.php:69 MRPCalendar.php:220 MRP.php:529 MRP.php:533 -#: MRP.php:537 MRP.php:541 PaymentMethods.php:199 PaymentMethods.php:200 -#: PaymentMethods.php:201 PaymentMethods.php:264 PaymentMethods.php:270 -#: PaymentMethods.php:276 PcAuthorizeExpenses.php:239 PDFChequeListing.php:62 -#: PDFDeliveryDifferences.php:64 PDFDIFOT.php:67 +#: DeliveryDetails.php:1063 DeliveryDetails.php:1103 DeliveryDetails.php:1106 +#: GLTransInquiry.php:68 MRPCalendar.php:221 MRP.php:529 MRP.php:533 +#: MRP.php:537 MRP.php:541 PaymentMethods.php:197 PaymentMethods.php:198 +#: PaymentMethods.php:199 PaymentMethods.php:262 PaymentMethods.php:268 +#: PaymentMethods.php:275 PcAuthorizeExpenses.php:239 PDFChequeListing.php:62 +#: PDFDeliveryDifferences.php:65 PDFDIFOT.php:75 #: PO_AuthorisationLevels.php:132 PO_AuthorisationLevels.php:137 #: PO_Header.php:761 PO_PDFPurchOrder.php:370 PO_PDFPurchOrder.php:373 #: PurchData.php:187 PurchData.php:489 PurchData.php:492 @@ -286,17 +286,16 @@ #: SalesAnalReptCols.php:404 SalesAnalRepts.php:404 SalesAnalRepts.php:407 #: SalesAnalRepts.php:430 SalesAnalRepts.php:433 SalesAnalRepts.php:456 #: SalesAnalRepts.php:459 SalesPeople.php:208 SalesPeople.php:316 -#: SalesPeople.php:318 SelectProduct.php:374 ShipmentCosting.php:627 -#: Stocks.php:878 Stocks.php:880 Stocks.php:898 Stocks.php:900 -#: SuppContractChgs.php:83 SuppLoginSetup.php:508 SuppLoginSetup.php:510 -#: SystemParameters.php:383 SystemParameters.php:406 SystemParameters.php:422 -#: SystemParameters.php:485 SystemParameters.php:493 SystemParameters.php:533 -#: SystemParameters.php:606 SystemParameters.php:615 SystemParameters.php:623 -#: SystemParameters.php:641 SystemParameters.php:648 SystemParameters.php:775 -#: SystemParameters.php:906 SystemParameters.php:908 SystemParameters.php:918 -#: SystemParameters.php:920 SystemParameters.php:974 SystemParameters.php:986 -#: SystemParameters.php:988 TaxGroups.php:293 TaxGroups.php:296 -#: TaxGroups.php:345 WWW_Users.php:592 WWW_Users.php:594 +#: SalesPeople.php:318 SelectProduct.php:374 ShipmentCosting.php:630 +#: Stocks.php:888 Stocks.php:890 Stocks.php:908 Stocks.php:910 +#: SuppContractChgs.php:83 SystemParameters.php:383 SystemParameters.php:406 +#: SystemParameters.php:422 SystemParameters.php:485 SystemParameters.php:493 +#: SystemParameters.php:533 SystemParameters.php:606 SystemParameters.php:615 +#: SystemParameters.php:623 SystemParameters.php:641 SystemParameters.php:648 +#: SystemParameters.php:775 SystemParameters.php:906 SystemParameters.php:908 +#: SystemParameters.php:918 SystemParameters.php:920 SystemParameters.php:974 +#: SystemParameters.php:986 SystemParameters.php:988 TaxGroups.php:293 +#: TaxGroups.php:296 TaxGroups.php:345 WWW_Users.php:592 WWW_Users.php:594 msgid "Yes" msgstr "Ano" @@ -308,12 +307,12 @@ #: CompanyPreferences.php:468 CompanyPreferences.php:472 #: ContractCosting.php:192 CustomerBranches.php:410 Customers.php:596 #: Customers.php:861 Customers.php:872 Customers.php:875 -#: DeliveryDetails.php:1065 DeliveryDetails.php:1105 DeliveryDetails.php:1108 -#: GLTransInquiry.php:123 MRPCalendar.php:222 MRP.php:527 MRP.php:531 -#: MRP.php:535 MRP.php:539 PaymentMethods.php:199 PaymentMethods.php:200 -#: PaymentMethods.php:201 PaymentMethods.php:265 PaymentMethods.php:271 -#: PaymentMethods.php:277 PcAuthorizeExpenses.php:237 PDFChequeListing.php:61 -#: PDFDeliveryDifferences.php:63 PDFDIFOT.php:66 +#: DeliveryDetails.php:1064 DeliveryDetails.php:1104 DeliveryDetails.php:1107 +#: GLTransInquiry.php:122 MRPCalendar.php:223 MRP.php:527 MRP.php:531 +#: MRP.php:535 MRP.php:539 PaymentMethods.php:197 PaymentMethods.php:198 +#: PaymentMethods.php:199 PaymentMethods.php:263 PaymentMethods.php:269 +#: PaymentMethods.php:276 PcAuthorizeExpenses.php:237 PDFChequeListing.php:61 +#: PDFDeliveryDifferences.php:64 PDFDIFOT.php:74 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 #: PO_Header.php:760 PO_PDFPurchOrder.php:371 PO_PDFPurchOrder.php:374 #: PurchData.php:190 PurchData.php:490 PurchData.php:493 @@ -322,17 +321,16 @@ #: SalesAnalReptCols.php:405 SalesAnalRepts.php:403 SalesAnalRepts.php:406 #: SalesAnalRepts.php:429 SalesAnalRepts.php:432 SalesAnalRepts.php:455 #: SalesAnalRepts.php:458 SalesPeople.php:208 SalesPeople.php:321 -#: SalesPeople.php:323 SelectProduct.php:376 ShipmentCosting.php:628 -#: Stocks.php:873 Stocks.php:875 Stocks.php:893 Stocks.php:895 -#: SuppContractChgs.php:85 SuppLoginSetup.php:507 SuppLoginSetup.php:511 -#: SystemParameters.php:384 SystemParameters.php:407 SystemParameters.php:423 -#: SystemParameters.php:486 SystemParameters.php:494 SystemParameters.php:534 -#: SystemParameters.php:607 SystemParameters.php:616 SystemParameters.php:624 -#: SystemParameters.php:642 SystemParameters.php:649 SystemParameters.php:776 -#: SystemParameters.php:905 SystemParameters.php:909 SystemParameters.php:917 -#: SystemParameters.php:921 SystemParameters.php:975 SystemParameters.php:985 -#: SystemParameters.php:989 TaxGroups.php:294 TaxGroups.php:297 -#: TaxGroups.php:347 WWW_Users.php:591 WWW_Users.php:595 +#: SalesPeople.php:323 SelectProduct.php:376 ShipmentCosting.php:631 +#: Stocks.php:883 Stocks.php:885 Stocks.php:903 Stocks.php:905 +#: SuppContractChgs.php:85 SystemParameters.php:384 SystemParameters.php:407 +#: SystemParameters.php:423 SystemParameters.php:486 SystemParameters.php:494 +#: SystemParameters.php:534 SystemParameters.php:607 SystemParameters.php:616 +#: SystemParameters.php:624 SystemParameters.php:642 SystemParameters.php:649 +#: SystemParameters.php:776 SystemParameters.php:905 SystemParameters.php:909 +#: SystemParameters.php:917 SystemParameters.php:921 SystemParameters.php:975 +#: SystemParameters.php:985 SystemParameters.php:989 TaxGroups.php:294 +#: TaxGroups.php:297 TaxGroups.php:347 WWW_Users.php:591 WWW_Users.php:595 #: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" @@ -341,58 +339,61 @@ #: AddCustomerNotes.php:132 AddCustomerTypeNotes.php:123 Areas.php:164 #: BankAccounts.php:223 BOMs.php:144 COGSGLPostings.php:107 #: COGSGLPostings.php:204 CreditStatus.php:172 Currencies.php:269 -#: CustLoginSetup.php:219 CustomerBranches.php:414 Customers.php:940 -#: Customers.php:973 CustomerTypes.php:202 EDIMessageFormat.php:150 -#: Factors.php:299 FixedAssetCategories.php:180 FixedAssetLocations.php:102 -#: FreightCosts.php:240 GeocodeSetup.php:170 GLAccounts.php:308 GLTags.php:82 -#: Labels.php:414 Locations.php:377 MRPDemands.php:305 MRPDemandTypes.php:120 -#: PaymentMethods.php:202 PaymentTerms.php:203 PcAssignCashToTab.php:255 +#: CustomerBranches.php:414 Customers.php:940 Customers.php:973 +#: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:300 +#: FixedAssetCategories.php:182 FixedAssetLocations.php:102 +#: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:83 +#: Labels.php:411 Locations.php:381 MRPDemands.php:305 MRPDemandTypes.php:120 +#: PaymentMethods.php:200 PaymentTerms.php:201 PcAssignCashToTab.php:255 #: PcClaimExpensesFromTab.php:252 PcExpenses.php:208 PcTabs.php:234 #: PcTypeTabs.php:172 PO_AuthorisationLevels.php:149 Prices_Customer.php:280 #: Prices.php:246 PurchData.php:202 SalesCategories.php:256 #: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:219 -#: SalesTypes.php:216 SecurityTokens.php:110 SelectCustomer.php:614 -#: SelectCustomer.php:632 SelectCustomer.php:656 SelectCustomer.php:673 -#: SelectCustomer.php:696 SelectCustomer.php:712 Shippers.php:144 +#: SalesTypes.php:216 SecurityTokens.php:110 SelectCustomer.php:668 +#: SelectCustomer.php:686 SelectCustomer.php:710 SelectCustomer.php:727 +#: SelectCustomer.php:751 SelectCustomer.php:768 Shippers.php:144 #: StockCategories.php:240 SupplierContacts.php:157 SupplierTypes.php:189 -#: SuppLoginSetup.php:271 SuppTransGLAnalysis.php:118 TaxAuthorities.php:172 -#: TaxCategories.php:182 TaxGroups.php:178 TaxProvinces.php:176 -#: UnitsOfMeasure.php:188 WorkCentres.php:137 WWW_Access.php:123 -#: WWW_Users.php:306 includes/InputSerialItems.php:88 -#: includes/OutputSerialItems.php:21 +#: SuppTransGLAnalysis.php:118 TaxAuthorities.php:172 TaxCategories.php:182 +#: TaxGroups.php:178 TaxProvinces.php:176 UnitsOfMeasure.php:188 +#: WorkCentres.php:137 WWW_Access.php:123 WWW_Users.php:306 +#: includes/InputSerialItems.php:88 includes/OutputSerialItems.php:21 #, php-format msgid "Edit" msgstr "Upravit" +#: AccountGroups.php:265 +#, fuzzy +msgid "Are you sure you wish to delete this account group?" +msgstr "Jste si jisti, že chcete smazat tento obor?" + #: AccountGroups.php:265 AccountSections.php:200 AddCustomerContacts.php:150 #: AddCustomerNotes.php:133 AddCustomerTypeNotes.php:124 Areas.php:165 #: BankAccounts.php:224 BOMs.php:146 COGSGLPostings.php:108 #: COGSGLPostings.php:205 ContractBOM.php:266 ContractOtherReqts.php:117 -#: CounterSales.php:781 Credit_Invoice.php:384 CreditStatus.php:173 -#: Currencies.php:272 CustLoginSetup.php:220 CustomerReceipt.php:863 -#: Customers.php:974 CustomerTypes.php:203 DiscountCategories.php:215 -#: DiscountMatrix.php:173 EDIMessageFormat.php:151 -#: FixedAssetCategories.php:181 FreightCosts.php:241 GeocodeSetup.php:171 -#: GLAccounts.php:309 GLJournal.php:382 GLTags.php:83 Labels.php:414 -#: Locations.php:378 MRPDemands.php:306 MRPDemandTypes.php:121 -#: PaymentMethods.php:203 Payments.php:1006 PaymentTerms.php:204 +#: CounterSales.php:793 Credit_Invoice.php:381 CreditStatus.php:173 +#: Currencies.php:272 CustomerReceipt.php:863 Customers.php:974 +#: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:175 +#: EDIMessageFormat.php:151 FixedAssetCategories.php:183 FreightCosts.php:241 +#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:382 GLTags.php:84 +#: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:121 +#: PaymentMethods.php:201 Payments.php:1015 PaymentTerms.php:202 #: PcAssignCashToTab.php:259 PcClaimExpensesFromTab.php:253 PcExpenses.php:209 #: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 -#: PO_AuthorisationLevels.php:151 PO_Items.php:688 Prices_Customer.php:281 +#: PO_AuthorisationLevels.php:151 PO_Items.php:684 Prices_Customer.php:281 #: Prices.php:247 PurchData.php:203 SalesAnalReptCols.php:294 #: SalesAnalRepts.php:302 SalesCategories.php:257 SalesGLPostings.php:133 #: SalesGLPostings.php:246 SalesPeople.php:220 SalesTypes.php:217 -#: SecurityTokens.php:111 SelectCreditItems.php:745 SelectCustomer.php:615 -#: SelectCustomer.php:633 SelectCustomer.php:657 SelectCustomer.php:674 -#: SelectCustomer.php:697 SelectCustomer.php:713 SelectOrderItems.php:1390 +#: SecurityTokens.php:111 SelectCreditItems.php:754 SelectCustomer.php:669 +#: SelectCustomer.php:687 SelectCustomer.php:711 SelectCustomer.php:728 +#: SelectCustomer.php:752 SelectCustomer.php:769 SelectOrderItems.php:1430 #: Shipments.php:423 Shippers.php:145 SpecialOrder.php:581 #: StockCategories.php:241 StockCategories.php:535 SuppContractChgs.php:91 #: SuppCreditGRNs.php:92 SuppFixedAssetChgs.php:84 SuppInvGRNs.php:132 -#: SupplierContacts.php:158 SupplierTypes.php:191 SuppLoginSetup.php:272 -#: SuppShiptChgs.php:89 SuppTransGLAnalysis.php:119 TaxAuthorities.php:173 -#: TaxCategories.php:183 TaxGroups.php:179 TaxProvinces.php:177 -#: UnitsOfMeasure.php:189 WorkCentres.php:138 WOSerialNos.php:303 -#: WWW_Access.php:124 WWW_Users.php:307 includes/InputSerialItemsKeyed.php:59 +#: SupplierContacts.php:158 SupplierTypes.php:191 SuppShiptChgs.php:89 +#: SuppTransGLAnalysis.php:119 TaxAuthorities.php:173 TaxCategories.php:183 +#: TaxGroups.php:179 TaxProvinces.php:177 UnitsOfMeasure.php:189 +#: WorkCentres.php:138 WOSerialNos.php:303 WWW_Access.php:124 +#: WWW_Users.php:307 includes/InputSerialItemsKeyed.php:59 #: includes/OutputSerialItems.php:98 #, php-format msgid "Delete" @@ -418,7 +419,7 @@ msgid "The account group name does not exist in the database" msgstr "Účet jméno skupiny neexistuje v databázi" -#: AccountGroups.php:313 GLAccounts.php:239 GLAccounts.php:288 +#: AccountGroups.php:313 GLAccounts.php:243 GLAccounts.php:292 #: Z_ImportGLAccountGroups.php:26 msgid "Account Group" msgstr "Účetní skupina" @@ -438,16 +439,16 @@ #: AccountGroups.php:399 AccountSections.php:264 AddCustomerContacts.php:244 #: AddCustomerNotes.php:211 AddCustomerTypeNotes.php:191 Areas.php:220 #: BankAccounts.php:391 BOMs.php:730 COGSGLPostings.php:342 -#: CreditStatus.php:250 Currencies.php:393 CustLoginSetup.php:439 +#: CreditStatus.php:250 Currencies.php:393 CustLoginSetup.php:257 #: DiscountMatrix.php:136 EDIMessageFormat.php:247 #: FixedAssetCategories.php:322 FixedAssetLocations.php:148 -#: FreightCosts.php:339 GeocodeSetup.php:267 GLAccounts.php:258 -#: Locations.php:561 MRPDemands.php:411 MRPDemandTypes.php:180 +#: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 +#: Locations.php:567 MRPDemands.php:411 MRPDemandTypes.php:185 #: OffersReceived.php:52 OffersReceived.php:129 PaymentMethods.php:282 -#: PaymentTerms.php:284 PO_AuthorisationLevels.php:244 Prices_Customer.php:350 +#: PaymentTerms.php:293 PO_AuthorisationLevels.php:244 Prices_Customer.php:350 #: SalesAnalReptCols.php:510 SalesAnalRepts.php:494 SalesGLPostings.php:416 #: SalesPeople.php:329 Shippers.php:196 StockCategories.php:557 -#: SupplierContacts.php:258 SuppLoginSetup.php:529 TaxAuthorities.php:312 +#: SupplierContacts.php:258 SuppLoginSetup.php:287 TaxAuthorities.php:312 #: TaxCategories.php:233 TaxProvinces.php:227 UnitsOfMeasure.php:240 #: WorkCentres.php:261 WWW_Users.php:625 msgid "Enter Information" @@ -514,8 +515,8 @@ msgid "Could not retrieve the requested section please try again." msgstr "Nepodařilo se získat požadovanou sekci prosím zkuste to znovu." -#: AddCustomerContacts.php:6 AddCustomerContacts.php:61 SelectCustomer.php:607 -#: SelectCustomer.php:639 +#: AddCustomerContacts.php:6 AddCustomerContacts.php:61 SelectCustomer.php:661 +#: SelectCustomer.php:693 msgid "Customer Contacts" msgstr "Zákazník Kontakty" @@ -558,10 +559,10 @@ #: AddCustomerContacts.php:61 AddCustomerNotes.php:50 #: AddCustomerTypeNotes.php:48 Areas.php:73 CustomerTypes.php:69 -#: DeliveryDetails.php:771 Factors.php:105 FixedAssetItems.php:236 +#: DeliveryDetails.php:770 Factors.php:105 FixedAssetItems.php:243 #: PcAssignCashToTab.php:88 PcClaimExpensesFromTab.php:79 PcExpenses.php:93 -#: PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:356 SalesAnalReptCols.php:129 -#: SalesPeople.php:96 SalesTypes.php:66 Stocks.php:355 Suppliers.php:510 +#: PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:354 SalesAnalReptCols.php:129 +#: SalesPeople.php:96 SalesTypes.php:66 Stocks.php:361 Suppliers.php:510 #: SupplierTypes.php:67 msgid "has been updated" msgstr "byla aktualizována" @@ -576,7 +577,7 @@ #: AddCustomerContacts.php:128 CompanyPreferences.php:222 #: CustomerBranches.php:368 Customers.php:928 Customers.php:935 -#: SalesPeople.php:191 SelectCustomer.php:609 StockDispatch.php:185 +#: SalesPeople.php:191 SelectCustomer.php:663 StockDispatch.php:185 #: StockDispatch.php:197 SupplierContacts.php:145 SupplierCredit.php:441 #: SupplierInvoice.php:408 SuppTransGLAnalysis.php:103 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 @@ -585,7 +586,7 @@ msgstr "Název" #: AddCustomerContacts.php:129 AddCustomerContacts.php:220 Customers.php:929 -#: Customers.php:936 SelectCustomer.php:610 WWW_Access.php:107 +#: Customers.php:936 SelectCustomer.php:664 WWW_Access.php:107 #: WWW_Access.php:168 msgid "Role" msgstr "Roli" @@ -595,15 +596,14 @@ msgstr "Telefonní číslo" #: AddCustomerContacts.php:131 AddCustomerContacts.php:232 -#: CustLoginSetup.php:193 CustomerBranches.php:374 CustomerBranches.php:716 -#: CustomerInquiry.php:249 Customers.php:931 Customers.php:938 -#: EmailCustTrans.php:15 EmailCustTrans.php:63 Factors.php:226 Factors.php:263 -#: Locations.php:533 OrderDetails.php:105 PDFRemittanceAdvice.php:251 -#: PO_PDFPurchOrder.php:357 PO_PDFPurchOrder.php:360 PrintCustTrans.php:694 -#: PrintCustTrans.php:914 PrintCustTrans.php:961 -#: PrintCustTransPortrait.php:715 PrintCustTransPortrait.php:935 -#: PrintCustTransPortrait.php:979 SelectCustomer.php:612 -#: SupplierContacts.php:149 SupplierContacts.php:253 SuppLoginSetup.php:237 +#: CustomerBranches.php:374 CustomerBranches.php:718 CustomerInquiry.php:249 +#: Customers.php:931 Customers.php:938 EmailCustTrans.php:15 +#: EmailCustTrans.php:63 Factors.php:225 Factors.php:263 Locations.php:539 +#: OrderDetails.php:104 PDFRemittanceAdvice.php:251 PO_PDFPurchOrder.php:357 +#: PO_PDFPurchOrder.php:360 PrintCustTrans.php:709 PrintCustTrans.php:931 +#: PrintCustTrans.php:980 PrintCustTransPortrait.php:728 +#: PrintCustTransPortrait.php:949 PrintCustTransPortrait.php:997 +#: SelectCustomer.php:666 SupplierContacts.php:149 SupplierContacts.php:253 #: UserSettings.php:180 WWW_Users.php:262 includes/PDFPickingListHeader.inc:25 #: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:82 #: includes/PDFTransPageHeaderPortrait.inc:109 @@ -614,7 +614,7 @@ #: AddCustomerContacts.php:132 AddCustomerContacts.php:238 Customers.php:932 #: Customers.php:939 PcAssignCashToTab.php:220 PcAssignCashToTab.php:346 #: PcAuthorizeExpenses.php:91 PcClaimExpensesFromTab.php:214 -#: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:613 +#: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:667 #: SystemParameters.php:322 WOSerialNos.php:280 WOSerialNos.php:282 msgid "Notes" msgstr "Bere na vědomí" @@ -632,20 +632,20 @@ msgid "Contact Code" msgstr "Kontakt kód" -#: AddCustomerContacts.php:214 Factors.php:220 SupplierContacts.php:225 +#: AddCustomerContacts.php:214 Factors.php:219 SupplierContacts.php:225 msgid "Contact Name" msgstr "Jméno kontaktní osoby" #: AddCustomerContacts.php:226 Contracts.php:777 PDFRemittanceAdvice.php:247 -#: PO_Header.php:965 PO_Header.php:1035 SelectCreditItems.php:223 -#: SelectCustomer.php:463 SelectOrderItems.php:647 +#: PO_Header.php:965 PO_Header.php:1035 SelectCreditItems.php:230 +#: SelectCustomer.php:487 SelectOrderItems.php:647 #: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:81 #: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" msgstr "Telefon" -#: AddCustomerNotes.php:6 AddCustomerNotes.php:50 SelectCustomer.php:649 -#: SelectCustomer.php:680 +#: AddCustomerNotes.php:6 AddCustomerNotes.php:50 SelectCustomer.php:703 +#: SelectCustomer.php:734 msgid "Customer Notes" msgstr "Zákazník bere na vědomí" @@ -682,17 +682,17 @@ #: BankMatching.php:231 BankReconciliation.php:198 BankReconciliation.php:270 #: ContractCosting.php:169 CustomerAllocations.php:331 #: CustomerAllocations.php:357 CustomerInquiry.php:192 -#: CustomerTransInquiry.php:90 GLAccountInquiry.php:154 -#: GLAccountReport.php:369 GLTransInquiry.php:41 MRPCalendar.php:215 -#: PaymentAllocations.php:77 PcAssignCashToTab.php:216 +#: CustomerTransInquiry.php:90 GLAccountInquiry.php:152 +#: GLAccountReport.php:349 GLTransInquiry.php:40 MRPCalendar.php:216 +#: PaymentAllocations.php:62 PcAssignCashToTab.php:216 #: PcAuthorizeExpenses.php:87 PDFRemittanceAdvice.php:308 -#: PrintCustTrans.php:793 PrintCustTransPortrait.php:817 ReverseGRN.php:378 -#: ShipmentCosting.php:508 ShipmentCosting.php:579 Shipments.php:466 +#: PrintCustTrans.php:809 PrintCustTransPortrait.php:829 ReverseGRN.php:378 +#: ShipmentCosting.php:510 ShipmentCosting.php:581 Shipments.php:466 #: StockDispatch.php:187 StockDispatch.php:199 StockLocMovements.php:83 #: StockMovements.php:92 StockSerialItemResearch.php:79 #: SupplierAllocations.php:454 SupplierAllocations.php:559 #: SupplierAllocations.php:630 SupplierInquiry.php:201 -#: SupplierTransInquiry.php:89 includes/PDFQuotationPageHeader.inc:91 +#: SupplierTransInquiry.php:89 includes/PDFQuotationPageHeader.inc:92 #: includes/PDFQuotationPortraitPageHeader.inc:90 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 #: includes/PDFTransPageHeader.inc:48 @@ -701,7 +701,7 @@ msgstr "Datum" #: AddCustomerNotes.php:114 AddCustomerTypeNotes.php:105 PcReportTab.php:173 -#: Stocks.php:882 UpgradeDatabase.php:171 UpgradeDatabase.php:174 +#: Stocks.php:892 UpgradeDatabase.php:171 UpgradeDatabase.php:174 #: UpgradeDatabase.php:177 UpgradeDatabase.php:180 UpgradeDatabase.php:183 #: UpgradeDatabase.php:186 UpgradeDatabase.php:189 UpgradeDatabase.php:192 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 @@ -733,7 +733,7 @@ msgid "Contact Note" msgstr "Kontakt Poznámka:" -#: AddCustomerTypeNotes.php:5 SelectCustomer.php:689 +#: AddCustomerTypeNotes.php:5 SelectCustomer.php:744 msgid "Customer Type (Group) Notes" msgstr "Typ zákazníka (Group) Poznámky" @@ -741,7 +741,7 @@ msgid "The Contact priority must be an integer." msgstr "Prioritou Kontakt musí být celé číslo." -#: AddCustomerTypeNotes.php:48 SelectCustomer.php:719 +#: AddCustomerTypeNotes.php:48 SelectCustomer.php:775 msgid "Customer Group Notes" msgstr "Zákaznická skupina bere na vědomí" @@ -793,21 +793,21 @@ #: AgedDebtors.php:270 AgedDebtors.php:369 AgedDebtors.php:434 #: AgedSuppliers.php:107 BOMExtendedQty.php:149 BOMIndented.php:150 #: BOMIndentedReverse.php:141 BOMListing.php:44 BOMListing.php:55 -#: DebtorsAtPeriodEnd.php:56 DebtorsAtPeriodEnd.php:68 GLBalanceSheet.php:90 -#: GLBalanceSheet.php:128 GLProfit_Loss.php:157 GLTagProfit_Loss.php:172 -#: GLTrialBalance.php:151 InventoryPlanning.php:99 InventoryPlanning.php:174 -#: InventoryPlanning.php:209 InventoryPlanning.php:257 -#: InventoryPlanning.php:295 InventoryPlanningPrefSupplier.php:208 -#: InventoryPlanningPrefSupplier.php:276 InventoryPlanningPrefSupplier.php:310 -#: InventoryPlanningPrefSupplier.php:355 InventoryPlanningPrefSupplier.php:401 -#: InventoryQuantities.php:81 InventoryValuation.php:78 -#: MailInventoryValuation.php:115 MRPPlannedPurchaseOrders.php:114 -#: MRPPlannedWorkOrders.php:105 MRPReport.php:147 MRPReport.php:508 +#: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:90 +#: GLBalanceSheet.php:128 GLProfit_Loss.php:165 GLTagProfit_Loss.php:186 +#: GLTrialBalance.php:155 InventoryPlanning.php:98 InventoryPlanning.php:173 +#: InventoryPlanning.php:208 InventoryPlanning.php:256 +#: InventoryPlanning.php:294 InventoryPlanningPrefSupplier.php:201 +#: InventoryPlanningPrefSupplier.php:269 InventoryPlanningPrefSupplier.php:303 +#: InventoryPlanningPrefSupplier.php:348 InventoryPlanningPrefSupplier.php:394 +#: InventoryQuantities.php:84 InventoryValuation.php:78 +#: MailInventoryValuation.php:114 MRPPlannedPurchaseOrders.php:114 +#: MRPPlannedWorkOrders.php:106 MRPReport.php:147 MRPReport.php:508 #: MRPReschedules.php:45 MRPReschedules.php:57 MRPShortages.php:155 -#: MRPShortages.php:167 OutstandingGRNs.php:48 OutstandingGRNs.php:60 +#: MRPShortages.php:167 OutstandingGRNs.php:53 OutstandingGRNs.php:65 #: PDFCustomerList.php:18 PDFCustomerList.php:230 PDFCustomerList.php:242 -#: PDFLowGP.php:20 PDFStockCheckComparison.php:35 -#: PDFStockCheckComparison.php:61 PDFStockCheckComparison.php:262 +#: PDFLowGP.php:20 PDFStockCheckComparison.php:32 +#: PDFStockCheckComparison.php:58 PDFStockCheckComparison.php:263 #: ReorderLevel.php:57 SelectAsset.php:37 SelectProduct.php:39 #: StockCheck.php:65 StockCheck.php:139 SupplierTenders.php:326 #: SuppPriceList.php:118 includes/PDFPaymentRun_PymtFooter.php:149 @@ -815,7 +815,7 @@ msgstr "Problém" #: AgedDebtors.php:272 CustomerInquiry.php:85 CustomerInquiry.php:109 -#: DebtorsAtPeriodEnd.php:58 +#: DebtorsAtPeriodEnd.php:59 msgid "The customer details could not be retrieved by the SQL because" msgstr "Zákazník podrobnosti se nepodařilo získat do SQL, protože" @@ -823,29 +823,29 @@ #: AgedSuppliers.php:110 AgedSuppliers.php:192 BOMExtendedQty.php:152 #: BOMExtendedQty.php:246 BOMIndented.php:153 BOMIndented.php:234 #: BOMIndentedReverse.php:145 BOMIndentedReverse.php:222 BOMListing.php:47 -#: Credit_Invoice.php:184 DebtorsAtPeriodEnd.php:59 DebtorsAtPeriodEnd.php:71 +#: Credit_Invoice.php:184 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 #: FTP_RadioBeacon.php:187 GetStockImage.php:154 GLBalanceSheet.php:93 -#: GLBalanceSheet.php:131 GLBalanceSheet.php:294 GLProfit_Loss.php:160 -#: GLProfit_Loss.php:172 GLTagProfit_Loss.php:175 GLTagProfit_Loss.php:187 -#: GLTrialBalance.php:154 GLTrialBalance.php:166 InventoryPlanning.php:102 -#: InventoryPlanning.php:177 InventoryPlanning.php:212 -#: InventoryPlanning.php:260 InventoryPlanning.php:298 -#: InventoryPlanning.php:361 InventoryPlanningPrefSupplier.php:211 -#: InventoryPlanningPrefSupplier.php:279 InventoryPlanningPrefSupplier.php:313 -#: InventoryPlanningPrefSupplier.php:358 InventoryPlanningPrefSupplier.php:404 -#: InventoryPlanningPrefSupplier.php:460 InventoryQuantities.php:84 -#: InventoryQuantities.php:95 InventoryValuation.php:81 -#: InventoryValuation.php:92 MailInventoryValuation.php:118 -#: MailInventoryValuation.php:214 MRPPlannedPurchaseOrders.php:117 -#: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:108 -#: MRPPlannedWorkOrders.php:119 MRPPlannedWorkOrders.php:306 MRPReport.php:39 +#: GLBalanceSheet.php:131 GLBalanceSheet.php:294 GLProfit_Loss.php:168 +#: GLProfit_Loss.php:180 GLTagProfit_Loss.php:190 GLTagProfit_Loss.php:203 +#: GLTrialBalance.php:158 GLTrialBalance.php:170 InventoryPlanning.php:101 +#: InventoryPlanning.php:176 InventoryPlanning.php:211 +#: InventoryPlanning.php:259 InventoryPlanning.php:297 +#: InventoryPlanning.php:360 InventoryPlanningPrefSupplier.php:204 +#: InventoryPlanningPrefSupplier.php:272 InventoryPlanningPrefSupplier.php:306 +#: InventoryPlanningPrefSupplier.php:351 InventoryPlanningPrefSupplier.php:397 +#: InventoryPlanningPrefSupplier.php:453 InventoryQuantities.php:87 +#: InventoryQuantities.php:98 InventoryValuation.php:81 +#: InventoryValuation.php:92 MailInventoryValuation.php:117 +#: MailInventoryValuation.php:213 MRPPlannedPurchaseOrders.php:117 +#: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:109 +#: MRPPlannedWorkOrders.php:120 MRPPlannedWorkOrders.php:307 MRPReport.php:39 #: MRPReport.php:50 MRPReport.php:150 MRPReschedules.php:48 #: MRPReschedules.php:60 MRPShortages.php:158 MRPShortages.php:170 -#: OutstandingGRNs.php:51 OutstandingGRNs.php:63 PDFCustomerList.php:233 -#: PDFCustomerList.php:245 PDFGrn.php:123 PDFLowGP.php:60 PDFLowGP.php:72 -#: PDFPriceList.php:124 PDFQuotation.php:234 PDFQuotationPortrait.php:235 -#: PDFRemittanceAdvice.php:84 PDFStockCheckComparison.php:39 -#: PDFStockCheckComparison.php:65 PDFStockCheckComparison.php:266 +#: OutstandingGRNs.php:56 OutstandingGRNs.php:68 PDFCustomerList.php:233 +#: PDFCustomerList.php:245 PDFGrn.php:123 PDFLowGP.php:59 PDFLowGP.php:71 +#: PDFPriceList.php:124 PDFQuotation.php:250 PDFQuotationPortrait.php:264 +#: PDFRemittanceAdvice.php:84 PDFStockCheckComparison.php:36 +#: PDFStockCheckComparison.php:62 PDFStockCheckComparison.php:267 #: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:149 #: PrintCustOrder_generic.php:243 PrintCustOrder.php:198 ReorderLevel.php:60 #: ReorderLevel.php:149 SalesAnalysis_UserDefined.php:28 @@ -875,8 +875,8 @@ msgstr "Podrobnosti o nesplacených transakcí pro zákazníka" #: AgedDebtors.php:371 AgedSuppliers.php:191 GLAccountCSV.php:168 -#: GLAccountInquiry.php:145 GLAccountReport.php:93 PO_Items.php:416 -#: PO_Items.php:539 PO_Items.php:563 SalesAnalReptCols.php:356 +#: GLAccountInquiry.php:143 GLAccountReport.php:94 PO_Items.php:414 +#: PO_Items.php:535 PO_Items.php:559 SalesAnalReptCols.php:356 #: SpecialOrder.php:370 StockLocTransferReceive.php:373 #: StockQuantityByDate.php:110 includes/SelectOrderItems_IntoCart.inc:53 msgid "could not be retrieved because" @@ -884,13 +884,13 @@ #: AgedDebtors.php:374 AgedSuppliers.php:194 Areas.php:95 #: ConfirmDispatch_Invoice.php:150 ConfirmDispatch_Invoice.php:957 -#: ConfirmDispatch_Invoice.php:971 Contracts.php:581 CounterSales.php:1323 -#: CounterSales.php:1337 Credit_Invoice.php:703 Credit_Invoice.php:725 +#: ConfirmDispatch_Invoice.php:971 Contracts.php:581 CounterSales.php:1335 +#: CounterSales.php:1349 Credit_Invoice.php:699 Credit_Invoice.php:721 #: CustomerReceipt.php:523 CustomerReceipt.php:655 CustomerReceipt.php:683 -#: CustomerTransInquiry.php:82 DeliveryDetails.php:393 GLProfit_Loss.php:579 -#: GLTagProfit_Loss.php:488 Payments.php:312 PDFRemittanceAdvice.php:86 +#: CustomerTransInquiry.php:82 DeliveryDetails.php:393 GLProfit_Loss.php:587 +#: GLTagProfit_Loss.php:507 Payments.php:319 PDFRemittanceAdvice.php:86 #: PurchData.php:87 PurchData.php:105 PurchData.php:237 ReverseGRN.php:191 -#: ReverseGRN.php:205 ReverseGRN.php:366 SelectCreditItems.php:1372 +#: ReverseGRN.php:205 ReverseGRN.php:366 SelectCreditItems.php:1396 #: SelectSalesOrder.php:113 SelectSalesOrder.php:277 StockCheck.php:225 #: StockCostUpdate.php:76 StockCostUpdate.php:86 StockLocStatus.php:147 #: StockMovements.php:85 StockQuantityByDate.php:86 StockReorderLevel.php:39 @@ -899,7 +899,7 @@ #: SupplierInquiry.php:130 SupplierInquiry.php:182 SupplierTransInquiry.php:81 #: SuppPaymentRun.php:111 SuppPaymentRun.php:186 SuppPaymentRun.php:216 #: WorkOrderCosting.php:399 WorkOrderReceive.php:270 WOSerialNos.php:45 -#: Z_ChangeBranchCode.php:108 Z_ChangeCustomerCode.php:92 +#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:92 #: Z_DeleteCreditNote.php:58 Z_DeleteInvoice.php:87 #: includes/PDFPaymentRun_PymtFooter.php:59 #: includes/PDFPaymentRun_PymtFooter.php:89 @@ -918,11 +918,11 @@ msgid "Aged Debtor Analysis" msgstr "Ve věku dlužníka analýza" -#: AgedDebtors.php:464 DebtorsAtPeriodEnd.php:135 +#: AgedDebtors.php:464 DebtorsAtPeriodEnd.php:136 msgid "From Customer Code" msgstr "Od kódu zákazníka" -#: AgedDebtors.php:467 DebtorsAtPeriodEnd.php:138 +#: AgedDebtors.php:467 DebtorsAtPeriodEnd.php:139 msgid "To Customer Code" msgstr "Do kódu zákazníka" @@ -969,14 +969,14 @@ #: AgedDebtors.php:515 AgedSuppliers.php:312 BOMExtendedQty.php:282 #: BOMIndented.php:272 BOMIndentedReverse.php:250 BOMListing.php:132 -#: DebtorsAtPeriodEnd.php:156 InventoryPlanning.php:442 -#: InventoryPlanningPrefSupplier.php:518 InventoryQuantities.php:187 -#: InventoryValuation.php:251 MRPPlannedPurchaseOrders.php:282 -#: MRPPlannedWorkOrders.php:335 MRPReschedules.php:140 MRPShortages.php:290 -#: OutstandingGRNs.php:162 PDFCustomerList.php:410 PDFLowGP.php:145 +#: DebtorsAtPeriodEnd.php:157 InventoryPlanning.php:442 +#: InventoryPlanningPrefSupplier.php:516 InventoryQuantities.php:203 +#: InventoryValuation.php:255 MRPPlannedPurchaseOrders.php:282 +#: MRPPlannedWorkOrders.php:336 MRPReschedules.php:140 MRPShortages.php:302 +#: OutstandingGRNs.php:172 PDFCustomerList.php:410 PDFLowGP.php:146 #: PDFPriceList.php:301 PDFRemittanceAdvice.php:152 -#: PDFStockCheckComparison.php:379 PrintCustTrans.php:536 -#: PrintCustTransPortrait.php:558 ReorderLevel.php:217 StockDispatch.php:308 +#: PDFStockCheckComparison.php:357 PrintCustTrans.php:542 +#: PrintCustTransPortrait.php:562 ReorderLevel.php:217 StockDispatch.php:308 #: SupplierBalsAtPeriodEnd.php:150 SuppPriceList.php:228 Tax.php:344 msgid "Print PDF" msgstr "Tisknout PDF" @@ -1009,12 +1009,12 @@ msgid "Aged Supplier Analysis" msgstr "Dodavatel ve věku analýza" -#: AgedSuppliers.php:278 OutstandingGRNs.php:157 PDFRemittanceAdvice.php:138 +#: AgedSuppliers.php:278 OutstandingGRNs.php:167 PDFRemittanceAdvice.php:138 #: SupplierBalsAtPeriodEnd.php:131 SuppPaymentRun.php:259 msgid "From Supplier Code" msgstr "Od kódu dodavatele" -#: AgedSuppliers.php:281 OutstandingGRNs.php:159 PDFRemittanceAdvice.php:140 +#: AgedSuppliers.php:281 OutstandingGRNs.php:169 PDFRemittanceAdvice.php:140 #: SupplierBalsAtPeriodEnd.php:133 SuppPaymentRun.php:261 msgid "To Supplier Code" msgstr "Do kódu dodavatele" @@ -1100,7 +1100,7 @@ msgstr "Kód oblasti" #: Areas.php:132 CustomerTypes.php:164 Factors.php:140 -#: FixedAssetCategories.php:135 GLAccounts.php:193 Locations.php:325 +#: FixedAssetCategories.php:134 GLAccounts.php:197 Locations.php:328 #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:160 PcExpensesTypeTab.php:101 PcTabs.php:166 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:137 @@ -1135,12 +1135,12 @@ msgstr "Nesprávné datum používaného formátu, prosím, re-zadání" #: AuditTrail.php:35 BOMIndented.php:310 BOMIndentedReverse.php:289 -#: MRPCalendar.php:258 +#: MRPCalendar.php:260 msgid "From Date" msgstr "Od data" #: AuditTrail.php:37 BOMIndented.php:311 BOMIndentedReverse.php:290 -#: MRPCalendar.php:260 +#: MRPCalendar.php:262 msgid "To Date" msgstr "To Date" @@ -1151,18 +1151,18 @@ msgstr "ID uživatele" #: AuditTrail.php:43 AuditTrail.php:56 ContractBOM.php:298 -#: CounterSales.php:2113 CounterSales.php:2116 CustomerTransInquiry.php:29 +#: CounterSales.php:2122 CounterSales.php:2125 CustomerTransInquiry.php:29 #: DailySalesInquiry.php:41 DailySalesInquiry.php:43 FixedAssetRegister.php:56 -#: FixedAssetRegister.php:65 InventoryQuantities.php:153 -#: InventoryQuantities.php:175 InventoryQuantities.php:177 MRP.php:564 +#: FixedAssetRegister.php:65 InventoryQuantities.php:163 +#: InventoryQuantities.php:188 InventoryQuantities.php:190 MRP.php:564 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:135 #: PDFPeriodStockTransListing.php:58 PDFPriceList.php:194 -#: PDFPrintLabel.php:239 PO_Items.php:884 POReport.php:1548 +#: PDFPrintLabel.php:239 PO_Items.php:880 POReport.php:1548 #: ReorderLevel.php:175 ReorderLevel.php:177 ReorderLevel.php:205 #: ReorderLevel.php:207 SalesGraph.php:91 SalesGraph.php:93 SalesGraph.php:111 #: SalesGraph.php:113 SalesGraph.php:134 SalesGraph.php:136 SalesGraph.php:168 -#: SalesInquiry.php:1053 SalesInquiry.php:1092 SelectCreditItems.php:923 -#: SelectOrderItems.php:1589 SelectOrderItems.php:1592 SelectProduct.php:493 +#: SalesInquiry.php:1053 SalesInquiry.php:1092 SelectCreditItems.php:940 +#: SelectOrderItems.php:1639 SelectOrderItems.php:1642 SelectProduct.php:493 #: SelectProduct.php:495 StockDispatch.php:282 StockDispatch.php:284 #: StockLocStatus.php:67 StockLocStatus.php:69 StockLocStatus.php:87 #: StockLocStatus.php:91 StockLocStatus.php:95 StockQuantityByDate.php:21 @@ -1194,10 +1194,10 @@ #: AuditTrail.php:146 BankReconciliation.php:199 BankReconciliation.php:271 #: CustomerAllocations.php:355 CustomerInquiry.php:190 #: CustomerTransInquiry.php:18 CustomerTransInquiry.php:88 -#: CustWhereAlloc.php:17 CustWhereAlloc.php:88 DailyBankTransactions.php:104 -#: GLAccountInquiry.php:152 GLAccountReport.php:367 GLJournal.php:240 +#: CustWhereAlloc.php:18 CustWhereAlloc.php:92 DailyBankTransactions.php:105 +#: GLAccountInquiry.php:150 GLAccountReport.php:347 GLJournal.php:240 #: MRPReschedules.php:178 SalesByTypePeriodInquiry.php:327 -#: SelectCustomer.php:462 ShipmentCosting.php:506 ShipmentCosting.php:577 +#: SelectCustomer.php:486 ShipmentCosting.php:508 ShipmentCosting.php:579 #: StockCategories.php:215 StockLocMovements.php:81 StockMovements.php:90 #: SupplierAllocations.php:452 SupplierInquiry.php:199 #: SupplierTransInquiry.php:19 SupplierTransInquiry.php:86 @@ -1213,7 +1213,7 @@ msgstr "Tabulka" #: AuditTrail.php:148 api/api_xml-rpc.php:314 api/api_xml-rpc.php:729 -#: api/api_xml-rpc.php:1892 +#: api/api_xml-rpc.php:1914 msgid "Field Name" msgstr "Název pole" @@ -1394,7 +1394,7 @@ msgid "Bank Account Matching - Receipts" msgstr "Bankovní účet odpovídající - Příjmy" -#: BankMatching.php:20 PaymentAllocations.php:33 PaymentMethods.php:11 +#: BankMatching.php:20 PaymentAllocations.php:30 PaymentMethods.php:11 #: PDFSuppTransListing.php:41 msgid "Payments" msgstr "Platby" @@ -1439,7 +1439,7 @@ "zjistíte, odpovídající transakce." #: BankMatching.php:87 BankReconciliation.php:101 CustomerReceipt.php:726 -#: DailyBankTransactions.php:29 Payments.php:737 PDFChequeListing.php:44 +#: DailyBankTransactions.php:29 Payments.php:734 PDFChequeListing.php:44 #: TaxAuthorities.php:149 TaxAuthorities.php:305 msgid "Bank Account" msgstr "Bankovní účet" @@ -1448,8 +1448,8 @@ msgid "Show" msgstr "Zobrazit" -#: BankMatching.php:110 CreditItemsControlled.php:78 FreightCosts.php:267 -#: GoodsReceivedControlled.php:65 GoodsReceived.php:65 +#: BankMatching.php:110 CounterSales.php:218 CreditItemsControlled.php:78 +#: FreightCosts.php:267 GoodsReceivedControlled.php:65 GoodsReceived.php:65 #: StockLocTransferReceive.php:426 SupplierAllocations.php:434 #: SuppShiptChgs.php:129 msgid "from" @@ -1457,18 +1457,18 @@ #: BankMatching.php:113 ConfirmDispatchControlled_Invoice.php:58 #: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 -#: GLAccountCSV.php:171 GLAccountReport.php:102 Payments.php:717 +#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:714 #: PcReportTab.php:102 PDFChequeListing.php:107 PDFChequeListing.php:117 -#: PDFChequeListing.php:192 PDFDeliveryDifferences.php:166 -#: PDFDeliveryDifferences.php:179 PDFDeliveryDifferences.php:287 -#: PDFDIFOT.php:172 PDFDIFOT.php:185 PDFDIFOT.php:289 PDFOrdersInvoiced.php:71 -#: PDFOrdersInvoiced.php:268 PDFOrderStatus.php:78 PDFOrderStatus.php:253 +#: PDFChequeListing.php:192 PDFDeliveryDifferences.php:172 +#: PDFDeliveryDifferences.php:185 PDFDeliveryDifferences.php:281 +#: PDFDIFOT.php:190 PDFDIFOT.php:203 PDFDIFOT.php:307 PDFOrdersInvoiced.php:77 +#: PDFOrdersInvoiced.php:274 PDFOrderStatus.php:82 PDFOrderStatus.php:256 #: PO_PDFPurchOrder.php:323 PricesBasedOnMarkUp.php:216 -#: PricesBasedOnMarkUp.php:355 PrintCustStatements.php:50 +#: PricesBasedOnMarkUp.php:355 PrintCustStatements.php:45 #: PrintCustTrans.php:60 PrintCustTrans.php:63 PrintCustTransPortrait.php:58 #: PrintCustTransPortrait.php:61 SalesGraph.php:200 SalesGraph.php:229 #: SalesGraph.php:233 StockLocTransferReceive.php:310 -#: StockLocTransferReceive.php:426 Stocks.php:231 Stocks.php:236 +#: StockLocTransferReceive.php:426 Stocks.php:234 Stocks.php:239 #: StockStatus.php:309 StockStatus.php:350 StockTransfers.php:426 #: includes/PDFAgedDebtorsPageHeader.inc:18 #: includes/PDFAgedSuppliersPageHeader.inc:17 @@ -1564,19 +1564,19 @@ msgid "The payments with the selected criteria could not be retrieved because" msgstr "Platby podle zadaných kriterií se nepodařilo získat, protože" -#: BankMatching.php:229 ShipmentCosting.php:507 ShipmentCosting.php:578 +#: BankMatching.php:229 ShipmentCosting.php:509 ShipmentCosting.php:580 #: SupplierAllocations.php:455 msgid "Ref" msgstr "Ref" #: BankMatching.php:232 ConfirmDispatch_Invoice.php:274 Credit_Invoice.php:279 #: CustomerAllocations.php:358 CustomerReceipt.php:842 -#: CustomerTransInquiry.php:97 CustWhereAlloc.php:92 PaymentAllocations.php:78 -#: Payments.php:969 Payments.php:972 Payments.php:984 +#: CustomerTransInquiry.php:97 CustWhereAlloc.php:96 PaymentAllocations.php:63 +#: Payments.php:972 Payments.php:976 Payments.php:992 #: PcAssignCashToTab.php:218 PcAssignCashToTab.php:339 #: PcAuthorizeExpenses.php:89 PcClaimExpensesFromTab.php:212 #: PcClaimExpensesFromTab.php:365 PcReportTab.php:172 PcReportTab.php:326 -#: PrintCheque.php:70 PrintCheque.php:84 SelectCreditItems.php:659 +#: PrintCheque.php:64 PrintCheque.php:78 SelectCreditItems.php:671 #: SuppContractChgs.php:73 SuppContractChgs.php:142 SuppFixedAssetChgs.php:74 #: SuppFixedAssetChgs.php:140 SupplierAllocations.php:456 #: SupplierCredit.php:344 SupplierCredit.php:374 SupplierCredit.php:406 @@ -1590,7 +1590,7 @@ msgstr "Částka" #: BankMatching.php:233 BankReconciliation.php:203 BankReconciliation.php:275 -#: PDFOrdersInvoiced.php:345 PDFOrderStatus.php:319 +#: PDFOrdersInvoiced.php:351 PDFOrderStatus.php:322 #: PO_SelectOSPurchOrder.php:213 PO_SelectPurchOrder.php:180 #: Shipt_Select.php:182 SuppCreditGRNs.php:227 #: includes/PDFStatementPageHeader.inc:173 @@ -1653,7 +1653,7 @@ msgstr "Bankovní účty se nepodařilo získat na SQL, protože" #: BankReconciliation.php:98 CustomerReceipt.php:717 -#: DailyBankTransactions.php:26 Payments.php:734 SuppPaymentRun.php:302 +#: DailyBankTransactions.php:26 Payments.php:731 SuppPaymentRun.php:302 msgid "The SQL used to retrieve the bank accounts was" msgstr "SQL slouží k získání bankovní účty byly" @@ -1666,12 +1666,12 @@ msgstr "Musíte nejprve" #: BankReconciliation.php:108 CustomerReceipt.php:731 -#: DailyBankTransactions.php:34 Payments.php:742 SuppPaymentRun.php:310 +#: DailyBankTransactions.php:35 Payments.php:739 SuppPaymentRun.php:310 msgid "define the bank accounts" msgstr "definovat bankovních účtů" #: BankReconciliation.php:108 CustomerReceipt.php:731 -#: DailyBankTransactions.php:34 Payments.php:742 SuppPaymentRun.php:310 +#: DailyBankTransactions.php:35 Payments.php:739 SuppPaymentRun.php:310 msgid "and general ledger accounts to be affected" msgstr "a účtů hlavní knihy mohly být postiženy" @@ -1703,15 +1703,15 @@ #: BankReconciliation.php:200 BankReconciliation.php:272 #: CustomerAllocations.php:330 CustomerAllocations.php:356 -#: CustomerInquiry.php:191 CustomerTransInquiry.php:89 CustWhereAlloc.php:89 -#: EmailCustTrans.php:15 GLAccountInquiry.php:153 PrintCustTrans.php:480 -#: PrintCustTrans.php:681 PrintCustTrans.php:901 PrintCustTrans.php:948 -#: PrintCustTransPortrait.php:502 PrintCustTransPortrait.php:703 -#: PrintCustTransPortrait.php:922 PrintCustTransPortrait.php:967 +#: CustomerInquiry.php:191 CustomerTransInquiry.php:89 CustWhereAlloc.php:93 +#: EmailCustTrans.php:15 GLAccountInquiry.php:151 PrintCustTrans.php:486 +#: PrintCustTrans.php:696 PrintCustTrans.php:918 PrintCustTrans.php:967 +#: PrintCustTransPortrait.php:506 PrintCustTransPortrait.php:716 +#: PrintCustTransPortrait.php:936 PrintCustTransPortrait.php:983 #: StockMovements.php:91 SupplierAllocations.php:453 #: SupplierAllocations.php:558 SupplierAllocations.php:629 #: SupplierTransInquiry.php:87 Z_CheckAllocs.php:58 -#: Z_CheckGLTransBalance.php:12 includes/PDFQuotationPageHeader.inc:87 +#: Z_CheckGLTransBalance.php:12 includes/PDFQuotationPageHeader.inc:88 #: includes/PDFQuotationPortraitPageHeader.inc:86 #: includes/PDFStatementPageHeader.inc:168 #: includes/PDFStatementPageHeader.inc:179 includes/PDFTransPageHeader.inc:44 @@ -1721,8 +1721,8 @@ #: BankReconciliation.php:201 BankReconciliation.php:273 #: ContractCosting.php:168 CustomerInquiry.php:194 CustomerTransInquiry.php:93 -#: CustWhereAlloc.php:90 DailyBankTransactions.php:105 GLAccountReport.php:368 -#: PaymentAllocations.php:75 PaymentAllocations.php:76 +#: CustWhereAlloc.php:94 DailyBankTransactions.php:106 GLAccountReport.php:348 +#: PaymentAllocations.php:60 PaymentAllocations.php:61 #: PDFRemittanceAdvice.php:309 ShiptsList.php:37 StockCounts.php:99 #: StockCounts.php:135 StockLocMovements.php:86 StockMovements.php:96 #: Z_CheckAllocs.php:59 includes/PDFBankingSummaryPageHeader.inc:40 @@ -1776,8 +1776,8 @@ "zůstatek na účtu. Je důležité, že směnný kurz výše odráží současnou hodnotu " "měny bankovního účtu" -#: BankReconciliation.php:331 CounterSales.php:781 Customers.php:1000 -#: SelectOrderItems.php:1401 Stocks.php:1041 WorkOrderCosting.php:518 +#: BankReconciliation.php:331 CounterSales.php:793 Customers.php:1000 +#: SelectOrderItems.php:1441 Stocks.php:1051 WorkOrderCosting.php:518 #: WorkOrderEntry.php:548 msgid "Are You Sure?" msgstr "Opravdu provést?" @@ -1844,26 +1844,26 @@ #: BOMIndentedReverse.php:288 BOMInquiry.php:178 BOMs.php:522 BOMs.php:685 #: ContractBOM.php:237 ContractBOM.php:345 ContractCosting.php:77 #: ContractCosting.php:83 ContractCosting.php:148 ContractOtherReqts.php:92 -#: Contracts.php:938 Contracts.php:973 CounterSales.php:701 -#: CounterSales.php:1994 CounterSales.php:2174 CounterSales.php:2302 -#: Credit_Invoice.php:273 DeliveryDetails.php:822 DeliveryDetails.php:887 -#: GoodsReceived.php:88 GoodsReceived.php:92 GoodsReceived.php:95 -#: InventoryPlanningPrefSupplier.php:83 InventoryQuantities.php:223 +#: Contracts.php:938 Contracts.php:973 CounterSales.php:713 +#: CounterSales.php:2006 CounterSales.php:2183 CounterSales.php:2307 +#: Credit_Invoice.php:273 DeliveryDetails.php:821 DeliveryDetails.php:886 +#: GoodsReceived.php:92 GoodsReceived.php:96 GoodsReceived.php:99 +#: InventoryPlanningPrefSupplier.php:78 InventoryQuantities.php:240 #: MRPDemands.php:293 MRPDemands.php:383 MRPPlannedPurchaseOrders.php:326 -#: MRPPlannedWorkOrders.php:258 MRPPlannedWorkOrders.php:379 MRPReport.php:413 +#: MRPPlannedWorkOrders.php:259 MRPPlannedWorkOrders.php:380 MRPReport.php:413 #: MRPReport.php:419 MRPReschedules.php:179 OffersReceived.php:95 -#: OffersReceived.php:197 OffersReceived.php:244 OrderDetails.php:155 -#: PDFOrdersInvoiced.php:384 POReport.php:743 POReport.php:1428 -#: PrintCustTrans.php:831 PrintCustTrans.php:919 PrintCustTrans.php:966 -#: PrintCustTransPortrait.php:857 PrintCustTransPortrait.php:940 -#: PrintCustTransPortrait.php:984 RecurringSalesOrders.php:321 +#: OffersReceived.php:197 OffersReceived.php:244 OrderDetails.php:154 +#: PDFOrdersInvoiced.php:390 POReport.php:743 POReport.php:1428 +#: PrintCustTrans.php:848 PrintCustTrans.php:937 PrintCustTrans.php:986 +#: PrintCustTransPortrait.php:870 PrintCustTransPortrait.php:955 +#: PrintCustTransPortrait.php:1005 RecurringSalesOrders.php:321 #: ReorderLevel.php:256 ReverseGRN.php:379 ReverseGRN.php:380 #: SalesAnalReptCols.php:18 SalesAnalReptCols.php:20 SalesGraph.php:177 #: SalesGraph.php:258 SalesInquiry.php:965 SalesTopItemsInquiry.php:222 -#: SelectCreditItems.php:651 SelectCreditItems.php:1004 -#: SelectOrderItems.php:1325 SelectOrderItems.php:1474 -#: SelectOrderItems.php:1654 SelectOrderItems.php:1778 ShipmentCosting.php:144 -#: ShipmentCosting.php:145 Shipments.php:385 Shipments.php:387 +#: SelectCreditItems.php:663 SelectCreditItems.php:1022 +#: SelectOrderItems.php:1365 SelectOrderItems.php:1523 +#: SelectOrderItems.php:1705 SelectOrderItems.php:1830 ShipmentCosting.php:145 +#: ShipmentCosting.php:146 Shipments.php:385 Shipments.php:387 #: Shipments.php:388 Shipments.php:463 Shipments.php:465 SpecialOrder.php:542 #: StockCounts.php:98 StockLocMovements.php:85 StockLocTransfer.php:185 #: StockMovements.php:95 StockStatus.php:312 StockUsageGraph.php:12 @@ -1879,14 +1879,14 @@ #: includes/PDFOrderPageHeader_generic.inc:93 #: includes/PDFPeriodStockTransListingPageHeader.inc:50 #: includes/PDFPickingListHeader.inc:74 -#: includes/PDFQuotationPageHeader.inc:102 -#: includes/PDFQuotationPortraitPageHeader.inc:101 +#: includes/PDFQuotationPageHeader.inc:103 +#: includes/PDFQuotationPortraitPageHeader.inc:103 #: includes/PDFSalesOrder_generic.inc:95 #: includes/PDFStockCheckPageHeader.inc:44 #: includes/PDFStockNegativesHeader.inc:33 #: includes/PDFStockTransferHeader.inc:39 includes/PDFTransPageHeader.inc:209 -#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2235 -#: api/api_xml-rpc.php:2281 api/api_xml-rpc.php:2477 +#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2260 +#: api/api_xml-rpc.php:2306 api/api_xml-rpc.php:2502 msgid "Quantity" msgstr "Množství" @@ -1903,20 +1903,20 @@ msgstr "Zobrazit pouze Nedostatky" #: BOMExtendedQty.php:273 BOMIndented.php:264 BOMIndentedReverse.php:244 -#: MRPPlannedPurchaseOrders.php:276 MRPPlannedWorkOrders.php:327 -#: MRPReschedules.php:130 MRPShortages.php:286 +#: MRPPlannedPurchaseOrders.php:276 MRPPlannedWorkOrders.php:328 +#: MRPReschedules.php:130 MRPShortages.php:292 msgid "Print Option" msgstr "Možnost tisku" #: BOMExtendedQty.php:275 BOMIndented.php:266 BOMIndentedReverse.php:246 -#: MRPPlannedPurchaseOrders.php:277 MRPPlannedWorkOrders.php:328 -#: MRPReschedules.php:131 MRPShortages.php:287 +#: MRPPlannedPurchaseOrders.php:277 MRPPlannedWorkOrders.php:329 +#: MRPReschedules.php:131 MRPShortages.php:294 msgid "Print With Alternating Highlighted Lines" msgstr "Tisk se střídavými Zvýrazněné Lines" #: BOMExtendedQty.php:276 BOMIndented.php:267 BOMIndentedReverse.php:247 -#: MRPPlannedPurchaseOrders.php:278 MRPPlannedWorkOrders.php:329 -#: MRPReschedules.php:132 MRPShortages.php:288 +#: MRPPlannedPurchaseOrders.php:278 MRPPlannedWorkOrders.php:330 +#: MRPReschedules.php:132 MRPShortages.php:295 msgid "Plain Print" msgstr "Prostý Tisk" @@ -1925,10 +1925,10 @@ msgstr "Rozšířená Množství kusovníku výpis " #: BOMExtendedQty.php:307 BOMIndented.php:296 BOMIndentedReverse.php:275 -#: GLAccountReport.php:353 InventoryPlanningPrefSupplier.php:63 -#: InventoryQuantities.php:209 MRPPlannedPurchaseOrders.php:305 -#: MRPPlannedWorkOrders.php:358 MRPReport.php:805 MRPReschedules.php:164 -#: MRPShortages.php:318 PDFOrderStatus.php:302 PDFPriceList.php:331 +#: GLAccountReport.php:3... [truncated message content] |
From: <dai...@us...> - 2011-07-26 09:21:59
|
Revision: 4638 http://web-erp.svn.sourceforge.net/web-erp/?rev=4638&view=rev Author: daintree Date: 2011-07-26 09:21:52 +0000 (Tue, 26 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/SalesCategories.php trunk/doc/Change.log Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2011-07-24 03:17:05 UTC (rev 4637) +++ trunk/CustomerAllocations.php 2011-07-26 09:21:52 UTC (rev 4638) @@ -4,9 +4,9 @@ /* Call this page with: - 1. A TransID to show the make up and to modify existing allocations. - 2. A DebtorNo to show all outstanding receipts or credits yet to be allocated. - 3. No parameters to show all outstanding credits and receipts yet to be allocated. + 1. A TransID to show the make up and to modify existing allocations. + 2. A DebtorNo to show all outstanding receipts or credits yet to be allocated. + 3. No parameters to show all outstanding credits and receipts yet to be allocated. */ include('includes/DefineCustAllocsClass.php'); @@ -216,22 +216,23 @@ $_POST['AllocTrans'] = $_GET['AllocTrans']; // Set AllocTrans when page first called $SQL= "SELECT systypes.typename, - debtortrans.type, - debtortrans.transno, - debtortrans.trandate, - debtortrans.debtorno, - debtorsmaster.name, - rate, - (debtortrans.ovamount+debtortrans.ovgst+debtortrans.ovfreight+debtortrans.ovdiscount) as total, - debtortrans.diffonexch, - debtortrans.alloc - FROM debtortrans, - systypes, - debtorsmaster - WHERE - debtortrans.type = systypes.typeid AND - debtortrans.debtorno = debtorsmaster.debtorno AND - debtortrans.id='" . $_POST['AllocTrans'] . "'"; + debtortrans.type, + debtortrans.transno, + debtortrans.trandate, + debtortrans.debtorno, + debtorsmaster.name, + debtortrans.rate, + (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount) as total, + debtortrans.diffonexch, + debtortrans.alloc, + currencies.decimalplaces + FROM debtortrans INNER JOIN systypes + ON debtortrans.type = systypes.typeid + INNER JOIN debtorsmaster + ON debtortrans.debtorno = debtorsmaster.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.id='" . $_POST['AllocTrans'] . "'"; $Result = DB_query($SQL,$db); $myrow = DB_fetch_array($Result); DB_free_result($Result); @@ -246,93 +247,92 @@ $_SESSION['Alloc']->TransAmt = $myrow['total']; $_SESSION['Alloc']->PrevDiffOnExch = $myrow['diffonexch']; $_SESSION['Alloc']->TransDate = ConvertSQLDate($myrow['trandate']); + $_SESSION['Alloc']->CurrDecimalPlaces = $myrow['decimalplaces']; // First get transactions that have outstanding balances $SQL = "SELECT debtortrans.id, - typename, - transno, - trandate, - rate, - ovamount+ovgst+ovfreight+ovdiscount as total, - diffonexch, - alloc - FROM debtortrans, systypes - WHERE debtortrans.type = systypes.typeid - AND debtortrans.settled=0 + typename, + transno, + trandate, + rate, + ovamount+ovgst+ovfreight+ovdiscount as total, + diffonexch, + alloc + FROM debtortrans INNER JOIN systypes + ON debtortrans.type = systypes.typeid + WHERE debtortrans.settled=0 AND debtorno='" . $_SESSION['Alloc']->DebtorNo . "' ORDER BY debtortrans.trandate"; $Result = DB_query($SQL,$db); while ($myrow=DB_fetch_array($Result)) { - $_SESSION['Alloc']->add_to_AllocsAllocn ( - $myrow['id'], - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - 0, - $myrow['total'], - $myrow['rate'], - $myrow['diffonexch'], - $myrow['diffonexch'], - $myrow['alloc'], - 'NA' - ); + $_SESSION['Alloc']->add_to_AllocsAllocn ($myrow['id'], + $myrow['typename'], + $myrow['transno'], + ConvertSQLDate($myrow['trandate']), + 0, + $myrow['total'], + $myrow['rate'], + $myrow['diffonexch'], + $myrow['diffonexch'], + $myrow['alloc'], + 'NA'); } DB_free_result($Result); // Get trans previously allocated to by this trans - this will overwrite incomplete allocations above $SQL= "SELECT debtortrans.id, - typename, - transno, - trandate, - rate, - ovamount+ovgst+ovfreight+ovdiscount AS total, - diffonexch, - debtortrans.alloc-custallocns.amt AS prevallocs, - amt, - custallocns.id AS allocid - FROM debtortrans, - systypes, - custallocns - WHERE debtortrans.type = systypes.typeid AND - debtortrans.id=custallocns.transid_allocto AND - custallocns.transid_allocfrom='" . $_POST['AllocTrans'] . "' AND - debtorno='" . $_SESSION['Alloc']->DebtorNo . "' + typename, + transno, + trandate, + rate, + ovamount+ovgst+ovfreight+ovdiscount AS total, + diffonexch, + debtortrans.alloc-custallocns.amt AS prevallocs, + amt, + custallocns.id AS allocid + FROM debtortrans INNER JOIN systypes + ON debtortrans.type = systypes.typeid + INNER JOIN custallocns + ON debtortrans.id=custallocns.transid_allocto + WHERE custallocns.transid_allocfrom='" . $_POST['AllocTrans'] . "' + AND debtorno='" . $_SESSION['Alloc']->DebtorNo . "' ORDER BY debtortrans.trandate"; + $Result=DB_query($SQL,$db); while ($myrow=DB_fetch_array($Result)) { $DiffOnExchThisOne = ($myrow['amt']/$myrow['rate']) - ($myrow['amt']/$_SESSION['Alloc']->TransExRate); - $_SESSION['Alloc']->add_to_AllocsAllocn ( - $myrow['id'], - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['amt'], - $myrow['total'], - $myrow['rate'], - $DiffOnExchThisOne, - ($myrow['diffonexch'] - $DiffOnExchThisOne), - $myrow['prevallocs'], - $myrow['allocid'] - ); + $_SESSION['Alloc']->add_to_AllocsAllocn ($myrow['id'], + $myrow['typename'], + $myrow['transno'], + ConvertSQLDate($myrow['trandate']), + $myrow['amt'], + $myrow['total'], + $myrow['rate'], + $DiffOnExchThisOne, + ($myrow['diffonexch'] - $DiffOnExchThisOne), + $myrow['prevallocs'], + $myrow['allocid']); } DB_free_result($Result); } - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Allocate Receipt') . '" alt="" />' . ' ' . _('Allocate Receipts') . '</p>'; + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Allocate Receipt') . '" alt="" />' . ' ' . _('Allocate Receipts') . ' + </p>'; $TableHeader = '<tr> - <th>' . _('Trans Type') . '</th> - <th>' . _('Customer') . '</th> - <th>' . _('Cust No') . '</th> - <th>' . _('Number') . '</th> - <th>' . _('Date') . '</th> - <th>' . _('Total') . '</th> - <th>' . _('To Alloc') . '</th> - <th>' . _('Action') . '</th> - </tr>'; + <th>' . _('Trans Type') . '</th> + <th>' . _('Customer') . '</th> + <th>' . _('Cust No') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Total') . '</th> + <th>' . _('To Alloc') . '</th> + <th>' . _('Action') . '</th> + </tr>'; if (isset($_POST['AllocTrans'])) { // Page called with trans number @@ -342,11 +342,11 @@ // Show trans already allocated and potential new allocations - echo '<p><table class=selection>'; - echo '<tr><th colspan=7><div class="centre"><font color=blue><b>' . $_SESSION['Alloc']->DebtorNo . ' - ' . $_SESSION['Alloc']->CustomerName . '</b></div>'; + echo '<p><table class="selection">'; + echo '<tr><th colspan="7"><div class="centre"><font color="blue"><b>' . $_SESSION['Alloc']->DebtorNo . ' - ' . $_SESSION['Alloc']->CustomerName . '</b></div>'; if ($_SESSION['Alloc']->TransExRate != 1) { - echo '<br />'._('Amount in customer currency').' <b>' . + echo '<br />' . _('Amount in customer currency') . ' <b>' . number_format(-$_SESSION['Alloc']->TransAmt,2) . '</b><i> ('._('converted into local currency at an exchange rate of'). ' ' . $_SESSION['Alloc']->TransExRate . ')</i>'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-24 03:17:05 UTC (rev 4637) +++ trunk/CustomerBranches.php 2011-07-26 09:21:52 UTC (rev 4638) @@ -580,7 +580,7 @@ } - echo '<input type=hidden name="DebtorNo" value="'. $DebtorNo . '" />'; + echo '<input type="hidden" name="DebtorNo" value="'. $DebtorNo . '" />'; echo '<tr> Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-07-24 03:17:05 UTC (rev 4637) +++ trunk/SalesCategories.php 2011-07-26 09:21:52 UTC (rev 4638) @@ -21,7 +21,7 @@ } else if (isset($_POST['ParentCategory'])){ $ParentCategory = mb_strtoupper($_POST['ParentCategory']); } -if( isset($ParentCategory) AND $ParentCategory == 0 ) { +if(isset($ParentCategory) AND $ParentCategory == 0 ) { unset($ParentCategory); } @@ -112,7 +112,7 @@ unset($_POST['SalesCatName']); unset($EditName); -} elseif (isset($_GET['delete']) && $EditName == 1) { +} elseif (isset($_GET['delete']) AND $EditName == 1) { //the link to delete a selected record was clicked instead of the submit button // PREVENT DELETES IF DEPENDENT RECORDS IN 'StockMaster' @@ -121,16 +121,14 @@ $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { - prnMsg(_('Cannot delete this sales category because stock items have been added to this category') . - '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('items under to this category'),'warn'); + prnMsg(_('Cannot delete this sales category because stock items have been added to this category') . '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('items under to this category'),'warn'); } else { $sql = "SELECT COUNT(*) FROM salescat WHERE parentcatid='".$SelectedCategory."'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { - prnMsg(_('Cannot delete this sales category because sub categories have been added to this category') . - '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('sub categories'),'warn'); + prnMsg(_('Cannot delete this sales category because sub categories have been added to this category') . '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('sub categories'),'warn'); } else { $sql="DELETE FROM salescat WHERE salescatid='".$SelectedCategory."'"; $result = DB_query($sql,$db); @@ -142,13 +140,10 @@ unset($_GET['delete']); unset($EditName); } elseif( isset($_POST['submit']) && isset($_POST['AddStockID']) ) { - $sql = "INSERT INTO salescatprod ( - stockid, - salescatid - ) VALUES ( - '". $_POST['AddStockID']."', - '".(isset($ParentCategory)?($ParentCategory):('NULL'))."' - )"; + $sql = "INSERT INTO salescatprod (stockid, + salescatid + ) VALUES ('". $_POST['AddStockID']."', + '".(isset($ParentCategory)?($ParentCategory):('NULL'))."')"; $result = DB_query($sql,$db); prnMsg(_('Stock item') . ' ' . $_POST['AddStockID'] . ' ' . _('has been added') . ' !','success'); @@ -166,17 +161,20 @@ // ---------------------------------------------------------------------------------------- // Calculate Path for navigation -$CategoryPath = '<a href="'.$_SERVER['PHP_SELF'] . '?ParentCategory=NULL">' . _('Main') . '</a>' . " \\ "; +$CategoryPath = '<a href="'.$_SERVER['PHP_SELF'] . '?ParentCategory=0">' . _('Main') . '</a>' . " \\ "; $TempPath = ''; +if ($ParentCategory == null){ + $ParentCategory =0; +} if (isset($ParentCategory)) { $TmpParentID = $ParentCategory; } $LastParentName = ''; -for($Buzy = (isset($TmpParentID) && ($TmpParentID <> '')); +for($Buzy = (isset($TmpParentID) AND ($TmpParentID != 0)); $Buzy == true; - $Buzy = (isset($TmpParentID) && ($TmpParentID <> '')) ) { + $Buzy = (isset($TmpParentID) AND ($TmpParentID != 0)) ) { $sql = "SELECT parentcatid, salescatname FROM salescat WHERE salescatid='".$TmpParentID."'"; $result = DB_query($sql,$db); if( $result ) { @@ -209,10 +207,10 @@ or deletion of the records*/ $sql = "SELECT salescatid, - salescatname - FROM salescat - WHERE parentcatid". (isset($ParentCategory)?('='.$ParentCategory):' is NULL') . " - ORDER BY salescatname"; + salescatname + FROM salescat + WHERE parentcatid". (isset($ParentCategory)?('='.$ParentCategory):' =0') . " + ORDER BY salescatname"; $result = DB_query($sql,$db); @@ -220,7 +218,7 @@ if (DB_num_rows($result) == 0) { prnMsg(_('There are no categories defined at this level.')); } else { - echo '<table class=selection>'; + echo '<table class="selection">'; echo '<tr><th>' . _('Sub Category') . '</th></tr>'; $k=0; //row colour counter @@ -257,16 +255,16 @@ <td><a href="%sSelectedCategory=%s&delete=yes&EditName=1&ParentCategory=%s">' . _('Delete') . '</td> <td>%s</td> </tr>', - $myrow['salescatname'], - $_SERVER['PHP_SELF'] . '?', - $myrow['salescatid'], - $_SERVER['PHP_SELF'] . '?', - $myrow['salescatid'], - $ParentCategory, - $_SERVER['PHP_SELF'] . '?', - $myrow['salescatid'], - $ParentCategory, - $CatImgLink); + $myrow['salescatname'], + $_SERVER['PHP_SELF'] . '?', + $myrow['salescatid'], + $_SERVER['PHP_SELF'] . '?', + $myrow['salescatid'], + $ParentCategory, + $_SERVER['PHP_SELF'] . '?', + $myrow['salescatid'], + $ParentCategory, + $CatImgLink); } //END WHILE LIST LOOP echo '</table>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-24 03:17:05 UTC (rev 4637) +++ trunk/doc/Change.log 2011-07-26 09:21:52 UTC (rev 4638) @@ -1,5 +1,8 @@ webERP Change Log + +26/7/11 SalesCategories.php fixed display of active categories - this script is not used by webERP - only by Mo Kelly's joomla cart application + 24/7/11 Version 4.04.5 24/7/11 Phil: CustomerBranches.php check for existance of Shippers and TaxGroups This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-26 09:21:59
|
Revision: 4638 http://web-erp.svn.sourceforge.net/web-erp/?rev=4638&view=rev Author: daintree Date: 2011-07-26 09:21:52 +0000 (Tue, 26 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/CustomerAllocations.php trunk/CustomerBranches.php trunk/SalesCategories.php trunk/doc/Change.log Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2011-07-24 03:17:05 UTC (rev 4637) +++ trunk/CustomerAllocations.php 2011-07-26 09:21:52 UTC (rev 4638) @@ -4,9 +4,9 @@ /* Call this page with: - 1. A TransID to show the make up and to modify existing allocations. - 2. A DebtorNo to show all outstanding receipts or credits yet to be allocated. - 3. No parameters to show all outstanding credits and receipts yet to be allocated. + 1. A TransID to show the make up and to modify existing allocations. + 2. A DebtorNo to show all outstanding receipts or credits yet to be allocated. + 3. No parameters to show all outstanding credits and receipts yet to be allocated. */ include('includes/DefineCustAllocsClass.php'); @@ -216,22 +216,23 @@ $_POST['AllocTrans'] = $_GET['AllocTrans']; // Set AllocTrans when page first called $SQL= "SELECT systypes.typename, - debtortrans.type, - debtortrans.transno, - debtortrans.trandate, - debtortrans.debtorno, - debtorsmaster.name, - rate, - (debtortrans.ovamount+debtortrans.ovgst+debtortrans.ovfreight+debtortrans.ovdiscount) as total, - debtortrans.diffonexch, - debtortrans.alloc - FROM debtortrans, - systypes, - debtorsmaster - WHERE - debtortrans.type = systypes.typeid AND - debtortrans.debtorno = debtorsmaster.debtorno AND - debtortrans.id='" . $_POST['AllocTrans'] . "'"; + debtortrans.type, + debtortrans.transno, + debtortrans.trandate, + debtortrans.debtorno, + debtorsmaster.name, + debtortrans.rate, + (debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount) as total, + debtortrans.diffonexch, + debtortrans.alloc, + currencies.decimalplaces + FROM debtortrans INNER JOIN systypes + ON debtortrans.type = systypes.typeid + INNER JOIN debtorsmaster + ON debtortrans.debtorno = debtorsmaster.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE debtortrans.id='" . $_POST['AllocTrans'] . "'"; $Result = DB_query($SQL,$db); $myrow = DB_fetch_array($Result); DB_free_result($Result); @@ -246,93 +247,92 @@ $_SESSION['Alloc']->TransAmt = $myrow['total']; $_SESSION['Alloc']->PrevDiffOnExch = $myrow['diffonexch']; $_SESSION['Alloc']->TransDate = ConvertSQLDate($myrow['trandate']); + $_SESSION['Alloc']->CurrDecimalPlaces = $myrow['decimalplaces']; // First get transactions that have outstanding balances $SQL = "SELECT debtortrans.id, - typename, - transno, - trandate, - rate, - ovamount+ovgst+ovfreight+ovdiscount as total, - diffonexch, - alloc - FROM debtortrans, systypes - WHERE debtortrans.type = systypes.typeid - AND debtortrans.settled=0 + typename, + transno, + trandate, + rate, + ovamount+ovgst+ovfreight+ovdiscount as total, + diffonexch, + alloc + FROM debtortrans INNER JOIN systypes + ON debtortrans.type = systypes.typeid + WHERE debtortrans.settled=0 AND debtorno='" . $_SESSION['Alloc']->DebtorNo . "' ORDER BY debtortrans.trandate"; $Result = DB_query($SQL,$db); while ($myrow=DB_fetch_array($Result)) { - $_SESSION['Alloc']->add_to_AllocsAllocn ( - $myrow['id'], - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - 0, - $myrow['total'], - $myrow['rate'], - $myrow['diffonexch'], - $myrow['diffonexch'], - $myrow['alloc'], - 'NA' - ); + $_SESSION['Alloc']->add_to_AllocsAllocn ($myrow['id'], + $myrow['typename'], + $myrow['transno'], + ConvertSQLDate($myrow['trandate']), + 0, + $myrow['total'], + $myrow['rate'], + $myrow['diffonexch'], + $myrow['diffonexch'], + $myrow['alloc'], + 'NA'); } DB_free_result($Result); // Get trans previously allocated to by this trans - this will overwrite incomplete allocations above $SQL= "SELECT debtortrans.id, - typename, - transno, - trandate, - rate, - ovamount+ovgst+ovfreight+ovdiscount AS total, - diffonexch, - debtortrans.alloc-custallocns.amt AS prevallocs, - amt, - custallocns.id AS allocid - FROM debtortrans, - systypes, - custallocns - WHERE debtortrans.type = systypes.typeid AND - debtortrans.id=custallocns.transid_allocto AND - custallocns.transid_allocfrom='" . $_POST['AllocTrans'] . "' AND - debtorno='" . $_SESSION['Alloc']->DebtorNo . "' + typename, + transno, + trandate, + rate, + ovamount+ovgst+ovfreight+ovdiscount AS total, + diffonexch, + debtortrans.alloc-custallocns.amt AS prevallocs, + amt, + custallocns.id AS allocid + FROM debtortrans INNER JOIN systypes + ON debtortrans.type = systypes.typeid + INNER JOIN custallocns + ON debtortrans.id=custallocns.transid_allocto + WHERE custallocns.transid_allocfrom='" . $_POST['AllocTrans'] . "' + AND debtorno='" . $_SESSION['Alloc']->DebtorNo . "' ORDER BY debtortrans.trandate"; + $Result=DB_query($SQL,$db); while ($myrow=DB_fetch_array($Result)) { $DiffOnExchThisOne = ($myrow['amt']/$myrow['rate']) - ($myrow['amt']/$_SESSION['Alloc']->TransExRate); - $_SESSION['Alloc']->add_to_AllocsAllocn ( - $myrow['id'], - $myrow['typename'], - $myrow['transno'], - ConvertSQLDate($myrow['trandate']), - $myrow['amt'], - $myrow['total'], - $myrow['rate'], - $DiffOnExchThisOne, - ($myrow['diffonexch'] - $DiffOnExchThisOne), - $myrow['prevallocs'], - $myrow['allocid'] - ); + $_SESSION['Alloc']->add_to_AllocsAllocn ($myrow['id'], + $myrow['typename'], + $myrow['transno'], + ConvertSQLDate($myrow['trandate']), + $myrow['amt'], + $myrow['total'], + $myrow['rate'], + $DiffOnExchThisOne, + ($myrow['diffonexch'] - $DiffOnExchThisOne), + $myrow['prevallocs'], + $myrow['allocid']); } DB_free_result($Result); } - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Allocate Receipt') . '" alt="" />' . ' ' . _('Allocate Receipts') . '</p>'; + echo '<p class="page_title_text"> + <img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . _('Allocate Receipt') . '" alt="" />' . ' ' . _('Allocate Receipts') . ' + </p>'; $TableHeader = '<tr> - <th>' . _('Trans Type') . '</th> - <th>' . _('Customer') . '</th> - <th>' . _('Cust No') . '</th> - <th>' . _('Number') . '</th> - <th>' . _('Date') . '</th> - <th>' . _('Total') . '</th> - <th>' . _('To Alloc') . '</th> - <th>' . _('Action') . '</th> - </tr>'; + <th>' . _('Trans Type') . '</th> + <th>' . _('Customer') . '</th> + <th>' . _('Cust No') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Date') . '</th> + <th>' . _('Total') . '</th> + <th>' . _('To Alloc') . '</th> + <th>' . _('Action') . '</th> + </tr>'; if (isset($_POST['AllocTrans'])) { // Page called with trans number @@ -342,11 +342,11 @@ // Show trans already allocated and potential new allocations - echo '<p><table class=selection>'; - echo '<tr><th colspan=7><div class="centre"><font color=blue><b>' . $_SESSION['Alloc']->DebtorNo . ' - ' . $_SESSION['Alloc']->CustomerName . '</b></div>'; + echo '<p><table class="selection">'; + echo '<tr><th colspan="7"><div class="centre"><font color="blue"><b>' . $_SESSION['Alloc']->DebtorNo . ' - ' . $_SESSION['Alloc']->CustomerName . '</b></div>'; if ($_SESSION['Alloc']->TransExRate != 1) { - echo '<br />'._('Amount in customer currency').' <b>' . + echo '<br />' . _('Amount in customer currency') . ' <b>' . number_format(-$_SESSION['Alloc']->TransAmt,2) . '</b><i> ('._('converted into local currency at an exchange rate of'). ' ' . $_SESSION['Alloc']->TransExRate . ')</i>'; Modified: trunk/CustomerBranches.php =================================================================== --- trunk/CustomerBranches.php 2011-07-24 03:17:05 UTC (rev 4637) +++ trunk/CustomerBranches.php 2011-07-26 09:21:52 UTC (rev 4638) @@ -580,7 +580,7 @@ } - echo '<input type=hidden name="DebtorNo" value="'. $DebtorNo . '" />'; + echo '<input type="hidden" name="DebtorNo" value="'. $DebtorNo . '" />'; echo '<tr> Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-07-24 03:17:05 UTC (rev 4637) +++ trunk/SalesCategories.php 2011-07-26 09:21:52 UTC (rev 4638) @@ -21,7 +21,7 @@ } else if (isset($_POST['ParentCategory'])){ $ParentCategory = mb_strtoupper($_POST['ParentCategory']); } -if( isset($ParentCategory) AND $ParentCategory == 0 ) { +if(isset($ParentCategory) AND $ParentCategory == 0 ) { unset($ParentCategory); } @@ -112,7 +112,7 @@ unset($_POST['SalesCatName']); unset($EditName); -} elseif (isset($_GET['delete']) && $EditName == 1) { +} elseif (isset($_GET['delete']) AND $EditName == 1) { //the link to delete a selected record was clicked instead of the submit button // PREVENT DELETES IF DEPENDENT RECORDS IN 'StockMaster' @@ -121,16 +121,14 @@ $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { - prnMsg(_('Cannot delete this sales category because stock items have been added to this category') . - '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('items under to this category'),'warn'); + prnMsg(_('Cannot delete this sales category because stock items have been added to this category') . '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('items under to this category'),'warn'); } else { $sql = "SELECT COUNT(*) FROM salescat WHERE parentcatid='".$SelectedCategory."'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { - prnMsg(_('Cannot delete this sales category because sub categories have been added to this category') . - '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('sub categories'),'warn'); + prnMsg(_('Cannot delete this sales category because sub categories have been added to this category') . '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('sub categories'),'warn'); } else { $sql="DELETE FROM salescat WHERE salescatid='".$SelectedCategory."'"; $result = DB_query($sql,$db); @@ -142,13 +140,10 @@ unset($_GET['delete']); unset($EditName); } elseif( isset($_POST['submit']) && isset($_POST['AddStockID']) ) { - $sql = "INSERT INTO salescatprod ( - stockid, - salescatid - ) VALUES ( - '". $_POST['AddStockID']."', - '".(isset($ParentCategory)?($ParentCategory):('NULL'))."' - )"; + $sql = "INSERT INTO salescatprod (stockid, + salescatid + ) VALUES ('". $_POST['AddStockID']."', + '".(isset($ParentCategory)?($ParentCategory):('NULL'))."')"; $result = DB_query($sql,$db); prnMsg(_('Stock item') . ' ' . $_POST['AddStockID'] . ' ' . _('has been added') . ' !','success'); @@ -166,17 +161,20 @@ // ---------------------------------------------------------------------------------------- // Calculate Path for navigation -$CategoryPath = '<a href="'.$_SERVER['PHP_SELF'] . '?ParentCategory=NULL">' . _('Main') . '</a>' . " \\ "; +$CategoryPath = '<a href="'.$_SERVER['PHP_SELF'] . '?ParentCategory=0">' . _('Main') . '</a>' . " \\ "; $TempPath = ''; +if ($ParentCategory == null){ + $ParentCategory =0; +} if (isset($ParentCategory)) { $TmpParentID = $ParentCategory; } $LastParentName = ''; -for($Buzy = (isset($TmpParentID) && ($TmpParentID <> '')); +for($Buzy = (isset($TmpParentID) AND ($TmpParentID != 0)); $Buzy == true; - $Buzy = (isset($TmpParentID) && ($TmpParentID <> '')) ) { + $Buzy = (isset($TmpParentID) AND ($TmpParentID != 0)) ) { $sql = "SELECT parentcatid, salescatname FROM salescat WHERE salescatid='".$TmpParentID."'"; $result = DB_query($sql,$db); if( $result ) { @@ -209,10 +207,10 @@ or deletion of the records*/ $sql = "SELECT salescatid, - salescatname - FROM salescat - WHERE parentcatid". (isset($ParentCategory)?('='.$ParentCategory):' is NULL') . " - ORDER BY salescatname"; + salescatname + FROM salescat + WHERE parentcatid". (isset($ParentCategory)?('='.$ParentCategory):' =0') . " + ORDER BY salescatname"; $result = DB_query($sql,$db); @@ -220,7 +218,7 @@ if (DB_num_rows($result) == 0) { prnMsg(_('There are no categories defined at this level.')); } else { - echo '<table class=selection>'; + echo '<table class="selection">'; echo '<tr><th>' . _('Sub Category') . '</th></tr>'; $k=0; //row colour counter @@ -257,16 +255,16 @@ <td><a href="%sSelectedCategory=%s&delete=yes&EditName=1&ParentCategory=%s">' . _('Delete') . '</td> <td>%s</td> </tr>', - $myrow['salescatname'], - $_SERVER['PHP_SELF'] . '?', - $myrow['salescatid'], - $_SERVER['PHP_SELF'] . '?', - $myrow['salescatid'], - $ParentCategory, - $_SERVER['PHP_SELF'] . '?', - $myrow['salescatid'], - $ParentCategory, - $CatImgLink); + $myrow['salescatname'], + $_SERVER['PHP_SELF'] . '?', + $myrow['salescatid'], + $_SERVER['PHP_SELF'] . '?', + $myrow['salescatid'], + $ParentCategory, + $_SERVER['PHP_SELF'] . '?', + $myrow['salescatid'], + $ParentCategory, + $CatImgLink); } //END WHILE LIST LOOP echo '</table>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-24 03:17:05 UTC (rev 4637) +++ trunk/doc/Change.log 2011-07-26 09:21:52 UTC (rev 4638) @@ -1,5 +1,8 @@ webERP Change Log + +26/7/11 SalesCategories.php fixed display of active categories - this script is not used by webERP - only by Mo Kelly's joomla cart application + 24/7/11 Version 4.04.5 24/7/11 Phil: CustomerBranches.php check for existance of Shippers and TaxGroups This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-27 02:43:24
|
Revision: 4639 http://web-erp.svn.sourceforge.net/web-erp/?rev=4639&view=rev Author: daintree Date: 2011-07-27 02:43:17 +0000 (Wed, 27 Jul 2011) Log Message: ----------- quoting Modified Paths: -------------- trunk/PDFSuppTransListing.php trunk/StockReorderLevel.php trunk/WhereUsedInquiry.php trunk/Z_ReverseSuppPaymentRun.php trunk/includes/LanguageSetup.php Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/PDFSuppTransListing.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -1,130 +1,130 @@ -<?php - -/* $Id$*/ - -include('includes/SQL_CommonFunctions.inc'); -include ('includes/session.inc'); - -$InputError=0; -if (isset($_POST['Date']) AND !Is_Date($_POST['Date'])){ - $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; - $InputError=1; - unset($_POST['Date']); -} - -if (!isset($_POST['Date'])){ - - $title = _('Supplier Transaction Listing'); - include ('includes/header.inc'); - - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' - . _('Supplier Transaction Listing').'</p>'; - - if ($InputError==1){ - prnMsg($msg,'error'); - } - - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection> - <tr> - <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> - <td><input type="text" name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; - - echo '<tr><td>' . _('Transaction type') . '</td><td>'; - - echo "<select name='TransType'>"; - - echo '<option value=20>' . _('Invoices') . '</option>'; - echo '<option value=21>' . _('Credit Notes') . '</option>'; - echo '<option value=22>' . _('Payments') . '</option>'; - - echo '</select></td></tr>'; - - echo '</select></td></tr> - </table> - <br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; - - include('includes/footer.inc'); - exit; -} else { - - include('includes/ConnectDB.inc'); -} - -$sql= "SELECT type, - supplierno, - suppreference, - trandate, - ovamount, - ovgst, - transtext - FROM supptrans - WHERE type='" . $_POST['TransType'] . "' - AND date_format(inputdate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; - -$result=DB_query($sql,$db,'','',false,false); - -if (DB_error_no($db)!=0){ - $title = _('Payment Listing'); - include('includes/header.inc'); - prnMsg(_('An error occurred getting the payments'),'error'); - if ($Debug==1){ - prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); - } - include('includes/footer.inc'); - exit; -} elseif (DB_num_rows($result) == 0){ - $title = _('Payment Listing'); - include('includes/header.inc'); - echo '<br />'; - prnMsg (_('There were no transactions found in the database for the date') . ' ' . $_POST['Date'] .'. '._('Please try again selecting a different date'), 'info'); - include('includes/footer.inc'); - exit; -} - -include('includes/PDFStarter.php'); - -/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ - -$pdf->addInfo('Title',_('Supplier Transaction Listing')); -$pdf->addInfo('Subject',_('Supplier transaction listing from') . ' ' . $_POST['Date'] ); -$line_height=12; -$PageNumber = 1; -$TotalCheques = 0; - -include ('includes/PDFSuppTransListingPageHeader.inc'); - -while ($myrow=DB_fetch_array($result)){ - - $sql="SELECT suppname FROM suppliers WHERE supplierid='" . $myrow['supplierno']."'"; - $supplierresult=DB_query($sql, $db); - $supplierrow=DB_fetch_array($supplierresult); - - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$supplierrow['suppname'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['suppreference'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['ovamount'],2), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,number_format($myrow['ovgst'],2), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($myrow['ovamount']+$myrow['ovgst'],2), 'right'); - - $YPos -= ($line_height); - $TotalCheques = $TotalCheques - $myrow['ovamount']; - - if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; - include ('includes/PDFChequeListingPageHeader.inc'); - } /*end of new page header */ -} /* end of while there are customer receipts in the batch to print */ - - -$YPos-=$line_height; -$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format(-$TotalCheques,2), 'right'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions'), 'left'); - -$ReportFileName = $_SESSION['DatabaseName'] . '_SuppTransListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName); -$pdf->__destruct(); +<?php + +/* $Id$*/ + +include('includes/SQL_CommonFunctions.inc'); +include ('includes/session.inc'); + +$InputError=0; +if (isset($_POST['Date']) AND !Is_Date($_POST['Date'])){ + $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; + $InputError=1; + unset($_POST['Date']); +} + +if (!isset($_POST['Date'])){ + + $title = _('Supplier Transaction Listing'); + include ('includes/header.inc'); + + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' + . _('Supplier Transaction Listing').'</p>'; + + if ($InputError==1){ + prnMsg($msg,'error'); + } + + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class=selection> + <tr> + <td>' . _('Enter the date for which the transactions are to be listed') . ':</td> + <td><input type="text" name="Date" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + <tr>'; + + echo '<tr><td>' . _('Transaction type') . '</td><td>'; + + echo "<select name='TransType'>"; + + echo '<option value=20>' . _('Invoices') . '</option>'; + echo '<option value=21>' . _('Credit Notes') . '</option>'; + echo '<option value=22>' . _('Payments') . '</option>'; + + echo '</select></td></tr>'; + + echo '</select></td></tr> + </table> + <br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; + + include('includes/footer.inc'); + exit; +} else { + + include('includes/ConnectDB.inc'); +} + +$sql= "SELECT type, + supplierno, + suppreference, + trandate, + ovamount, + ovgst, + transtext + FROM supptrans + WHERE type='" . $_POST['TransType'] . "' + AND date_format(inputdate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; + +$result=DB_query($sql,$db,'','',false,false); + +if (DB_error_no($db)!=0){ + $title = _('Payment Listing'); + include('includes/header.inc'); + prnMsg(_('An error occurred getting the payments'),'error'); + if ($Debug==1){ + prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); + } + include('includes/footer.inc'); + exit; +} elseif (DB_num_rows($result) == 0){ + $title = _('Payment Listing'); + include('includes/header.inc'); + echo '<br />'; + prnMsg (_('There were no transactions found in the database for the date') . ' ' . $_POST['Date'] .'. '._('Please try again selecting a different date'), 'info'); + include('includes/footer.inc'); + exit; +} + +include('includes/PDFStarter.php'); + +/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ + +$pdf->addInfo('Title',_('Supplier Transaction Listing')); +$pdf->addInfo('Subject',_('Supplier transaction listing from') . ' ' . $_POST['Date'] ); +$line_height=12; +$PageNumber = 1; +$TotalCheques = 0; + +include ('includes/PDFSuppTransListingPageHeader.inc'); + +while ($myrow=DB_fetch_array($result)){ + + $sql="SELECT suppname FROM suppliers WHERE supplierid='" . $myrow['supplierno']."'"; + $supplierresult=DB_query($sql, $db); + $supplierrow=DB_fetch_array($supplierresult); + + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$supplierrow['suppname'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['suppreference'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['ovamount'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,number_format($myrow['ovgst'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($myrow['ovamount']+$myrow['ovgst'],2), 'right'); + + $YPos -= ($line_height); + $TotalCheques = $TotalCheques - $myrow['ovamount']; + + if ($YPos - (2 *$line_height) < $Bottom_Margin){ + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFChequeListingPageHeader.inc'); + } /*end of new page header */ +} /* end of while there are customer receipts in the batch to print */ + + +$YPos-=$line_height; +$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format(-$TotalCheques,2), 'right'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions'), 'left'); + +$ReportFileName = $_SESSION['DatabaseName'] . '_SuppTransListing_' . date('Y-m-d').'.pdf'; +$pdf->OutputD($ReportFileName); +$pdf->__destruct(); ?> \ No newline at end of file Modified: trunk/StockReorderLevel.php =================================================================== --- trunk/StockReorderLevel.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/StockReorderLevel.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -75,9 +75,9 @@ } - printf("<td>%s</td> - <td class=number>%s</td> - <td><input type="text" class='number' name=%s maxlength=10 size=10 VALUE=%s></td>", + printf('<td>%s</td> + <td class="number">%s</td> + <td><input type="text" class="number" name="%s" maxlength="10" size="10" value="%s" /></td>', $myrow['locationname'], number_format($myrow['quantity'],$myrow['decimalplaces']), $myrow['loccode'], @@ -91,7 +91,8 @@ } //end of while loop -echo '</table><br /><div class="centre"><input type="submit" name="UpdateData" value="' . _('Update') . '"><br /><br />'; +echo '</table> + <br /><div class="centre"><input type="submit" name="UpdateData" value="' . _('Update') . '" /><br /><br />'; echo '<a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a>'; echo '<br /><a href="' . $rootpath . '/StockUsage.php?StockID=' . $StockID . '">' . _('Show Stock Usage') . '</a>'; echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>'; Modified: trunk/WhereUsedInquiry.php =================================================================== --- trunk/WhereUsedInquiry.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/WhereUsedInquiry.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -35,9 +35,9 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($StockID)) { - echo _('Enter an Item Code') . ": <input type="text" name='StockID' size=21 maxlength=20 value='$StockID' >"; + echo _('Enter an Item Code') . ': <input type="text" name="StockID" size="21" maxlength="20" value="' . $StockID . '" />'; } else { - echo _('Enter an Item Code') . ": <input type="text" name='StockID' size=21 maxlength=20>"; + echo _('Enter an Item Code') . ': <input type="text" name="StockID" size="21" maxlength="20" />'; } echo "<input type=submit name='ShowWhereUsed' value='" . _('Show Where Used') . "'>"; @@ -62,12 +62,12 @@ echo '<table width=97% class=selection>'; - $tableheader = "<tr><th>" . _('Used By') . "</th> - <th>" . _('Work Centre') . "</th> - <th>" . _('Location') . "</th> - <th>" . _('Quantity Required') . "</th> - <th>" . _('Effective After') . "</th> - <th>" . _('Effective To') . '</th></tr>'; + $tableheader = '<tr><th>' . _('Used By') . '</th> + <th>' . _('Work Centre') . '</th> + <th>' . _('Location') . '</th> + <th>' . _('Quantity Required') . '</th> + <th>' . _('Effective After') . '</th> + <th>' . _('Effective To') . '</th></tr>'; echo $tableheader; $k=0; while ($myrow=DB_fetch_array($result)) { @@ -80,7 +80,7 @@ $k=1; } - echo "<td><a target='_blank' href='" . $rootpath . "/BOMInquiry.php?" . SID . "&StockID=" . $myrow['parent'] . "' alt='" . _('Show Bill Of Material') . "'>" . $myrow['parent']. ' - ' . $myrow['description']. '</a></td>'; + echo '<td><a target="_blank" href="' . $rootpath . '/BOMInquiry.php?StockID=' . $myrow['parent'] . '" alt="' . _('Show Bill Of Material') . '">' . $myrow['parent']. ' - ' . $myrow['description']. '</a></td>'; echo '<td>' . $myrow['workcentreadded']. '</td>'; echo '<td>' . $myrow['loccode']. '</td>'; echo '<td>' . $myrow['quantity']. '</td>'; Modified: trunk/Z_ReverseSuppPaymentRun.php =================================================================== --- trunk/Z_ReverseSuppPaymentRun.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/Z_ReverseSuppPaymentRun.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -85,7 +85,7 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<br />' . _('Enter the date of the payment run') . ": <input type="text" name='PaytDate' maxlength=11 size=11 value='" . $_POST['PaytDate'] . "'>"; +echo '<br />' . _('Enter the date of the payment run') . ': <input type="text" name="PaytDate" maxlength="11" size="11" value="' . $_POST['PaytDate'] . '">'; echo '<input type="submit" name="RevPayts" value="' . _('Reverse Supplier Payments on the Date Entered') . '">'; echo '</form>'; Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/includes/LanguageSetup.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -27,22 +27,22 @@ if (function_exists('gettext')){ - //$Locale = setlocale (LC_ALL, $_SESSION['Language']); + if (defined('LC_MESSAGES')) { + $Locale = setlocale (LC_MESSAGES, $_SESSION['Language']); // Linux + } else { + $Locale = setlocale (LC_ALL, $_SESSION['Language']); // windows + } - $Locale = setlocale (LC_MESSAGES, $_SESSION['Language']); - //Turkish seems to be a special case if ($_SESSION['Language']=='tr_TR.utf8') { $Locale = setlocale(LC_CTYPE, 'C'); } - //$Locale = setlocale (LC_CTYPE, $_SESSION['Language']); - //$Locale = setlocale (LC_MESSAGES, $_SESSION['Language']); + $Locale = setlocale (LC_NUMERIC, 'en_US'); //currently need all decimal points etc to be as expected on webserver // possibly even if locale fails the language will still switch by using Language instead of locale variable putenv('LANG=' . $_SESSION['Language']); putenv('LANGUAGE=' . $_SESSION['Language']); - //putenv('LANG=$Language_Country'); bindtextdomain ('messages', $PathPrefix . 'locale'); textdomain ('messages'); bind_textdomain_codeset('messages', 'UTF-8'); @@ -92,4 +92,4 @@ } */ } -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-27 02:43:24
|
Revision: 4639 http://web-erp.svn.sourceforge.net/web-erp/?rev=4639&view=rev Author: daintree Date: 2011-07-27 02:43:17 +0000 (Wed, 27 Jul 2011) Log Message: ----------- quoting Modified Paths: -------------- trunk/PDFSuppTransListing.php trunk/StockReorderLevel.php trunk/WhereUsedInquiry.php trunk/Z_ReverseSuppPaymentRun.php trunk/includes/LanguageSetup.php Modified: trunk/PDFSuppTransListing.php =================================================================== --- trunk/PDFSuppTransListing.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/PDFSuppTransListing.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -1,130 +1,130 @@ -<?php - -/* $Id$*/ - -include('includes/SQL_CommonFunctions.inc'); -include ('includes/session.inc'); - -$InputError=0; -if (isset($_POST['Date']) AND !Is_Date($_POST['Date'])){ - $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; - $InputError=1; - unset($_POST['Date']); -} - -if (!isset($_POST['Date'])){ - - $title = _('Supplier Transaction Listing'); - include ('includes/header.inc'); - - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' - . _('Supplier Transaction Listing').'</p>'; - - if ($InputError==1){ - prnMsg($msg,'error'); - } - - echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class=selection> - <tr> - <td>' . _('Enter the date for which the transactions are to be listed') . ":</td> - <td><input type="text" name='Date' maxlength=10 size=10 class=date alt='" . $_SESSION['DefaultDateFormat'] . "' VALUE='" . Date($_SESSION['DefaultDateFormat']) . "'></td> - </tr>"; - - echo '<tr><td>' . _('Transaction type') . '</td><td>'; - - echo "<select name='TransType'>"; - - echo '<option value=20>' . _('Invoices') . '</option>'; - echo '<option value=21>' . _('Credit Notes') . '</option>'; - echo '<option value=22>' . _('Payments') . '</option>'; - - echo '</select></td></tr>'; - - echo '</select></td></tr> - </table> - <br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; - - include('includes/footer.inc'); - exit; -} else { - - include('includes/ConnectDB.inc'); -} - -$sql= "SELECT type, - supplierno, - suppreference, - trandate, - ovamount, - ovgst, - transtext - FROM supptrans - WHERE type='" . $_POST['TransType'] . "' - AND date_format(inputdate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; - -$result=DB_query($sql,$db,'','',false,false); - -if (DB_error_no($db)!=0){ - $title = _('Payment Listing'); - include('includes/header.inc'); - prnMsg(_('An error occurred getting the payments'),'error'); - if ($Debug==1){ - prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); - } - include('includes/footer.inc'); - exit; -} elseif (DB_num_rows($result) == 0){ - $title = _('Payment Listing'); - include('includes/header.inc'); - echo '<br />'; - prnMsg (_('There were no transactions found in the database for the date') . ' ' . $_POST['Date'] .'. '._('Please try again selecting a different date'), 'info'); - include('includes/footer.inc'); - exit; -} - -include('includes/PDFStarter.php'); - -/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ - -$pdf->addInfo('Title',_('Supplier Transaction Listing')); -$pdf->addInfo('Subject',_('Supplier transaction listing from') . ' ' . $_POST['Date'] ); -$line_height=12; -$PageNumber = 1; -$TotalCheques = 0; - -include ('includes/PDFSuppTransListingPageHeader.inc'); - -while ($myrow=DB_fetch_array($result)){ - - $sql="SELECT suppname FROM suppliers WHERE supplierid='" . $myrow['supplierno']."'"; - $supplierresult=DB_query($sql, $db); - $supplierrow=DB_fetch_array($supplierresult); - - $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$supplierrow['suppname'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['suppreference'], 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['ovamount'],2), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,number_format($myrow['ovgst'],2), 'right'); - $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($myrow['ovamount']+$myrow['ovgst'],2), 'right'); - - $YPos -= ($line_height); - $TotalCheques = $TotalCheques - $myrow['ovamount']; - - if ($YPos - (2 *$line_height) < $Bottom_Margin){ - /*Then set up a new page */ - $PageNumber++; - include ('includes/PDFChequeListingPageHeader.inc'); - } /*end of new page header */ -} /* end of while there are customer receipts in the batch to print */ - - -$YPos-=$line_height; -$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format(-$TotalCheques,2), 'right'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions'), 'left'); - -$ReportFileName = $_SESSION['DatabaseName'] . '_SuppTransListing_' . date('Y-m-d').'.pdf'; -$pdf->OutputD($ReportFileName); -$pdf->__destruct(); +<?php + +/* $Id$*/ + +include('includes/SQL_CommonFunctions.inc'); +include ('includes/session.inc'); + +$InputError=0; +if (isset($_POST['Date']) AND !Is_Date($_POST['Date'])){ + $msg = _('The date must be specified in the format') . ' ' . $_SESSION['DefaultDateFormat']; + $InputError=1; + unset($_POST['Date']); +} + +if (!isset($_POST['Date'])){ + + $title = _('Supplier Transaction Listing'); + include ('includes/header.inc'); + + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/transactions.png" title="' . $title . '" alt="" />' . ' ' + . _('Supplier Transaction Listing').'</p>'; + + if ($InputError==1){ + prnMsg($msg,'error'); + } + + echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class=selection> + <tr> + <td>' . _('Enter the date for which the transactions are to be listed') . ':</td> + <td><input type="text" name="Date" maxlength="10" size="10" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" value="' . Date($_SESSION['DefaultDateFormat']) . '"></td> + <tr>'; + + echo '<tr><td>' . _('Transaction type') . '</td><td>'; + + echo "<select name='TransType'>"; + + echo '<option value=20>' . _('Invoices') . '</option>'; + echo '<option value=21>' . _('Credit Notes') . '</option>'; + echo '<option value=22>' . _('Payments') . '</option>'; + + echo '</select></td></tr>'; + + echo '</select></td></tr> + </table> + <br /><div class="centre"><input type="submit" name="Go" value="' . _('Create PDF') . '"></div>'; + + include('includes/footer.inc'); + exit; +} else { + + include('includes/ConnectDB.inc'); +} + +$sql= "SELECT type, + supplierno, + suppreference, + trandate, + ovamount, + ovgst, + transtext + FROM supptrans + WHERE type='" . $_POST['TransType'] . "' + AND date_format(inputdate, '%Y-%m-%d')='".FormatDateForSQL($_POST['Date'])."'"; + +$result=DB_query($sql,$db,'','',false,false); + +if (DB_error_no($db)!=0){ + $title = _('Payment Listing'); + include('includes/header.inc'); + prnMsg(_('An error occurred getting the payments'),'error'); + if ($Debug==1){ + prnMsg(_('The SQL used to get the receipt header information that failed was') . ':<br />' . $SQL,'error'); + } + include('includes/footer.inc'); + exit; +} elseif (DB_num_rows($result) == 0){ + $title = _('Payment Listing'); + include('includes/header.inc'); + echo '<br />'; + prnMsg (_('There were no transactions found in the database for the date') . ' ' . $_POST['Date'] .'. '._('Please try again selecting a different date'), 'info'); + include('includes/footer.inc'); + exit; +} + +include('includes/PDFStarter.php'); + +/*PDFStarter.php has all the variables for page size and width set up depending on the users default preferences for paper size */ + +$pdf->addInfo('Title',_('Supplier Transaction Listing')); +$pdf->addInfo('Subject',_('Supplier transaction listing from') . ' ' . $_POST['Date'] ); +$line_height=12; +$PageNumber = 1; +$TotalCheques = 0; + +include ('includes/PDFSuppTransListingPageHeader.inc'); + +while ($myrow=DB_fetch_array($result)){ + + $sql="SELECT suppname FROM suppliers WHERE supplierid='" . $myrow['supplierno']."'"; + $supplierresult=DB_query($sql, $db); + $supplierrow=DB_fetch_array($supplierresult); + + $LeftOvers = $pdf->addTextWrap($Left_Margin,$YPos,160,$FontSize,$supplierrow['suppname'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+162,$YPos,80,$FontSize,$myrow['suppreference'], 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+242,$YPos,70,$FontSize,ConvertSQLDate($myrow['trandate']), 'left'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+312,$YPos,70,$FontSize,number_format($myrow['ovamount'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+382,$YPos,70,$FontSize,number_format($myrow['ovgst'],2), 'right'); + $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format($myrow['ovamount']+$myrow['ovgst'],2), 'right'); + + $YPos -= ($line_height); + $TotalCheques = $TotalCheques - $myrow['ovamount']; + + if ($YPos - (2 *$line_height) < $Bottom_Margin){ + /*Then set up a new page */ + $PageNumber++; + include ('includes/PDFChequeListingPageHeader.inc'); + } /*end of new page header */ +} /* end of while there are customer receipts in the batch to print */ + + +$YPos-=$line_height; +$LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,number_format(-$TotalCheques,2), 'right'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions'), 'left'); + +$ReportFileName = $_SESSION['DatabaseName'] . '_SuppTransListing_' . date('Y-m-d').'.pdf'; +$pdf->OutputD($ReportFileName); +$pdf->__destruct(); ?> \ No newline at end of file Modified: trunk/StockReorderLevel.php =================================================================== --- trunk/StockReorderLevel.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/StockReorderLevel.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -75,9 +75,9 @@ } - printf("<td>%s</td> - <td class=number>%s</td> - <td><input type="text" class='number' name=%s maxlength=10 size=10 VALUE=%s></td>", + printf('<td>%s</td> + <td class="number">%s</td> + <td><input type="text" class="number" name="%s" maxlength="10" size="10" value="%s" /></td>', $myrow['locationname'], number_format($myrow['quantity'],$myrow['decimalplaces']), $myrow['loccode'], @@ -91,7 +91,8 @@ } //end of while loop -echo '</table><br /><div class="centre"><input type="submit" name="UpdateData" value="' . _('Update') . '"><br /><br />'; +echo '</table> + <br /><div class="centre"><input type="submit" name="UpdateData" value="' . _('Update') . '" /><br /><br />'; echo '<a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a>'; echo '<br /><a href="' . $rootpath . '/StockUsage.php?StockID=' . $StockID . '">' . _('Show Stock Usage') . '</a>'; echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>'; Modified: trunk/WhereUsedInquiry.php =================================================================== --- trunk/WhereUsedInquiry.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/WhereUsedInquiry.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -35,9 +35,9 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (isset($StockID)) { - echo _('Enter an Item Code') . ": <input type="text" name='StockID' size=21 maxlength=20 value='$StockID' >"; + echo _('Enter an Item Code') . ': <input type="text" name="StockID" size="21" maxlength="20" value="' . $StockID . '" />'; } else { - echo _('Enter an Item Code') . ": <input type="text" name='StockID' size=21 maxlength=20>"; + echo _('Enter an Item Code') . ': <input type="text" name="StockID" size="21" maxlength="20" />'; } echo "<input type=submit name='ShowWhereUsed' value='" . _('Show Where Used') . "'>"; @@ -62,12 +62,12 @@ echo '<table width=97% class=selection>'; - $tableheader = "<tr><th>" . _('Used By') . "</th> - <th>" . _('Work Centre') . "</th> - <th>" . _('Location') . "</th> - <th>" . _('Quantity Required') . "</th> - <th>" . _('Effective After') . "</th> - <th>" . _('Effective To') . '</th></tr>'; + $tableheader = '<tr><th>' . _('Used By') . '</th> + <th>' . _('Work Centre') . '</th> + <th>' . _('Location') . '</th> + <th>' . _('Quantity Required') . '</th> + <th>' . _('Effective After') . '</th> + <th>' . _('Effective To') . '</th></tr>'; echo $tableheader; $k=0; while ($myrow=DB_fetch_array($result)) { @@ -80,7 +80,7 @@ $k=1; } - echo "<td><a target='_blank' href='" . $rootpath . "/BOMInquiry.php?" . SID . "&StockID=" . $myrow['parent'] . "' alt='" . _('Show Bill Of Material') . "'>" . $myrow['parent']. ' - ' . $myrow['description']. '</a></td>'; + echo '<td><a target="_blank" href="' . $rootpath . '/BOMInquiry.php?StockID=' . $myrow['parent'] . '" alt="' . _('Show Bill Of Material') . '">' . $myrow['parent']. ' - ' . $myrow['description']. '</a></td>'; echo '<td>' . $myrow['workcentreadded']. '</td>'; echo '<td>' . $myrow['loccode']. '</td>'; echo '<td>' . $myrow['quantity']. '</td>'; Modified: trunk/Z_ReverseSuppPaymentRun.php =================================================================== --- trunk/Z_ReverseSuppPaymentRun.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/Z_ReverseSuppPaymentRun.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -85,7 +85,7 @@ echo '<form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo '<br />' . _('Enter the date of the payment run') . ": <input type="text" name='PaytDate' maxlength=11 size=11 value='" . $_POST['PaytDate'] . "'>"; +echo '<br />' . _('Enter the date of the payment run') . ': <input type="text" name="PaytDate" maxlength="11" size="11" value="' . $_POST['PaytDate'] . '">'; echo '<input type="submit" name="RevPayts" value="' . _('Reverse Supplier Payments on the Date Entered') . '">'; echo '</form>'; Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-07-26 09:21:52 UTC (rev 4638) +++ trunk/includes/LanguageSetup.php 2011-07-27 02:43:17 UTC (rev 4639) @@ -27,22 +27,22 @@ if (function_exists('gettext')){ - //$Locale = setlocale (LC_ALL, $_SESSION['Language']); + if (defined('LC_MESSAGES')) { + $Locale = setlocale (LC_MESSAGES, $_SESSION['Language']); // Linux + } else { + $Locale = setlocale (LC_ALL, $_SESSION['Language']); // windows + } - $Locale = setlocale (LC_MESSAGES, $_SESSION['Language']); - //Turkish seems to be a special case if ($_SESSION['Language']=='tr_TR.utf8') { $Locale = setlocale(LC_CTYPE, 'C'); } - //$Locale = setlocale (LC_CTYPE, $_SESSION['Language']); - //$Locale = setlocale (LC_MESSAGES, $_SESSION['Language']); + $Locale = setlocale (LC_NUMERIC, 'en_US'); //currently need all decimal points etc to be as expected on webserver // possibly even if locale fails the language will still switch by using Language instead of locale variable putenv('LANG=' . $_SESSION['Language']); putenv('LANGUAGE=' . $_SESSION['Language']); - //putenv('LANG=$Language_Country'); bindtextdomain ('messages', $PathPrefix . 'locale'); textdomain ('messages'); bind_textdomain_codeset('messages', 'UTF-8'); @@ -92,4 +92,4 @@ } */ } -?> +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-27 09:10:57
|
Revision: 4640 http://web-erp.svn.sourceforge.net/web-erp/?rev=4640&view=rev Author: daintree Date: 2011-07-27 09:10:47 +0000 (Wed, 27 Jul 2011) Log Message: ----------- pre 4.05 release Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/build/make_release.sh trunk/doc/Change.log trunk/includes/ConnectDB.inc trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/UpgradeDatabase.php 2011-07-27 09:10:47 UTC (rev 4640) @@ -119,9 +119,13 @@ case '4.04': $SQLScripts[] = './sql/mysql/upgrade4.04-4.04.1.sql'; case '4.04.1': + case '4.04.2': + case '4.04.3': $SQLScripts[] = './sql/mysql/upgrade4.04.1-4.04.4.sql'; case '4.04.4': $SQLScripts[] = './sql/mysql/upgrade4.04.4-4.04.5.sql'; + case '4.04.5': + case '4.05': break; } //end switch } Modified: trunk/build/make_release.sh =================================================================== --- trunk/build/make_release.sh 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/build/make_release.sh 2011-07-27 09:10:47 UTC (rev 4640) @@ -126,4 +126,4 @@ cd .. -zip -r $OUTPUT_DIR/webERP webERP -x \*.svn* \*/config.php +zip -r $OUTPUT_DIR/webERP webERP -x \*.svn* \*/config.php \*.ecoder* Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/doc/Change.log 2011-07-27 09:10:47 UTC (rev 4640) @@ -1,6 +1,9 @@ webERP Change Log +27/7/11 Version 4.05 +27/7/11 includes/LanguageSetup.php now checks for existence of LC_MESSAGES (it doesn't exist on windows servers) and uses LC_ALL as the fall back only +27/7/11 Fixed quoting in PDFSuppTransListing.php, StockReorderLevel.php WhereUsedInquiry.php Z_ReverseSuppPaymentRun.php 26/7/11 SalesCategories.php fixed display of active categories - this script is not used by webERP - only by Mo Kelly's joomla cart application 24/7/11 Version 4.04.5 Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/includes/ConnectDB.inc 2011-07-27 09:10:47 UTC (rev 4640) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.04.5'; //must update manually every time there is a DB change +$Version='4.05'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-07-27 09:10:47 UTC (rev 4640) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-07-24 12:24+1200\n" +"POT-Creation-Date: 2011-07-27 19:08+1200\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -149,7 +149,7 @@ #: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 #: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 #: PaymentMethods.php:138 PaymentTerms.php:144 PaymentTerms.php:151 -#: PcExpenses.php:152 SalesCategories.php:125 SalesCategories.php:133 +#: PcExpenses.php:152 SalesCategories.php:124 SalesCategories.php:131 #: SalesPeople.php:149 SalesPeople.php:156 SalesTypes.php:150 #: SalesTypes.php:160 Shippers.php:82 Shippers.php:94 StockCategories.php:179 #: Stocks.php:481 Stocks.php:490 Stocks.php:498 Stocks.php:506 Stocks.php:514 @@ -347,7 +347,7 @@ #: PaymentMethods.php:200 PaymentTerms.php:201 PcAssignCashToTab.php:255 #: PcClaimExpensesFromTab.php:252 PcExpenses.php:208 PcTabs.php:234 #: PcTypeTabs.php:172 PO_AuthorisationLevels.php:149 Prices_Customer.php:280 -#: Prices.php:246 PurchData.php:202 SalesCategories.php:256 +#: Prices.php:246 PurchData.php:202 SalesCategories.php:254 #: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:219 #: SalesTypes.php:216 SecurityTokens.php:110 SelectCustomer.php:668 #: SelectCustomer.php:686 SelectCustomer.php:710 SelectCustomer.php:727 @@ -381,7 +381,7 @@ #: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 #: PO_AuthorisationLevels.php:151 PO_Items.php:684 Prices_Customer.php:281 #: Prices.php:247 PurchData.php:203 SalesAnalReptCols.php:294 -#: SalesAnalRepts.php:302 SalesCategories.php:257 SalesGLPostings.php:133 +#: SalesAnalRepts.php:302 SalesCategories.php:255 SalesGLPostings.php:133 #: SalesGLPostings.php:246 SalesPeople.php:220 SalesTypes.php:217 #: SecurityTokens.php:111 SelectCreditItems.php:754 SelectCustomer.php:669 #: SelectCustomer.php:687 SelectCustomer.php:711 SelectCustomer.php:728 @@ -701,9 +701,9 @@ msgstr "Datum" #: AddCustomerNotes.php:114 AddCustomerTypeNotes.php:105 PcReportTab.php:173 -#: Stocks.php:892 UpgradeDatabase.php:171 UpgradeDatabase.php:174 -#: UpgradeDatabase.php:177 UpgradeDatabase.php:180 UpgradeDatabase.php:183 -#: UpgradeDatabase.php:186 UpgradeDatabase.php:189 UpgradeDatabase.php:192 +#: Stocks.php:892 UpgradeDatabase.php:175 UpgradeDatabase.php:178 +#: UpgradeDatabase.php:181 UpgradeDatabase.php:184 UpgradeDatabase.php:187 +#: UpgradeDatabase.php:190 UpgradeDatabase.php:193 UpgradeDatabase.php:196 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 #: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 #: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 @@ -847,15 +847,15 @@ #: PDFRemittanceAdvice.php:84 PDFStockCheckComparison.php:36 #: PDFStockCheckComparison.php:62 PDFStockCheckComparison.php:267 #: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:149 -#: PrintCustOrder_generic.php:243 PrintCustOrder.php:198 ReorderLevel.php:60 -#: ReorderLevel.php:149 SalesAnalysis_UserDefined.php:28 -#: SelectCreditItems.php:23 StockCheck.php:47 StockCheck.php:68 -#: StockCheck.php:98 StockCheck.php:142 StockCheck.php:153 StockCheck.php:195 -#: StockDispatch.php:92 StockDispatch.php:104 SupplierBalsAtPeriodEnd.php:56 -#: SupplierBalsAtPeriodEnd.php:67 SuppPaymentRun.php:109 -#: SuppPaymentRun.php:120 SuppPaymentRun.php:184 SuppPaymentRun.php:214 -#: SuppPriceList.php:121 Tax.php:63 Tax.php:168 Tax.php:277 -#: Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 +#: PrintCustOrder_generic.php:243 PrintCustOrder.php:198 +#: PrintSalesOrder_generic.php:183 ReorderLevel.php:60 ReorderLevel.php:149 +#: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:23 StockCheck.php:47 +#: StockCheck.php:68 StockCheck.php:98 StockCheck.php:142 StockCheck.php:153 +#: StockCheck.php:195 StockDispatch.php:92 StockDispatch.php:104 +#: SupplierBalsAtPeriodEnd.php:56 SupplierBalsAtPeriodEnd.php:67 +#: SuppPaymentRun.php:109 SuppPaymentRun.php:120 SuppPaymentRun.php:184 +#: SuppPaymentRun.php:214 SuppPriceList.php:121 Tax.php:63 Tax.php:168 +#: Tax.php:277 Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 #: Z_DataExport.php:308 Z_DataExport.php:347 Z_DataExport.php:383 #: Z_DataExport.php:419 Z_DataExport.php:471 Z_poRebuildDefault.php:38 #: includes/PDFPaymentRun_PymtFooter.php:57 @@ -1103,7 +1103,7 @@ #: FixedAssetCategories.php:134 GLAccounts.php:197 Locations.php:328 #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:160 PcExpensesTypeTab.php:101 PcTabs.php:166 -#: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:137 +#: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:135 #: SalesTypes.php:166 StockCategories.php:196 Suppliers.php:635 #: SupplierTypes.php:151 Z_DeleteInvoice.php:146 msgid "has been deleted" @@ -1170,7 +1170,8 @@ #: SystemParameters.php:943 SystemParameters.php:949 SystemParameters.php:955 #: SystemParameters.php:961 TopItems.php:23 TopItems.php:36 #: WorkOrderEntry.php:562 WorkOrderEntry.php:565 WorkOrderIssue.php:626 -#: WorkOrderIssue.php:629 +#: WorkOrderIssue.php:629 includes/PDFAssetRegisterHeader.inc:15 +#: includes/PDFAssetRegisterHeader.inc:24 msgid "All" msgstr "Všechny" @@ -1730,6 +1731,8 @@ #: includes/PDFPeriodStockTransListingPageHeader.inc:48 #: includes/PDFPeriodStockTransListingPageHeader.inc:52 #: includes/PDFStockComparisonPageHeader.inc:36 +#: includes/PDFStockTransListingPageHeader.inc:68 +#: includes/PDFStockTransListingPageHeader.inc:72 #: includes/PDFSuppTransListingPageHeader.inc:49 msgid "Reference" msgstr "Reference" @@ -1884,9 +1887,10 @@ #: includes/PDFSalesOrder_generic.inc:95 #: includes/PDFStockCheckPageHeader.inc:44 #: includes/PDFStockNegativesHeader.inc:33 -#: includes/PDFStockTransferHeader.inc:39 includes/PDFTransPageHeader.inc:209 -#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2260 -#: api/api_xml-rpc.php:2306 api/api_xml-rpc.php:2502 +#: includes/PDFStockTransferHeader.inc:39 +#: includes/PDFStockTransListingPageHeader.inc:70 +#: includes/PDFTransPageHeader.inc:209 includes/PO_PDFOrderPageHeader.inc:78 +#: api/api_xml-rpc.php:2260 api/api_xml-rpc.php:2306 api/api_xml-rpc.php:2502 msgid "Quantity" msgstr "Množství" @@ -1943,7 +1947,7 @@ #: includes/PDFOrderPageHeader_generic.inc:79 #: includes/PDFOstdgGRNsPageHeader.inc:16 #: includes/PDFPaymentRunPageHeader.inc:11 -#: includes/PDFPickingListHeader.inc:48 +#: includes/PDFPickingListHeader.inc:48 includes/PDFPriceListPageHeader.inc:12 #: includes/PDFProfitAndLossPageHeader.inc:27 #: includes/PDFSalesAnalPageHeader.inc:15 #: includes/PDFSalesOrder_generic.inc:81 @@ -1971,6 +1975,7 @@ #: PrintCustTransPortrait.php:998 ReorderLevel.php:240 StockDispatch.php:337 #: SuppPriceList.php:255 Tax.php:243 includes/PDFAgedDebtorsPageHeader.inc:34 #: includes/PDFAgedSuppliersPageHeader.inc:21 +#: includes/PDFAssetRegisterHeader.inc:38 #: includes/PDFBalanceSheetPageHeader.inc:26 #: includes/PDFBankingSummaryPageHeader.inc:23 #: includes/PDFBOMListingPageHeader.inc:26 @@ -1990,7 +1995,7 @@ #: includes/PDFOstdgGRNsPageHeader.inc:16 #: includes/PDFPaymentRunPageHeader.inc:11 #: includes/PDFPeriodStockTransListingPageHeader.inc:25 -#: includes/PDFPickingListHeader.inc:69 +#: includes/PDFPickingListHeader.inc:69 includes/PDFPriceListPageHeader.inc:12 #: includes/PDFProfitAndLossPageHeader.inc:28 #: includes/PDFQuotationPageHeader.inc:94 #: includes/PDFQuotationPortraitPageHeader.inc:92 @@ -2003,6 +2008,7 @@ #: includes/PDFStockLocTransferHeader.inc:12 #: includes/PDFStockNegativesHeader.inc:12 #: includes/PDFStockTransferHeader.inc:16 +#: includes/PDFStockTransListingPageHeader.inc:45 #: includes/PDFSupplierBalsPageHeader.inc:20 #: includes/PDFSuppTransListingPageHeader.inc:32 #: includes/PDFTabReportHeader.inc:15 @@ -2114,7 +2120,7 @@ #: PDFOrderStatus.php:319 PDFPrintLabel.php:238 PO_Items.php:637 #: PO_Items.php:926 PO_SelectOSPurchOrder.php:211 PO_SelectPurchOrder.php:178 #: PricesByCost.php:152 ReorderLevelLocation.php:55 ReorderLevel.php:254 -#: ReverseGRN.php:377 SalesCategories.php:423 SecurityTokens.php:86 +#: ReverseGRN.php:377 SalesCategories.php:421 SecurityTokens.php:86 #: SecurityTokens.php:92 SecurityTokens.php:102 SelectAsset.php:243 #: SelectCompletedOrder.php:536 SelectContract.php:153 #: SelectCreditItems.php:976 SelectOrderItems.php:1517 @@ -2129,8 +2135,8 @@ #: TaxAuthorities.php:145 TopItems.php:163 WorkCentres.php:124 #: WorkOrderCosting.php:81 WorkOrderCosting.php:111 WorkOrderEntry.php:598 #: WorkOrderIssue.php:668 includes/DefineLabelClass.php:12 -#: includes/DefineLabelClass.php:45 includes/PDFGrnHeader.inc:29 -#: includes/PDFInventoryPlanPageHeader.inc:51 +#: includes/DefineLabelClass.php:45 includes/PDFAssetRegisterHeader.inc:62 +#: includes/PDFGrnHeader.inc:29 includes/PDFInventoryPlanPageHeader.inc:51 #: includes/PDFOstdgGRNsPageHeader.inc:38 #: includes/PDFStockLocTransferHeader.inc:49 #: includes/PDFStockTransferHeader.inc:36 includes/PDFTopItemsHeader.inc:50 @@ -2240,7 +2246,7 @@ #: BOMInquiry.php:26 BOMs.php:806 EmailConfirmation.php:191 MRPDemands.php:333 #: MRPReport.php:542 PO_SelectOSPurchOrder.php:200 PO_SelectPurchOrder.php:170 -#: SalesCategories.php:422 SelectProduct.php:512 Shipt_Select.php:166 +#: SalesCategories.php:420 SelectProduct.php:512 Shipt_Select.php:166 #: StockAdjustments.php:76 StockAdjustments.php:335 StockCounts.php:97 #: StockCounts.php:132 StockMovements.php:31 StockReorderLevel.php:44 #: StockStatus.php:61 StockTransfers.php:38 StockTransfers.php:445 @@ -2641,8 +2647,10 @@ #: StockCounts.php:133 StockReorderLevel.php:49 StockSerialItemResearch.php:78 #: StockStatus.php:84 StockStatus.php:89 WhereUsedInquiry.php:67 #: WorkCentres.php:125 WorkCentres.php:210 +#: includes/PDFAssetRegisterHeader.inc:64 #: includes/PDFPeriodStockTransListingPageHeader.inc:51 -#: includes/PDFStockNegativesHeader.inc:31 api/api_xml-rpc.php:2258 +#: includes/PDFStockNegativesHeader.inc:31 +#: includes/PDFStockTransListingPageHeader.inc:71 api/api_xml-rpc.php:2258 #: api/api_xml-rpc.php:2304 api/api_xml-rpc.php:2500 msgid "Location" msgstr "Umístění" @@ -2988,7 +2996,7 @@ #: PO_AuthoriseMyOrders.php:132 PricesByCost.php:221 PurchData.php:497 #: ReorderLevelLocation.php:156 SecurityTokens.php:89 #: SelectCreditItems.php:911 SMTPServer.php:64 StockCostUpdate.php:163 -#: StockReorderLevel.php:94 Stocks.php:1047 SystemParameters.php:1018 +#: StockReorderLevel.php:95 Stocks.php:1047 SystemParameters.php:1018 #: TaxAuthorityRates.php:79 WorkOrderEntry.php:546 WOSerialNos.php:315 msgid "Update" msgstr "Aktualizace" @@ -3236,6 +3244,7 @@ #: StockMovements.php:97 StockStatus.php:313 SuppCreditGRNs.php:229 #: SuppCreditGRNs.php:230 SupplierTenders.php:267 SupplierTenders.php:494 #: SuppPriceList.php:274 includes/DefineLabelClass.php:49 +#: includes/PDFPriceListPageHeader.inc:46 #: includes/PDFQuotationPageHeader.inc:104 #: includes/PDFQuotationPortraitPageHeader.inc:104 #: includes/PDFTransPageHeaderPortrait.inc:265 @@ -3831,8 +3840,8 @@ #: FixedAssetCategories.php:86 FixedAssetCategories.php:105 #: PricesBasedOnMarkUp.php:337 PricesBasedOnMarkUp.php:353 #: SelectCreditItems.php:1395 SpecialOrder.php:423 StockCategories.php:21 -#: StockCategories.php:82 StockCategories.php:153 Z_ReApplyCostToSA.php:62 -#: Z_ReApplyCostToSA.php:74 +#: StockCategories.php:82 StockCategories.php:153 Z_PriceChanges.php:137 +#: Z_ReApplyCostToSA.php:62 Z_ReApplyCostToSA.php:74 msgid "because" msgstr "protože" @@ -4327,7 +4336,7 @@ msgstr "Obrázek" #: ContractBOM.php:365 CounterSales.php:2013 FixedAssetItems.php:468 -#: FixedAssetItems.php:472 PO_Items.php:951 SalesCategories.php:249 +#: FixedAssetItems.php:472 PO_Items.php:951 SalesCategories.php:247 #: SelectCreditItems.php:1005 SelectOrderItems.php:1531 #: SelectOrderItems.php:1708 Stocks.php:728 Stocks.php:732 #: SupplierTenders.php:518 WorkOrderEntry.php:617 WorkOrderIssue.php:684 @@ -5045,7 +5054,7 @@ #: StockSerialItemResearch.php:81 #: includes/PDFDeliveryDifferencesPageHeader.inc:45 #: includes/PDFDIFOTPageHeader.inc:44 includes/PDFOrderPageHeader.inc:50 -#: includes/PDFTransPageHeader.inc:47 +#: includes/PDFPriceListPageHeader.inc:42 includes/PDFTransPageHeader.inc:47 #: includes/PDFTransPageHeaderPortrait.inc:56 msgid "Branch" msgstr "Větev" @@ -5089,18 +5098,19 @@ #: ReorderLevel.php:242 SalesCategoryPeriodInquiry.php:162 #: SalesTopItemsInquiry.php:218 SpecialOrder.php:606 StockDispatch.php:344 #: Stocks.php:738 SuppPriceList.php:211 SuppPriceList.php:261 -#: includes/PDFInventoryValnPageHeader.inc:32 +#: Z_PriceChanges.php:37 includes/PDFInventoryValnPageHeader.inc:32 #: includes/PDFInventoryValnPageHeader.inc:38 +#: includes/PDFPriceListPageHeader.inc:38 msgid "Category" msgstr "Kategorie" #: Contracts.php:849 PricesBasedOnMarkUp.php:111 SpecialOrder.php:610 -#: Stocks.php:741 +#: Stocks.php:741 Z_PriceChanges.php:42 msgid "The stock categories could not be retrieved because" msgstr "Populace kategorie se nepodařilo získat, protože" #: Contracts.php:850 FixedAssetItems.php:485 PricesBasedOnMarkUp.php:112 -#: SpecialOrder.php:611 Stocks.php:742 +#: SpecialOrder.php:611 Stocks.php:742 Z_PriceChanges.php:43 msgid "The SQL used to retrieve stock categories and failed was" msgstr "SQL slouží k načtení zásob kategorií a neúspěšný byl" @@ -5630,7 +5640,8 @@ #: CounterSales.php:1193 DeliveryDetails.php:552 EDIMessageFormat.php:127 #: EDIMessageFormat.php:204 Prices_Customer.php:41 #: RecurringSalesOrdersProcess.php:88 ReverseGRN.php:332 SpecialOrder.php:111 -#: SpecialOrder.php:113 +#: SpecialOrder.php:113 includes/PDFPriceListPageHeader.inc:18 +#: includes/PDFPriceListPageHeader.inc:21 msgid "for" msgstr "pro" @@ -6632,7 +6643,8 @@ msgstr "Zprávy Velikost stránky" #: CustLoginSetup.php:174 CustLoginSetup.php:176 EmailConfirmation.php:119 -#: PrintCustOrder_generic.php:111 PrintCustOrder.php:90 SuppLoginSetup.php:202 +#: PrintCustOrder_generic.php:111 PrintCustOrder.php:90 +#: PrintSalesOrder_generic.php:90 SuppLoginSetup.php:202 #: SuppLoginSetup.php:204 WWW_Users.php:502 WWW_Users.php:504 msgid "A4" msgstr "A4" @@ -6647,10 +6659,11 @@ #: CustLoginSetup.php:186 CustLoginSetup.php:188 CustLoginSetup.php:198 #: CustLoginSetup.php:200 CustLoginSetup.php:209 CustLoginSetup.php:211 #: EmailConfirmation.php:119 PrintCustOrder_generic.php:111 -#: PrintCustOrder.php:90 SuppLoginSetup.php:214 SuppLoginSetup.php:216 -#: SuppLoginSetup.php:226 SuppLoginSetup.php:228 SuppLoginSetup.php:237 -#: SuppLoginSetup.php:239 WWW_Users.php:514 WWW_Users.php:516 -#: WWW_Users.php:526 WWW_Users.php:528 WWW_Users.php:537 WWW_Users.php:539 +#: PrintCustOrder.php:90 PrintSalesOrder_generic.php:90 SuppLoginSetup.php:214 +#: SuppLoginSetup.php:216 SuppLoginSetup.php:226 SuppLoginSetup.php:228 +#: SuppLoginSetup.php:237 SuppLoginSetup.php:239 WWW_Users.php:514 +#: WWW_Users.php:516 WWW_Users.php:526 WWW_Users.php:528 WWW_Users.php:537 +#: WWW_Users.php:539 msgid "landscape" msgstr "na šířku" @@ -6735,11 +6748,11 @@ msgid "was" msgstr "byl" -#: CustomerAllocations.php:324 +#: CustomerAllocations.php:323 msgid "Allocate Receipt" msgstr "Příjem přidělit" -#: CustomerAllocations.php:324 CustomerReceipt.php:529 +#: CustomerAllocations.php:323 CustomerReceipt.php:529 msgid "Allocate Receipts" msgstr "Příjmy přidělit" @@ -8395,13 +8408,16 @@ #: includes/PDFLowGPPageHeader.inc:15 includes/PDFOstdgGRNsPageHeader.inc:15 #: includes/PDFPaymentRunPageHeader.inc:18 #: includes/PDFPaymentRunPageHeader.inc:21 +#: includes/PDFPriceListPageHeader.inc:18 +#: includes/PDFPriceListPageHeader.inc:21 #: includes/PDFStockCheckPageHeader.inc:16 #: includes/PDFSupplierBalsPageHeader.inc:17 msgid "and" msgstr "a" #: DailyBankTransactions.php:104 PDFCustTransListing.php:35 -#: PDFPeriodStockTransListing.php:39 PDFSuppTransListing.php:35 +#: PDFPeriodStockTransListing.php:39 PDFStockTransListing.php:38 +#: PDFSuppTransListing.php:35 msgid "Transaction type" msgstr "Typ transakce" @@ -8872,6 +8888,17 @@ msgid "Commit Order Changes" msgstr "Spáchat Změny objednávky" +#: DemandWorkOrders.php:9 +#, fuzzy +msgid "Demand Work Orders" +msgstr "Hledat práci Objednávky" + +#: DemandWorkOrders.php:46 SelectProduct.php:282 +msgid "" +"The quantity on work orders for this product cannot be retrieved because" +msgstr "" +"Množství na pracovních příkazů pro tento produkt není možné získat, protože" + #: DiscountCategories.php:7 msgid "Discount Categories Maintenance" msgstr "Sleva Kategorie Údržba" @@ -8909,7 +8936,7 @@ msgstr "Kód slevové skupiny" #: DiscountCategories.php:88 DiscountCategories.php:248 PO_Header.php:855 -#: SalesCategories.php:255 SuppInvGRNs.php:277 SupplierTenders.php:55 +#: SalesCategories.php:253 SuppInvGRNs.php:277 SupplierTenders.php:55 #, php-format msgid "Select" msgstr "Vybrat" @@ -8960,6 +8987,7 @@ #: includes/PDFInventoryPlanPageHeader.inc:50 #: includes/PDFInventoryValnPageHeader.inc:32 #: includes/PDFLowGPPageHeader.inc:45 includes/PDFOstdgGRNsPageHeader.inc:38 +#: includes/PDFPriceListPageHeader.inc:38 #: includes/PDFStockCheckPageHeader.inc:33 #: includes/PDFStockComparisonPageHeader.inc:33 msgid "Item" @@ -9337,7 +9365,7 @@ msgstr "Aby data" #: EDIProcessOrders.php:275 EDIProcessOrders.php:277 -#: SupplierAllocations.php:436 +#: SupplierAllocations.php:436 includes/PDFStockTransListingPageHeader.inc:41 msgid "dated" msgstr "ze dne" @@ -9602,11 +9630,12 @@ "pro" #: EmailConfirmation.php:9 PrintCustOrder_generic.php:12 PrintCustOrder.php:13 +#: PrintSalesOrder_generic.php:14 msgid "Select Order To Print" msgstr "Vyberte Aby bylo možné tisknout" #: EmailConfirmation.php:15 PrintCustOrder_generic.php:15 -#: PrintCustOrder.php:16 +#: PrintCustOrder.php:16 PrintSalesOrder_generic.php:17 msgid "Select an Order Number to Print before calling this page" msgstr "Vyberte číslo objednávky pro tisk před voláním na tuto stránku" @@ -9614,19 +9643,22 @@ #: PO_OrderDetails.php:74 PrintCustOrder_generic.php:22 #: PrintCustOrder_generic.php:84 PrintCustOrder_generic.php:118 #: PrintCustOrder.php:18 PrintCustOrder.php:71 PrintCustOrder.php:95 -#: SelectSalesOrder.php:309 +#: PrintSalesOrder_generic.php:19 PrintSalesOrder_generic.php:70 +#: PrintSalesOrder_generic.php:95 SelectSalesOrder.php:309 msgid "Outstanding Sales Orders" msgstr "Nevyřízené prodejní objednávky" #: EmailConfirmation.php:24 EmailConfirmation.php:96 EmailConfirmation.php:128 #: PrintCustOrder_generic.php:23 PrintCustOrder_generic.php:85 #: PrintCustOrder_generic.php:119 PrintCustOrder.php:19 PrintCustOrder.php:72 -#: PrintCustOrder.php:96 +#: PrintCustOrder.php:96 PrintSalesOrder_generic.php:20 +#: PrintSalesOrder_generic.php:71 PrintSalesOrder_generic.php:96 msgid "Completed Sales Orders" msgstr "Dokončeny Prodejní objednávky" #: EmailConfirmation.php:42 FTP_RadioBeacon.php:178 #: PrintCustOrder_generic.php:36 PrintCustOrder.php:26 +#: PrintSalesOrder_generic.php:27 PrintSalesOrder_generic.php:129 msgid "" "There was a problem retrieving the order header details for Order Number" msgstr "Tam byl problém získávání informací, aby záhlaví pro pořadové číslo" @@ -9640,39 +9672,43 @@ #: PrintCustTrans.php:213 PrintCustTrans.php:263 PrintCustTrans.php:668 #: PrintCustTrans.php:837 PrintCustTransPortrait.php:235 #: PrintCustTransPortrait.php:288 PrintCustTransPortrait.php:689 -#: PrintCustTransPortrait.php:858 +#: PrintCustTransPortrait.php:858 PrintSalesOrder_generic.php:27 +#: PrintSalesOrder_generic.php:130 msgid "from the database" msgstr "z databáze" #: EmailConfirmation.php:81 EmailConfirmation.php:115 #: PrintCustOrder_generic.php:74 PrintCustOrder_generic.php:103 #: PrintCustOrder_generic.php:238 PrintCustOrder.php:66 PrintCustOrder.php:82 -#: PrintCustOrder.php:194 +#: PrintCustOrder.php:194 PrintSalesOrder_generic.php:65 +#: PrintSalesOrder_generic.php:82 PrintSalesOrder_generic.php:179 msgid "Print Packing Slip Error" msgstr "Tisk Balení skluzu Chyba" #: EmailConfirmation.php:87 PrintCustOrder_generic.php:77 -#: PrintCustOrder.php:69 +#: PrintCustOrder.php:69 PrintSalesOrder_generic.php:68 msgid "Unable to Locate Order Number" msgstr "Nelze Vyhledejte Objednací číslo" #: EmailConfirmation.php:117 PrintCustOrder_generic.php:106 -#: PrintCustOrder.php:85 +#: PrintCustOrder.php:85 PrintSalesOrder_generic.php:85 msgid "The packing slip for order number" msgstr "Balení prokluzu pro pořadové číslo" #: EmailConfirmation.php:117 PO_PDFPurchOrder.php:137 #: PrintCustOrder_generic.php:107 PrintCustOrder.php:86 +#: PrintSalesOrder_generic.php:86 msgid "has previously been printed" msgstr "již dříve bylo vytištěno" #: EmailConfirmation.php:117 PO_PDFPurchOrder.php:137 #: PrintCustOrder_generic.php:107 PrintCustOrder.php:86 +#: PrintSalesOrder_generic.php:86 msgid "It was printed on" msgstr "To byl vytištěn na" #: EmailConfirmation.php:117 PrintCustOrder_generic.php:108 -#: PrintCustOrder.php:87 +#: PrintCustOrder.php:87 PrintSalesOrder_generic.php:87 msgid "" "This check is there to ensure that duplicate packing slips are not produced " "and dispatched more than once to the customer" @@ -9682,26 +9718,28 @@ #: EmailConfirmation.php:119 PrintCustOrder_generic.php:110 #: PrintCustOrder_generic.php:111 PrintCustOrder.php:89 PrintCustOrder.php:90 +#: PrintSalesOrder_generic.php:89 PrintSalesOrder_generic.php:90 msgid "Do a Re-Print" msgstr "Do Re-Print" #: EmailConfirmation.php:119 PrintCustOrder_generic.php:110 -#: PrintCustOrder.php:89 +#: PrintCustOrder.php:89 PrintSalesOrder_generic.php:89 msgid "On Pre-Printed Stationery" msgstr "Na Pre-tištěné papírnické" #: EmailConfirmation.php:119 PrintCustOrder_generic.php:110 #: PrintCustOrder_generic.php:111 PrintCustOrder.php:89 PrintCustOrder.php:90 +#: PrintSalesOrder_generic.php:89 PrintSalesOrder_generic.php:90 msgid "Even Though Previously Printed" msgstr "I když dříve vytištěnou" #: EmailConfirmation.php:119 PrintCustOrder_generic.php:111 -#: PrintCustOrder.php:90 +#: PrintCustOrder.php:90 PrintSalesOrder_generic.php:90 msgid "Plain paper" msgstr "Volné listy" #: EmailConfirmation.php:124 PrintCustOrder_generic.php:114 -#: PrintCustOrder.php:93 +#: PrintCustOrder.php:93 PrintSalesOrder_generic.php:93 msgid "Or select another Order Number to Print" msgstr "Nebo zvolte jinou Objednací číslo k tisku" @@ -10106,6 +10144,7 @@ #: FixedAssetDepreciation.php:83 FixedAssetRegister.php:80 #: FixedAssetRegister.php:331 FixedAssetTransfer.php:109 #: SuppFixedAssetChgs.php:72 SupplierCredit.php:372 SupplierInvoice.php:342 +#: includes/PDFAssetRegisterHeader.inc:60 msgid "Asset ID" msgstr "Asset ID" @@ -10116,6 +10155,8 @@ #: FixedAssetDepreciation.php:86 PricesByCost.php:157 SalesAnalReptCols.php:38 #: SalesAnalReptCols.php:40 SelectProduct.php:186 SelectProduct.php:343 #: ShipmentCosting.php:149 ShipmentCosting.php:150 StockCostUpdate.php:149 +#: includes/PDFAssetRegisterHeader.inc:66 +#: includes/PDFAssetRegisterHeader.inc:69 #: includes/PDFInventoryValnPageHeader.inc:35 #: includes/PDFInventoryValnPageHeader.inc:39 #: includes/PDFLowGPPageHeader.inc:48 @@ -10389,7 +10430,7 @@ msgid "long" msgstr "dlouho" -#: FixedAssetItems.php:455 SalesCategories.php:326 Stocks.php:715 +#: FixedAssetItems.php:455 SalesCategories.php:324 Stocks.php:715 msgid "Image File (.jpg)" msgstr "Obrázek File (. Jpg)" @@ -10539,7 +10580,7 @@ msgid "Fixed Asset Register" msgstr "Hmotného majetku Registrace" -#: FixedAssetRegister.php:84 +#: FixedAssetRegister.php:84 includes/PDFAssetRegisterHeader.inc:65 msgid "Date Acquired" msgstr "Získané data" @@ -10555,7 +10596,8 @@ msgid "Additions" msgstr "Přírůstky" -#: FixedAssetRegister.php:88 +#: FixedAssetRegister.php:88 includes/PDFAssetRegisterHeader.inc:67 +#: includes/PDFAssetRegisterHeader.inc:70 msgid "Depn" msgstr "Depn" @@ -10567,7 +10609,8 @@ msgid "Depn C/fwd" msgstr "Depn C / vpřed" -#: FixedAssetRegister.php:91 +#: FixedAssetRegister.php:91 includes/PDFAssetRegisterHeader.inc:68 +#: includes/PDFAssetRegisterHeader.inc:71 msgid "NBV" msgstr "NBV" @@ -10608,15 +10651,15 @@ msgid "Show Assets" msgstr "Zobrazit Aktiva" -#: FixedAssetRegister.php:329 +#: FixedAssetRegister.php:329 includes/PDFAssetRegisterHeader.inc:33 msgid "Asset Category " msgstr "Kategorie aktiv " -#: FixedAssetRegister.php:330 +#: FixedAssetRegister.php:330 includes/PDFAssetRegisterHeader.inc:34 msgid "Asset Location " msgstr "Umístění aktiva " -#: FixedAssetRegister.php:356 +#: FixedAssetRegister.php:356 includes/PDFAssetRegisterHeader.inc:63 msgid "Serial No." msgstr "Pořadové číslo" @@ -15010,6 +15053,7 @@ #: OffersReceived.php:94 PurchData.php:323 Stocks.php:361 #: includes/PDFPeriodStockTransListingPageHeader.inc:47 +#: includes/PDFStockTransListingPageHeader.inc:67 msgid "Stock Item" msgstr "Skladová položka" @@ -16456,7 +16500,7 @@ #: PDFBankingSummary.php:36 PDFChequeListing.php:66 PDFCustTransListing.php:47 #: PDFDeliveryDifferences.php:71 PDFDIFOT.php:81 PDFOrdersInvoiced.php:70 #: PDFOrderStatus.php:73 PDFPeriodStockTransListing.php:78 -#: PDFSuppTransListing.php:47 +#: PDFStockTransListing.php:52 PDFSuppTransListing.php:47 msgid "Create PDF" msgstr "Vytvořit PDF" @@ -16662,7 +16706,7 @@ msgstr "Vzhledem k tomu, činnost" #: PDFCustTransListing.php:10 PDFPeriodStockTransListing.php:9 -#: PDFSuppTransListing.php:10 +#: PDFStockTransListing.php:13 PDFSuppTransListing.php:10 msgid "The date must be specified in the format" msgstr "Datum musí být zadáno ve formátu" @@ -16671,7 +16715,8 @@ msgid "Customer Transaction Listing" msgstr "Zákazník transakce Výpis" -#: PDFCustTransListing.php:31 PDFSuppTransListing.php:31 +#: PDFCustTransListing.php:31 PDFStockTransListing.php:34 +#: PDFSuppTransListing.php:31 msgid "Enter the date for which the transactions are to be listed" msgstr "Zadejte datum, pro které transakce by měly být uvedeny" @@ -16689,6 +16734,7 @@ msgstr "Dobropisů" #: PDFCustTransListing.php:77 PDFPeriodStockTransListing.php:134 +#: PDFStockTransListing.php:85 msgid "An error occurred getting the transactions" msgstr "Došlo k chybě dostat transakce" @@ -16696,12 +16742,13 @@ msgid "The SQL used to get the transaction information that failed was" msgstr "SQL slouží k získání informací o transakcích, které se nepodařilo byla" -#: PDFCustTransListing.php:87 PDFSuppTransListing.php:82 +#: PDFCustTransListing.php:87 PDFStockTransListing.php:92 +#: PDFSuppTransListing.php:82 msgid "There were no transactions found in the database for the date" msgstr "Nebyly zjištěny žádné transakce v databázi na data" #: PDFCustTransListing.php:87 PDFPeriodStockTransListing.php:141 -#: PDFSuppTransListing.php:82 +#: PDFStockTransListing.php:92 PDFSuppTransListing.php:82 msgid "Please try again selecting a different date" msgstr "Zkuste to prosím znovu vybrat jiný den" @@ -16969,7 +17016,8 @@ msgstr "Ještě netisknuto" #: PDFPeriodStockTransListing.php:16 PDFPeriodStockTransListing.php:20 -#: PDFPeriodStockTransListing.php:150 +#: PDFPeriodStockTransListing.php:150 PDFStockTransListing.php:20 +#: PDFStockTransListing.php:24 PDFStockTransListing.php:101 msgid "Stock Transaction Listing" msgstr "Sklad seznamu transakcí" @@ -16983,33 +17031,33 @@ msgid "Enter the date to which the transactions are to be listed" msgstr "Zadejte datum, pro které transakce by měly být uvedeny" -#: PDFPeriodStockTransListing.php:43 PrintCustTrans.php:59 -#: PrintCustTransPortrait.php:57 SalesInquiry.php:1054 +#: PDFPeriodStockTransListing.php:43 PDFStockTransListing.php:42 +#: PrintCustTrans.php:59 PrintCustTransPortrait.php:57 SalesInquiry.php:1054 msgid "Sales Invoice" msgstr "Prodejní faktury" -#: PDFPeriodStockTransListing.php:44 PrintCustTrans.php:62 -#: PrintCustTransPortrait.php:60 +#: PDFPeriodStockTransListing.php:44 PDFStockTransListing.php:43 +#: PrintCustTrans.php:62 PrintCustTransPortrait.php:60 msgid "Sales Credit Note" msgstr "Prodej dobropis" -#: PDFPeriodStockTransListing.php:45 +#: PDFPeriodStockTransListing.php:45 PDFStockTransListing.php:44 msgid "Location Transfer" msgstr "Umístění Transfer" -#: PDFPeriodStockTransListing.php:46 +#: PDFPeriodStockTransListing.php:46 PDFStockTransListing.php:45 msgid "Stock Adjustment" msgstr "Úprava skladu" -#: PDFPeriodStockTransListing.php:47 +#: PDFPeriodStockTransListing.php:47 PDFStockTransListing.php:46 msgid "Purchase Order Delivery" msgstr "Objednávka dodání" -#: PDFPeriodStockTransListing.php:48 +#: PDFPeriodStockTransListing.php:48 PDFStockTransListing.php:47 msgid "Work Order Receipt" msgstr "Práce doručení objednávky" -#: PDFPeriodStockTransListing.php:49 +#: PDFPeriodStockTransListing.php:49 PDFStockTransListing.php:48 msgid "Work Order Issue" msgstr "Objednat výtisk práce" @@ -17018,6 +17066,7 @@ msgstr "Pro Umístění skladu" #: PDFPeriodStockTransListing.php:132 PDFPeriodStockTransListing.php:138 +#: PDFStockTransListing.php:83 PDFStockTransListing.php:89 msgid "Transaction Listing" msgstr "Výpis transakce" @@ -17026,37 +17075,44 @@ msgid "There were no transactions found in the database between the dates" msgstr "Nebyly zjištěny žádné transakce v databázi na data" -#: PDFPeriodStockTransListing.php:151 +#: PDFPeriodStockTransListing.php:151 PDFStockTransListing.php:102 msgid "Stock transaction listing from" msgstr "Transakce na burze bude výpis z" #: PDFPeriodStockTransListing.php:158 #: includes/PDFCustTransListingPageHeader.inc:15 +#: includes/PDFStockTransListingPageHeader.inc:15 msgid "Customer Invoices" msgstr "Odběratelských faktur" #: PDFPeriodStockTransListing.php:161 #: includes/PDFCustTransListingPageHeader.inc:18 +#: includes/PDFStockTransListingPageHeader.inc:18 msgid "Customer Credit Notes" msgstr "Zákazník dobropisy" #: PDFPeriodStockTransListing.php:164 SelectProduct.php:417 +#: includes/PDFStockTransListingPageHeader.inc:21 msgid "Location Transfers" msgstr "Umístění Převody" #: PDFPeriodStockTransListing.php:167 StockAdjustments.php:8 +#: includes/PDFStockTransListingPageHeader.inc:24 msgid "Stock Adjustments" msgstr "Úpravy skladem" #: PDFPeriodStockTransListing.php:170 +#: includes/PDFStockTransListingPageHeader.inc:27 msgid "Purchase Order Deliveries" msgstr "Objednávka Dodávky" #: PDFPeriodStockTransListing.php:173 +#: includes/PDFStockTransListingPageHeader.inc:30 msgid "Work Order Receipts" msgstr "Příjmy práce Objednat" #: PDFPeriodStockTransListing.php:176 +#: includes/PDFStockTransListingPageHeader.inc:33 msgid "Work Order Issues" msgstr "Práce jiných záležitostí" @@ -17118,7 +17174,8 @@ msgstr "Cena Výpis Zpráva" #: PDFPriceList.php:23 PDFPriceList.php:295 PDFPriceList.php:335 -#: PDFPriceList.php:355 +#: PDFPriceList.php:355 includes/PDFPriceListPageHeader.inc:16 +#: includes/PDFPriceListPageHeader.inc:40 msgid "Customer Special Prices Only" msgstr "Zákazník Zvláštní ceny pouze" @@ -17233,7 +17290,7 @@ msgstr "Datum účinnosti Range" #: PDFPriceList.php:362 includes/PDFLowGPPageHeader.inc:49 -#: includes/PDFLowGPPageHeader.inc:50 +#: includes/PDFLowGPPageHeader.inc:50 includes/PDFPriceListPageHeader.inc:49 msgid "GP" msgstr "GP" @@ -17273,7 +17330,7 @@ msgid "Number of labels per item" msgstr "Počet štítků za položku" -#: PDFPrintLabel.php:93 +#: PDFPrintLabel.php:93 Z_PriceChanges.php:94 msgid "Price list" msgstr "Ceník" @@ -19038,7 +19095,7 @@ msgid "Requisition" msgstr "Rekvizice" -#: PricesBasedOnMarkUp.php:8 +#: PricesBasedOnMarkUp.php:8 Z_PriceChanges.php:7 msgid "Update Pricing" msgstr "Aktualizace cen" @@ -19064,7 +19121,7 @@ msgid "Select the Price List to update" msgstr "Zvolte Cena aktualizace" -#: PricesBasedOnMarkUp.php:29 PricesBasedOnMarkUp.php:94 +#: PricesBasedOnMarkUp.php:29 PricesBasedOnMarkUp.php:94 Z_PriceChanges.php:28 msgid "No Price List Selected" msgstr "Ne Cena Vybrané Seznam" @@ -19122,11 +19179,11 @@ msgid "New Price To Be Effective To (Blank = No End Date)" msgstr "Nová cena jako účinná k (prázdné = Ne Datum ukončení)" -#: PricesBasedOnMarkUp.php:163 +#: PricesBasedOnMarkUp.php:163 Z_PriceChanges.php:67 msgid "Percentage Increase (positive) or decrease (negative)" msgstr "Procento zvýšení (pozitivní) nebo snížení (negativní)" -#: PricesBasedOnMarkUp.php:167 +#: PricesBasedOnMarkUp.php:167 Z_PriceChanges.php:71 msgid "Update Prices" msgstr "Aktualizace ceny" @@ -19212,7 +19269,7 @@ "Pro záznam všech cen změnilo této stránce by měly být vytištěny pomocí CTRL " "+ P" -#: PricesBasedOnMarkUp.php:214 +#: PricesBasedOnMarkUp.php:214 Z_PriceChanges.php:77 msgid "So we are using a price list/sales type of" msgstr "Tak jsme se s použitím ceníku / prodej druhu" @@ -19232,7 +19289,7 @@ msgid "against" msgstr "proti" -#: PricesBasedOnMarkUp.php:229 +#: PricesBasedOnMarkUp.php:229 Z_PriceChanges.php:82 msgid "The price list/sales type to be updated must be selected first" msgstr "Ceník / prodeje, který má být aktualizován, musí být vybrány první" @@ -19284,7 +19341,7 @@ "roven nule - žádné cenové změny budou provedeny na základě nulové nákladové " "položky. Z bodu je:" -#: PricesBasedOnMarkUp.php:337 +#: PricesBasedOnMarkUp.php:337 Z_PriceChanges.php:137 msgid "Error updating prices for" msgstr "Chyba při aktualizaci cen pro" @@ -19594,11 +19651,11 @@ msgid "Cheque No." msgstr "Šek Ne" -#: PrintCustOrder_generic.php:141 +#: PrintCustOrder_generic.php:141 PrintSalesOrder_generic.php:111 msgid "Customer Laser Packing Slip" msgstr "Zákazník Laser Balení skluzu" -#: PrintCustOrder_generic.php:142 +#: PrintCustOrder_generic.php:142 PrintSalesOrder_generic.php:112 msgid "Laser Packing slip for order" msgstr "Laser Balení skluzu na objednávku" @@ -19626,6 +19683,7 @@ msgstr "Dodacího listu nelze vytisknout" #: PrintCustOrder_generic.php:241 PrintCustOrder.php:197 +#: PrintSalesOrder_generic.php:182 msgid "Print Another Packing Slip/Order" msgstr "Tisk Další balicí list / Objednávka" @@ -19981,6 +20039,14 @@ msgid "Print Preview" msgstr "Náhled" +#: PrintSalesOrder_generic.php:181 +msgid "" +"There were no outstanding items on the order to deliver. A packing slip " +"cannot be printed" +msgstr "" +"Nebyly zjištěny žádné nesplacené položek na objednávce dodat. Dodacího listu " +"nelze vytisknout" + #: PurchData.php:6 msgid "Supplier Purchasing Data" msgstr "Dodavatel nákupu dat" @@ -20294,20 +20360,20 @@ msgstr "Zobrazit stavu populace" #: PurchData.php:505 SelectProduct.php:393 StockCostUpdate.php:167 -#: StockLocMovements.php:47 StockMovements.php:56 StockReorderLevel.php:95 +#: StockLocMovements.php:47 StockMovements.php:56 StockReorderLevel.php:96 #: StockUsage.php:182 msgid "Show Stock Movements" msgstr "Zobrazit pohybů zásob" #: PurchData.php:506 SelectProduct.php:398 SelectSalesOrder.php:6 #: StockAdjustments.php:426 StockCostUpdate.php:169 StockMovements.php:202 -#: StockReorderLevel.php:97 StockStatus.php:357 StockTransfers.php:532 +#: StockReorderLevel.php:98 StockStatus.php:357 StockTransfers.php:532 #: StockUsage.php:183 msgid "Search Outstanding Sales Orders" msgstr "Hledat Vynikající Prodejní objednávky" #: PurchData.php:507 SelectProduct.php:399 StockAdjustments.php:427 -#: StockCostUpdate.php:170 StockMovements.php:203 StockReorderLevel.php:98 +#: StockCostUpdate.php:170 StockMovements.php:203 StockReorderLevel.php:99 #: StockStatus.php:358 StockTransfers.php:533 StockUsage.php:184 msgid "Search Completed Sales Orders" msgstr "Vyhledávání Dokončené Prodejní objednávky" @@ -21621,11 +21687,11 @@ "Nelze smazat tento prodej kategorií, protože skladě položky byly přidány do " "této kategorie" -#: SalesCategories.php:125 +#: SalesCategories.php:124 msgid "items under to this category" msgstr "položek v této kategorii" -#: SalesCategories.php:132 +#: SalesCategories.php:131 msgid "" "Cannot delete this sales category because sub categories have been added to " "this category" @@ -21633,86 +21699,86 @@ "Nelze smazat tento prodej kategorií, protože dílčí kategorie, které byly " "přidány do této kategorie" -#: SalesCategories.php:133 +#: SalesCategories.php:131 msgid "sub categories" msgstr "dílčí kategorie" -#: SalesCategories.php:137 +#: SalesCategories.php:135 msgid "The sales category" msgstr "Kategorie prodej" -#: SalesCategories.php:153 SalesCategories.php:161 +#: SalesCategories.php:148 SalesCategories.php:156 msgid "Stock item" msgstr "Na skladě" -#: SalesCategories.php:153 +#: SalesCategories.php:148 msgid "has been added" msgstr "Byla přidána" -#: SalesCategories.php:161 +#: SalesCategories.php:156 msgid "has been removed" msgstr "byl odebrán" -#: SalesCategories.php:169 +#: SalesCategories.php:164 msgid "Main" msgstr "Hlavní" -#: SalesCategories.php:197 +#: SalesCategories.php:195 msgid "Selected Sales Category Path" msgstr "Vybrané kategorie Prodej cesta" -#: SalesCategories.php:221 +#: SalesCategories.php:219 msgid "There are no categories defined at this level." msgstr "Nejsou žádné kategorie stanovené na této úrovni." -#: SalesCategories.php:224 +#: SalesCategories.php:222 msgid "Sub Category" msgstr "Sub kategorie" -#: SalesCategories.php:307 +#: SalesCategories.php:305 msgid "Edit Sub Category" msgstr "Upravit Podkategorie" -#: SalesCategories.php:316 +#: SalesCategories.php:314 msgid "New Sub Category" msgstr "Nové Podkategorie" -#: SalesCategories.php:321 +#: SalesCategories.php:319 msgid "Category Name" msgstr "Název kategorie" -#: SalesCategories.php:331 +#: SalesCategories.php:329 msgid "Submit Information" msgstr "Předložit informace" -#: SalesCategories.php:381 +#: SalesCategories.php:379 msgid "Add Inventory to this category." msgstr "Přidat Zásoby v této kategorii." -#: SalesCategories.php:382 +#: SalesCategories.php:380 msgid "Select Inv. Item" msgstr "Vyberte Inv. Bod" -#: SalesCategories.php:394 +#: SalesCategories.php:392 msgid "Add Inventory Item" msgstr "Přidat skladovou položku" -#: SalesCategories.php:399 +#: SalesCategories.php:397 #, fuzzy msgid "No more Inventory items to add" msgstr "Žádné další položky zásob přidat." -#: SalesCategories.php:421 +#: SalesCategories.php:419 msgid "Inventory items in this category." msgstr "Zásoby zboží v této kategorii." -#: SalesCategories.php:438 StockAdjustments.php:391 SupplierTenders.php:291 +#: SalesCategories.php:436 StockAdjustments.php:391 SupplierTenders.php:291 #: TaxGroups.php:354 WWW_Access.php:212 #, php-format msgid "Remove" msgstr "Odstranit" -#: SalesCategories.php:442 +#: SalesCategories.php:440 #, fuzzy msgid "No Inventory items in this category" msgstr "Zásoby žádné položky v této kategorii." @@ -23314,12 +23380,6 @@ msgid "No Default Price Set in Home Currency" msgstr "Č. Výchozí Cena Nastavit v domácí měně" -#: SelectProduct.php:282 -msgid "" -"The quantity on work orders for this product cannot be retrieved because" -msgstr "" -"Množství na pracovních příkazů pro tento produkt není možné získat, protože" - #: SelectProduct.php:323 msgid "" "The workorder component demand for this product cannot be retrieved because" @@ -23365,7 +23425,7 @@ msgstr "Nastavení položek" #: SelectProduct.php:396 StockAdjustments.php:425 StockCostUpdate.php:168 -#: StockMovements.php:201 StockReorderLevel.php:96 StockTransfers.php:531 +#: StockMovements.php:201 StockReorderLevel.php:97 StockTransfers.php:531 #: StockUsage.php:87 msgid "Show Stock Usage" msgstr "Zobrazit skladem Využití" @@ -28310,11 +28370,12 @@ msgid "Items to offer from" msgstr "Položky, které nabízí od" -#: SupplierTenders.php:263 api/api_xml-rpc.php:696 api/api_xml-rpc.php:764 -#: api/api_xml-rpc.php:795 api/api_xml-rpc.php:826 api/api_xml-rpc.php:865 -#: api/api_xml-rpc.php:896 api/api_xml-rpc.php:927 api/api_xml-rpc.php:970 -#: api/api_xml-rpc.php:2220 api/api_xml-rpc.php:2256 api/api_xml-rpc.php:2302 -#: api/api_xml-rpc.php:2498 api/api_xml-rpc.php:2662 +#: SupplierTenders.php:263 includes/PDFAssetRegisterHeader.inc:61 +#: api/api_xml-rpc.php:696 api/api_xml-rpc.php:764 api/api_xml-rpc.php:795 +#: api/api_xml-rpc.php:826 api/api_xml-rpc.php:865 api/api_xml-rpc.php:896 +#: api/api_xml-rpc.php:927 api/api_xml-rpc.php:970 api/api_xml-rpc.php:2220 +#: api/api_xml-rpc.php:2256 api/api_xml-rpc.php:2302 api/api_xml-rpc.php:2498 +#: api/api_xml-rpc.php:2662 msgid "Stock ID" msgstr "Sklad ID" @@ -30614,7 +30675,7 @@ "systému. Přečtěte si prosím pozorně všechny poznámky, aby bylo zajištěno, že " "se očekává, že" -#: UpgradeDatabase.php:129 +#: UpgradeDatabase.php:133 msgid "" "Only mysql upgrades are performed seamlessly at this time. Your database " "will need to be manually updated" @@ -30622,61 +30683,61 @@ "Pouze mysql upgrady jsou prováděny plynule v této době. Databáze bude třeba " "ručně aktualizované" -#: UpgradeDatabase.php:141 +#: UpgradeDatabase.php:145 msgid "Applying" msgstr "Uplatnění" -#: UpgradeDatabase.php:168 Z_Upgrade_3.10-3.11.php:59 Z_Upgrade3.10.php:29 +#: UpgradeDatabase.php:172 Z_Upgrade_3.10-3.11.php:59 Z_Upgrade3.10.php:29 #: Z_Upgrade3.10.php:34 Z_Upgrade3.10.php:46 Z_Upgrade3.10.php:51 #: Z_Upgrade3.10.php:60 Z_Upgrade3.10.php:65 Z_Upgrade3.10.php:74 #: Z_Upgrade3.10.php:79 Z_Upgrade_3.11-4.00.php:59 msgid "Success" msgstr "Úspěch" -#: UpgradeDatabase.php:171 Z_Upgrade_3.10-3.11.php:63 +#: UpgradeDatabase.php:175 Z_Upgrade_3.10-3.11.php:63 #: Z_Upgrade_3.11-4.00.php:63 msgid "Table has already been created" msgstr "Tabulka již byla vytvořena" -#: UpgradeDatabase.php:174 +#: UpgradeDatabase.php:178 #, fuzzy msgid "Column has already been changed" msgstr "Sloupec již byla vytvořena" -#: UpgradeDatabase.php:177 Z_Upgrade_3.10-3.11.php:67 +#: UpgradeDatabase.php:181 Z_Upgrade_3.10-3.11.php:67 #: Z_Upgrade_3.11-4.00.php:67 msgid "Column has already been created" msgstr "Sloupec již byla vytvořena" -#: UpgradeDatabase.php:180 Z_Upgrade_3.10-3.11.php:71 +#: UpgradeDatabase.php:184 Z_Upgrade_3.10-3.11.php:71 #: Z_Upgrade_3.11-4.00.php:71 msgid "Index already exists" msgstr "Index již existuje" -#: UpgradeDatabase.php:183 Z_Upgrade_3.10-3.11.php:75 +#: UpgradeDatabase.php:187 Z_Upgrade_3.10-3.11.php:75 #: Z_Upgrade_3.11-4.00.php:75 msgid "Entry has already been done" msgstr "Vstup již bylo učiněno" -#: UpgradeDatabase.php:186 +#: UpgradeDatabase.php:190 msgid "SQL syntax error. The SQL error message is" msgstr "SQL chyba syntaxe. Chyba SQL zpráva" -#: UpgradeDatabase.php:189 Z_Upgrade_3.10-3.11.php:79 +#: UpgradeDatabase.php:193 Z_Upgrade_3.10-3.11.php:79 #: Z_Upgrade_3.11-4.00.php:79 msgid "Primary key already exists" msgstr "Primární klíč již existuje" -#: UpgradeDatabase.php:192 +#: UpgradeDatabase.php:196 msgid "Index already dropped previously" msgstr "Index již klesl dříve" -#: UpgradeDatabase.php:195 Z_Upgrade_3.10-3.11.php:82 +#: UpgradeDatabase.php:199 Z_Upgrade_3.10-3.11.php:82 #: Z_Upgrade_3.11-4.00.php:82 msgid "Failure" msgstr "Selhání" -#: UpgradeDatabase.php:195 Z_Upgrade_3.10-3.11.php:83 +#: UpgradeDatabase.php:199 Z_Upgrade_3.10-3.11.php:83 #: Z_Upgrade_3.11-4.00.php:83 msgid "Error number" msgstr "Číslo chyby" @@ -33161,6 +33222,36 @@ msgid "Default" msgstr "Výchozí" +#: Z_FixedAssetCostAccumDepnFix.php:8 +#, fuzzy +msgid "Fixed Fixed Asset Records" +msgstr "Hmotného majetku Kredity" + +#: Z_FixedAssetCostAccumDepnFix.php:12 +msgid "This script repairs the fixedasset table cost and accum depn" +msgstr "" + +#: Z_FixedAssetCostAccumDepnFix.php:18 +#, fuzzy +msgid "Updated asset" +msgstr "Sazby aktualizace" + +#: Z_FixedAssetCostAccumDepnFix.php:18 +#, fuzzy +msgid "to have a cost of" +msgstr "std náklady" + +#: Z_FixedAssetCostAccumDepnFix.php:18 +#, fuzzy +msgid "and accum depn of" +msgstr "Accum Depn GL" + +#: Z_FixedAssetCostAccumDepnFix.php:22 +msgid "" +"Asset cost and accumulated depreciation has now been fixed to the " +"transaction cost and depreciation" +msgstr "" + #: Z_ImportChartOfAccounts.php:7 Z_ImportGLAccountGroups.php:5 #: Z_ImportGLAccountSections.php:5 msgid "Import Chart of Accounts" @@ -34006,6 +34097,108 @@ msgid "Existing languages are not affected." msgstr "Stávající jazyky nejsou ovlivněny." +#: Z_PriceChanges.php:11 +msgid "" +"This page updates already existing prices for a specified sales type (price " +"list)" +msgstr "Tato stránka aktualizuje stávající ceny pro určitý typ prodeje (ceník)" + +#: Z_PriceChanges.php:11 +msgid "" +"Choose between updating only customer special prices where the customer is " +"set up under the price list selected, or all prices under the sales type or " +"just specific prices for a customer for the stock category selected" +msgstr "" +"Vyberte si mezi aktualizace jediný zákazník speciální ceny, kde je zákazník " +"zřízený podle ceny vybraného seznamu, nebo všechny ceny v rámci prodeje, " +"nebo jen konkrétní typ ceny pro zákazníka pro populaci vybrané kategorii" + +#: Z_PriceChanges.php:13 +msgid "" +"This script takes no account of start and end dates of prices and updates " +"all historical prices as well as current prices - better to use new scripts " +"under Inventory -> Maintenance" +msgstr "" +"Tento skript nebere v úvahu datum zahájení a ukončení cen a aktualizace " +"všech historických cen, stejně jako v běžných cenách - lépe využít nové " +"skripty pod Inventory -> Údržba" + +#: Z_PriceChanges.php:24 +msgid "Select the Price List to update the costs for" +msgstr "Zvolte Cena aktualizovat náklady na" + +#: Z_PriceChanges.php:55 +msgid "Which Prices to update" +msgstr "Ceny, které k aktualizaci" + +#: Z_PriceChanges.php:57 +msgid "Only Non-customer special prices" +msgstr "Pouze Non-zákazník speciální ceny" + +#: Z_PriceChanges.php:58 +msgid "Only customer special prices" +msgstr "Pouze zákazník speciální ceny" + +#: Z_PriceChanges.php:59 +msgid "Both customer special prices and non-customer special prices" +msgstr "Oba zákazník speciální ceny a non-zákazník speciální ceny" + +#: Z_PriceChanges.php:60 +msgid "customer special prices only" +msgstr "zákazník speciální ceny pouze" + +#: Z_PriceChanges.php:71 +msgid "" +"Are you sure you wish to update all the prices according to the criteria " +"selected?" +msgstr "" +"Jste si jisti, že chcete aktualizovat všechny ceny podle zvolených kritérií?" + +#: Z_PriceChanges.php:78 +msgid "and a stock category code of" +msgstr "a zásoby kategorii kód" + +#: Z_PriceChanges.php:79 +msgid "and a increase percent of" +msgstr "a zvýšení procenta" + +#: Z_PriceChanges.php:89 +msgid "" +"The increase or decrease to be applied is expected to be an integer between " +"1 and 40 it is not necessary to enter the" +msgstr "" +"Zvýšení nebo snížení má být použita, je čekal, že je celé číslo mezi 1 a 40, " +"není nutné zadávat" + +#: Z_PriceChanges.php:89 +#, fuzzy +msgid "sign" +msgstr "Design" + +#: Z_PriceChanges.php:89 +msgid "the amount is assumed to be a percentage" +msgstr "částka Předpokládá se, že procento" + +#: Z_PriceChanges.php:94 +msgid "prices for" +msgstr "ceny pro" + +#: Z_PriceChanges.php:94 +msgid "for the stock category" +msgstr "pro populaci kategorii" + +#: Z_PriceChanges.php:94 +msgid "will been incremented by" +msgstr "bude se zvyšuje o" + +#: Z_PriceChanges.php:94 +msgid "percent" +msgstr "procent" + +#: Z_PriceChanges.php:138 +msgid "Updating prices for" +msgstr "Aktualizace ceny" + #: Z_ReApplyCostToSA.php:6 msgid "Apply Current Cost to Sales Analysis" msgstr "Použít aktuální náklady na analýzu prodeje" @@ -35472,6 +35665,28 @@ msgid "Aged Supplier Balances For Suppliers from" msgstr "Dodavatel ve věku Zůstatky Pro dodavatele z" +#: includes/PDFAssetRegisterHeader.inc:35 +msgid "Asset Type" +msgstr "Typ majetku" + +#: includes/PDFAssetRegisterHeader.inc:36 +#, fuzzy +msgid "Acquired After" +msgstr "Požadované datum" + +#: includes/PDFAssetRegisterHeader.inc:37 +#, fuzzy +msgid "and Before" +msgstr "a pro" + +#: includes/PDFAssetRegisterHeader.inc:57 +msgid "<--------------External Depreciation-------------->" +msgstr "" + +#: includes/PDFAssetRegisterHeader.inc:58 +msgid "<--------------Internal Depreciation-------------->" +msgstr "" + #: includes/PDFBankingSummaryPageHeader.inc:19 msgid "for Receipt Batch" msgstr "pro přijetí dávky" @@ -35567,6 +35782,7 @@ #: includes/PDFCustTransListingPageHeader.inc:50 #: includes/PDFPeriodStockTransListingPageHeader.inc:49 +#: includes/PDFStockTransListingPageHeader.inc:69 #: includes/PDFSuppTransListingPageHeader.inc:50 msgid "Trans Date" msgstr "Trans Datum" @@ -35795,6 +36011,16 @@ msgid "Actual Picked" msgstr "Skutečné Sklizené" +#: includes/PDFPriceListPageHeader.inc:18 +#, fuzzy +msgid "Special Prices for Inventory Categories between" +msgstr "Zkontrolujte, zda listy Kategorie mezi" + +#: includes/PDFPriceListPageHeader.inc:21 +#, fuzzy +msgid "Price List for Inventory Categories between" +msgstr "Zkontrolujte, zda listy Kategorie mezi" + #: includes/PDFProfitAndLossPageHeader.inc:21 #: includes/PDFTagProfitAndLossPageHeader.inc:21 msgid "Profit and loss for the " @@ -38308,10 +38534,6 @@ #~ msgstr "Zákazník záznam vybrané zákazníky" #, fuzzy -#~ msgid "Demand Work Orders" -#~ msgstr "Hledat práci Objednávky" - -#, fuzzy #~ msgid "Annual Depreciation Percentage" #~ msgstr "Neplatné odpisové sazby:" @@ -38320,134 +38542,6 @@ #~ msgstr "Aktualizace faktor" #~ msgid "" -#~ "There were no outstanding items on the order to deliver. A packing slip " -#~ "cannot be printed" -#~ msgstr "" -#~ "Nebyly zjištěny žádné nesplacené položek na objednávce dodat. Dodacího " -#~ "listu nelze vytisknout" - -#, fuzzy -#~ msgid "Fixed Fixed Asset Records" -#~ msgstr "Hmotného majetku Kredity" - -#, fuzzy -#~ msgid "Updated asset" -#~ msgstr "Sazby aktualizace" - -#, fuzzy -#~ msgid "to have a cost of" -#~ msgstr "std náklady" - -#, fuzzy -#~ msgid "and accum depn of" -#~ msgstr "Accum Depn GL" - -#~ msgid "" -#~ "This page updates already existing prices for a specified sales type " -#~ "(price list)" -#~ msgstr "" -#~ "Tato stránka aktualizuje stávající ceny pro určitý typ prodeje (ceník)" - -#~ msgid "" -#~ "Choose between updating only customer special prices where the customer " -#~ "is set up under the price list selected, or all prices under the sales " -#~ "type or just specific prices for a customer for the stock category " -#~ "selected" -#~ msgstr "" -#~ "Vyberte si mezi aktualizace jediný zákazník speciální ceny, kde je " -#~ "zákazník zřízený podle ceny vybraného seznamu, nebo všechny ceny v rámci " -#~ "prodeje, nebo jen konkrétní typ ceny pro zákazníka pro populaci vybrané " -#~ "kategorii" - -#~ msgid "" -#~ "This script takes no account of start and end dates of prices and updates " -#~ "all historical prices as well as current prices - better to use new " -#~ "scripts under Inventory -> Maintenance" -#~ msgstr "" -#~ "Tento skript nebere v úvahu datum zahájení a ukončení cen a aktualizace " -#~ "všech historických cen, stejně jako v běžných cenách - lépe využít nové " -#~ "skripty pod Inventory -> Údržba" - -#~ msgid "Select the Price List to update the costs for" -#~ msgstr "Zvolte Cena aktualizovat náklady na" - -#~ msgid "Which Prices to update" -#~ msgstr "Ceny, které k aktualizaci" - -#~ msgid "Only Non-customer special prices" -#~ msgstr "Pouze Non-zákazník speciální ceny" - -#~ msgid "Only customer special prices" -#~ msgstr "Pouze zákazník speciální ceny" - -#~ msgid "Both customer special prices and non-customer special prices" -#~ msgstr "Oba zákazník speciální ceny a non-zákazník speciální ceny" - -#~ msgid "customer special prices only" -#~ msgstr "zákazník speciální ceny pouze" - -#~ msgid "" -#~ "Are you sure you wish to update all the prices according to the criteria " -#~ "selected?" -#~ msgstr "" -#~ "Jste si jisti, že chcete aktualizovat všechny ceny podle zvolených " -#~ "kritérií?" - -#~ msgid "and a stock category code of" -#~ msgstr "a zásoby kategorii kód" - -#~ msgid "and a increase percent of" -#~ msgstr "a zvýšení procenta" - -#~ msgid "" -#~ "The increase or decrease to be applied is expected to be an integer " -#~ "between 1 and 40 it is not necessary to enter the" -#~ msgstr "" -#~ "Zvýšení nebo snížení má být použita, je čekal, že je celé číslo mezi 1 a " -#~ "40, není nutné zadávat" - -#, fuzzy -#~ msgid "sign" -#~ msgstr "Design" - -#~ msgid "the amount is assumed to be a percentage" -#~ msgstr "částka Předpokládá se, že procento" - -#~ msgid "prices for" -#~ msgstr "ceny pro" - -#~ msgid "for the stock category" -#~ msgstr "pro populaci kategorii" - -#~ msgid "will been incremented by" -#~ msgstr "bude se zvyšuje o" - -#~ msgid "percent" -#~ msgstr "procent" - -#~ msgid "Updating prices for" -#~ msgstr "Aktualizace ceny" - -#~ msgid "Asset Type" -#~ msgstr "Typ majetku" - -#, fuzzy -#~ msgid "Acquired After" -#~ msgstr "Požadované datum" - -#, fuzzy -#~ msgid "and Before" -#~ msgstr "a pro" - -#, fuzzy -#~ msgid "Special Prices for Inventory Categories between" -#~ msgstr "Zkontrolujte, zda listy Kategorie mezi" - -#, fuzzy -#~ msgid "Price List for Inventory Categories between" -#~ msgstr "Zkontrolujte, zda listy Kategorie mezi" - -#~ msgid "" #~ "The effective after date field must be a date in the format dd/mm/yy or " #~ "dd/mm/yyyy or ddmmyy or ddmmyyyy or dd-mm-yy or dd-mm-yyyy" #~ msgstr "" Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-27 09:10:47 UTC (rev 4640) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: WebERP 4.00/trunk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-07-24 12:24+1200\n" +"POT-Creation-Date: 2011-07-27 19:08+1200\n" "PO-Revision-Date: 2011-07-17 13:46+0000\n" "Last-Translator: Peter Hürlimann <su...@ph...>\n" "Language-Team: Deutsch <web...@li...>\n" @@ -146,7 +146,7 @@ #: Locations.php:256 Locations.php:265 Locations.php:274 Locations.p... [truncated message content] |
From: <dai...@us...> - 2011-07-27 09:10:58
|
Revision: 4640 http://web-erp.svn.sourceforge.net/web-erp/?rev=4640&view=rev Author: daintree Date: 2011-07-27 09:10:47 +0000 (Wed, 27 Jul 2011) Log Message: ----------- pre 4.05 release Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/build/make_release.sh trunk/doc/Change.log trunk/includes/ConnectDB.inc trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/UpgradeDatabase.php 2011-07-27 09:10:47 UTC (rev 4640) @@ -119,9 +119,13 @@ case '4.04': $SQLScripts[] = './sql/mysql/upgrade4.04-4.04.1.sql'; case '4.04.1': + case '4.04.2': + case '4.04.3': $SQLScripts[] = './sql/mysql/upgrade4.04.1-4.04.4.sql'; case '4.04.4': $SQLScripts[] = './sql/mysql/upgrade4.04.4-4.04.5.sql'; + case '4.04.5': + case '4.05': break; } //end switch } Modified: trunk/build/make_release.sh =================================================================== --- trunk/build/make_release.sh 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/build/make_release.sh 2011-07-27 09:10:47 UTC (rev 4640) @@ -126,4 +126,4 @@ cd .. -zip -r $OUTPUT_DIR/webERP webERP -x \*.svn* \*/config.php +zip -r $OUTPUT_DIR/webERP webERP -x \*.svn* \*/config.php \*.ecoder* Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/doc/Change.log 2011-07-27 09:10:47 UTC (rev 4640) @@ -1,6 +1,9 @@ webERP Change Log +27/7/11 Version 4.05 +27/7/11 includes/LanguageSetup.php now checks for existence of LC_MESSAGES (it doesn't exist on windows servers) and uses LC_ALL as the fall back only +27/7/11 Fixed quoting in PDFSuppTransListing.php, StockReorderLevel.php WhereUsedInquiry.php Z_ReverseSuppPaymentRun.php 26/7/11 SalesCategories.php fixed display of active categories - this script is not used by webERP - only by Mo Kelly's joomla cart application 24/7/11 Version 4.04.5 Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/includes/ConnectDB.inc 2011-07-27 09:10:47 UTC (rev 4640) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.04.5'; //must update manually every time there is a DB change +$Version='4.05'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-07-27 09:10:47 UTC (rev 4640) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-07-24 12:24+1200\n" +"POT-Creation-Date: 2011-07-27 19:08+1200\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -149,7 +149,7 @@ #: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 #: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 #: PaymentMethods.php:138 PaymentTerms.php:144 PaymentTerms.php:151 -#: PcExpenses.php:152 SalesCategories.php:125 SalesCategories.php:133 +#: PcExpenses.php:152 SalesCategories.php:124 SalesCategories.php:131 #: SalesPeople.php:149 SalesPeople.php:156 SalesTypes.php:150 #: SalesTypes.php:160 Shippers.php:82 Shippers.php:94 StockCategories.php:179 #: Stocks.php:481 Stocks.php:490 Stocks.php:498 Stocks.php:506 Stocks.php:514 @@ -347,7 +347,7 @@ #: PaymentMethods.php:200 PaymentTerms.php:201 PcAssignCashToTab.php:255 #: PcClaimExpensesFromTab.php:252 PcExpenses.php:208 PcTabs.php:234 #: PcTypeTabs.php:172 PO_AuthorisationLevels.php:149 Prices_Customer.php:280 -#: Prices.php:246 PurchData.php:202 SalesCategories.php:256 +#: Prices.php:246 PurchData.php:202 SalesCategories.php:254 #: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:219 #: SalesTypes.php:216 SecurityTokens.php:110 SelectCustomer.php:668 #: SelectCustomer.php:686 SelectCustomer.php:710 SelectCustomer.php:727 @@ -381,7 +381,7 @@ #: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 #: PO_AuthorisationLevels.php:151 PO_Items.php:684 Prices_Customer.php:281 #: Prices.php:247 PurchData.php:203 SalesAnalReptCols.php:294 -#: SalesAnalRepts.php:302 SalesCategories.php:257 SalesGLPostings.php:133 +#: SalesAnalRepts.php:302 SalesCategories.php:255 SalesGLPostings.php:133 #: SalesGLPostings.php:246 SalesPeople.php:220 SalesTypes.php:217 #: SecurityTokens.php:111 SelectCreditItems.php:754 SelectCustomer.php:669 #: SelectCustomer.php:687 SelectCustomer.php:711 SelectCustomer.php:728 @@ -701,9 +701,9 @@ msgstr "Datum" #: AddCustomerNotes.php:114 AddCustomerTypeNotes.php:105 PcReportTab.php:173 -#: Stocks.php:892 UpgradeDatabase.php:171 UpgradeDatabase.php:174 -#: UpgradeDatabase.php:177 UpgradeDatabase.php:180 UpgradeDatabase.php:183 -#: UpgradeDatabase.php:186 UpgradeDatabase.php:189 UpgradeDatabase.php:192 +#: Stocks.php:892 UpgradeDatabase.php:175 UpgradeDatabase.php:178 +#: UpgradeDatabase.php:181 UpgradeDatabase.php:184 UpgradeDatabase.php:187 +#: UpgradeDatabase.php:190 UpgradeDatabase.php:193 UpgradeDatabase.php:196 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 #: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 #: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 @@ -847,15 +847,15 @@ #: PDFRemittanceAdvice.php:84 PDFStockCheckComparison.php:36 #: PDFStockCheckComparison.php:62 PDFStockCheckComparison.php:267 #: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:149 -#: PrintCustOrder_generic.php:243 PrintCustOrder.php:198 ReorderLevel.php:60 -#: ReorderLevel.php:149 SalesAnalysis_UserDefined.php:28 -#: SelectCreditItems.php:23 StockCheck.php:47 StockCheck.php:68 -#: StockCheck.php:98 StockCheck.php:142 StockCheck.php:153 StockCheck.php:195 -#: StockDispatch.php:92 StockDispatch.php:104 SupplierBalsAtPeriodEnd.php:56 -#: SupplierBalsAtPeriodEnd.php:67 SuppPaymentRun.php:109 -#: SuppPaymentRun.php:120 SuppPaymentRun.php:184 SuppPaymentRun.php:214 -#: SuppPriceList.php:121 Tax.php:63 Tax.php:168 Tax.php:277 -#: Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 +#: PrintCustOrder_generic.php:243 PrintCustOrder.php:198 +#: PrintSalesOrder_generic.php:183 ReorderLevel.php:60 ReorderLevel.php:149 +#: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:23 StockCheck.php:47 +#: StockCheck.php:68 StockCheck.php:98 StockCheck.php:142 StockCheck.php:153 +#: StockCheck.php:195 StockDispatch.php:92 StockDispatch.php:104 +#: SupplierBalsAtPeriodEnd.php:56 SupplierBalsAtPeriodEnd.php:67 +#: SuppPaymentRun.php:109 SuppPaymentRun.php:120 SuppPaymentRun.php:184 +#: SuppPaymentRun.php:214 SuppPriceList.php:121 Tax.php:63 Tax.php:168 +#: Tax.php:277 Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 #: Z_DataExport.php:308 Z_DataExport.php:347 Z_DataExport.php:383 #: Z_DataExport.php:419 Z_DataExport.php:471 Z_poRebuildDefault.php:38 #: includes/PDFPaymentRun_PymtFooter.php:57 @@ -1103,7 +1103,7 @@ #: FixedAssetCategories.php:134 GLAccounts.php:197 Locations.php:328 #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:160 PcExpensesTypeTab.php:101 PcTabs.php:166 -#: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:137 +#: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:135 #: SalesTypes.php:166 StockCategories.php:196 Suppliers.php:635 #: SupplierTypes.php:151 Z_DeleteInvoice.php:146 msgid "has been deleted" @@ -1170,7 +1170,8 @@ #: SystemParameters.php:943 SystemParameters.php:949 SystemParameters.php:955 #: SystemParameters.php:961 TopItems.php:23 TopItems.php:36 #: WorkOrderEntry.php:562 WorkOrderEntry.php:565 WorkOrderIssue.php:626 -#: WorkOrderIssue.php:629 +#: WorkOrderIssue.php:629 includes/PDFAssetRegisterHeader.inc:15 +#: includes/PDFAssetRegisterHeader.inc:24 msgid "All" msgstr "Všechny" @@ -1730,6 +1731,8 @@ #: includes/PDFPeriodStockTransListingPageHeader.inc:48 #: includes/PDFPeriodStockTransListingPageHeader.inc:52 #: includes/PDFStockComparisonPageHeader.inc:36 +#: includes/PDFStockTransListingPageHeader.inc:68 +#: includes/PDFStockTransListingPageHeader.inc:72 #: includes/PDFSuppTransListingPageHeader.inc:49 msgid "Reference" msgstr "Reference" @@ -1884,9 +1887,10 @@ #: includes/PDFSalesOrder_generic.inc:95 #: includes/PDFStockCheckPageHeader.inc:44 #: includes/PDFStockNegativesHeader.inc:33 -#: includes/PDFStockTransferHeader.inc:39 includes/PDFTransPageHeader.inc:209 -#: includes/PO_PDFOrderPageHeader.inc:78 api/api_xml-rpc.php:2260 -#: api/api_xml-rpc.php:2306 api/api_xml-rpc.php:2502 +#: includes/PDFStockTransferHeader.inc:39 +#: includes/PDFStockTransListingPageHeader.inc:70 +#: includes/PDFTransPageHeader.inc:209 includes/PO_PDFOrderPageHeader.inc:78 +#: api/api_xml-rpc.php:2260 api/api_xml-rpc.php:2306 api/api_xml-rpc.php:2502 msgid "Quantity" msgstr "Množství" @@ -1943,7 +1947,7 @@ #: includes/PDFOrderPageHeader_generic.inc:79 #: includes/PDFOstdgGRNsPageHeader.inc:16 #: includes/PDFPaymentRunPageHeader.inc:11 -#: includes/PDFPickingListHeader.inc:48 +#: includes/PDFPickingListHeader.inc:48 includes/PDFPriceListPageHeader.inc:12 #: includes/PDFProfitAndLossPageHeader.inc:27 #: includes/PDFSalesAnalPageHeader.inc:15 #: includes/PDFSalesOrder_generic.inc:81 @@ -1971,6 +1975,7 @@ #: PrintCustTransPortrait.php:998 ReorderLevel.php:240 StockDispatch.php:337 #: SuppPriceList.php:255 Tax.php:243 includes/PDFAgedDebtorsPageHeader.inc:34 #: includes/PDFAgedSuppliersPageHeader.inc:21 +#: includes/PDFAssetRegisterHeader.inc:38 #: includes/PDFBalanceSheetPageHeader.inc:26 #: includes/PDFBankingSummaryPageHeader.inc:23 #: includes/PDFBOMListingPageHeader.inc:26 @@ -1990,7 +1995,7 @@ #: includes/PDFOstdgGRNsPageHeader.inc:16 #: includes/PDFPaymentRunPageHeader.inc:11 #: includes/PDFPeriodStockTransListingPageHeader.inc:25 -#: includes/PDFPickingListHeader.inc:69 +#: includes/PDFPickingListHeader.inc:69 includes/PDFPriceListPageHeader.inc:12 #: includes/PDFProfitAndLossPageHeader.inc:28 #: includes/PDFQuotationPageHeader.inc:94 #: includes/PDFQuotationPortraitPageHeader.inc:92 @@ -2003,6 +2008,7 @@ #: includes/PDFStockLocTransferHeader.inc:12 #: includes/PDFStockNegativesHeader.inc:12 #: includes/PDFStockTransferHeader.inc:16 +#: includes/PDFStockTransListingPageHeader.inc:45 #: includes/PDFSupplierBalsPageHeader.inc:20 #: includes/PDFSuppTransListingPageHeader.inc:32 #: includes/PDFTabReportHeader.inc:15 @@ -2114,7 +2120,7 @@ #: PDFOrderStatus.php:319 PDFPrintLabel.php:238 PO_Items.php:637 #: PO_Items.php:926 PO_SelectOSPurchOrder.php:211 PO_SelectPurchOrder.php:178 #: PricesByCost.php:152 ReorderLevelLocation.php:55 ReorderLevel.php:254 -#: ReverseGRN.php:377 SalesCategories.php:423 SecurityTokens.php:86 +#: ReverseGRN.php:377 SalesCategories.php:421 SecurityTokens.php:86 #: SecurityTokens.php:92 SecurityTokens.php:102 SelectAsset.php:243 #: SelectCompletedOrder.php:536 SelectContract.php:153 #: SelectCreditItems.php:976 SelectOrderItems.php:1517 @@ -2129,8 +2135,8 @@ #: TaxAuthorities.php:145 TopItems.php:163 WorkCentres.php:124 #: WorkOrderCosting.php:81 WorkOrderCosting.php:111 WorkOrderEntry.php:598 #: WorkOrderIssue.php:668 includes/DefineLabelClass.php:12 -#: includes/DefineLabelClass.php:45 includes/PDFGrnHeader.inc:29 -#: includes/PDFInventoryPlanPageHeader.inc:51 +#: includes/DefineLabelClass.php:45 includes/PDFAssetRegisterHeader.inc:62 +#: includes/PDFGrnHeader.inc:29 includes/PDFInventoryPlanPageHeader.inc:51 #: includes/PDFOstdgGRNsPageHeader.inc:38 #: includes/PDFStockLocTransferHeader.inc:49 #: includes/PDFStockTransferHeader.inc:36 includes/PDFTopItemsHeader.inc:50 @@ -2240,7 +2246,7 @@ #: BOMInquiry.php:26 BOMs.php:806 EmailConfirmation.php:191 MRPDemands.php:333 #: MRPReport.php:542 PO_SelectOSPurchOrder.php:200 PO_SelectPurchOrder.php:170 -#: SalesCategories.php:422 SelectProduct.php:512 Shipt_Select.php:166 +#: SalesCategories.php:420 SelectProduct.php:512 Shipt_Select.php:166 #: StockAdjustments.php:76 StockAdjustments.php:335 StockCounts.php:97 #: StockCounts.php:132 StockMovements.php:31 StockReorderLevel.php:44 #: StockStatus.php:61 StockTransfers.php:38 StockTransfers.php:445 @@ -2641,8 +2647,10 @@ #: StockCounts.php:133 StockReorderLevel.php:49 StockSerialItemResearch.php:78 #: StockStatus.php:84 StockStatus.php:89 WhereUsedInquiry.php:67 #: WorkCentres.php:125 WorkCentres.php:210 +#: includes/PDFAssetRegisterHeader.inc:64 #: includes/PDFPeriodStockTransListingPageHeader.inc:51 -#: includes/PDFStockNegativesHeader.inc:31 api/api_xml-rpc.php:2258 +#: includes/PDFStockNegativesHeader.inc:31 +#: includes/PDFStockTransListingPageHeader.inc:71 api/api_xml-rpc.php:2258 #: api/api_xml-rpc.php:2304 api/api_xml-rpc.php:2500 msgid "Location" msgstr "Umístění" @@ -2988,7 +2996,7 @@ #: PO_AuthoriseMyOrders.php:132 PricesByCost.php:221 PurchData.php:497 #: ReorderLevelLocation.php:156 SecurityTokens.php:89 #: SelectCreditItems.php:911 SMTPServer.php:64 StockCostUpdate.php:163 -#: StockReorderLevel.php:94 Stocks.php:1047 SystemParameters.php:1018 +#: StockReorderLevel.php:95 Stocks.php:1047 SystemParameters.php:1018 #: TaxAuthorityRates.php:79 WorkOrderEntry.php:546 WOSerialNos.php:315 msgid "Update" msgstr "Aktualizace" @@ -3236,6 +3244,7 @@ #: StockMovements.php:97 StockStatus.php:313 SuppCreditGRNs.php:229 #: SuppCreditGRNs.php:230 SupplierTenders.php:267 SupplierTenders.php:494 #: SuppPriceList.php:274 includes/DefineLabelClass.php:49 +#: includes/PDFPriceListPageHeader.inc:46 #: includes/PDFQuotationPageHeader.inc:104 #: includes/PDFQuotationPortraitPageHeader.inc:104 #: includes/PDFTransPageHeaderPortrait.inc:265 @@ -3831,8 +3840,8 @@ #: FixedAssetCategories.php:86 FixedAssetCategories.php:105 #: PricesBasedOnMarkUp.php:337 PricesBasedOnMarkUp.php:353 #: SelectCreditItems.php:1395 SpecialOrder.php:423 StockCategories.php:21 -#: StockCategories.php:82 StockCategories.php:153 Z_ReApplyCostToSA.php:62 -#: Z_ReApplyCostToSA.php:74 +#: StockCategories.php:82 StockCategories.php:153 Z_PriceChanges.php:137 +#: Z_ReApplyCostToSA.php:62 Z_ReApplyCostToSA.php:74 msgid "because" msgstr "protože" @@ -4327,7 +4336,7 @@ msgstr "Obrázek" #: ContractBOM.php:365 CounterSales.php:2013 FixedAssetItems.php:468 -#: FixedAssetItems.php:472 PO_Items.php:951 SalesCategories.php:249 +#: FixedAssetItems.php:472 PO_Items.php:951 SalesCategories.php:247 #: SelectCreditItems.php:1005 SelectOrderItems.php:1531 #: SelectOrderItems.php:1708 Stocks.php:728 Stocks.php:732 #: SupplierTenders.php:518 WorkOrderEntry.php:617 WorkOrderIssue.php:684 @@ -5045,7 +5054,7 @@ #: StockSerialItemResearch.php:81 #: includes/PDFDeliveryDifferencesPageHeader.inc:45 #: includes/PDFDIFOTPageHeader.inc:44 includes/PDFOrderPageHeader.inc:50 -#: includes/PDFTransPageHeader.inc:47 +#: includes/PDFPriceListPageHeader.inc:42 includes/PDFTransPageHeader.inc:47 #: includes/PDFTransPageHeaderPortrait.inc:56 msgid "Branch" msgstr "Větev" @@ -5089,18 +5098,19 @@ #: ReorderLevel.php:242 SalesCategoryPeriodInquiry.php:162 #: SalesTopItemsInquiry.php:218 SpecialOrder.php:606 StockDispatch.php:344 #: Stocks.php:738 SuppPriceList.php:211 SuppPriceList.php:261 -#: includes/PDFInventoryValnPageHeader.inc:32 +#: Z_PriceChanges.php:37 includes/PDFInventoryValnPageHeader.inc:32 #: includes/PDFInventoryValnPageHeader.inc:38 +#: includes/PDFPriceListPageHeader.inc:38 msgid "Category" msgstr "Kategorie" #: Contracts.php:849 PricesBasedOnMarkUp.php:111 SpecialOrder.php:610 -#: Stocks.php:741 +#: Stocks.php:741 Z_PriceChanges.php:42 msgid "The stock categories could not be retrieved because" msgstr "Populace kategorie se nepodařilo získat, protože" #: Contracts.php:850 FixedAssetItems.php:485 PricesBasedOnMarkUp.php:112 -#: SpecialOrder.php:611 Stocks.php:742 +#: SpecialOrder.php:611 Stocks.php:742 Z_PriceChanges.php:43 msgid "The SQL used to retrieve stock categories and failed was" msgstr "SQL slouží k načtení zásob kategorií a neúspěšný byl" @@ -5630,7 +5640,8 @@ #: CounterSales.php:1193 DeliveryDetails.php:552 EDIMessageFormat.php:127 #: EDIMessageFormat.php:204 Prices_Customer.php:41 #: RecurringSalesOrdersProcess.php:88 ReverseGRN.php:332 SpecialOrder.php:111 -#: SpecialOrder.php:113 +#: SpecialOrder.php:113 includes/PDFPriceListPageHeader.inc:18 +#: includes/PDFPriceListPageHeader.inc:21 msgid "for" msgstr "pro" @@ -6632,7 +6643,8 @@ msgstr "Zprávy Velikost stránky" #: CustLoginSetup.php:174 CustLoginSetup.php:176 EmailConfirmation.php:119 -#: PrintCustOrder_generic.php:111 PrintCustOrder.php:90 SuppLoginSetup.php:202 +#: PrintCustOrder_generic.php:111 PrintCustOrder.php:90 +#: PrintSalesOrder_generic.php:90 SuppLoginSetup.php:202 #: SuppLoginSetup.php:204 WWW_Users.php:502 WWW_Users.php:504 msgid "A4" msgstr "A4" @@ -6647,10 +6659,11 @@ #: CustLoginSetup.php:186 CustLoginSetup.php:188 CustLoginSetup.php:198 #: CustLoginSetup.php:200 CustLoginSetup.php:209 CustLoginSetup.php:211 #: EmailConfirmation.php:119 PrintCustOrder_generic.php:111 -#: PrintCustOrder.php:90 SuppLoginSetup.php:214 SuppLoginSetup.php:216 -#: SuppLoginSetup.php:226 SuppLoginSetup.php:228 SuppLoginSetup.php:237 -#: SuppLoginSetup.php:239 WWW_Users.php:514 WWW_Users.php:516 -#: WWW_Users.php:526 WWW_Users.php:528 WWW_Users.php:537 WWW_Users.php:539 +#: PrintCustOrder.php:90 PrintSalesOrder_generic.php:90 SuppLoginSetup.php:214 +#: SuppLoginSetup.php:216 SuppLoginSetup.php:226 SuppLoginSetup.php:228 +#: SuppLoginSetup.php:237 SuppLoginSetup.php:239 WWW_Users.php:514 +#: WWW_Users.php:516 WWW_Users.php:526 WWW_Users.php:528 WWW_Users.php:537 +#: WWW_Users.php:539 msgid "landscape" msgstr "na šířku" @@ -6735,11 +6748,11 @@ msgid "was" msgstr "byl" -#: CustomerAllocations.php:324 +#: CustomerAllocations.php:323 msgid "Allocate Receipt" msgstr "Příjem přidělit" -#: CustomerAllocations.php:324 CustomerReceipt.php:529 +#: CustomerAllocations.php:323 CustomerReceipt.php:529 msgid "Allocate Receipts" msgstr "Příjmy přidělit" @@ -8395,13 +8408,16 @@ #: includes/PDFLowGPPageHeader.inc:15 includes/PDFOstdgGRNsPageHeader.inc:15 #: includes/PDFPaymentRunPageHeader.inc:18 #: includes/PDFPaymentRunPageHeader.inc:21 +#: includes/PDFPriceListPageHeader.inc:18 +#: includes/PDFPriceListPageHeader.inc:21 #: includes/PDFStockCheckPageHeader.inc:16 #: includes/PDFSupplierBalsPageHeader.inc:17 msgid "and" msgstr "a" #: DailyBankTransactions.php:104 PDFCustTransListing.php:35 -#: PDFPeriodStockTransListing.php:39 PDFSuppTransListing.php:35 +#: PDFPeriodStockTransListing.php:39 PDFStockTransListing.php:38 +#: PDFSuppTransListing.php:35 msgid "Transaction type" msgstr "Typ transakce" @@ -8872,6 +8888,17 @@ msgid "Commit Order Changes" msgstr "Spáchat Změny objednávky" +#: DemandWorkOrders.php:9 +#, fuzzy +msgid "Demand Work Orders" +msgstr "Hledat práci Objednávky" + +#: DemandWorkOrders.php:46 SelectProduct.php:282 +msgid "" +"The quantity on work orders for this product cannot be retrieved because" +msgstr "" +"Množství na pracovních příkazů pro tento produkt není možné získat, protože" + #: DiscountCategories.php:7 msgid "Discount Categories Maintenance" msgstr "Sleva Kategorie Údržba" @@ -8909,7 +8936,7 @@ msgstr "Kód slevové skupiny" #: DiscountCategories.php:88 DiscountCategories.php:248 PO_Header.php:855 -#: SalesCategories.php:255 SuppInvGRNs.php:277 SupplierTenders.php:55 +#: SalesCategories.php:253 SuppInvGRNs.php:277 SupplierTenders.php:55 #, php-format msgid "Select" msgstr "Vybrat" @@ -8960,6 +8987,7 @@ #: includes/PDFInventoryPlanPageHeader.inc:50 #: includes/PDFInventoryValnPageHeader.inc:32 #: includes/PDFLowGPPageHeader.inc:45 includes/PDFOstdgGRNsPageHeader.inc:38 +#: includes/PDFPriceListPageHeader.inc:38 #: includes/PDFStockCheckPageHeader.inc:33 #: includes/PDFStockComparisonPageHeader.inc:33 msgid "Item" @@ -9337,7 +9365,7 @@ msgstr "Aby data" #: EDIProcessOrders.php:275 EDIProcessOrders.php:277 -#: SupplierAllocations.php:436 +#: SupplierAllocations.php:436 includes/PDFStockTransListingPageHeader.inc:41 msgid "dated" msgstr "ze dne" @@ -9602,11 +9630,12 @@ "pro" #: EmailConfirmation.php:9 PrintCustOrder_generic.php:12 PrintCustOrder.php:13 +#: PrintSalesOrder_generic.php:14 msgid "Select Order To Print" msgstr "Vyberte Aby bylo možné tisknout" #: EmailConfirmation.php:15 PrintCustOrder_generic.php:15 -#: PrintCustOrder.php:16 +#: PrintCustOrder.php:16 PrintSalesOrder_generic.php:17 msgid "Select an Order Number to Print before calling this page" msgstr "Vyberte číslo objednávky pro tisk před voláním na tuto stránku" @@ -9614,19 +9643,22 @@ #: PO_OrderDetails.php:74 PrintCustOrder_generic.php:22 #: PrintCustOrder_generic.php:84 PrintCustOrder_generic.php:118 #: PrintCustOrder.php:18 PrintCustOrder.php:71 PrintCustOrder.php:95 -#: SelectSalesOrder.php:309 +#: PrintSalesOrder_generic.php:19 PrintSalesOrder_generic.php:70 +#: PrintSalesOrder_generic.php:95 SelectSalesOrder.php:309 msgid "Outstanding Sales Orders" msgstr "Nevyřízené prodejní objednávky" #: EmailConfirmation.php:24 EmailConfirmation.php:96 EmailConfirmation.php:128 #: PrintCustOrder_generic.php:23 PrintCustOrder_generic.php:85 #: PrintCustOrder_generic.php:119 PrintCustOrder.php:19 PrintCustOrder.php:72 -#: PrintCustOrder.php:96 +#: PrintCustOrder.php:96 PrintSalesOrder_generic.php:20 +#: PrintSalesOrder_generic.php:71 PrintSalesOrder_generic.php:96 msgid "Completed Sales Orders" msgstr "Dokončeny Prodejní objednávky" #: EmailConfirmation.php:42 FTP_RadioBeacon.php:178 #: PrintCustOrder_generic.php:36 PrintCustOrder.php:26 +#: PrintSalesOrder_generic.php:27 PrintSalesOrder_generic.php:129 msgid "" "There was a problem retrieving the order header details for Order Number" msgstr "Tam byl problém získávání informací, aby záhlaví pro pořadové číslo" @@ -9640,39 +9672,43 @@ #: PrintCustTrans.php:213 PrintCustTrans.php:263 PrintCustTrans.php:668 #: PrintCustTrans.php:837 PrintCustTransPortrait.php:235 #: PrintCustTransPortrait.php:288 PrintCustTransPortrait.php:689 -#: PrintCustTransPortrait.php:858 +#: PrintCustTransPortrait.php:858 PrintSalesOrder_generic.php:27 +#: PrintSalesOrder_generic.php:130 msgid "from the database" msgstr "z databáze" #: EmailConfirmation.php:81 EmailConfirmation.php:115 #: PrintCustOrder_generic.php:74 PrintCustOrder_generic.php:103 #: PrintCustOrder_generic.php:238 PrintCustOrder.php:66 PrintCustOrder.php:82 -#: PrintCustOrder.php:194 +#: PrintCustOrder.php:194 PrintSalesOrder_generic.php:65 +#: PrintSalesOrder_generic.php:82 PrintSalesOrder_generic.php:179 msgid "Print Packing Slip Error" msgstr "Tisk Balení skluzu Chyba" #: EmailConfirmation.php:87 PrintCustOrder_generic.php:77 -#: PrintCustOrder.php:69 +#: PrintCustOrder.php:69 PrintSalesOrder_generic.php:68 msgid "Unable to Locate Order Number" msgstr "Nelze Vyhledejte Objednací číslo" #: EmailConfirmation.php:117 PrintCustOrder_generic.php:106 -#: PrintCustOrder.php:85 +#: PrintCustOrder.php:85 PrintSalesOrder_generic.php:85 msgid "The packing slip for order number" msgstr "Balení prokluzu pro pořadové číslo" #: EmailConfirmation.php:117 PO_PDFPurchOrder.php:137 #: PrintCustOrder_generic.php:107 PrintCustOrder.php:86 +#: PrintSalesOrder_generic.php:86 msgid "has previously been printed" msgstr "již dříve bylo vytištěno" #: EmailConfirmation.php:117 PO_PDFPurchOrder.php:137 #: PrintCustOrder_generic.php:107 PrintCustOrder.php:86 +#: PrintSalesOrder_generic.php:86 msgid "It was printed on" msgstr "To byl vytištěn na" #: EmailConfirmation.php:117 PrintCustOrder_generic.php:108 -#: PrintCustOrder.php:87 +#: PrintCustOrder.php:87 PrintSalesOrder_generic.php:87 msgid "" "This check is there to ensure that duplicate packing slips are not produced " "and dispatched more than once to the customer" @@ -9682,26 +9718,28 @@ #: EmailConfirmation.php:119 PrintCustOrder_generic.php:110 #: PrintCustOrder_generic.php:111 PrintCustOrder.php:89 PrintCustOrder.php:90 +#: PrintSalesOrder_generic.php:89 PrintSalesOrder_generic.php:90 msgid "Do a Re-Print" msgstr "Do Re-Print" #: EmailConfirmation.php:119 PrintCustOrder_generic.php:110 -#: PrintCustOrder.php:89 +#: PrintCustOrder.php:89 PrintSalesOrder_generic.php:89 msgid "On Pre-Printed Stationery" msgstr "Na Pre-tištěné papírnické" #: EmailConfirmation.php:119 PrintCustOrder_generic.php:110 #: PrintCustOrder_generic.php:111 PrintCustOrder.php:89 PrintCustOrder.php:90 +#: PrintSalesOrder_generic.php:89 PrintSalesOrder_generic.php:90 msgid "Even Though Previously Printed" msgstr "I když dříve vytištěnou" #: EmailConfirmation.php:119 PrintCustOrder_generic.php:111 -#: PrintCustOrder.php:90 +#: PrintCustOrder.php:90 PrintSalesOrder_generic.php:90 msgid "Plain paper" msgstr "Volné listy" #: EmailConfirmation.php:124 PrintCustOrder_generic.php:114 -#: PrintCustOrder.php:93 +#: PrintCustOrder.php:93 PrintSalesOrder_generic.php:93 msgid "Or select another Order Number to Print" msgstr "Nebo zvolte jinou Objednací číslo k tisku" @@ -10106,6 +10144,7 @@ #: FixedAssetDepreciation.php:83 FixedAssetRegister.php:80 #: FixedAssetRegister.php:331 FixedAssetTransfer.php:109 #: SuppFixedAssetChgs.php:72 SupplierCredit.php:372 SupplierInvoice.php:342 +#: includes/PDFAssetRegisterHeader.inc:60 msgid "Asset ID" msgstr "Asset ID" @@ -10116,6 +10155,8 @@ #: FixedAssetDepreciation.php:86 PricesByCost.php:157 SalesAnalReptCols.php:38 #: SalesAnalReptCols.php:40 SelectProduct.php:186 SelectProduct.php:343 #: ShipmentCosting.php:149 ShipmentCosting.php:150 StockCostUpdate.php:149 +#: includes/PDFAssetRegisterHeader.inc:66 +#: includes/PDFAssetRegisterHeader.inc:69 #: includes/PDFInventoryValnPageHeader.inc:35 #: includes/PDFInventoryValnPageHeader.inc:39 #: includes/PDFLowGPPageHeader.inc:48 @@ -10389,7 +10430,7 @@ msgid "long" msgstr "dlouho" -#: FixedAssetItems.php:455 SalesCategories.php:326 Stocks.php:715 +#: FixedAssetItems.php:455 SalesCategories.php:324 Stocks.php:715 msgid "Image File (.jpg)" msgstr "Obrázek File (. Jpg)" @@ -10539,7 +10580,7 @@ msgid "Fixed Asset Register" msgstr "Hmotného majetku Registrace" -#: FixedAssetRegister.php:84 +#: FixedAssetRegister.php:84 includes/PDFAssetRegisterHeader.inc:65 msgid "Date Acquired" msgstr "Získané data" @@ -10555,7 +10596,8 @@ msgid "Additions" msgstr "Přírůstky" -#: FixedAssetRegister.php:88 +#: FixedAssetRegister.php:88 includes/PDFAssetRegisterHeader.inc:67 +#: includes/PDFAssetRegisterHeader.inc:70 msgid "Depn" msgstr "Depn" @@ -10567,7 +10609,8 @@ msgid "Depn C/fwd" msgstr "Depn C / vpřed" -#: FixedAssetRegister.php:91 +#: FixedAssetRegister.php:91 includes/PDFAssetRegisterHeader.inc:68 +#: includes/PDFAssetRegisterHeader.inc:71 msgid "NBV" msgstr "NBV" @@ -10608,15 +10651,15 @@ msgid "Show Assets" msgstr "Zobrazit Aktiva" -#: FixedAssetRegister.php:329 +#: FixedAssetRegister.php:329 includes/PDFAssetRegisterHeader.inc:33 msgid "Asset Category " msgstr "Kategorie aktiv " -#: FixedAssetRegister.php:330 +#: FixedAssetRegister.php:330 includes/PDFAssetRegisterHeader.inc:34 msgid "Asset Location " msgstr "Umístění aktiva " -#: FixedAssetRegister.php:356 +#: FixedAssetRegister.php:356 includes/PDFAssetRegisterHeader.inc:63 msgid "Serial No." msgstr "Pořadové číslo" @@ -15010,6 +15053,7 @@ #: OffersReceived.php:94 PurchData.php:323 Stocks.php:361 #: includes/PDFPeriodStockTransListingPageHeader.inc:47 +#: includes/PDFStockTransListingPageHeader.inc:67 msgid "Stock Item" msgstr "Skladová položka" @@ -16456,7 +16500,7 @@ #: PDFBankingSummary.php:36 PDFChequeListing.php:66 PDFCustTransListing.php:47 #: PDFDeliveryDifferences.php:71 PDFDIFOT.php:81 PDFOrdersInvoiced.php:70 #: PDFOrderStatus.php:73 PDFPeriodStockTransListing.php:78 -#: PDFSuppTransListing.php:47 +#: PDFStockTransListing.php:52 PDFSuppTransListing.php:47 msgid "Create PDF" msgstr "Vytvořit PDF" @@ -16662,7 +16706,7 @@ msgstr "Vzhledem k tomu, činnost" #: PDFCustTransListing.php:10 PDFPeriodStockTransListing.php:9 -#: PDFSuppTransListing.php:10 +#: PDFStockTransListing.php:13 PDFSuppTransListing.php:10 msgid "The date must be specified in the format" msgstr "Datum musí být zadáno ve formátu" @@ -16671,7 +16715,8 @@ msgid "Customer Transaction Listing" msgstr "Zákazník transakce Výpis" -#: PDFCustTransListing.php:31 PDFSuppTransListing.php:31 +#: PDFCustTransListing.php:31 PDFStockTransListing.php:34 +#: PDFSuppTransListing.php:31 msgid "Enter the date for which the transactions are to be listed" msgstr "Zadejte datum, pro které transakce by měly být uvedeny" @@ -16689,6 +16734,7 @@ msgstr "Dobropisů" #: PDFCustTransListing.php:77 PDFPeriodStockTransListing.php:134 +#: PDFStockTransListing.php:85 msgid "An error occurred getting the transactions" msgstr "Došlo k chybě dostat transakce" @@ -16696,12 +16742,13 @@ msgid "The SQL used to get the transaction information that failed was" msgstr "SQL slouží k získání informací o transakcích, které se nepodařilo byla" -#: PDFCustTransListing.php:87 PDFSuppTransListing.php:82 +#: PDFCustTransListing.php:87 PDFStockTransListing.php:92 +#: PDFSuppTransListing.php:82 msgid "There were no transactions found in the database for the date" msgstr "Nebyly zjištěny žádné transakce v databázi na data" #: PDFCustTransListing.php:87 PDFPeriodStockTransListing.php:141 -#: PDFSuppTransListing.php:82 +#: PDFStockTransListing.php:92 PDFSuppTransListing.php:82 msgid "Please try again selecting a different date" msgstr "Zkuste to prosím znovu vybrat jiný den" @@ -16969,7 +17016,8 @@ msgstr "Ještě netisknuto" #: PDFPeriodStockTransListing.php:16 PDFPeriodStockTransListing.php:20 -#: PDFPeriodStockTransListing.php:150 +#: PDFPeriodStockTransListing.php:150 PDFStockTransListing.php:20 +#: PDFStockTransListing.php:24 PDFStockTransListing.php:101 msgid "Stock Transaction Listing" msgstr "Sklad seznamu transakcí" @@ -16983,33 +17031,33 @@ msgid "Enter the date to which the transactions are to be listed" msgstr "Zadejte datum, pro které transakce by měly být uvedeny" -#: PDFPeriodStockTransListing.php:43 PrintCustTrans.php:59 -#: PrintCustTransPortrait.php:57 SalesInquiry.php:1054 +#: PDFPeriodStockTransListing.php:43 PDFStockTransListing.php:42 +#: PrintCustTrans.php:59 PrintCustTransPortrait.php:57 SalesInquiry.php:1054 msgid "Sales Invoice" msgstr "Prodejní faktury" -#: PDFPeriodStockTransListing.php:44 PrintCustTrans.php:62 -#: PrintCustTransPortrait.php:60 +#: PDFPeriodStockTransListing.php:44 PDFStockTransListing.php:43 +#: PrintCustTrans.php:62 PrintCustTransPortrait.php:60 msgid "Sales Credit Note" msgstr "Prodej dobropis" -#: PDFPeriodStockTransListing.php:45 +#: PDFPeriodStockTransListing.php:45 PDFStockTransListing.php:44 msgid "Location Transfer" msgstr "Umístění Transfer" -#: PDFPeriodStockTransListing.php:46 +#: PDFPeriodStockTransListing.php:46 PDFStockTransListing.php:45 msgid "Stock Adjustment" msgstr "Úprava skladu" -#: PDFPeriodStockTransListing.php:47 +#: PDFPeriodStockTransListing.php:47 PDFStockTransListing.php:46 msgid "Purchase Order Delivery" msgstr "Objednávka dodání" -#: PDFPeriodStockTransListing.php:48 +#: PDFPeriodStockTransListing.php:48 PDFStockTransListing.php:47 msgid "Work Order Receipt" msgstr "Práce doručení objednávky" -#: PDFPeriodStockTransListing.php:49 +#: PDFPeriodStockTransListing.php:49 PDFStockTransListing.php:48 msgid "Work Order Issue" msgstr "Objednat výtisk práce" @@ -17018,6 +17066,7 @@ msgstr "Pro Umístění skladu" #: PDFPeriodStockTransListing.php:132 PDFPeriodStockTransListing.php:138 +#: PDFStockTransListing.php:83 PDFStockTransListing.php:89 msgid "Transaction Listing" msgstr "Výpis transakce" @@ -17026,37 +17075,44 @@ msgid "There were no transactions found in the database between the dates" msgstr "Nebyly zjištěny žádné transakce v databázi na data" -#: PDFPeriodStockTransListing.php:151 +#: PDFPeriodStockTransListing.php:151 PDFStockTransListing.php:102 msgid "Stock transaction listing from" msgstr "Transakce na burze bude výpis z" #: PDFPeriodStockTransListing.php:158 #: includes/PDFCustTransListingPageHeader.inc:15 +#: includes/PDFStockTransListingPageHeader.inc:15 msgid "Customer Invoices" msgstr "Odběratelských faktur" #: PDFPeriodStockTransListing.php:161 #: includes/PDFCustTransListingPageHeader.inc:18 +#: includes/PDFStockTransListingPageHeader.inc:18 msgid "Customer Credit Notes" msgstr "Zákazník dobropisy" #: PDFPeriodStockTransListing.php:164 SelectProduct.php:417 +#: includes/PDFStockTransListingPageHeader.inc:21 msgid "Location Transfers" msgstr "Umístění Převody" #: PDFPeriodStockTransListing.php:167 StockAdjustments.php:8 +#: includes/PDFStockTransListingPageHeader.inc:24 msgid "Stock Adjustments" msgstr "Úpravy skladem" #: PDFPeriodStockTransListing.php:170 +#: includes/PDFStockTransListingPageHeader.inc:27 msgid "Purchase Order Deliveries" msgstr "Objednávka Dodávky" #: PDFPeriodStockTransListing.php:173 +#: includes/PDFStockTransListingPageHeader.inc:30 msgid "Work Order Receipts" msgstr "Příjmy práce Objednat" #: PDFPeriodStockTransListing.php:176 +#: includes/PDFStockTransListingPageHeader.inc:33 msgid "Work Order Issues" msgstr "Práce jiných záležitostí" @@ -17118,7 +17174,8 @@ msgstr "Cena Výpis Zpráva" #: PDFPriceList.php:23 PDFPriceList.php:295 PDFPriceList.php:335 -#: PDFPriceList.php:355 +#: PDFPriceList.php:355 includes/PDFPriceListPageHeader.inc:16 +#: includes/PDFPriceListPageHeader.inc:40 msgid "Customer Special Prices Only" msgstr "Zákazník Zvláštní ceny pouze" @@ -17233,7 +17290,7 @@ msgstr "Datum účinnosti Range" #: PDFPriceList.php:362 includes/PDFLowGPPageHeader.inc:49 -#: includes/PDFLowGPPageHeader.inc:50 +#: includes/PDFLowGPPageHeader.inc:50 includes/PDFPriceListPageHeader.inc:49 msgid "GP" msgstr "GP" @@ -17273,7 +17330,7 @@ msgid "Number of labels per item" msgstr "Počet štítků za položku" -#: PDFPrintLabel.php:93 +#: PDFPrintLabel.php:93 Z_PriceChanges.php:94 msgid "Price list" msgstr "Ceník" @@ -19038,7 +19095,7 @@ msgid "Requisition" msgstr "Rekvizice" -#: PricesBasedOnMarkUp.php:8 +#: PricesBasedOnMarkUp.php:8 Z_PriceChanges.php:7 msgid "Update Pricing" msgstr "Aktualizace cen" @@ -19064,7 +19121,7 @@ msgid "Select the Price List to update" msgstr "Zvolte Cena aktualizace" -#: PricesBasedOnMarkUp.php:29 PricesBasedOnMarkUp.php:94 +#: PricesBasedOnMarkUp.php:29 PricesBasedOnMarkUp.php:94 Z_PriceChanges.php:28 msgid "No Price List Selected" msgstr "Ne Cena Vybrané Seznam" @@ -19122,11 +19179,11 @@ msgid "New Price To Be Effective To (Blank = No End Date)" msgstr "Nová cena jako účinná k (prázdné = Ne Datum ukončení)" -#: PricesBasedOnMarkUp.php:163 +#: PricesBasedOnMarkUp.php:163 Z_PriceChanges.php:67 msgid "Percentage Increase (positive) or decrease (negative)" msgstr "Procento zvýšení (pozitivní) nebo snížení (negativní)" -#: PricesBasedOnMarkUp.php:167 +#: PricesBasedOnMarkUp.php:167 Z_PriceChanges.php:71 msgid "Update Prices" msgstr "Aktualizace ceny" @@ -19212,7 +19269,7 @@ "Pro záznam všech cen změnilo této stránce by měly být vytištěny pomocí CTRL " "+ P" -#: PricesBasedOnMarkUp.php:214 +#: PricesBasedOnMarkUp.php:214 Z_PriceChanges.php:77 msgid "So we are using a price list/sales type of" msgstr "Tak jsme se s použitím ceníku / prodej druhu" @@ -19232,7 +19289,7 @@ msgid "against" msgstr "proti" -#: PricesBasedOnMarkUp.php:229 +#: PricesBasedOnMarkUp.php:229 Z_PriceChanges.php:82 msgid "The price list/sales type to be updated must be selected first" msgstr "Ceník / prodeje, který má být aktualizován, musí být vybrány první" @@ -19284,7 +19341,7 @@ "roven nule - žádné cenové změny budou provedeny na základě nulové nákladové " "položky. Z bodu je:" -#: PricesBasedOnMarkUp.php:337 +#: PricesBasedOnMarkUp.php:337 Z_PriceChanges.php:137 msgid "Error updating prices for" msgstr "Chyba při aktualizaci cen pro" @@ -19594,11 +19651,11 @@ msgid "Cheque No." msgstr "Šek Ne" -#: PrintCustOrder_generic.php:141 +#: PrintCustOrder_generic.php:141 PrintSalesOrder_generic.php:111 msgid "Customer Laser Packing Slip" msgstr "Zákazník Laser Balení skluzu" -#: PrintCustOrder_generic.php:142 +#: PrintCustOrder_generic.php:142 PrintSalesOrder_generic.php:112 msgid "Laser Packing slip for order" msgstr "Laser Balení skluzu na objednávku" @@ -19626,6 +19683,7 @@ msgstr "Dodacího listu nelze vytisknout" #: PrintCustOrder_generic.php:241 PrintCustOrder.php:197 +#: PrintSalesOrder_generic.php:182 msgid "Print Another Packing Slip/Order" msgstr "Tisk Další balicí list / Objednávka" @@ -19981,6 +20039,14 @@ msgid "Print Preview" msgstr "Náhled" +#: PrintSalesOrder_generic.php:181 +msgid "" +"There were no outstanding items on the order to deliver. A packing slip " +"cannot be printed" +msgstr "" +"Nebyly zjištěny žádné nesplacené položek na objednávce dodat. Dodacího listu " +"nelze vytisknout" + #: PurchData.php:6 msgid "Supplier Purchasing Data" msgstr "Dodavatel nákupu dat" @@ -20294,20 +20360,20 @@ msgstr "Zobrazit stavu populace" #: PurchData.php:505 SelectProduct.php:393 StockCostUpdate.php:167 -#: StockLocMovements.php:47 StockMovements.php:56 StockReorderLevel.php:95 +#: StockLocMovements.php:47 StockMovements.php:56 StockReorderLevel.php:96 #: StockUsage.php:182 msgid "Show Stock Movements" msgstr "Zobrazit pohybů zásob" #: PurchData.php:506 SelectProduct.php:398 SelectSalesOrder.php:6 #: StockAdjustments.php:426 StockCostUpdate.php:169 StockMovements.php:202 -#: StockReorderLevel.php:97 StockStatus.php:357 StockTransfers.php:532 +#: StockReorderLevel.php:98 StockStatus.php:357 StockTransfers.php:532 #: StockUsage.php:183 msgid "Search Outstanding Sales Orders" msgstr "Hledat Vynikající Prodejní objednávky" #: PurchData.php:507 SelectProduct.php:399 StockAdjustments.php:427 -#: StockCostUpdate.php:170 StockMovements.php:203 StockReorderLevel.php:98 +#: StockCostUpdate.php:170 StockMovements.php:203 StockReorderLevel.php:99 #: StockStatus.php:358 StockTransfers.php:533 StockUsage.php:184 msgid "Search Completed Sales Orders" msgstr "Vyhledávání Dokončené Prodejní objednávky" @@ -21621,11 +21687,11 @@ "Nelze smazat tento prodej kategorií, protože skladě položky byly přidány do " "této kategorie" -#: SalesCategories.php:125 +#: SalesCategories.php:124 msgid "items under to this category" msgstr "položek v této kategorii" -#: SalesCategories.php:132 +#: SalesCategories.php:131 msgid "" "Cannot delete this sales category because sub categories have been added to " "this category" @@ -21633,86 +21699,86 @@ "Nelze smazat tento prodej kategorií, protože dílčí kategorie, které byly " "přidány do této kategorie" -#: SalesCategories.php:133 +#: SalesCategories.php:131 msgid "sub categories" msgstr "dílčí kategorie" -#: SalesCategories.php:137 +#: SalesCategories.php:135 msgid "The sales category" msgstr "Kategorie prodej" -#: SalesCategories.php:153 SalesCategories.php:161 +#: SalesCategories.php:148 SalesCategories.php:156 msgid "Stock item" msgstr "Na skladě" -#: SalesCategories.php:153 +#: SalesCategories.php:148 msgid "has been added" msgstr "Byla přidána" -#: SalesCategories.php:161 +#: SalesCategories.php:156 msgid "has been removed" msgstr "byl odebrán" -#: SalesCategories.php:169 +#: SalesCategories.php:164 msgid "Main" msgstr "Hlavní" -#: SalesCategories.php:197 +#: SalesCategories.php:195 msgid "Selected Sales Category Path" msgstr "Vybrané kategorie Prodej cesta" -#: SalesCategories.php:221 +#: SalesCategories.php:219 msgid "There are no categories defined at this level." msgstr "Nejsou žádné kategorie stanovené na této úrovni." -#: SalesCategories.php:224 +#: SalesCategories.php:222 msgid "Sub Category" msgstr "Sub kategorie" -#: SalesCategories.php:307 +#: SalesCategories.php:305 msgid "Edit Sub Category" msgstr "Upravit Podkategorie" -#: SalesCategories.php:316 +#: SalesCategories.php:314 msgid "New Sub Category" msgstr "Nové Podkategorie" -#: SalesCategories.php:321 +#: SalesCategories.php:319 msgid "Category Name" msgstr "Název kategorie" -#: SalesCategories.php:331 +#: SalesCategories.php:329 msgid "Submit Information" msgstr "Předložit informace" -#: SalesCategories.php:381 +#: SalesCategories.php:379 msgid "Add Inventory to this category." msgstr "Přidat Zásoby v této kategorii." -#: SalesCategories.php:382 +#: SalesCategories.php:380 msgid "Select Inv. Item" msgstr "Vyberte Inv. Bod" -#: SalesCategories.php:394 +#: SalesCategories.php:392 msgid "Add Inventory Item" msgstr "Přidat skladovou položku" -#: SalesCategories.php:399 +#: SalesCategories.php:397 #, fuzzy msgid "No more Inventory items to add" msgstr "Žádné další položky zásob přidat." -#: SalesCategories.php:421 +#: SalesCategories.php:419 msgid "Inventory items in this category." msgstr "Zásoby zboží v této kategorii." -#: SalesCategories.php:438 StockAdjustments.php:391 SupplierTenders.php:291 +#: SalesCategories.php:436 StockAdjustments.php:391 SupplierTenders.php:291 #: TaxGroups.php:354 WWW_Access.php:212 #, php-format msgid "Remove" msgstr "Odstranit" -#: SalesCategories.php:442 +#: SalesCategories.php:440 #, fuzzy msgid "No Inventory items in this category" msgstr "Zásoby žádné položky v této kategorii." @@ -23314,12 +23380,6 @@ msgid "No Default Price Set in Home Currency" msgstr "Č. Výchozí Cena Nastavit v domácí měně" -#: SelectProduct.php:282 -msgid "" -"The quantity on work orders for this product cannot be retrieved because" -msgstr "" -"Množství na pracovních příkazů pro tento produkt není možné získat, protože" - #: SelectProduct.php:323 msgid "" "The workorder component demand for this product cannot be retrieved because" @@ -23365,7 +23425,7 @@ msgstr "Nastavení položek" #: SelectProduct.php:396 StockAdjustments.php:425 StockCostUpdate.php:168 -#: StockMovements.php:201 StockReorderLevel.php:96 StockTransfers.php:531 +#: StockMovements.php:201 StockReorderLevel.php:97 StockTransfers.php:531 #: StockUsage.php:87 msgid "Show Stock Usage" msgstr "Zobrazit skladem Využití" @@ -28310,11 +28370,12 @@ msgid "Items to offer from" msgstr "Položky, které nabízí od" -#: SupplierTenders.php:263 api/api_xml-rpc.php:696 api/api_xml-rpc.php:764 -#: api/api_xml-rpc.php:795 api/api_xml-rpc.php:826 api/api_xml-rpc.php:865 -#: api/api_xml-rpc.php:896 api/api_xml-rpc.php:927 api/api_xml-rpc.php:970 -#: api/api_xml-rpc.php:2220 api/api_xml-rpc.php:2256 api/api_xml-rpc.php:2302 -#: api/api_xml-rpc.php:2498 api/api_xml-rpc.php:2662 +#: SupplierTenders.php:263 includes/PDFAssetRegisterHeader.inc:61 +#: api/api_xml-rpc.php:696 api/api_xml-rpc.php:764 api/api_xml-rpc.php:795 +#: api/api_xml-rpc.php:826 api/api_xml-rpc.php:865 api/api_xml-rpc.php:896 +#: api/api_xml-rpc.php:927 api/api_xml-rpc.php:970 api/api_xml-rpc.php:2220 +#: api/api_xml-rpc.php:2256 api/api_xml-rpc.php:2302 api/api_xml-rpc.php:2498 +#: api/api_xml-rpc.php:2662 msgid "Stock ID" msgstr "Sklad ID" @@ -30614,7 +30675,7 @@ "systému. Přečtěte si prosím pozorně všechny poznámky, aby bylo zajištěno, že " "se očekává, že" -#: UpgradeDatabase.php:129 +#: UpgradeDatabase.php:133 msgid "" "Only mysql upgrades are performed seamlessly at this time. Your database " "will need to be manually updated" @@ -30622,61 +30683,61 @@ "Pouze mysql upgrady jsou prováděny plynule v této době. Databáze bude třeba " "ručně aktualizované" -#: UpgradeDatabase.php:141 +#: UpgradeDatabase.php:145 msgid "Applying" msgstr "Uplatnění" -#: UpgradeDatabase.php:168 Z_Upgrade_3.10-3.11.php:59 Z_Upgrade3.10.php:29 +#: UpgradeDatabase.php:172 Z_Upgrade_3.10-3.11.php:59 Z_Upgrade3.10.php:29 #: Z_Upgrade3.10.php:34 Z_Upgrade3.10.php:46 Z_Upgrade3.10.php:51 #: Z_Upgrade3.10.php:60 Z_Upgrade3.10.php:65 Z_Upgrade3.10.php:74 #: Z_Upgrade3.10.php:79 Z_Upgrade_3.11-4.00.php:59 msgid "Success" msgstr "Úspěch" -#: UpgradeDatabase.php:171 Z_Upgrade_3.10-3.11.php:63 +#: UpgradeDatabase.php:175 Z_Upgrade_3.10-3.11.php:63 #: Z_Upgrade_3.11-4.00.php:63 msgid "Table has already been created" msgstr "Tabulka již byla vytvořena" -#: UpgradeDatabase.php:174 +#: UpgradeDatabase.php:178 #, fuzzy msgid "Column has already been changed" msgstr "Sloupec již byla vytvořena" -#: UpgradeDatabase.php:177 Z_Upgrade_3.10-3.11.php:67 +#: UpgradeDatabase.php:181 Z_Upgrade_3.10-3.11.php:67 #: Z_Upgrade_3.11-4.00.php:67 msgid "Column has already been created" msgstr "Sloupec již byla vytvořena" -#: UpgradeDatabase.php:180 Z_Upgrade_3.10-3.11.php:71 +#: UpgradeDatabase.php:184 Z_Upgrade_3.10-3.11.php:71 #: Z_Upgrade_3.11-4.00.php:71 msgid "Index already exists" msgstr "Index již existuje" -#: UpgradeDatabase.php:183 Z_Upgrade_3.10-3.11.php:75 +#: UpgradeDatabase.php:187 Z_Upgrade_3.10-3.11.php:75 #: Z_Upgrade_3.11-4.00.php:75 msgid "Entry has already been done" msgstr "Vstup již bylo učiněno" -#: UpgradeDatabase.php:186 +#: UpgradeDatabase.php:190 msgid "SQL syntax error. The SQL error message is" msgstr "SQL chyba syntaxe. Chyba SQL zpráva" -#: UpgradeDatabase.php:189 Z_Upgrade_3.10-3.11.php:79 +#: UpgradeDatabase.php:193 Z_Upgrade_3.10-3.11.php:79 #: Z_Upgrade_3.11-4.00.php:79 msgid "Primary key already exists" msgstr "Primární klíč již existuje" -#: UpgradeDatabase.php:192 +#: UpgradeDatabase.php:196 msgid "Index already dropped previously" msgstr "Index již klesl dříve" -#: UpgradeDatabase.php:195 Z_Upgrade_3.10-3.11.php:82 +#: UpgradeDatabase.php:199 Z_Upgrade_3.10-3.11.php:82 #: Z_Upgrade_3.11-4.00.php:82 msgid "Failure" msgstr "Selhání" -#: UpgradeDatabase.php:195 Z_Upgrade_3.10-3.11.php:83 +#: UpgradeDatabase.php:199 Z_Upgrade_3.10-3.11.php:83 #: Z_Upgrade_3.11-4.00.php:83 msgid "Error number" msgstr "Číslo chyby" @@ -33161,6 +33222,36 @@ msgid "Default" msgstr "Výchozí" +#: Z_FixedAssetCostAccumDepnFix.php:8 +#, fuzzy +msgid "Fixed Fixed Asset Records" +msgstr "Hmotného majetku Kredity" + +#: Z_FixedAssetCostAccumDepnFix.php:12 +msgid "This script repairs the fixedasset table cost and accum depn" +msgstr "" + +#: Z_FixedAssetCostAccumDepnFix.php:18 +#, fuzzy +msgid "Updated asset" +msgstr "Sazby aktualizace" + +#: Z_FixedAssetCostAccumDepnFix.php:18 +#, fuzzy +msgid "to have a cost of" +msgstr "std náklady" + +#: Z_FixedAssetCostAccumDepnFix.php:18 +#, fuzzy +msgid "and accum depn of" +msgstr "Accum Depn GL" + +#: Z_FixedAssetCostAccumDepnFix.php:22 +msgid "" +"Asset cost and accumulated depreciation has now been fixed to the " +"transaction cost and depreciation" +msgstr "" + #: Z_ImportChartOfAccounts.php:7 Z_ImportGLAccountGroups.php:5 #: Z_ImportGLAccountSections.php:5 msgid "Import Chart of Accounts" @@ -34006,6 +34097,108 @@ msgid "Existing languages are not affected." msgstr "Stávající jazyky nejsou ovlivněny." +#: Z_PriceChanges.php:11 +msgid "" +"This page updates already existing prices for a specified sales type (price " +"list)" +msgstr "Tato stránka aktualizuje stávající ceny pro určitý typ prodeje (ceník)" + +#: Z_PriceChanges.php:11 +msgid "" +"Choose between updating only customer special prices where the customer is " +"set up under the price list selected, or all prices under the sales type or " +"just specific prices for a customer for the stock category selected" +msgstr "" +"Vyberte si mezi aktualizace jediný zákazník speciální ceny, kde je zákazník " +"zřízený podle ceny vybraného seznamu, nebo všechny ceny v rámci prodeje, " +"nebo jen konkrétní typ ceny pro zákazníka pro populaci vybrané kategorii" + +#: Z_PriceChanges.php:13 +msgid "" +"This script takes no account of start and end dates of prices and updates " +"all historical prices as well as current prices - better to use new scripts " +"under Inventory -> Maintenance" +msgstr "" +"Tento skript nebere v úvahu datum zahájení a ukončení cen a aktualizace " +"všech historických cen, stejně jako v běžných cenách - lépe využít nové " +"skripty pod Inventory -> Údržba" + +#: Z_PriceChanges.php:24 +msgid "Select the Price List to update the costs for" +msgstr "Zvolte Cena aktualizovat náklady na" + +#: Z_PriceChanges.php:55 +msgid "Which Prices to update" +msgstr "Ceny, které k aktualizaci" + +#: Z_PriceChanges.php:57 +msgid "Only Non-customer special prices" +msgstr "Pouze Non-zákazník speciální ceny" + +#: Z_PriceChanges.php:58 +msgid "Only customer special prices" +msgstr "Pouze zákazník speciální ceny" + +#: Z_PriceChanges.php:59 +msgid "Both customer special prices and non-customer special prices" +msgstr "Oba zákazník speciální ceny a non-zákazník speciální ceny" + +#: Z_PriceChanges.php:60 +msgid "customer special prices only" +msgstr "zákazník speciální ceny pouze" + +#: Z_PriceChanges.php:71 +msgid "" +"Are you sure you wish to update all the prices according to the criteria " +"selected?" +msgstr "" +"Jste si jisti, že chcete aktualizovat všechny ceny podle zvolených kritérií?" + +#: Z_PriceChanges.php:78 +msgid "and a stock category code of" +msgstr "a zásoby kategorii kód" + +#: Z_PriceChanges.php:79 +msgid "and a increase percent of" +msgstr "a zvýšení procenta" + +#: Z_PriceChanges.php:89 +msgid "" +"The increase or decrease to be applied is expected to be an integer between " +"1 and 40 it is not necessary to enter the" +msgstr "" +"Zvýšení nebo snížení má být použita, je čekal, že je celé číslo mezi 1 a 40, " +"není nutné zadávat" + +#: Z_PriceChanges.php:89 +#, fuzzy +msgid "sign" +msgstr "Design" + +#: Z_PriceChanges.php:89 +msgid "the amount is assumed to be a percentage" +msgstr "částka Předpokládá se, že procento" + +#: Z_PriceChanges.php:94 +msgid "prices for" +msgstr "ceny pro" + +#: Z_PriceChanges.php:94 +msgid "for the stock category" +msgstr "pro populaci kategorii" + +#: Z_PriceChanges.php:94 +msgid "will been incremented by" +msgstr "bude se zvyšuje o" + +#: Z_PriceChanges.php:94 +msgid "percent" +msgstr "procent" + +#: Z_PriceChanges.php:138 +msgid "Updating prices for" +msgstr "Aktualizace ceny" + #: Z_ReApplyCostToSA.php:6 msgid "Apply Current Cost to Sales Analysis" msgstr "Použít aktuální náklady na analýzu prodeje" @@ -35472,6 +35665,28 @@ msgid "Aged Supplier Balances For Suppliers from" msgstr "Dodavatel ve věku Zůstatky Pro dodavatele z" +#: includes/PDFAssetRegisterHeader.inc:35 +msgid "Asset Type" +msgstr "Typ majetku" + +#: includes/PDFAssetRegisterHeader.inc:36 +#, fuzzy +msgid "Acquired After" +msgstr "Požadované datum" + +#: includes/PDFAssetRegisterHeader.inc:37 +#, fuzzy +msgid "and Before" +msgstr "a pro" + +#: includes/PDFAssetRegisterHeader.inc:57 +msgid "<--------------External Depreciation-------------->" +msgstr "" + +#: includes/PDFAssetRegisterHeader.inc:58 +msgid "<--------------Internal Depreciation-------------->" +msgstr "" + #: includes/PDFBankingSummaryPageHeader.inc:19 msgid "for Receipt Batch" msgstr "pro přijetí dávky" @@ -35567,6 +35782,7 @@ #: includes/PDFCustTransListingPageHeader.inc:50 #: includes/PDFPeriodStockTransListingPageHeader.inc:49 +#: includes/PDFStockTransListingPageHeader.inc:69 #: includes/PDFSuppTransListingPageHeader.inc:50 msgid "Trans Date" msgstr "Trans Datum" @@ -35795,6 +36011,16 @@ msgid "Actual Picked" msgstr "Skutečné Sklizené" +#: includes/PDFPriceListPageHeader.inc:18 +#, fuzzy +msgid "Special Prices for Inventory Categories between" +msgstr "Zkontrolujte, zda listy Kategorie mezi" + +#: includes/PDFPriceListPageHeader.inc:21 +#, fuzzy +msgid "Price List for Inventory Categories between" +msgstr "Zkontrolujte, zda listy Kategorie mezi" + #: includes/PDFProfitAndLossPageHeader.inc:21 #: includes/PDFTagProfitAndLossPageHeader.inc:21 msgid "Profit and loss for the " @@ -38308,10 +38534,6 @@ #~ msgstr "Zákazník záznam vybrané zákazníky" #, fuzzy -#~ msgid "Demand Work Orders" -#~ msgstr "Hledat práci Objednávky" - -#, fuzzy #~ msgid "Annual Depreciation Percentage" #~ msgstr "Neplatné odpisové sazby:" @@ -38320,134 +38542,6 @@ #~ msgstr "Aktualizace faktor" #~ msgid "" -#~ "There were no outstanding items on the order to deliver. A packing slip " -#~ "cannot be printed" -#~ msgstr "" -#~ "Nebyly zjištěny žádné nesplacené položek na objednávce dodat. Dodacího " -#~ "listu nelze vytisknout" - -#, fuzzy -#~ msgid "Fixed Fixed Asset Records" -#~ msgstr "Hmotného majetku Kredity" - -#, fuzzy -#~ msgid "Updated asset" -#~ msgstr "Sazby aktualizace" - -#, fuzzy -#~ msgid "to have a cost of" -#~ msgstr "std náklady" - -#, fuzzy -#~ msgid "and accum depn of" -#~ msgstr "Accum Depn GL" - -#~ msgid "" -#~ "This page updates already existing prices for a specified sales type " -#~ "(price list)" -#~ msgstr "" -#~ "Tato stránka aktualizuje stávající ceny pro určitý typ prodeje (ceník)" - -#~ msgid "" -#~ "Choose between updating only customer special prices where the customer " -#~ "is set up under the price list selected, or all prices under the sales " -#~ "type or just specific prices for a customer for the stock category " -#~ "selected" -#~ msgstr "" -#~ "Vyberte si mezi aktualizace jediný zákazník speciální ceny, kde je " -#~ "zákazník zřízený podle ceny vybraného seznamu, nebo všechny ceny v rámci " -#~ "prodeje, nebo jen konkrétní typ ceny pro zákazníka pro populaci vybrané " -#~ "kategorii" - -#~ msgid "" -#~ "This script takes no account of start and end dates of prices and updates " -#~ "all historical prices as well as current prices - better to use new " -#~ "scripts under Inventory -> Maintenance" -#~ msgstr "" -#~ "Tento skript nebere v úvahu datum zahájení a ukončení cen a aktualizace " -#~ "všech historických cen, stejně jako v běžných cenách - lépe využít nové " -#~ "skripty pod Inventory -> Údržba" - -#~ msgid "Select the Price List to update the costs for" -#~ msgstr "Zvolte Cena aktualizovat náklady na" - -#~ msgid "Which Prices to update" -#~ msgstr "Ceny, které k aktualizaci" - -#~ msgid "Only Non-customer special prices" -#~ msgstr "Pouze Non-zákazník speciální ceny" - -#~ msgid "Only customer special prices" -#~ msgstr "Pouze zákazník speciální ceny" - -#~ msgid "Both customer special prices and non-customer special prices" -#~ msgstr "Oba zákazník speciální ceny a non-zákazník speciální ceny" - -#~ msgid "customer special prices only" -#~ msgstr "zákazník speciální ceny pouze" - -#~ msgid "" -#~ "Are you sure you wish to update all the prices according to the criteria " -#~ "selected?" -#~ msgstr "" -#~ "Jste si jisti, že chcete aktualizovat všechny ceny podle zvolených " -#~ "kritérií?" - -#~ msgid "and a stock category code of" -#~ msgstr "a zásoby kategorii kód" - -#~ msgid "and a increase percent of" -#~ msgstr "a zvýšení procenta" - -#~ msgid "" -#~ "The increase or decrease to be applied is expected to be an integer " -#~ "between 1 and 40 it is not necessary to enter the" -#~ msgstr "" -#~ "Zvýšení nebo snížení má být použita, je čekal, že je celé číslo mezi 1 a " -#~ "40, není nutné zadávat" - -#, fuzzy -#~ msgid "sign" -#~ msgstr "Design" - -#~ msgid "the amount is assumed to be a percentage" -#~ msgstr "částka Předpokládá se, že procento" - -#~ msgid "prices for" -#~ msgstr "ceny pro" - -#~ msgid "for the stock category" -#~ msgstr "pro populaci kategorii" - -#~ msgid "will been incremented by" -#~ msgstr "bude se zvyšuje o" - -#~ msgid "percent" -#~ msgstr "procent" - -#~ msgid "Updating prices for" -#~ msgstr "Aktualizace ceny" - -#~ msgid "Asset Type" -#~ msgstr "Typ majetku" - -#, fuzzy -#~ msgid "Acquired After" -#~ msgstr "Požadované datum" - -#, fuzzy -#~ msgid "and Before" -#~ msgstr "a pro" - -#, fuzzy -#~ msgid "Special Prices for Inventory Categories between" -#~ msgstr "Zkontrolujte, zda listy Kategorie mezi" - -#, fuzzy -#~ msgid "Price List for Inventory Categories between" -#~ msgstr "Zkontrolujte, zda listy Kategorie mezi" - -#~ msgid "" #~ "The effective after date field must be a date in the format dd/mm/yy or " #~ "dd/mm/yyyy or ddmmyy or ddmmyyyy or dd-mm-yy or dd-mm-yyyy" #~ msgstr "" Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-27 02:43:17 UTC (rev 4639) +++ trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po 2011-07-27 09:10:47 UTC (rev 4640) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: WebERP 4.00/trunk\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-07-24 12:24+1200\n" +"POT-Creation-Date: 2011-07-27 19:08+1200\n" "PO-Revision-Date: 2011-07-17 13:46+0000\n" "Last-Translator: Peter Hürlimann <su...@ph...>\n" "Language-Team: Deutsch <web...@li...>\n" @@ -146,7 +146,7 @@ #: Locations.php:256 Locations.php:265 Locations.php:274 Locations.p... [truncated message content] |
From: <dai...@us...> - 2011-07-29 05:55:10
|
Revision: 4643 http://web-erp.svn.sourceforge.net/web-erp/?rev=4643&view=rev Author: daintree Date: 2011-07-29 05:55:03 +0000 (Fri, 29 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/SalesGraph.php trunk/install/save.php Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2011-07-27 09:17:10 UTC (rev 4642) +++ trunk/SalesGraph.php 2011-07-29 05:55:03 UTC (rev 4643) @@ -28,12 +28,14 @@ if ((! isset($_POST['FromPeriod']) OR ! isset($_POST['ToPeriod'])) OR $SelectADifferentPeriod==_('Select A Different Period')){ - echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; + echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; - /*Show a form to allow input of criteria for TB to show */ - echo '<table class=selection><tr><td>' . _('Select Period From:') . '</td><td><select Name="FromPeriod">'; + + echo '<table class="selection"> + <tr><td>' . _('Select Period From:') . '</td> + <td><select Name="FromPeriod">'; if (Date('m') > $_SESSION['YearEnd']){ /*Dates in SQL format */ @@ -41,21 +43,21 @@ } else { $DefaultFromDate = Date ('Y-m-d', Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); } - $sql = 'SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno'; + $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno"; $Periods = DB_query($sql,$db); while ($myrow=DB_fetch_array($Periods,$db)){ if(isset($_POST['FromPeriod']) AND $_POST['FromPeriod']!=''){ if( $_POST['FromPeriod']== $myrow['periodno']){ - echo '<option selected VALUE="' . $myrow['periodno'] . '">' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option selected value="' . $myrow['periodno'] . '">' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } else { if($myrow['lastdate_in_period']==$DefaultFromDate){ - echo '<option selected VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option selected value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } } @@ -67,95 +69,104 @@ $DefaultToPeriod = $_POST['ToPeriod']; } - echo '<tr><td>' . _('Select Period To:') .'</td><td><select Name="ToPeriod">'; + echo '<tr> + <td>' . _('Select Period To:') .'</td> + <td><select name="ToPeriod">'; $RetResult = DB_data_seek($Periods,0); while ($myrow=DB_fetch_array($Periods,$db)){ if($myrow['periodno']==$DefaultToPeriod){ - echo '<option selected VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option selected value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option value ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } echo '</select></td></tr>'; - $AreasResult = DB_query('SELECT areacode, areadescription FROM areas',$db); + $AreasResult = DB_query("SELECT areacode, areadescription FROM areas",$db); if (!isset($_POST['SalesArea'])){ $_POST['SalesArea']=''; } - echo '<tr><td>' . _('For Sales Area/Region:') .'</td><td><select Name="SalesArea">'; + echo '<tr> + <td>' . _('For Sales Area/Region:') .'</td> + <td><select name="SalesArea">'; if($_POST['SalesArea']=='All'){ - echo '<option selected VALUE="All">' . _('All'); + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option VALUE="All">' . _('All'); + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow=DB_fetch_array($AreasResult)){ if($myrow['areacode']==$_POST['SalesArea']){ - echo '<option selected VALUE="' . $myrow['areacode'] . '">' . $myrow['areadescription']; + echo '<option selected value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['areacode'] . '">' . $myrow['areadescription']; + echo '<option value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } } echo '</select></td></tr>'; - $CategoriesResult = DB_query('SELECT categoryid, categorydescription FROM stockcategory',$db); + $CategoriesResult = DB_query("SELECT categoryid, categorydescription FROM stockcategory",$db); if (!isset($_POST['CategoryID'])){ $_POST['CategoryID']=''; } - echo '<tr><td>' . _('For Stock Category:') .'</td><td><select Name="CategoryID">'; + echo '<tr> + <td>' . _('For Stock Category:') .'</td> + <td><select Name="CategoryID">'; if($_POST['CategoryID']=='All'){ - echo '<option selected VALUE="All">' . _('All'); + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option VALUE="All">' . _('All'); + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow=DB_fetch_array($CategoriesResult)){ if($myrow['categoryid']==$_POST['CategoryID']){ - echo '<option selected VALUE="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } } echo '</select></td></tr>'; - $SalesFolkResult = DB_query('SELECT salesmancode, salesmanname FROM salesman',$db); + $SalesFolkResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); - if (! isset($_POST['SalesmanCode'])){ $_POST['SalesmanCode'] = ''; } - echo '<tr><td>' . _('For Sales Person:') .'</td><td><select Name="SalesmanCode">'; + echo '<tr> + <td>' . _('For Sales Person:') .'</td> + <td><select name="SalesmanCode">'; if($_POST['SalesmanCode']=='All'){ - echo '<option selected VALUE="All">' . _('All') . '</option>'; + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option VALUE="All">' . _('All') . '</option>'; + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow=DB_fetch_array($SalesFolkResult)){ if ($myrow['salesmancode']== $_POST['SalesmanCode']){ - echo '<option selected VALUE="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; + echo '<option selected value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; + echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } } - echo '</select></td><td>' . $_POST['SalesmanCode'] . '</td></tr>'; + echo '</select></td> + <td>' . $_POST['SalesmanCode'] . '</td> + </tr>'; echo '<tr><td>'._('Graph Type').'</td>'; - echo '<td><select name=GraphType>'; - echo '<option value=bars>'._('Bar Graph').'</option>'; - echo '<option value=stackedbars>'._('Stacked Bar Graph').'</option>'; - echo '<option value=lines>'._('Line Graph').'</option>'; - echo '<option value=linepoints>'._('Line Point Graph').'</option>'; - echo '<option value=area>'._('Area Graph').'</option>'; - echo '<option value=points>'._('Points Graph').'</option>'; - echo '<option value=pie>'._('Pie Graph').'</option>'; - echo '<option value=thinbarline>'._('Thin Bar Line Graph').'</option>'; - echo '<option value=squared>'._('Squared Graph').'</option>'; - echo '<option value=stackedarea>'._('Stacked Area Graph').'</option>'; + echo '<td><select name="GraphType">'; + echo '<option value="bars">'._('Bar Graph').'</option>'; + echo '<option value="stackedbars">'._('Stacked Bar Graph').'</option>'; + echo '<option value="lines">'._('Line Graph').'</option>'; + echo '<option value="linepoints">'._('Line Point Graph').'</option>'; + echo '<option value="area">'._('Area Graph').'</option>'; + echo '<option value="points">'._('Points Graph').'</option>'; + echo '<option value="pie">'._('Pie Graph').'</option>'; + echo '<option value="thinbarline">'._('Thin Bar Line Graph').'</option>'; + echo '<option value="squared">'._('Squared Graph').'</option>'; + echo '<option value="stackedarea">'._('Stacked Area Graph').'</option>'; echo '</select></td></tr>'; if (!isset($_POST['ValueFrom'])){ @@ -165,20 +176,20 @@ $_POST['ValueTo']=''; } echo '<tr><td>' . _('Graph On:') . '</td><td> - <input type="RADIO" name="GraphOn" VALUE="All" CHECKED>' . _('All') . '<br /> - <input type="RADIO" name="GraphOn" VALUE="Customer">' . _('Customer') . '<br /> - <input type="RADIO" name="GraphOn" VALUE="StockID">' . _('Item Code') . '</td></tr>'; - echo '<tr><td>' . _('From:') . ' <input type=TEXT name="ValueFrom" VALUE=' . $_POST['ValueFrom'] . '></td> - <td>' . _('To:') . ' <input type=TEXT name="ValueTo" VALUE=' . $_POST['ValueTo'] . '></td></tr>'; + <input type="RADIO" name="GraphOn" value="All" CHECKED>' . _('All') . '<br /> + <input type="RADIO" name="GraphOn" value="Customer">' . _('Customer') . '<br /> + <input type="RADIO" name="GraphOn" value="StockID">' . _('Item Code') . '</td></tr>'; + echo '<tr><td>' . _('From:') . ' <input type=TEXT name="ValueFrom" value=' . $_POST['ValueFrom'] . '></td> + <td>' . _('To:') . ' <input type=TEXT name="ValueTo" value=' . $_POST['ValueTo'] . '></td></tr>'; echo '<tr><td>' . _('Graph Value:') . '</td><td> - <input type="RADIO" name="GraphValue" VALUE="Net" CHECKED>' . _('Net Sales Value') . '<br /> - <input type="RADIO" name="GraphValue" VALUE="GP">' . _('Gross Profit') . '<br /> - <input type="RADIO" name="GraphValue" VALUE="Quantity">' . _('Quantity') . '</td></tr>'; + <input type="RADIO" name="GraphValue" value="Net" CHECKED>' . _('Net Sales Value') . '<br /> + <input type="RADIO" name="GraphValue" value="GP">' . _('Gross Profit') . '<br /> + <input type="RADIO" name="GraphValue" value="Quantity">' . _('Quantity') . '</td></tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type=submit Name="ShowGraph" Value="' . _('Show Sales Graph') .'"></div>'; + echo '<br /><div class="centre"><input type="submit" Name="ShowGraph" Value="' . _('Show Sales Graph') .'"></div>'; include('includes/footer.inc'); } else { @@ -234,16 +245,16 @@ $WhereClause .= " stockid >='" . $_POST['ValueFrom'] . "' AND stockid <='" . $_POST['ValueTo'] . "' AND"; } - $WhereClause = 'WHERE ' . $WhereClause . ' salesanalysis.periodno>=' . $_POST['FromPeriod'] . ' AND salesanalysis.periodno <= ' . $_POST['ToPeriod']; + $WhereClause = "WHERE " . $WhereClause . " salesanalysis.periodno>='" . $_POST['FromPeriod'] . "' AND salesanalysis.periodno <= '" . $_POST['ToPeriod'] . "'"; - $SQL = 'SELECT salesanalysis.periodno, + $SQL = "SELECT salesanalysis.periodno, periods.lastdate_in_period, - SUM(CASE WHEN budgetoractual=1 THEN ' . $SelectClause . ' ELSE 0 END) AS sales, - SUM(CASE WHEN budgetoractual=0 THEN ' . $SelectClause . ' ELSE 0 END) AS budget - FROM salesanalysis INNER JOIN periods ON salesanalysis.periodno=periods.periodno ' . $WhereClause . ' + SUM(CASE WHEN budgetoractual=1 THEN " . $SelectClause . " ELSE 0 END) AS sales, + SUM(CASE WHEN budgetoractual=0 THEN " . $SelectClause . " ELSE 0 END) AS budget + FROM salesanalysis INNER JOIN periods ON salesanalysis.periodno=periods.periodno " . $WhereClause . " GROUP BY salesanalysis.periodno, periods.lastdate_in_period - ORDER BY salesanalysis.periodno'; + ORDER BY salesanalysis.periodno"; $graph->SetTitle($GraphTitle); @@ -259,11 +270,11 @@ } $graph->SetXTickPos('none'); $graph->SetXTickLabelPos('none'); - $graph->SetBackgroundColor("selection"); - $graph->SetTitleColor("blue"); - $graph->SetFileFormat("png"); + $graph->SetBackgroundColor('selection'); + $graph->SetTitleColor('blue'); + $graph->SetFileFormat('png'); $graph->SetPlotType($_POST['GraphType']); - $graph->SetIsInline("1"); + $graph->SetIsInline('1'); $graph->SetShading(5); $graph->SetDrawYGrid(TRUE); $graph->SetDataType('text-data'); @@ -297,9 +308,12 @@ //Draw it $graph->DrawGraph(); - echo '<table class=selection><tr><td>'; + echo '<table class="selection"> + <tr><td>'; echo '<p><img src="companies/' .$_SESSION['DatabaseName'] . '/reports/salesgraph.png" alt="Sales Report Graph"></img></p>'; - echo '</td></tr></table>'; + echo '</td> + </tr> + </table>'; include('includes/footer.inc'); - } - ?> \ No newline at end of file +} +?> \ No newline at end of file Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-07-27 09:17:10 UTC (rev 4642) +++ trunk/install/save.php 2011-07-29 05:55:03 UTC (rev 4643) @@ -1,8 +1,8 @@ <?php /* $Id$*/ -error_reporting(E_ALL); -ini_set('display_errors', "On"); -ini_set('max_execution_time', "180"); +error_reporting(E_ALL && ~E_NOTICE); +ini_set('display_errors', 'On'); +ini_set('max_execution_time', '180'); require_once('../includes/MiscFunctions.php'); // Start a session @@ -79,7 +79,7 @@ // Function to workout what the default permissions are for files created by the webserver function default_file_mode($temp_dir) { - $v = explode(".",PHP_VERSION); + $v = explode('.',PHP_VERSION); $v = $v[0].$v[1]; if($v > 41 && is_writable($temp_dir)) { @@ -97,7 +97,7 @@ // Function to workout what the default permissions are for directories created by the webserver function default_dir_mode($temp_dir) { - $v = explode(".",PHP_VERSION); + $v = explode('.',PHP_VERSION); $v = $v[0].$v[1]; if ($v > 41 && is_writable($temp_dir)) { $dirname = $temp_dir.'/test_permissions/'; @@ -237,11 +237,10 @@ $Result = mkdir($CompanyDir . '/reportwriter'); $Result = mkdir($CompanyDir . '/pdf_append'); $Result = mkdir($CompanyDir . '/FormDesigns'); - copy ($path_to_root . '/companies/weberpdemo/FormDesigns/GoodsReceived.xml', $CompanyDir . '/FormDesigns/GoodsReceived.xml'); - copy ($path_to_root . '/companies/weberpdemo/FormDesigns/PickingList.xml', $CompanyDir . '/FormDesigns/PickingList.xml'); - copy ($path_to_root . '/companies/weberpdemo/FormDesigns/PurchaseOrder.xml', $CompanyDir . '/FormDesigns/PurchaseOrder.xml'); - copy ($path_to_root . '/companies/weberpdemo/FormDesigns/SalesInvoice.xml', $CompanyDir . '/FormDesigns/SalesInvoice.xml'); - + copy ($path_to_root . '/companies/weberpdemo/FormDesigns/GoodsReceived.xml', $CompanyDir . '/FormDesigns/GoodsReceived.xml'); + copy ($path_to_root . '/companies/weberpdemo/FormDesigns/PickingList.xml', $CompanyDir . '/FormDesigns/PickingList.xml'); + copy ($path_to_root . '/companies/weberpdemo/FormDesigns/PurchaseOrder.xml', $CompanyDir . '/FormDesigns/PurchaseOrder.xml'); + // Now have a destination to place the logo image. if (isset($_FILES['LogoFile'])) { if ($_FILES['LogoFile']['error'] == UPLOAD_ERR_OK) { @@ -249,12 +248,12 @@ $CompanyDir . '/logo.jpg'); } elseif ($_FILES['LogoFile']['error'] == UPLOAD_ERR_INI_SIZE || $_FILES['LogoFile']['error'] == UPLOAD_ERR_FORM_SIZE) { - set_error( "Logo file is too big - Limit: " . $_SESSION['MaxLogoSize'] ); + set_error( 'Logo file is too big - Limit: ' . $_SESSION['MaxLogoSize'] ); } elseif ($_FILES['LogoFile']['error'] == UPLOAD_ERR_NO_FILE ) { // No logo file, so use the default. copy( $path_to_root . '/logo_server.jpg', $CompanyDir . '/logo.jpg'); } else { - set_error( "Error uploading logo file" ); + set_error( 'Error uploading logo file' ); } } else { // No logo file, so use the default. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-29 05:55:10
|
Revision: 4643 http://web-erp.svn.sourceforge.net/web-erp/?rev=4643&view=rev Author: daintree Date: 2011-07-29 05:55:03 +0000 (Fri, 29 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/SalesGraph.php trunk/install/save.php Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2011-07-27 09:17:10 UTC (rev 4642) +++ trunk/SalesGraph.php 2011-07-29 05:55:03 UTC (rev 4643) @@ -28,12 +28,14 @@ if ((! isset($_POST['FromPeriod']) OR ! isset($_POST['ToPeriod'])) OR $SelectADifferentPeriod==_('Select A Different Period')){ - echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; + echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; - /*Show a form to allow input of criteria for TB to show */ - echo '<table class=selection><tr><td>' . _('Select Period From:') . '</td><td><select Name="FromPeriod">'; + + echo '<table class="selection"> + <tr><td>' . _('Select Period From:') . '</td> + <td><select Name="FromPeriod">'; if (Date('m') > $_SESSION['YearEnd']){ /*Dates in SQL format */ @@ -41,21 +43,21 @@ } else { $DefaultFromDate = Date ('Y-m-d', Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); } - $sql = 'SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno'; + $sql = "SELECT periodno, lastdate_in_period FROM periods ORDER BY periodno"; $Periods = DB_query($sql,$db); while ($myrow=DB_fetch_array($Periods,$db)){ if(isset($_POST['FromPeriod']) AND $_POST['FromPeriod']!=''){ if( $_POST['FromPeriod']== $myrow['periodno']){ - echo '<option selected VALUE="' . $myrow['periodno'] . '">' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option selected value="' . $myrow['periodno'] . '">' .MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } else { if($myrow['lastdate_in_period']==$DefaultFromDate){ - echo '<option selected VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option selected value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } } @@ -67,95 +69,104 @@ $DefaultToPeriod = $_POST['ToPeriod']; } - echo '<tr><td>' . _('Select Period To:') .'</td><td><select Name="ToPeriod">'; + echo '<tr> + <td>' . _('Select Period To:') .'</td> + <td><select name="ToPeriod">'; $RetResult = DB_data_seek($Periods,0); while ($myrow=DB_fetch_array($Periods,$db)){ if($myrow['periodno']==$DefaultToPeriod){ - echo '<option selected VALUE="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option selected value="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } else { - echo '<option VALUE ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']); + echo '<option value ="' . $myrow['periodno'] . '">' . MonthAndYearFromSQLDate($myrow['lastdate_in_period']) . '</option>'; } } echo '</select></td></tr>'; - $AreasResult = DB_query('SELECT areacode, areadescription FROM areas',$db); + $AreasResult = DB_query("SELECT areacode, areadescription FROM areas",$db); if (!isset($_POST['SalesArea'])){ $_POST['SalesArea']=''; } - echo '<tr><td>' . _('For Sales Area/Region:') .'</td><td><select Name="SalesArea">'; + echo '<tr> + <td>' . _('For Sales Area/Region:') .'</td> + <td><select name="SalesArea">'; if($_POST['SalesArea']=='All'){ - echo '<option selected VALUE="All">' . _('All'); + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option VALUE="All">' . _('All'); + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow=DB_fetch_array($AreasResult)){ if($myrow['areacode']==$_POST['SalesArea']){ - echo '<option selected VALUE="' . $myrow['areacode'] . '">' . $myrow['areadescription']; + echo '<option selected value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['areacode'] . '">' . $myrow['areadescription']; + echo '<option value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } } echo '</select></td></tr>'; - $CategoriesResult = DB_query('SELECT categoryid, categorydescription FROM stockcategory',$db); + $CategoriesResult = DB_query("SELECT categoryid, categorydescription FROM stockcategory",$db); if (!isset($_POST['CategoryID'])){ $_POST['CategoryID']=''; } - echo '<tr><td>' . _('For Stock Category:') .'</td><td><select Name="CategoryID">'; + echo '<tr> + <td>' . _('For Stock Category:') .'</td> + <td><select Name="CategoryID">'; if($_POST['CategoryID']=='All'){ - echo '<option selected VALUE="All">' . _('All'); + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option VALUE="All">' . _('All'); + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow=DB_fetch_array($CategoriesResult)){ if($myrow['categoryid']==$_POST['CategoryID']){ - echo '<option selected VALUE="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option selected value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['categoryid'] . '">' . $myrow['categorydescription']; + echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } } echo '</select></td></tr>'; - $SalesFolkResult = DB_query('SELECT salesmancode, salesmanname FROM salesman',$db); + $SalesFolkResult = DB_query("SELECT salesmancode, salesmanname FROM salesman",$db); - if (! isset($_POST['SalesmanCode'])){ $_POST['SalesmanCode'] = ''; } - echo '<tr><td>' . _('For Sales Person:') .'</td><td><select Name="SalesmanCode">'; + echo '<tr> + <td>' . _('For Sales Person:') .'</td> + <td><select name="SalesmanCode">'; if($_POST['SalesmanCode']=='All'){ - echo '<option selected VALUE="All">' . _('All') . '</option>'; + echo '<option selected value="All">' . _('All') . '</option>'; } else { - echo '<option VALUE="All">' . _('All') . '</option>'; + echo '<option value="All">' . _('All') . '</option>'; } while ($myrow=DB_fetch_array($SalesFolkResult)){ if ($myrow['salesmancode']== $_POST['SalesmanCode']){ - echo '<option selected VALUE="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; + echo '<option selected value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } else { - echo '<option VALUE="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; + echo '<option value="' . $myrow['salesmancode'] . '">' . $myrow['salesmanname'] . '</option>'; } } - echo '</select></td><td>' . $_POST['SalesmanCode'] . '</td></tr>'; + echo '</select></td> + <td>' . $_POST['SalesmanCode'] . '</td> + </tr>'; echo '<tr><td>'._('Graph Type').'</td>'; - echo '<td><select name=GraphType>'; - echo '<option value=bars>'._('Bar Graph').'</option>'; - echo '<option value=stackedbars>'._('Stacked Bar Graph').'</option>'; - echo '<option value=lines>'._('Line Graph').'</option>'; - echo '<option value=linepoints>'._('Line Point Graph').'</option>'; - echo '<option value=area>'._('Area Graph').'</option>'; - echo '<option value=points>'._('Points Graph').'</option>'; - echo '<option value=pie>'._('Pie Graph').'</option>'; - echo '<option value=thinbarline>'._('Thin Bar Line Graph').'</option>'; - echo '<option value=squared>'._('Squared Graph').'</option>'; - echo '<option value=stackedarea>'._('Stacked Area Graph').'</option>'; + echo '<td><select name="GraphType">'; + echo '<option value="bars">'._('Bar Graph').'</option>'; + echo '<option value="stackedbars">'._('Stacked Bar Graph').'</option>'; + echo '<option value="lines">'._('Line Graph').'</option>'; + echo '<option value="linepoints">'._('Line Point Graph').'</option>'; + echo '<option value="area">'._('Area Graph').'</option>'; + echo '<option value="points">'._('Points Graph').'</option>'; + echo '<option value="pie">'._('Pie Graph').'</option>'; + echo '<option value="thinbarline">'._('Thin Bar Line Graph').'</option>'; + echo '<option value="squared">'._('Squared Graph').'</option>'; + echo '<option value="stackedarea">'._('Stacked Area Graph').'</option>'; echo '</select></td></tr>'; if (!isset($_POST['ValueFrom'])){ @@ -165,20 +176,20 @@ $_POST['ValueTo']=''; } echo '<tr><td>' . _('Graph On:') . '</td><td> - <input type="RADIO" name="GraphOn" VALUE="All" CHECKED>' . _('All') . '<br /> - <input type="RADIO" name="GraphOn" VALUE="Customer">' . _('Customer') . '<br /> - <input type="RADIO" name="GraphOn" VALUE="StockID">' . _('Item Code') . '</td></tr>'; - echo '<tr><td>' . _('From:') . ' <input type=TEXT name="ValueFrom" VALUE=' . $_POST['ValueFrom'] . '></td> - <td>' . _('To:') . ' <input type=TEXT name="ValueTo" VALUE=' . $_POST['ValueTo'] . '></td></tr>'; + <input type="RADIO" name="GraphOn" value="All" CHECKED>' . _('All') . '<br /> + <input type="RADIO" name="GraphOn" value="Customer">' . _('Customer') . '<br /> + <input type="RADIO" name="GraphOn" value="StockID">' . _('Item Code') . '</td></tr>'; + echo '<tr><td>' . _('From:') . ' <input type=TEXT name="ValueFrom" value=' . $_POST['ValueFrom'] . '></td> + <td>' . _('To:') . ' <input type=TEXT name="ValueTo" value=' . $_POST['ValueTo'] . '></td></tr>'; echo '<tr><td>' . _('Graph Value:') . '</td><td> - <input type="RADIO" name="GraphValue" VALUE="Net" CHECKED>' . _('Net Sales Value') . '<br /> - <input type="RADIO" name="GraphValue" VALUE="GP">' . _('Gross Profit') . '<br /> - <input type="RADIO" name="GraphValue" VALUE="Quantity">' . _('Quantity') . '</td></tr>'; + <input type="RADIO" name="GraphValue" value="Net" CHECKED>' . _('Net Sales Value') . '<br /> + <input type="RADIO" name="GraphValue" value="GP">' . _('Gross Profit') . '<br /> + <input type="RADIO" name="GraphValue" value="Quantity">' . _('Quantity') . '</td></tr>'; echo '</table>'; - echo '<br /><div class="centre"><input type=submit Name="ShowGraph" Value="' . _('Show Sales Graph') .'"></div>'; + echo '<br /><div class="centre"><input type="submit" Name="ShowGraph" Value="' . _('Show Sales Graph') .'"></div>'; include('includes/footer.inc'); } else { @@ -234,16 +245,16 @@ $WhereClause .= " stockid >='" . $_POST['ValueFrom'] . "' AND stockid <='" . $_POST['ValueTo'] . "' AND"; } - $WhereClause = 'WHERE ' . $WhereClause . ' salesanalysis.periodno>=' . $_POST['FromPeriod'] . ' AND salesanalysis.periodno <= ' . $_POST['ToPeriod']; + $WhereClause = "WHERE " . $WhereClause . " salesanalysis.periodno>='" . $_POST['FromPeriod'] . "' AND salesanalysis.periodno <= '" . $_POST['ToPeriod'] . "'"; - $SQL = 'SELECT salesanalysis.periodno, + $SQL = "SELECT salesanalysis.periodno, periods.lastdate_in_period, - SUM(CASE WHEN budgetoractual=1 THEN ' . $SelectClause . ' ELSE 0 END) AS sales, - SUM(CASE WHEN budgetoractual=0 THEN ' . $SelectClause . ' ELSE 0 END) AS budget - FROM salesanalysis INNER JOIN periods ON salesanalysis.periodno=periods.periodno ' . $WhereClause . ' + SUM(CASE WHEN budgetoractual=1 THEN " . $SelectClause . " ELSE 0 END) AS sales, + SUM(CASE WHEN budgetoractual=0 THEN " . $SelectClause . " ELSE 0 END) AS budget + FROM salesanalysis INNER JOIN periods ON salesanalysis.periodno=periods.periodno " . $WhereClause . " GROUP BY salesanalysis.periodno, periods.lastdate_in_period - ORDER BY salesanalysis.periodno'; + ORDER BY salesanalysis.periodno"; $graph->SetTitle($GraphTitle); @@ -259,11 +270,11 @@ } $graph->SetXTickPos('none'); $graph->SetXTickLabelPos('none'); - $graph->SetBackgroundColor("selection"); - $graph->SetTitleColor("blue"); - $graph->SetFileFormat("png"); + $graph->SetBackgroundColor('selection'); + $graph->SetTitleColor('blue'); + $graph->SetFileFormat('png'); $graph->SetPlotType($_POST['GraphType']); - $graph->SetIsInline("1"); + $graph->SetIsInline('1'); $graph->SetShading(5); $graph->SetDrawYGrid(TRUE); $graph->SetDataType('text-data'); @@ -297,9 +308,12 @@ //Draw it $graph->DrawGraph(); - echo '<table class=selection><tr><td>'; + echo '<table class="selection"> + <tr><td>'; echo '<p><img src="companies/' .$_SESSION['DatabaseName'] . '/reports/salesgraph.png" alt="Sales Report Graph"></img></p>'; - echo '</td></tr></table>'; + echo '</td> + </tr> + </table>'; include('includes/footer.inc'); - } - ?> \ No newline at end of file +} +?> \ No newline at end of file Modified: trunk/install/save.php =================================================================== --- trunk/install/save.php 2011-07-27 09:17:10 UTC (rev 4642) +++ trunk/install/save.php 2011-07-29 05:55:03 UTC (rev 4643) @@ -1,8 +1,8 @@ <?php /* $Id$*/ -error_reporting(E_ALL); -ini_set('display_errors', "On"); -ini_set('max_execution_time', "180"); +error_reporting(E_ALL && ~E_NOTICE); +ini_set('display_errors', 'On'); +ini_set('max_execution_time', '180'); require_once('../includes/MiscFunctions.php'); // Start a session @@ -79,7 +79,7 @@ // Function to workout what the default permissions are for files created by the webserver function default_file_mode($temp_dir) { - $v = explode(".",PHP_VERSION); + $v = explode('.',PHP_VERSION); $v = $v[0].$v[1]; if($v > 41 && is_writable($temp_dir)) { @@ -97,7 +97,7 @@ // Function to workout what the default permissions are for directories created by the webserver function default_dir_mode($temp_dir) { - $v = explode(".",PHP_VERSION); + $v = explode('.',PHP_VERSION); $v = $v[0].$v[1]; if ($v > 41 && is_writable($temp_dir)) { $dirname = $temp_dir.'/test_permissions/'; @@ -237,11 +237,10 @@ $Result = mkdir($CompanyDir . '/reportwriter'); $Result = mkdir($CompanyDir . '/pdf_append'); $Result = mkdir($CompanyDir . '/FormDesigns'); - copy ($path_to_root . '/companies/weberpdemo/FormDesigns/GoodsReceived.xml', $CompanyDir . '/FormDesigns/GoodsReceived.xml'); - copy ($path_to_root . '/companies/weberpdemo/FormDesigns/PickingList.xml', $CompanyDir . '/FormDesigns/PickingList.xml'); - copy ($path_to_root . '/companies/weberpdemo/FormDesigns/PurchaseOrder.xml', $CompanyDir . '/FormDesigns/PurchaseOrder.xml'); - copy ($path_to_root . '/companies/weberpdemo/FormDesigns/SalesInvoice.xml', $CompanyDir . '/FormDesigns/SalesInvoice.xml'); - + copy ($path_to_root . '/companies/weberpdemo/FormDesigns/GoodsReceived.xml', $CompanyDir . '/FormDesigns/GoodsReceived.xml'); + copy ($path_to_root . '/companies/weberpdemo/FormDesigns/PickingList.xml', $CompanyDir . '/FormDesigns/PickingList.xml'); + copy ($path_to_root . '/companies/weberpdemo/FormDesigns/PurchaseOrder.xml', $CompanyDir . '/FormDesigns/PurchaseOrder.xml'); + // Now have a destination to place the logo image. if (isset($_FILES['LogoFile'])) { if ($_FILES['LogoFile']['error'] == UPLOAD_ERR_OK) { @@ -249,12 +248,12 @@ $CompanyDir . '/logo.jpg'); } elseif ($_FILES['LogoFile']['error'] == UPLOAD_ERR_INI_SIZE || $_FILES['LogoFile']['error'] == UPLOAD_ERR_FORM_SIZE) { - set_error( "Logo file is too big - Limit: " . $_SESSION['MaxLogoSize'] ); + set_error( 'Logo file is too big - Limit: ' . $_SESSION['MaxLogoSize'] ); } elseif ($_FILES['LogoFile']['error'] == UPLOAD_ERR_NO_FILE ) { // No logo file, so use the default. copy( $path_to_root . '/logo_server.jpg', $CompanyDir . '/logo.jpg'); } else { - set_error( "Error uploading logo file" ); + set_error( 'Error uploading logo file' ); } } else { // No logo file, so use the default. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-07-30 06:58:21
|
Revision: 4644 http://web-erp.svn.sourceforge.net/web-erp/?rev=4644&view=rev Author: daintree Date: 2011-07-30 06:58:14 +0000 (Sat, 30 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/PO_Items.php trunk/SelectCreditItems.php trunk/doc/Change.log trunk/includes/PDFTransPageHeader.inc trunk/includes/PDFTransPageHeaderPortrait.inc trunk/includes/session.inc Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-07-29 05:55:03 UTC (rev 4643) +++ trunk/PO_Items.php 2011-07-30 06:58:14 UTC (rev 4644) @@ -554,12 +554,13 @@ purchdata.supplierdescription, purchdata.suppliersuom, purchdata.suppliers_partno, - purchdata.leadtime"; + purchdata.leadtime + ORDER BY latesteffectivefrom DESC"; $ErrMsg = _('The purchasing data for') . ' ' . $ItemCode . ' ' . _('could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the purchasing data but failed was'); $PurchDataResult = DB_query($sql,$db,$ErrMsg,$DbgMsg); - if (DB_num_rows($PurchDataResult)==1){ //the purchasing data is set up + if (DB_num_rows($PurchDataResult)>0){ //the purchasing data is set up $PurchRow = DB_fetch_array($PurchDataResult); $PurchPrice = $PurchRow['price']/$PurchRow['conversionfactor']; $ConversionFactor = $PurchRow['conversionfactor']; Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-29 05:55:03 UTC (rev 4643) +++ trunk/SelectCreditItems.php 2011-07-30 06:58:14 UTC (rev 4644) @@ -18,7 +18,14 @@ include('includes/GetPrice.inc'); -if (isset($_POST['ProcessCredit']) AND !isset($_SESSION['CreditItems'])){ +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + +if (isset($_POST['ProcessCredit']) AND !isset($_SESSION['CreditItems'.$identifier])){ prnMsg(_('This credit note has already been processed. Refreshing the page will not enter the credit note again') . '<br />' . _('Please use the navigation links provided rather than using the browser back button and then having to refresh'),'info'); echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); @@ -27,17 +34,17 @@ if (isset($_GET['NewCredit'])){ /*New credit note entry - clear any existing credit note details from the Items object and initiate a newy*/ - if (isset($_SESSION['CreditItems'])){ - unset ($_SESSION['CreditItems']->LineItems); - unset ($_SESSION['CreditItems']); + if (isset($_SESSION['CreditItems'.$identifier])){ + unset ($_SESSION['CreditItems'.$identifier]->LineItems); + unset ($_SESSION['CreditItems'.$identifier]); } } -if (!isset($_SESSION['CreditItems'])){ - /* It must be a new credit note being created $_SESSION['CreditItems'] would be set up from a previous call*/ +if (!isset($_SESSION['CreditItems'.$identifier])){ + /* It must be a new credit note being created $_SESSION['CreditItems'.$identifier] would be set up from a previous call*/ - $_SESSION['CreditItems'] = new cart; + $_SESSION['CreditItems'.$identifier] = new cart; $_SESSION['RequireCustomerSelection'] = 1; } @@ -51,9 +58,9 @@ } if (isset($_POST['CancelCredit'])) { - unset($_SESSION['CreditItems']->LineItems); - unset($_SESSION['CreditItems']); - $_SESSION['CreditItems'] = new cart; + unset($_SESSION['CreditItems'.$identifier]->LineItems); + unset($_SESSION['CreditItems'.$identifier]); + $_SESSION['CreditItems'.$identifier] = new cart; $_SESSION['RequireCustomerSelection'] = 1; } @@ -138,8 +145,8 @@ Now retrieve customer information - name, salestype, currency, terms etc */ - $_SESSION['CreditItems']->DebtorNo = $SelectedCustomer; - $_SESSION['CreditItems']->Branch = $SelectedBranch; + $_SESSION['CreditItems'.$identifier]->DebtorNo = $SelectedCustomer; + $_SESSION['CreditItems'.$identifier]->Branch = $SelectedBranch; $_SESSION['RequireCustomerSelection'] = 0; /* default the branch information from the customer branches table CustBranch -particularly where the stock @@ -166,8 +173,8 @@ INNER JOIN locations ON locations.loccode=custbranch.defaultlocation INNER JOIN debtorsmaster ON custbranch.debtorno=debtorsmaster.debtorno INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev - WHERE custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "' - AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "'"; + WHERE custbranch.branchcode='" . $_SESSION['CreditItems'.$identifier]->Branch . "' + AND custbranch.debtorno = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "'"; $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $SelectedCustomer . ' ' . _('cannot be retrieved because'); $DbgMsg = _('SQL used to retrieve the branch details was'); @@ -177,43 +184,44 @@ /* the sales type determines the price list to be used by default the customer of the user is defaulted from the entry of the userid and password. */ - $_SESSION['CreditItems']->CustomerName = $myrow['name']; - $_SESSION['CreditItems']->DefaultSalesType = $myrow['salestype']; - $_SESSION['CreditItems']->DefaultCurrency = $myrow['currcode']; - $_SESSION['CreditItems']->CurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['CreditItems'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['CreditItems'.$identifier]->DefaultSalesType = $myrow['salestype']; + $_SESSION['CreditItems'.$identifier]->DefaultCurrency = $myrow['currcode']; + $_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; $_SESSION['CurrencyRate'] = $myrow['rate']; - $_SESSION['CreditItems']->DeliverTo = $myrow['brname']; - $_SESSION['CreditItems']->BrAdd1 = $myrow['braddress1']; - $_SESSION['CreditItems']->BrAdd2 = $myrow['braddress2']; - $_SESSION['CreditItems']->BrAdd3 = $myrow['braddress3']; - $_SESSION['CreditItems']->BrAdd4 = $myrow['braddress4']; - $_SESSION['CreditItems']->BrAdd5 = $myrow['braddress5']; - $_SESSION['CreditItems']->BrAdd6 = $myrow['braddress6']; - $_SESSION['CreditItems']->PhoneNo = $myrow['phoneno']; - $_SESSION['CreditItems']->Email = $myrow['email']; - $_SESSION['CreditItems']->Location = $myrow['defaultlocation']; - $_SESSION['CreditItems']->TaxGroup = $myrow['taxgroupid']; - $_SESSION['CreditItems']->DispatchTaxProvince = $myrow['taxprovinceid']; - $_SESSION['CreditItems']->GetFreightTaxes(); + $_SESSION['CreditItems'.$identifier]->DeliverTo = $myrow['brname']; + $_SESSION['CreditItems'.$identifier]->BrAdd1 = $myrow['braddress1']; + $_SESSION['CreditItems'.$identifier]->BrAdd2 = $myrow['braddress2']; + $_SESSION['CreditItems'.$identifier]->BrAdd3 = $myrow['braddress3']; + $_SESSION['CreditItems'.$identifier]->BrAdd4 = $myrow['braddress4']; + $_SESSION['CreditItems'.$identifier]->BrAdd5 = $myrow['braddress5']; + $_SESSION['CreditItems'.$identifier]->BrAdd6 = $myrow['braddress6']; + $_SESSION['CreditItems'.$identifier]->PhoneNo = $myrow['phoneno']; + $_SESSION['CreditItems'.$identifier]->Email = $myrow['email']; + $_SESSION['CreditItems'.$identifier]->Location = $myrow['defaultlocation']; + $_SESSION['CreditItems'.$identifier]->TaxGroup = $myrow['taxgroupid']; + $_SESSION['CreditItems'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['CreditItems'.$identifier]->GetFreightTaxes(); } /* if the change customer button hit or the customer has not already been selected */ if ($_SESSION['RequireCustomerSelection'] ==1 - OR !isset($_SESSION['CreditItems']->DebtorNo) - OR $_SESSION['CreditItems']->DebtorNo=='' ) { + OR !isset($_SESSION['CreditItems'.$identifier]->DebtorNo) + OR $_SESSION['CreditItems'.$identifier]->DebtorNo=='' ) { - echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Select Customer For Credit Note').'</p>'; + echo '<table cellpadding="3" colspan="4" class="selection">'; echo '<tr><th colspan="5"><font size="3" color="navy"><b> ' . _('Customer Selection') . '</b></font></th></tr>'; echo '<tr>'; echo '<td><font size="1">' . _('Enter text in the customer name') . ':</font></td>'; - echo '<td><input type="text" name="Keywords" size=20 maxlength=25></td>'; + echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td>'; echo '<td><font size="3"><b>' . _('OR') . '</b></font></td>'; echo '<td><font size="1">' . _('Enter text extract in the customer code') . ':</font></td>'; - echo '<td><input type="text" name="CustCode" size="15" maxlength="18"></td>'; + echo '<td><input type="text" name="CustCode" size="15" maxlength="18" /></td>'; echo '</tr>'; echo '</table>'; echo '<br /><div class="centre"><input type="submit" name="SearchCust" value="' . _('Search Now') . '"></div>'; @@ -261,7 +269,7 @@ $j++; //end of page full new headings if } //end of while loop - echo '<input type="hidden" name="JustSelectedACustomer" value="Yes">'; + echo '<input type="hidden" name="JustSelectedACustomer" value="Yes" />'; echo '</table></form>'; }//end if results to show @@ -272,7 +280,7 @@ first add a header to show who we are making a credit note for */ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . - _('Search') . '" alt="" />' . ' ' . $_SESSION['CreditItems']->CustomerName . ' - ' . $_SESSION['CreditItems']->DeliverTo.'</p>'; + _('Search') . '" alt="" />' . ' ' . $_SESSION['CreditItems'.$identifier]->CustomerName . ' - ' . $_SESSION['CreditItems'.$identifier]->DeliverTo.'</p>'; /* do the search for parts that might be being looked up to add to the credit note */ if (isset($_POST['Search'])){ @@ -281,7 +289,7 @@ prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered') . '.', 'info' ); } - if ($_POST['Keywords']!="") { + if ($_POST['Keywords']!='') { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -289,9 +297,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.description " . LIKE . " '" . $SearchString . "' GROUP BY stockmaster.stockid, stockmaster.description, @@ -301,10 +309,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.description " . LIKE . " '" . $SearchString . "' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' GROUP BY stockmaster.stockid, @@ -319,10 +326,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' GROUP BY stockmaster.stockid, stockmaster.description, @@ -332,10 +338,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' GROUP BY stockmaster.stockid, @@ -348,9 +353,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') GROUP BY stockmaster.stockid, stockmaster.description, stockmaster.units @@ -359,10 +364,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.categoryid='" . $_POST['StockCat'] . "' GROUP BY stockmaster.stockid, stockmaster.description, @@ -391,7 +395,7 @@ /*Always do the stuff below if not looking for a customerid Set up the form for the credit note display and entry*/ - echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -416,7 +420,7 @@ $AlreadyOnThisCredit =0; - foreach ($_SESSION['CreditItems']->LineItems AS $OrderItem) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems AS $OrderItem) { /* do a loop round the items on the credit note to see that the item is not already on this credit note */ @@ -449,41 +453,40 @@ if ($myrow = DB_fetch_array($result1)){ - $LineNumber = $_SESSION['CreditItems']->LineCounter; + $LineNumber = $_SESSION['CreditItems'.$identifier]->LineCounter; - if ($_SESSION['CreditItems']->add_to_cart ($myrow['stockid'], - $NewItemQty, - $myrow['description'], - GetPrice ($_POST['NewItem'], - $_SESSION['CreditItems']->DebtorNo, - $_SESSION['CreditItems']->Branch, $db), - 0, - $myrow['units'], - $myrow['volume'], - $myrow['kgs'], - 0, - $myrow['mbflag'], - Date($_SESSION['DefaultDateFormat']), - 0, - $myrow['discountcategory'], - $myrow['controlled'], - $myrow['serialised'], - $myrow['decimalplaces'], - '', - 'No', - -1, - $myrow['taxcatid'], - '', - '', - '', - $myrow['standardcost']) ==1){ - + if ($_SESSION['CreditItems'.$identifier]->add_to_cart ($myrow['stockid'], + $NewItemQty, + $myrow['description'], + GetPrice ($_POST['NewItem'], + $_SESSION['CreditItems'.$identifier]->DebtorNo, + $_SESSION['CreditItems'.$identifier]->Branch, $db), + 0, + $myrow['units'], + $myrow['volume'], + $myrow['kgs'], + 0, + $myrow['mbflag'], + Date($_SESSION['DefaultDateFormat']), + 0, + $myrow['discountcategory'], + $myrow['controlled'], + $myrow['serialised'], + $myrow['decimalplaces'], + '', + 'No', + -1, + $myrow['taxcatid'], + '', + '', + '', + $myrow['standardcost']) ==1){ - $_SESSION['CreditItems']->GetTaxes($LineNumber); + $_SESSION['CreditItems'.$identifier]->GetTaxes($LineNumber); if ($myrow['controlled']==1){ /*Qty must be built up from serial item entries */ - $_SESSION['CreditItems']->LineItems[$LineNumber]->Quantity = 0; + $_SESSION['CreditItems'.$identifier]->LineItems[$LineNumber]->Quantity = 0; } } @@ -499,31 +502,31 @@ /* setup system defaults for looking up prices and the number of ordered items if an item has been selected for adding to the basket add it to the session arrays */ - if ($_SESSION['CreditItems']->ItemsOrdered > 0 OR isset($_POST['NewItem'])){ + if ($_SESSION['CreditItems'.$identifier]->ItemsOrdered > 0 OR isset($_POST['NewItem'])){ if (isset($_GET['Delete'])){ - $_SESSION['CreditItems']->remove_from_cart($_GET['Delete']); + $_SESSION['CreditItems'.$identifier]->remove_from_cart($_GET['Delete']); } if (isset($_POST['ChargeFreightCost'])){ - $_SESSION['CreditItems']->FreightCost = $_POST['ChargeFreightCost']; + $_SESSION['CreditItems'.$identifier]->FreightCost = $_POST['ChargeFreightCost']; } - if (isset($_POST['Location']) AND $_POST['Location'] != $_SESSION['CreditItems']->Location){ + if (isset($_POST['Location']) AND $_POST['Location'] != $_SESSION['CreditItems'.$identifier]->Location){ - $_SESSION['CreditItems']->Location = $_POST['Location']; + $_SESSION['CreditItems'.$identifier]->Location = $_POST['Location']; $NewDispatchTaxProvResult = DB_query("SELECT taxprovinceid FROM locations WHERE loccode='" . $_POST['Location'] . "'",$db); $myrow = DB_fetch_array($NewDispatchTaxProvResult); - $_SESSION['CreditItems']->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['CreditItems'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; - foreach ($_SESSION['CreditItems']->LineItems as $LineItem) { - $_SESSION['CreditItems']->GetTaxes($LineItem->LineNumber); + foreach ($_SESSION['CreditItems'.$identifier]->LineItems as $LineItem) { + $_SESSION['CreditItems'.$identifier]->GetTaxes($LineItem->LineNumber); } } - foreach ($_SESSION['CreditItems']->LineItems as $LineItem) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems as $LineItem) { if (isset($_POST['Quantity_' . $LineItem->LineNumber])){ @@ -540,7 +543,7 @@ $TaxTotalPercent += $Tax->TaxRate; } } - $Price = round($_POST['Price_' . $LineItem->LineNumber]/($TaxTotalPercent + 1),2); + $Price = round($_POST['Price_' . $LineItem->LineNumber]/($TaxTotalPercent + 1),$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); } else { $Price = $_POST['Price_' . $LineItem->LineNumber]; } @@ -549,30 +552,30 @@ foreach ($LineItem->Taxes as $TaxLine) { if (isset($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ - $_SESSION['CreditItems']->LineItems[$LineItem->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = $_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate']/100; + $_SESSION['CreditItems'.$identifier]->LineItems[$LineItem->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = $_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate']/100; } } } 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 credited to less than 0 or the price less than 0 or the discount more than 100% or less than 0%'),'warn'); } elseif (isset($_POST['Quantity_' . $LineItem->LineNumber])) { - $_SESSION['CreditItems']->update_cart_item($LineItem->LineNumber, - $Quantity, - $Price, - $DiscountPercentage/100, - $Narrative, - 'No', - $LineItem->ItemDue, - $LineItem->POLine, - 0); + $_SESSION['CreditItems'.$identifier]->update_cart_item($LineItem->LineNumber, + $Quantity, + $Price, + $DiscountPercentage/100, + $Narrative, + 'No', + $LineItem->ItemDue, + $LineItem->POLine, + 0); } } } - foreach ($_SESSION['CreditItems']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['CreditItems'.$identifier]->FreightTaxes as $FreightTaxLine) { if (isset($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])){ - $_SESSION['CreditItems']->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = $_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder]/100; + $_SESSION['CreditItems'.$identifier]->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = $_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder]/100; } } @@ -581,12 +584,12 @@ $AlreadyOnThisCredit =0; - foreach ($_SESSION['CreditItems']->LineItems AS $OrderItem) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems AS $OrderItem) { /* do a loop round the items on the credit note to see that the item is not already on this credit note */ - if ($_SESSION['SO_AllowSameItemMultipleTimes']==0 && strcasecmp($OrderItem->StockID, $_POST['NewItem']) == 0) { + if ($_SESSION['SO_AllowSameItemMultipleTimes']==0 AND strcasecmp($OrderItem->StockID, $_POST['NewItem']) == 0) { $AlreadyOnThisCredit = 1; prnMsg(_('The item selected is already on this credit the system will not allow the same item on the credit note more than once. However you can change the quantity credited of the existing line if necessary.'),'warn'); } @@ -614,14 +617,14 @@ $result1 = DB_query($sql,$db,$ErrMsg,$DbgMsg); $myrow = DB_fetch_array($result1); - $LineNumber = $_SESSION['CreditItems']->LineCounter; + $LineNumber = $_SESSION['CreditItems'.$identifier]->LineCounter; /*validate the data returned before adding to the items to credit */ - if ($_SESSION['CreditItems']->add_to_cart ($myrow['stockid'], + if ($_SESSION['CreditItems'.$identifier]->add_to_cart ($myrow['stockid'], 1, $myrow['description'], GetPrice($_POST['NewItem'], - $_SESSION['CreditItems']->DebtorNo, - $_SESSION['CreditItems']->Branch, + $_SESSION['CreditItems'.$identifier]->DebtorNo, + $_SESSION['CreditItems'.$identifier]->Branch, $db), 0, $myrow['units'], @@ -644,11 +647,11 @@ '', $myrow['standardcost']) ==1){ - $_SESSION['CreditItems']->GetTaxes($LineNumber); + $_SESSION['CreditItems'.$identifier]->GetTaxes($LineNumber); if ($myrow['controlled']==1){ /*Qty must be built up from serial item entries */ - $_SESSION['CreditItems']->LineItems[$LineNumber]->Quantity = 0; + $_SESSION['CreditItems'.$identifier]->LineItems[$LineNumber]->Quantity = 0; } } } /* end of if not already on the credit note */ @@ -672,19 +675,19 @@ <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> </tr>'; - $_SESSION['CreditItems']->total = 0; - $_SESSION['CreditItems']->totalVolume = 0; - $_SESSION['CreditItems']->totalWeight = 0; + $_SESSION['CreditItems'.$identifier]->total = 0; + $_SESSION['CreditItems'.$identifier]->totalVolume = 0; + $_SESSION['CreditItems'.$identifier]->totalWeight = 0; $TaxTotal = 0; $TaxTotals = array(); $TaxGLCodes = array(); $k =0; //row colour counter - foreach ($_SESSION['CreditItems']->LineItems as $LineItem) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems as $LineItem) { - $LineTotal = round($LineItem->Quantity * $LineItem->Price * (1 - $LineItem->DiscountPercent),$_SESSION['CreditItems']->CurrDecimalPlaces); - $DisplayLineTotal = number_format($LineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); + $LineTotal = round($LineItem->Quantity * $LineItem->Price * (1 - $LineItem->DiscountPercent),$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); + $DisplayLineTotal = number_format($LineTotal,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; @@ -698,9 +701,9 @@ <td>' . $LineItem->ItemDescription . '</td>'; if ($LineItem->Controlled==0){ - echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 value=' . $LineItem->Quantity . '></td>'; + echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength="6" size="6" value=' . $LineItem->Quantity . '></td>'; } else { - echo '<td class=number><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> + echo '<td class="number"><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> <input type=hidden name="Quantity_' . $LineItem->LineNumber . '" value=' . $LineItem->Quantity . '></td>'; } @@ -708,13 +711,13 @@ <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 value=' . $LineItem->Price . '></td> <td><input type="CheckBox" name="Gross" value=False></td> <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 value=' . ($LineItem->DiscountPercent * 100) . '>%</td> - <td class=number>' . $DisplayLineTotal . '</td>'; + <td class="number">' . $DisplayLineTotal . '</td>'; /*Need to list the taxes applicable to this line */ echo '<td>'; $i=0; - foreach ($_SESSION['CreditItems']->LineItems[$LineItem->LineNumber]->Taxes AS $Tax) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems[$LineItem->LineNumber]->Taxes AS $Tax) { if ($i>0){ echo '<br />'; } @@ -746,38 +749,38 @@ $TaxTotal += $TaxLineTotal; - $DisplayTaxAmount = number_format($TaxLineTotal ,$_SESSION['CreditItems']->CurrDecimalPlaces); - $DisplayGrossLineTotal = number_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); + $DisplayTaxAmount = number_format($TaxLineTotal ,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); + $DisplayGrossLineTotal = number_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); echo '<td class="number">' . $DisplayTaxAmount . '</td> <td class="number">' . $DisplayGrossLineTotal . '</td> - <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $LineItem->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this line item from the credit note?') . '\');">' . _('Delete') . '</a></td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?identifier=' . $identifier . '&Delete=' . $LineItem->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this line item from the credit note?') . '\');">' . _('Delete') . '</a></td> </tr>'; echo $RowStarter; echo '<td colspan=11><textarea name="Narrative_' . $LineItem->LineNumber . '" cols=100% rows=1>' . $LineItem->Narrative . '</textarea><br /></td></tr>'; - $_SESSION['CreditItems']->total = $_SESSION['CreditItems']->total + $LineTotal; - $_SESSION['CreditItems']->totalVolume = $_SESSION['CreditItems']->totalVolume + $LineItem->Quantity * $LineItem->Volume; $_SESSION['CreditItems']->totalWeight = $_SESSION['CreditItems']->totalWeight + $LineItem->Quantity * $LineItem->Weight; + $_SESSION['CreditItems'.$identifier]->total = $_SESSION['CreditItems'.$identifier]->total + $LineTotal; + $_SESSION['CreditItems'.$identifier]->totalVolume = $_SESSION['CreditItems'.$identifier]->totalVolume + $LineItem->Quantity * $LineItem->Volume; $_SESSION['CreditItems'.$identifier]->totalWeight = $_SESSION['CreditItems'.$identifier]->totalWeight + $LineItem->Quantity * $LineItem->Weight; } - if (!isset($_POST['ChargeFreightCost']) AND !isset($_SESSION['CreditItems']->FreightCost)){ + if (!isset($_POST['ChargeFreightCost']) AND !isset($_SESSION['CreditItems'.$identifier]->FreightCost)){ $_POST['ChargeFreightCost']=0; } echo '<tr> - <td colspan=5></td>'; + <td colspan="5"></td>'; echo '<td colspan="2" class="number">'. _('Credit Freight').'</td> - <td><input type="text" class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '" /></td>'; + <td><input type="text" class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems'.$identifier]->FreightCost . '" /></td>'; $FreightTaxTotal =0; //initialise tax total echo '<td>'; $i=0; // initialise the number of taxes iterated through - foreach ($_SESSION['CreditItems']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['CreditItems'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -788,38 +791,38 @@ echo '</td><td>'; $i=0; - foreach ($_SESSION['CreditItems']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['CreditItems'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } - echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 value="' . $FreightTaxLine->TaxRate * 100 . '" />'; + echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength="4" size="4" value="' . $FreightTaxLine->TaxRate * 100 . '" />'; if ($FreightTaxLine->TaxOnTax ==1){ - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems'.$identifier]->FreightCost + $FreightTaxTotal)); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems'.$identifier]->FreightCost + $FreightTaxTotal)); } else { - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['CreditItems']->FreightCost); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['CreditItems']->FreightCost); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['CreditItems'.$identifier]->FreightCost); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['CreditItems'.$identifier]->FreightCost); } $i++; $TaxGLCodes[$FreightTaxLine->TaxAuthID] = $FreightTaxLine->TaxGLCode; } echo '</td>'; - echo '<td class="number">' . number_format($FreightTaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> - <td class="number">' . number_format($FreightTaxTotal+ $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> + echo '<td class="number">' . number_format($FreightTaxTotal,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . number_format($FreightTaxTotal+ $_SESSION['CreditItems'.$identifier]->FreightCost,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces) . '</td> </tr>'; $TaxTotal += $FreightTaxTotal; - $DisplayTotal = number_format($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces); + $DisplayTotal = number_format($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); echo '<tr> <td colspan="7" class="number">' . _('Credit Totals') . '</td> <td class="number"><b>' . $DisplayTotal . '</b></td> <td colspan="2"></td> - <td class="number"><b>' . number_format($TaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> - <td class="number"><b>' . number_format($TaxTotal+($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost),$_SESSION['CreditItems']->CurrDecimalPlaces) . '</b></td> + <td class="number"><b>' . number_format($TaxTotal,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number"><b>' . number_format($TaxTotal+($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost),$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces) . '</b></td> </tr> </table>'; @@ -853,13 +856,14 @@ /*if the credit note is a return of goods then need to know which location to receive them into */ - echo '<tr><td>' . _('Goods Returned to Location') . ' :</td><td><select name=Location>'; + echo '<tr><td>' . _('Goods Returned to Location') . ' :</td> + <td><select name="Location">'; $SQL="SELECT loccode, locationname FROM locations"; $Result = DB_query($SQL,$db); if (!isset($_POST['Location'])){ - $_POST['Location'] = $_SESSION['CreditItems']->Location; + $_POST['Location'] = $_SESSION['CreditItems'.$identifier]->Location; } while ($myrow = DB_fetch_array($Result)) { @@ -877,10 +881,10 @@ $SQL="SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname - AND accountgroups.pandl=1 ORDER BY accountcode"; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl=1 + ORDER BY accountcode"; $Result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($Result)) { @@ -911,7 +915,7 @@ <input type=submit name="Update" value="' . _('Update') . '" /> <input type=submit name="CancelCredit" value="' . _('Cancel') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel the whole of this credit note?') . '\');" />'; if (!isset($_POST['ProcessCredit']) AND $OKToProcess == true){ - echo '<input type=submit name="ProcessCredit" value="' . _('Process Credit Note') . '" /> + echo '<input type="submit" name="ProcessCredit" value="' . _('Process Credit Note') . '" /> <br />'; } echo '</div>'; @@ -1048,8 +1052,8 @@ $SQL = "SELECT area FROM custbranch - WHERE custbranch.debtorno ='". $_SESSION['CreditItems']->DebtorNo . "' - AND custbranch.branchcode = '" . $_SESSION['CreditItems']->Branch . "'"; + WHERE custbranch.debtorno ='". $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND custbranch.branchcode = '" . $_SESSION['CreditItems'.$identifier]->Branch . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The area cannot be determined for this customer'); $DbgMsg = _('The following SQL to insert the customer credit note was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg); @@ -1098,15 +1102,15 @@ invtext) VALUES ('". $CreditNo . "', '11', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $SQLCreditDate . "', '" . date('Y-m-d H-i-s') . "', '" . $PeriodNo . "', - '" . $_SESSION['CreditItems']->DefaultSalesType . "', - '" . -($_SESSION['CreditItems']->total) . "', + '" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "', + '" . -($_SESSION['CreditItems'.$identifier]->total) . "', '" . -$TaxTotal . "', - '" . -$_SESSION['CreditItems']->FreightCost . "', + '" . -$_SESSION['CreditItems'.$identifier]->FreightCost . "', '" . $_SESSION['CurrencyRate'] . "', '" . $_POST['CreditText'] . "' )"; @@ -1135,7 +1139,7 @@ /* Insert stock movements for stock coming back in if the Credit is a return of goods */ - foreach ($_SESSION['CreditItems']->LineItems as $CreditLine) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems as $CreditLine) { If ($CreditLine->Quantity > 0){ @@ -1146,7 +1150,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $CreditLine->StockID . "' - AND loccode= '" . $_SESSION['CreditItems']->Location . "'"; + AND loccode= '" . $_SESSION['CreditItems'.$identifier]->Location . "'"; $Result = DB_query($SQL, $db); if (DB_num_rows($Result)==1){ @@ -1182,10 +1186,10 @@ ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_POST['CreditText'] . "', @@ -1222,10 +1226,10 @@ '" . $CreditLine->StockID . "', 11, " . $CreditNo . ", - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $CreditLine->Quantity . "', @@ -1255,10 +1259,10 @@ '" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $CreditLine->Quantity . "', @@ -1305,7 +1309,7 @@ $SQL = "SELECT COUNT(*) FROM stockserialitems WHERE stockid='" . $CreditLine->StockID . "' - AND loccode='" . $_SESSION['CreditItems']->Location . "' + AND loccode='" . $_SESSION['CreditItems'.$identifier]->Location . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The existence of the serial stock item record could not be determined because'); $DbgMsg = _('The following SQL to find out if the serial stock item record existed already was used'); @@ -1321,7 +1325,7 @@ quantity) VALUES ( '" . $CreditLine->StockID . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $Item->BundleRef . "', '" . $Item->BundleQty . "' )"; @@ -1332,7 +1336,7 @@ } else { /*Update the existing StockSerialItems record */ $SQL = "UPDATE stockserialitems SET quantity= quantity + " . $Item->BundleQty . " WHERE stockid='" . $CreditLine->StockID . "' - AND loccode='" . $_SESSION['CreditItems']->Location . "' + AND loccode='" . $_SESSION['CreditItems'.$identifier]->Location . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -1369,7 +1373,7 @@ $SQL = "UPDATE locstock SET locstock.quantity = locstock.quantity + " . $CreditLine->Quantity . " WHERE locstock.stockid = '" . $CreditLine->StockID . "' - AND locstock.loccode = '" . $_SESSION['CreditItems']->Location . "'"; + AND locstock.loccode = '" . $_SESSION['CreditItems'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the location stock record was used'); @@ -1404,7 +1408,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $AssParts['component'] . "' - AND locstock.loccode= '" . $_SESSION['CreditItems']->Location . "'"; + AND locstock.loccode= '" . $_SESSION['CreditItems'.$identifier]->Location . "'"; $Result = DB_query($SQL, $db); if (DB_num_rows($Result)==1){ @@ -1433,10 +1437,10 @@ '" . $AssParts['component'] . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $PeriodNo . "', '" . _('Assembly') .': ' . $CreditLine->StockID . "', '" . $AssParts['quantity'] * $CreditLine->Quantity . ", " . $AssParts['standard'] . "', @@ -1452,7 +1456,7 @@ $SQL = "UPDATE locstock SET locstock.quantity = locstock.quantity + " . $AssParts['quantity'] * $CreditLine->Quantity . " WHERE locstock.stockid = '" . $AssParts['component'] . "' - AND locstock.loccode = '" . $_SESSION['CreditItems']->Location . "'"; + AND locstock.loccode = '" . $_SESSION['CreditItems'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated for an assembly component because'); $DbgMsg = _('The following SQL to update the component location stock record was used'); @@ -1462,7 +1466,7 @@ /*Update the cart with the recalculated standard cost from the explosion of the assembly's components*/ - $_SESSION['CreditItems']->LineItems[$CreditLine->LineNumber]->StandardCost = $StandardCost; + $_SESSION['CreditItems'.$identifier]->LineItems[$CreditLine->LineNumber]->StandardCost = $StandardCost; $CreditLine->StandardCost = $StandardCost; } /*end of its a return of stock */ @@ -1491,10 +1495,10 @@ '" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . -$CreditLine->Quantity . "', @@ -1526,10 +1530,10 @@ '" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . -$CreditLine->Quantity . "', @@ -1555,7 +1559,7 @@ it would have been added by the return stock movement above */ $SQL = "UPDATE stockserialitems SET quantity= quantity - " . $Item->BundleQty . " WHERE stockid='" . $CreditLine->StockID . "' - AND loccode='" . $_SESSION['CreditItems']->Location . "' + AND loccode='" . $_SESSION['CreditItems'.$identifier]->Location . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated for the write off because'); @@ -1602,10 +1606,10 @@ AND salesanalysis.custbranch=custbranch.branchcode AND salesanalysis.area=custbranch.area AND salesanalysis.salesperson=custbranch.salesman - AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND salesanalysis.custbranch = '" . $_SESSION['CreditItems']->Branch . "' + AND salesanalysis.cust = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch = '" . $_SESSION['CreditItems'.$identifier]->Branch . "' AND salesanalysis.stockid = '" . $CreditLine->StockID . "' AND salesanalysis.budgetoractual=1 GROUP BY salesanalysis.stkcategory, @@ -1628,10 +1632,10 @@ disc=disc-" . ($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . " WHERE salesanalysis.area='" . $myrow[2] . "' AND salesanalysis.salesperson='" . $myrow[3] . "' - AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno = '" . $PeriodNo . "' - AND salesanalysis.cust = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND salesanalysis.custbranch = '" . $_SESSION['CreditItems']->Branch . "' + AND salesanalysis.cust = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch = '" . $_SESSION['CreditItems'.$identifier]->Branch . "' AND salesanalysis.stockid = '" . $CreditLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[1] . "' AND salesanalysis.budgetoractual=1"; @@ -1644,10 +1648,10 @@ Disc=Disc-" . ($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . " WHERE salesanalysis.area='" . $myrow[2] . "' AND salesanalysis.salesperson='" . $myrow[3] . "' - AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno = '" . $PeriodNo . "' - AND salesanalysis.cust = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND salesanalysis.custbranch = '" . $_SESSION['CreditItems']->Branch . "' + AND salesanalysis.cust = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch = '" . $_SESSION['CreditItems'.$identifier]->Branch . "' AND salesanalysis.stockid = '" . $CreditLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[1] . "' AND salesanalysis.budgetoractual=1"; @@ -1669,11 +1673,11 @@ budgetoractual, salesperson, stkcategory) - SELECT '" . $_SESSION['CreditItems']->DefaultSalesType . "', + SELECT '" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "', '" . $PeriodNo . "', '" . -($CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', 0, '" . -($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . "', '" . $CreditLine->StockID . "', @@ -1683,8 +1687,8 @@ stockmaster.categoryid FROM stockmaster, custbranch WHERE stockmaster.stockid = '" . $CreditLine->StockID . "' - AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "'"; + AND custbranch.debtorno = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['CreditItems'.$identifier]->Branch . "'"; } else { @@ -1701,12 +1705,12 @@ budgetoractual, salesperson, stkcategory) - SELECT '" . $_SESSION['CreditItems']->DefaultSalesType . "', + SELECT '" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "', '" . $PeriodNo . "', '" . -($CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . "', '" . -($CreditLine->StandardCost * $CreditLine->Quantity) . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . -$CreditLine->Quantity . "', '" . -($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . "', '" . $CreditLine->StockID . "', @@ -1717,8 +1721,8 @@ FROM stockmaster, custbranch WHERE stockmaster.stockid = '" . $CreditLine->StockID . "' - AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "'"; + AND custbranch.debtorno = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['CreditItems'.$identifier]->Branch . "'"; } } @@ -1738,7 +1742,7 @@ /*first reverse credit the cost of sales entry*/ $COGSAccount = GetCOGSGLAccount($Area, $CreditLine->StockID, - $_SESSION['CreditItems']->DefaultSalesType, + $_SESSION['CreditItems'.$identifier]->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1753,7 +1757,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $COGSAccount . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', '" . ($CreditLine->StandardCost * -$CreditLine->Quantity) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of the stock credited GL posting could not be inserted because'); @@ -1778,7 +1782,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $_POST['WriteOffGLCode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' )"; @@ -1801,7 +1805,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' )"; @@ -1817,7 +1821,7 @@ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, $CreditLine->StockID, - $_SESSION['CreditItems']->DefaultSalesType, + $_SESSION['CreditItems'.$identifier]->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, @@ -1832,7 +1836,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->Price . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->Price . "', '" . ($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate'] . "' )"; @@ -1854,7 +1858,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', '" . -($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate'] . "' )"; @@ -1871,7 +1875,7 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post credit note transaction to GL credit debtors, debit freight re-charged and debit sales */ - if (($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal) !=0) { + if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1884,14 +1888,14 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . -($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate'] . "')"; + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . -($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting for the credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); } - if ($_SESSION['CreditItems']->FreightCost !=0) { + if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1904,8 +1908,8 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->FreightCost/$_SESSION['CurrencyRate'] . "')"; + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->FreightCost/$_SESSION['CurrencyRate'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting for this credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1925,7 +1929,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', '" . ($TaxAmount/$_SESSION['CurrencyRate']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); @@ -1937,8 +1941,8 @@ DB_Txn_Commit($db); - unset($_SESSION['CreditItems']->LineItems); - unset($_SESSION['CreditItems']); + unset($_SESSION['CreditItems'.$identifier]->LineItems); + unset($_SESSION['CreditItems'.$identifier]); echo _('Credit Note number') . ' ' . $CreditNo . ' ' . _('processed') . '<br />'; echo '<a target="_blank" href="' . $rootpath . '/PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit">' . _('Show this Credit Note on screen') . '</a><br />'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-29 05:55:03 UTC (rev 4643) +++ trunk/doc/Change.log 2011-07-30 06:58:14 UTC (rev 4644) @@ -1,5 +1,8 @@ webERP Change Log +30/7/11 Phil: SelectCreditItems.php made it so if several sessions creating a credit note they no longer over-write each other. +30/7/11 Ricard: POItems.php now checks for return of more than 1 purchasing data from the supplier and takes the newest record + 27/7/11 Version 4.05 27/7/11 includes/LanguageSetup.php now checks for existence of LC_MESSAGES (it doesn't exist on windows servers) and uses LC_ALL as the fall back only Modified: trunk/includes/PDFTransPageHeader.inc =================================================================== --- trunk/includes/PDFTransPageHeader.inc 2011-07-29 05:55:03 UTC (rev 4643) +++ trunk/includes/PDFTransPageHeader.inc 2011-07-30 06:58:14 UTC (rev 4644) @@ -185,10 +185,10 @@ /*Print a vertical line */ $pdf->line($Left_Margin+248, $YPos-10+$line_height+3,$Left_Margin+248, $YPos - 18); - -$pdf->addText($Left_Margin + 252, $YPos, $FontSize, _('Customer Order Ref.') . ':'); -$pdf->addText($Left_Margin+340, $YPos, $FontSize, $myrow['customerref']); - +if ($InvOrCredit=='Invoice'){ + $pdf->addText($Left_Margin + 252, $YPos, $FontSize, _('Customer Order Ref.') . ':'); + $pdf->add... [truncated message content] |
From: <dai...@us...> - 2011-07-30 06:58:21
|
Revision: 4644 http://web-erp.svn.sourceforge.net/web-erp/?rev=4644&view=rev Author: daintree Date: 2011-07-30 06:58:14 +0000 (Sat, 30 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/PO_Items.php trunk/SelectCreditItems.php trunk/doc/Change.log trunk/includes/PDFTransPageHeader.inc trunk/includes/PDFTransPageHeaderPortrait.inc trunk/includes/session.inc Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-07-29 05:55:03 UTC (rev 4643) +++ trunk/PO_Items.php 2011-07-30 06:58:14 UTC (rev 4644) @@ -554,12 +554,13 @@ purchdata.supplierdescription, purchdata.suppliersuom, purchdata.suppliers_partno, - purchdata.leadtime"; + purchdata.leadtime + ORDER BY latesteffectivefrom DESC"; $ErrMsg = _('The purchasing data for') . ' ' . $ItemCode . ' ' . _('could not be retrieved because'); $DbgMsg = _('The SQL used to retrieve the purchasing data but failed was'); $PurchDataResult = DB_query($sql,$db,$ErrMsg,$DbgMsg); - if (DB_num_rows($PurchDataResult)==1){ //the purchasing data is set up + if (DB_num_rows($PurchDataResult)>0){ //the purchasing data is set up $PurchRow = DB_fetch_array($PurchDataResult); $PurchPrice = $PurchRow['price']/$PurchRow['conversionfactor']; $ConversionFactor = $PurchRow['conversionfactor']; Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-07-29 05:55:03 UTC (rev 4643) +++ trunk/SelectCreditItems.php 2011-07-30 06:58:14 UTC (rev 4644) @@ -18,7 +18,14 @@ include('includes/GetPrice.inc'); -if (isset($_POST['ProcessCredit']) AND !isset($_SESSION['CreditItems'])){ +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + +if (isset($_POST['ProcessCredit']) AND !isset($_SESSION['CreditItems'.$identifier])){ prnMsg(_('This credit note has already been processed. Refreshing the page will not enter the credit note again') . '<br />' . _('Please use the navigation links provided rather than using the browser back button and then having to refresh'),'info'); echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; include('includes/footer.inc'); @@ -27,17 +34,17 @@ if (isset($_GET['NewCredit'])){ /*New credit note entry - clear any existing credit note details from the Items object and initiate a newy*/ - if (isset($_SESSION['CreditItems'])){ - unset ($_SESSION['CreditItems']->LineItems); - unset ($_SESSION['CreditItems']); + if (isset($_SESSION['CreditItems'.$identifier])){ + unset ($_SESSION['CreditItems'.$identifier]->LineItems); + unset ($_SESSION['CreditItems'.$identifier]); } } -if (!isset($_SESSION['CreditItems'])){ - /* It must be a new credit note being created $_SESSION['CreditItems'] would be set up from a previous call*/ +if (!isset($_SESSION['CreditItems'.$identifier])){ + /* It must be a new credit note being created $_SESSION['CreditItems'.$identifier] would be set up from a previous call*/ - $_SESSION['CreditItems'] = new cart; + $_SESSION['CreditItems'.$identifier] = new cart; $_SESSION['RequireCustomerSelection'] = 1; } @@ -51,9 +58,9 @@ } if (isset($_POST['CancelCredit'])) { - unset($_SESSION['CreditItems']->LineItems); - unset($_SESSION['CreditItems']); - $_SESSION['CreditItems'] = new cart; + unset($_SESSION['CreditItems'.$identifier]->LineItems); + unset($_SESSION['CreditItems'.$identifier]); + $_SESSION['CreditItems'.$identifier] = new cart; $_SESSION['RequireCustomerSelection'] = 1; } @@ -138,8 +145,8 @@ Now retrieve customer information - name, salestype, currency, terms etc */ - $_SESSION['CreditItems']->DebtorNo = $SelectedCustomer; - $_SESSION['CreditItems']->Branch = $SelectedBranch; + $_SESSION['CreditItems'.$identifier]->DebtorNo = $SelectedCustomer; + $_SESSION['CreditItems'.$identifier]->Branch = $SelectedBranch; $_SESSION['RequireCustomerSelection'] = 0; /* default the branch information from the customer branches table CustBranch -particularly where the stock @@ -166,8 +173,8 @@ INNER JOIN locations ON locations.loccode=custbranch.defaultlocation INNER JOIN debtorsmaster ON custbranch.debtorno=debtorsmaster.debtorno INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev - WHERE custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "' - AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "'"; + WHERE custbranch.branchcode='" . $_SESSION['CreditItems'.$identifier]->Branch . "' + AND custbranch.debtorno = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "'"; $ErrMsg = _('The customer branch record of the customer selected') . ': ' . $SelectedCustomer . ' ' . _('cannot be retrieved because'); $DbgMsg = _('SQL used to retrieve the branch details was'); @@ -177,43 +184,44 @@ /* the sales type determines the price list to be used by default the customer of the user is defaulted from the entry of the userid and password. */ - $_SESSION['CreditItems']->CustomerName = $myrow['name']; - $_SESSION['CreditItems']->DefaultSalesType = $myrow['salestype']; - $_SESSION['CreditItems']->DefaultCurrency = $myrow['currcode']; - $_SESSION['CreditItems']->CurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['CreditItems'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['CreditItems'.$identifier]->DefaultSalesType = $myrow['salestype']; + $_SESSION['CreditItems'.$identifier]->DefaultCurrency = $myrow['currcode']; + $_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; $_SESSION['CurrencyRate'] = $myrow['rate']; - $_SESSION['CreditItems']->DeliverTo = $myrow['brname']; - $_SESSION['CreditItems']->BrAdd1 = $myrow['braddress1']; - $_SESSION['CreditItems']->BrAdd2 = $myrow['braddress2']; - $_SESSION['CreditItems']->BrAdd3 = $myrow['braddress3']; - $_SESSION['CreditItems']->BrAdd4 = $myrow['braddress4']; - $_SESSION['CreditItems']->BrAdd5 = $myrow['braddress5']; - $_SESSION['CreditItems']->BrAdd6 = $myrow['braddress6']; - $_SESSION['CreditItems']->PhoneNo = $myrow['phoneno']; - $_SESSION['CreditItems']->Email = $myrow['email']; - $_SESSION['CreditItems']->Location = $myrow['defaultlocation']; - $_SESSION['CreditItems']->TaxGroup = $myrow['taxgroupid']; - $_SESSION['CreditItems']->DispatchTaxProvince = $myrow['taxprovinceid']; - $_SESSION['CreditItems']->GetFreightTaxes(); + $_SESSION['CreditItems'.$identifier]->DeliverTo = $myrow['brname']; + $_SESSION['CreditItems'.$identifier]->BrAdd1 = $myrow['braddress1']; + $_SESSION['CreditItems'.$identifier]->BrAdd2 = $myrow['braddress2']; + $_SESSION['CreditItems'.$identifier]->BrAdd3 = $myrow['braddress3']; + $_SESSION['CreditItems'.$identifier]->BrAdd4 = $myrow['braddress4']; + $_SESSION['CreditItems'.$identifier]->BrAdd5 = $myrow['braddress5']; + $_SESSION['CreditItems'.$identifier]->BrAdd6 = $myrow['braddress6']; + $_SESSION['CreditItems'.$identifier]->PhoneNo = $myrow['phoneno']; + $_SESSION['CreditItems'.$identifier]->Email = $myrow['email']; + $_SESSION['CreditItems'.$identifier]->Location = $myrow['defaultlocation']; + $_SESSION['CreditItems'.$identifier]->TaxGroup = $myrow['taxgroupid']; + $_SESSION['CreditItems'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['CreditItems'.$identifier]->GetFreightTaxes(); } /* if the change customer button hit or the customer has not already been selected */ if ($_SESSION['RequireCustomerSelection'] ==1 - OR !isset($_SESSION['CreditItems']->DebtorNo) - OR $_SESSION['CreditItems']->DebtorNo=='' ) { + OR !isset($_SESSION['CreditItems'.$identifier]->DebtorNo) + OR $_SESSION['CreditItems'.$identifier]->DebtorNo=='' ) { - echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Select Customer For Credit Note').'</p>'; + echo '<table cellpadding="3" colspan="4" class="selection">'; echo '<tr><th colspan="5"><font size="3" color="navy"><b> ' . _('Customer Selection') . '</b></font></th></tr>'; echo '<tr>'; echo '<td><font size="1">' . _('Enter text in the customer name') . ':</font></td>'; - echo '<td><input type="text" name="Keywords" size=20 maxlength=25></td>'; + echo '<td><input type="text" name="Keywords" size="20" maxlength="25" /></td>'; echo '<td><font size="3"><b>' . _('OR') . '</b></font></td>'; echo '<td><font size="1">' . _('Enter text extract in the customer code') . ':</font></td>'; - echo '<td><input type="text" name="CustCode" size="15" maxlength="18"></td>'; + echo '<td><input type="text" name="CustCode" size="15" maxlength="18" /></td>'; echo '</tr>'; echo '</table>'; echo '<br /><div class="centre"><input type="submit" name="SearchCust" value="' . _('Search Now') . '"></div>'; @@ -261,7 +269,7 @@ $j++; //end of page full new headings if } //end of while loop - echo '<input type="hidden" name="JustSelectedACustomer" value="Yes">'; + echo '<input type="hidden" name="JustSelectedACustomer" value="Yes" />'; echo '</table></form>'; }//end if results to show @@ -272,7 +280,7 @@ first add a header to show who we are making a credit note for */ echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . - _('Search') . '" alt="" />' . ' ' . $_SESSION['CreditItems']->CustomerName . ' - ' . $_SESSION['CreditItems']->DeliverTo.'</p>'; + _('Search') . '" alt="" />' . ' ' . $_SESSION['CreditItems'.$identifier]->CustomerName . ' - ' . $_SESSION['CreditItems'.$identifier]->DeliverTo.'</p>'; /* do the search for parts that might be being looked up to add to the credit note */ if (isset($_POST['Search'])){ @@ -281,7 +289,7 @@ prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered') . '.', 'info' ); } - if ($_POST['Keywords']!="") { + if ($_POST['Keywords']!='') { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -289,9 +297,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.description " . LIKE . " '" . $SearchString . "' GROUP BY stockmaster.stockid, stockmaster.description, @@ -301,10 +309,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.description " . LIKE . " '" . $SearchString . "' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' GROUP BY stockmaster.stockid, @@ -319,10 +326,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' GROUP BY stockmaster.stockid, stockmaster.description, @@ -332,10 +338,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.stockid " . LIKE . " '" . $_POST['StockCode'] . "' AND stockmaster.categoryid='" . $_POST['StockCat'] . "' GROUP BY stockmaster.stockid, @@ -348,9 +353,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') GROUP BY stockmaster.stockid, stockmaster.description, stockmaster.units @@ -359,10 +364,9 @@ $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.units - FROM stockmaster, - stockcategory - WHERE stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') AND stockmaster.categoryid='" . $_POST['StockCat'] . "' GROUP BY stockmaster.stockid, stockmaster.description, @@ -391,7 +395,7 @@ /*Always do the stuff below if not looking for a customerid Set up the form for the credit note display and entry*/ - echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">'; + echo '<form action="' . $_SERVER['PHP_SELF'] . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -416,7 +420,7 @@ $AlreadyOnThisCredit =0; - foreach ($_SESSION['CreditItems']->LineItems AS $OrderItem) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems AS $OrderItem) { /* do a loop round the items on the credit note to see that the item is not already on this credit note */ @@ -449,41 +453,40 @@ if ($myrow = DB_fetch_array($result1)){ - $LineNumber = $_SESSION['CreditItems']->LineCounter; + $LineNumber = $_SESSION['CreditItems'.$identifier]->LineCounter; - if ($_SESSION['CreditItems']->add_to_cart ($myrow['stockid'], - $NewItemQty, - $myrow['description'], - GetPrice ($_POST['NewItem'], - $_SESSION['CreditItems']->DebtorNo, - $_SESSION['CreditItems']->Branch, $db), - 0, - $myrow['units'], - $myrow['volume'], - $myrow['kgs'], - 0, - $myrow['mbflag'], - Date($_SESSION['DefaultDateFormat']), - 0, - $myrow['discountcategory'], - $myrow['controlled'], - $myrow['serialised'], - $myrow['decimalplaces'], - '', - 'No', - -1, - $myrow['taxcatid'], - '', - '', - '', - $myrow['standardcost']) ==1){ - + if ($_SESSION['CreditItems'.$identifier]->add_to_cart ($myrow['stockid'], + $NewItemQty, + $myrow['description'], + GetPrice ($_POST['NewItem'], + $_SESSION['CreditItems'.$identifier]->DebtorNo, + $_SESSION['CreditItems'.$identifier]->Branch, $db), + 0, + $myrow['units'], + $myrow['volume'], + $myrow['kgs'], + 0, + $myrow['mbflag'], + Date($_SESSION['DefaultDateFormat']), + 0, + $myrow['discountcategory'], + $myrow['controlled'], + $myrow['serialised'], + $myrow['decimalplaces'], + '', + 'No', + -1, + $myrow['taxcatid'], + '', + '', + '', + $myrow['standardcost']) ==1){ - $_SESSION['CreditItems']->GetTaxes($LineNumber); + $_SESSION['CreditItems'.$identifier]->GetTaxes($LineNumber); if ($myrow['controlled']==1){ /*Qty must be built up from serial item entries */ - $_SESSION['CreditItems']->LineItems[$LineNumber]->Quantity = 0; + $_SESSION['CreditItems'.$identifier]->LineItems[$LineNumber]->Quantity = 0; } } @@ -499,31 +502,31 @@ /* setup system defaults for looking up prices and the number of ordered items if an item has been selected for adding to the basket add it to the session arrays */ - if ($_SESSION['CreditItems']->ItemsOrdered > 0 OR isset($_POST['NewItem'])){ + if ($_SESSION['CreditItems'.$identifier]->ItemsOrdered > 0 OR isset($_POST['NewItem'])){ if (isset($_GET['Delete'])){ - $_SESSION['CreditItems']->remove_from_cart($_GET['Delete']); + $_SESSION['CreditItems'.$identifier]->remove_from_cart($_GET['Delete']); } if (isset($_POST['ChargeFreightCost'])){ - $_SESSION['CreditItems']->FreightCost = $_POST['ChargeFreightCost']; + $_SESSION['CreditItems'.$identifier]->FreightCost = $_POST['ChargeFreightCost']; } - if (isset($_POST['Location']) AND $_POST['Location'] != $_SESSION['CreditItems']->Location){ + if (isset($_POST['Location']) AND $_POST['Location'] != $_SESSION['CreditItems'.$identifier]->Location){ - $_SESSION['CreditItems']->Location = $_POST['Location']; + $_SESSION['CreditItems'.$identifier]->Location = $_POST['Location']; $NewDispatchTaxProvResult = DB_query("SELECT taxprovinceid FROM locations WHERE loccode='" . $_POST['Location'] . "'",$db); $myrow = DB_fetch_array($NewDispatchTaxProvResult); - $_SESSION['CreditItems']->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['CreditItems'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; - foreach ($_SESSION['CreditItems']->LineItems as $LineItem) { - $_SESSION['CreditItems']->GetTaxes($LineItem->LineNumber); + foreach ($_SESSION['CreditItems'.$identifier]->LineItems as $LineItem) { + $_SESSION['CreditItems'.$identifier]->GetTaxes($LineItem->LineNumber); } } - foreach ($_SESSION['CreditItems']->LineItems as $LineItem) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems as $LineItem) { if (isset($_POST['Quantity_' . $LineItem->LineNumber])){ @@ -540,7 +543,7 @@ $TaxTotalPercent += $Tax->TaxRate; } } - $Price = round($_POST['Price_' . $LineItem->LineNumber]/($TaxTotalPercent + 1),2); + $Price = round($_POST['Price_' . $LineItem->LineNumber]/($TaxTotalPercent + 1),$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); } else { $Price = $_POST['Price_' . $LineItem->LineNumber]; } @@ -549,30 +552,30 @@ foreach ($LineItem->Taxes as $TaxLine) { if (isset($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ - $_SESSION['CreditItems']->LineItems[$LineItem->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = $_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate']/100; + $_SESSION['CreditItems'.$identifier]->LineItems[$LineItem->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = $_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate']/100; } } } 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 credited to less than 0 or the price less than 0 or the discount more than 100% or less than 0%'),'warn'); } elseif (isset($_POST['Quantity_' . $LineItem->LineNumber])) { - $_SESSION['CreditItems']->update_cart_item($LineItem->LineNumber, - $Quantity, - $Price, - $DiscountPercentage/100, - $Narrative, - 'No', - $LineItem->ItemDue, - $LineItem->POLine, - 0); + $_SESSION['CreditItems'.$identifier]->update_cart_item($LineItem->LineNumber, + $Quantity, + $Price, + $DiscountPercentage/100, + $Narrative, + 'No', + $LineItem->ItemDue, + $LineItem->POLine, + 0); } } } - foreach ($_SESSION['CreditItems']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['CreditItems'.$identifier]->FreightTaxes as $FreightTaxLine) { if (isset($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])){ - $_SESSION['CreditItems']->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = $_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder]/100; + $_SESSION['CreditItems'.$identifier]->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = $_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder]/100; } } @@ -581,12 +584,12 @@ $AlreadyOnThisCredit =0; - foreach ($_SESSION['CreditItems']->LineItems AS $OrderItem) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems AS $OrderItem) { /* do a loop round the items on the credit note to see that the item is not already on this credit note */ - if ($_SESSION['SO_AllowSameItemMultipleTimes']==0 && strcasecmp($OrderItem->StockID, $_POST['NewItem']) == 0) { + if ($_SESSION['SO_AllowSameItemMultipleTimes']==0 AND strcasecmp($OrderItem->StockID, $_POST['NewItem']) == 0) { $AlreadyOnThisCredit = 1; prnMsg(_('The item selected is already on this credit the system will not allow the same item on the credit note more than once. However you can change the quantity credited of the existing line if necessary.'),'warn'); } @@ -614,14 +617,14 @@ $result1 = DB_query($sql,$db,$ErrMsg,$DbgMsg); $myrow = DB_fetch_array($result1); - $LineNumber = $_SESSION['CreditItems']->LineCounter; + $LineNumber = $_SESSION['CreditItems'.$identifier]->LineCounter; /*validate the data returned before adding to the items to credit */ - if ($_SESSION['CreditItems']->add_to_cart ($myrow['stockid'], + if ($_SESSION['CreditItems'.$identifier]->add_to_cart ($myrow['stockid'], 1, $myrow['description'], GetPrice($_POST['NewItem'], - $_SESSION['CreditItems']->DebtorNo, - $_SESSION['CreditItems']->Branch, + $_SESSION['CreditItems'.$identifier]->DebtorNo, + $_SESSION['CreditItems'.$identifier]->Branch, $db), 0, $myrow['units'], @@ -644,11 +647,11 @@ '', $myrow['standardcost']) ==1){ - $_SESSION['CreditItems']->GetTaxes($LineNumber); + $_SESSION['CreditItems'.$identifier]->GetTaxes($LineNumber); if ($myrow['controlled']==1){ /*Qty must be built up from serial item entries */ - $_SESSION['CreditItems']->LineItems[$LineNumber]->Quantity = 0; + $_SESSION['CreditItems'.$identifier]->LineItems[$LineNumber]->Quantity = 0; } } } /* end of if not already on the credit note */ @@ -672,19 +675,19 @@ <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> </tr>'; - $_SESSION['CreditItems']->total = 0; - $_SESSION['CreditItems']->totalVolume = 0; - $_SESSION['CreditItems']->totalWeight = 0; + $_SESSION['CreditItems'.$identifier]->total = 0; + $_SESSION['CreditItems'.$identifier]->totalVolume = 0; + $_SESSION['CreditItems'.$identifier]->totalWeight = 0; $TaxTotal = 0; $TaxTotals = array(); $TaxGLCodes = array(); $k =0; //row colour counter - foreach ($_SESSION['CreditItems']->LineItems as $LineItem) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems as $LineItem) { - $LineTotal = round($LineItem->Quantity * $LineItem->Price * (1 - $LineItem->DiscountPercent),$_SESSION['CreditItems']->CurrDecimalPlaces); - $DisplayLineTotal = number_format($LineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); + $LineTotal = round($LineItem->Quantity * $LineItem->Price * (1 - $LineItem->DiscountPercent),$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); + $DisplayLineTotal = number_format($LineTotal,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; @@ -698,9 +701,9 @@ <td>' . $LineItem->ItemDescription . '</td>'; if ($LineItem->Controlled==0){ - echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength=6 size=6 value=' . $LineItem->Quantity . '></td>'; + echo '<td><input type="text" class="number" name="Quantity_' . $LineItem->LineNumber . '" maxlength="6" size="6" value=' . $LineItem->Quantity . '></td>'; } else { - echo '<td class=number><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> + echo '<td class="number"><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LineItem->LineNumber . '">' . $LineItem->Quantity . '</a> <input type=hidden name="Quantity_' . $LineItem->LineNumber . '" value=' . $LineItem->Quantity . '></td>'; } @@ -708,13 +711,13 @@ <td><input type="text" class="number" name="Price_' . $LineItem->LineNumber . '" size=10 maxlength=12 value=' . $LineItem->Price . '></td> <td><input type="CheckBox" name="Gross" value=False></td> <td><input type="text" class="number" name="Discount_' . $LineItem->LineNumber . '" size=3 maxlength=3 value=' . ($LineItem->DiscountPercent * 100) . '>%</td> - <td class=number>' . $DisplayLineTotal . '</td>'; + <td class="number">' . $DisplayLineTotal . '</td>'; /*Need to list the taxes applicable to this line */ echo '<td>'; $i=0; - foreach ($_SESSION['CreditItems']->LineItems[$LineItem->LineNumber]->Taxes AS $Tax) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems[$LineItem->LineNumber]->Taxes AS $Tax) { if ($i>0){ echo '<br />'; } @@ -746,38 +749,38 @@ $TaxTotal += $TaxLineTotal; - $DisplayTaxAmount = number_format($TaxLineTotal ,$_SESSION['CreditItems']->CurrDecimalPlaces); - $DisplayGrossLineTotal = number_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems']->CurrDecimalPlaces); + $DisplayTaxAmount = number_format($TaxLineTotal ,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); + $DisplayGrossLineTotal = number_format($LineTotal+ $TaxLineTotal,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); echo '<td class="number">' . $DisplayTaxAmount . '</td> <td class="number">' . $DisplayGrossLineTotal . '</td> - <td><a href="' . $_SERVER['PHP_SELF'] . '?Delete=' . $LineItem->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this line item from the credit note?') . '\');">' . _('Delete') . '</a></td> + <td><a href="' . $_SERVER['PHP_SELF'] . '?identifier=' . $identifier . '&Delete=' . $LineItem->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this line item from the credit note?') . '\');">' . _('Delete') . '</a></td> </tr>'; echo $RowStarter; echo '<td colspan=11><textarea name="Narrative_' . $LineItem->LineNumber . '" cols=100% rows=1>' . $LineItem->Narrative . '</textarea><br /></td></tr>'; - $_SESSION['CreditItems']->total = $_SESSION['CreditItems']->total + $LineTotal; - $_SESSION['CreditItems']->totalVolume = $_SESSION['CreditItems']->totalVolume + $LineItem->Quantity * $LineItem->Volume; $_SESSION['CreditItems']->totalWeight = $_SESSION['CreditItems']->totalWeight + $LineItem->Quantity * $LineItem->Weight; + $_SESSION['CreditItems'.$identifier]->total = $_SESSION['CreditItems'.$identifier]->total + $LineTotal; + $_SESSION['CreditItems'.$identifier]->totalVolume = $_SESSION['CreditItems'.$identifier]->totalVolume + $LineItem->Quantity * $LineItem->Volume; $_SESSION['CreditItems'.$identifier]->totalWeight = $_SESSION['CreditItems'.$identifier]->totalWeight + $LineItem->Quantity * $LineItem->Weight; } - if (!isset($_POST['ChargeFreightCost']) AND !isset($_SESSION['CreditItems']->FreightCost)){ + if (!isset($_POST['ChargeFreightCost']) AND !isset($_SESSION['CreditItems'.$identifier]->FreightCost)){ $_POST['ChargeFreightCost']=0; } echo '<tr> - <td colspan=5></td>'; + <td colspan="5"></td>'; echo '<td colspan="2" class="number">'. _('Credit Freight').'</td> - <td><input type="text" class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems']->FreightCost . '" /></td>'; + <td><input type="text" class="number" size=6 maxlength=6 name="ChargeFreightCost" value="' . $_SESSION['CreditItems'.$identifier]->FreightCost . '" /></td>'; $FreightTaxTotal =0; //initialise tax total echo '<td>'; $i=0; // initialise the number of taxes iterated through - foreach ($_SESSION['CreditItems']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['CreditItems'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -788,38 +791,38 @@ echo '</td><td>'; $i=0; - foreach ($_SESSION['CreditItems']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['CreditItems'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } - echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength=4 size=4 value="' . $FreightTaxLine->TaxRate * 100 . '" />'; + echo '<input type="text" class="number" name=FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . ' maxlength="4" size="4" value="' . $FreightTaxLine->TaxRate * 100 . '" />'; if ($FreightTaxLine->TaxOnTax ==1){ - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems']->FreightCost + $FreightTaxTotal)); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems'.$identifier]->FreightCost + $FreightTaxTotal)); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['CreditItems'.$identifier]->FreightCost + $FreightTaxTotal)); } else { - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['CreditItems']->FreightCost); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['CreditItems']->FreightCost); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['CreditItems'.$identifier]->FreightCost); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['CreditItems'.$identifier]->FreightCost); } $i++; $TaxGLCodes[$FreightTaxLine->TaxAuthID] = $FreightTaxLine->TaxGLCode; } echo '</td>'; - echo '<td class="number">' . number_format($FreightTaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> - <td class="number">' . number_format($FreightTaxTotal+ $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> + echo '<td class="number">' . number_format($FreightTaxTotal,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . number_format($FreightTaxTotal+ $_SESSION['CreditItems'.$identifier]->FreightCost,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces) . '</td> </tr>'; $TaxTotal += $FreightTaxTotal; - $DisplayTotal = number_format($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost,$_SESSION['CreditItems']->CurrDecimalPlaces); + $DisplayTotal = number_format($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces); echo '<tr> <td colspan="7" class="number">' . _('Credit Totals') . '</td> <td class="number"><b>' . $DisplayTotal . '</b></td> <td colspan="2"></td> - <td class="number"><b>' . number_format($TaxTotal,$_SESSION['CreditItems']->CurrDecimalPlaces) . '</td> - <td class="number"><b>' . number_format($TaxTotal+($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost),$_SESSION['CreditItems']->CurrDecimalPlaces) . '</b></td> + <td class="number"><b>' . number_format($TaxTotal,$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number"><b>' . number_format($TaxTotal+($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost),$_SESSION['CreditItems'.$identifier]->CurrDecimalPlaces) . '</b></td> </tr> </table>'; @@ -853,13 +856,14 @@ /*if the credit note is a return of goods then need to know which location to receive them into */ - echo '<tr><td>' . _('Goods Returned to Location') . ' :</td><td><select name=Location>'; + echo '<tr><td>' . _('Goods Returned to Location') . ' :</td> + <td><select name="Location">'; $SQL="SELECT loccode, locationname FROM locations"; $Result = DB_query($SQL,$db); if (!isset($_POST['Location'])){ - $_POST['Location'] = $_SESSION['CreditItems']->Location; + $_POST['Location'] = $_SESSION['CreditItems'.$identifier]->Location; } while ($myrow = DB_fetch_array($Result)) { @@ -877,10 +881,10 @@ $SQL="SELECT accountcode, accountname - FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname - AND accountgroups.pandl=1 ORDER BY accountcode"; + FROM chartmaster INNER JOIN accountgroups + ON chartmaster.group_=accountgroups.groupname + WHERE accountgroups.pandl=1 + ORDER BY accountcode"; $Result = DB_query($SQL,$db); while ($myrow = DB_fetch_array($Result)) { @@ -911,7 +915,7 @@ <input type=submit name="Update" value="' . _('Update') . '" /> <input type=submit name="CancelCredit" value="' . _('Cancel') . '" onclick="return confirm(\'' . _('Are you sure you wish to cancel the whole of this credit note?') . '\');" />'; if (!isset($_POST['ProcessCredit']) AND $OKToProcess == true){ - echo '<input type=submit name="ProcessCredit" value="' . _('Process Credit Note') . '" /> + echo '<input type="submit" name="ProcessCredit" value="' . _('Process Credit Note') . '" /> <br />'; } echo '</div>'; @@ -1048,8 +1052,8 @@ $SQL = "SELECT area FROM custbranch - WHERE custbranch.debtorno ='". $_SESSION['CreditItems']->DebtorNo . "' - AND custbranch.branchcode = '" . $_SESSION['CreditItems']->Branch . "'"; + WHERE custbranch.debtorno ='". $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND custbranch.branchcode = '" . $_SESSION['CreditItems'.$identifier]->Branch . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The area cannot be determined for this customer'); $DbgMsg = _('The following SQL to insert the customer credit note was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg); @@ -1098,15 +1102,15 @@ invtext) VALUES ('". $CreditNo . "', '11', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $SQLCreditDate . "', '" . date('Y-m-d H-i-s') . "', '" . $PeriodNo . "', - '" . $_SESSION['CreditItems']->DefaultSalesType . "', - '" . -($_SESSION['CreditItems']->total) . "', + '" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "', + '" . -($_SESSION['CreditItems'.$identifier]->total) . "', '" . -$TaxTotal . "', - '" . -$_SESSION['CreditItems']->FreightCost . "', + '" . -$_SESSION['CreditItems'.$identifier]->FreightCost . "', '" . $_SESSION['CurrencyRate'] . "', '" . $_POST['CreditText'] . "' )"; @@ -1135,7 +1139,7 @@ /* Insert stock movements for stock coming back in if the Credit is a return of goods */ - foreach ($_SESSION['CreditItems']->LineItems as $CreditLine) { + foreach ($_SESSION['CreditItems'.$identifier]->LineItems as $CreditLine) { If ($CreditLine->Quantity > 0){ @@ -1146,7 +1150,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $CreditLine->StockID . "' - AND loccode= '" . $_SESSION['CreditItems']->Location . "'"; + AND loccode= '" . $_SESSION['CreditItems'.$identifier]->Location . "'"; $Result = DB_query($SQL, $db); if (DB_num_rows($Result)==1){ @@ -1182,10 +1186,10 @@ ('" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_POST['CreditText'] . "', @@ -1222,10 +1226,10 @@ '" . $CreditLine->StockID . "', 11, " . $CreditNo . ", - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $CreditLine->Quantity . "', @@ -1255,10 +1259,10 @@ '" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $CreditLine->Quantity . "', @@ -1305,7 +1309,7 @@ $SQL = "SELECT COUNT(*) FROM stockserialitems WHERE stockid='" . $CreditLine->StockID . "' - AND loccode='" . $_SESSION['CreditItems']->Location . "' + AND loccode='" . $_SESSION['CreditItems'.$identifier]->Location . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The existence of the serial stock item record could not be determined because'); $DbgMsg = _('The following SQL to find out if the serial stock item record existed already was used'); @@ -1321,7 +1325,7 @@ quantity) VALUES ( '" . $CreditLine->StockID . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $Item->BundleRef . "', '" . $Item->BundleQty . "' )"; @@ -1332,7 +1336,7 @@ } else { /*Update the existing StockSerialItems record */ $SQL = "UPDATE stockserialitems SET quantity= quantity + " . $Item->BundleQty . " WHERE stockid='" . $CreditLine->StockID . "' - AND loccode='" . $_SESSION['CreditItems']->Location . "' + AND loccode='" . $_SESSION['CreditItems'.$identifier]->Location . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -1369,7 +1373,7 @@ $SQL = "UPDATE locstock SET locstock.quantity = locstock.quantity + " . $CreditLine->Quantity . " WHERE locstock.stockid = '" . $CreditLine->StockID . "' - AND locstock.loccode = '" . $_SESSION['CreditItems']->Location . "'"; + AND locstock.loccode = '" . $_SESSION['CreditItems'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the location stock record was used'); @@ -1404,7 +1408,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $AssParts['component'] . "' - AND locstock.loccode= '" . $_SESSION['CreditItems']->Location . "'"; + AND locstock.loccode= '" . $_SESSION['CreditItems'.$identifier]->Location . "'"; $Result = DB_query($SQL, $db); if (DB_num_rows($Result)==1){ @@ -1433,10 +1437,10 @@ '" . $AssParts['component'] . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $PeriodNo . "', '" . _('Assembly') .': ' . $CreditLine->StockID . "', '" . $AssParts['quantity'] * $CreditLine->Quantity . ", " . $AssParts['standard'] . "', @@ -1452,7 +1456,7 @@ $SQL = "UPDATE locstock SET locstock.quantity = locstock.quantity + " . $AssParts['quantity'] * $CreditLine->Quantity . " WHERE locstock.stockid = '" . $AssParts['component'] . "' - AND locstock.loccode = '" . $_SESSION['CreditItems']->Location . "'"; + AND locstock.loccode = '" . $_SESSION['CreditItems'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated for an assembly component because'); $DbgMsg = _('The following SQL to update the component location stock record was used'); @@ -1462,7 +1466,7 @@ /*Update the cart with the recalculated standard cost from the explosion of the assembly's components*/ - $_SESSION['CreditItems']->LineItems[$CreditLine->LineNumber]->StandardCost = $StandardCost; + $_SESSION['CreditItems'.$identifier]->LineItems[$CreditLine->LineNumber]->StandardCost = $StandardCost; $CreditLine->StandardCost = $StandardCost; } /*end of its a return of stock */ @@ -1491,10 +1495,10 @@ '" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . -$CreditLine->Quantity . "', @@ -1526,10 +1530,10 @@ '" . $CreditLine->StockID . "', 11, '" . $CreditNo . "', - '" . $_SESSION['CreditItems']->Location . "', + '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . -$CreditLine->Quantity . "', @@ -1555,7 +1559,7 @@ it would have been added by the return stock movement above */ $SQL = "UPDATE stockserialitems SET quantity= quantity - " . $Item->BundleQty . " WHERE stockid='" . $CreditLine->StockID . "' - AND loccode='" . $_SESSION['CreditItems']->Location . "' + AND loccode='" . $_SESSION['CreditItems'.$identifier]->Location . "' AND serialno='" . $Item->BundleRef . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated for the write off because'); @@ -1602,10 +1606,10 @@ AND salesanalysis.custbranch=custbranch.branchcode AND salesanalysis.area=custbranch.area AND salesanalysis.salesperson=custbranch.salesman - AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND salesanalysis.custbranch = '" . $_SESSION['CreditItems']->Branch . "' + AND salesanalysis.cust = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch = '" . $_SESSION['CreditItems'.$identifier]->Branch . "' AND salesanalysis.stockid = '" . $CreditLine->StockID . "' AND salesanalysis.budgetoractual=1 GROUP BY salesanalysis.stkcategory, @@ -1628,10 +1632,10 @@ disc=disc-" . ($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . " WHERE salesanalysis.area='" . $myrow[2] . "' AND salesanalysis.salesperson='" . $myrow[3] . "' - AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno = '" . $PeriodNo . "' - AND salesanalysis.cust = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND salesanalysis.custbranch = '" . $_SESSION['CreditItems']->Branch . "' + AND salesanalysis.cust = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch = '" . $_SESSION['CreditItems'.$identifier]->Branch . "' AND salesanalysis.stockid = '" . $CreditLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[1] . "' AND salesanalysis.budgetoractual=1"; @@ -1644,10 +1648,10 @@ Disc=Disc-" . ($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . " WHERE salesanalysis.area='" . $myrow[2] . "' AND salesanalysis.salesperson='" . $myrow[3] . "' - AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno = '" . $PeriodNo . "' - AND salesanalysis.cust = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND salesanalysis.custbranch = '" . $_SESSION['CreditItems']->Branch . "' + AND salesanalysis.cust = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch = '" . $_SESSION['CreditItems'.$identifier]->Branch . "' AND salesanalysis.stockid = '" . $CreditLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[1] . "' AND salesanalysis.budgetoractual=1"; @@ -1669,11 +1673,11 @@ budgetoractual, salesperson, stkcategory) - SELECT '" . $_SESSION['CreditItems']->DefaultSalesType . "', + SELECT '" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "', '" . $PeriodNo . "', '" . -($CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', 0, '" . -($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . "', '" . $CreditLine->StockID . "', @@ -1683,8 +1687,8 @@ stockmaster.categoryid FROM stockmaster, custbranch WHERE stockmaster.stockid = '" . $CreditLine->StockID . "' - AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "'"; + AND custbranch.debtorno = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['CreditItems'.$identifier]->Branch . "'"; } else { @@ -1701,12 +1705,12 @@ budgetoractual, salesperson, stkcategory) - SELECT '" . $_SESSION['CreditItems']->DefaultSalesType . "', + SELECT '" . $_SESSION['CreditItems'.$identifier]->DefaultSalesType . "', '" . $PeriodNo . "', '" . -($CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . "', '" . -($CreditLine->StandardCost * $CreditLine->Quantity) . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->Branch . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . -$CreditLine->Quantity . "', '" . -($CreditLine->DiscountPercent * $CreditLine->Price * $CreditLine->Quantity / $_SESSION['CurrencyRate']) . "', '" . $CreditLine->StockID . "', @@ -1717,8 +1721,8 @@ FROM stockmaster, custbranch WHERE stockmaster.stockid = '" . $CreditLine->StockID . "' - AND custbranch.debtorno = '" . $_SESSION['CreditItems']->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['CreditItems']->Branch . "'"; + AND custbranch.debtorno = '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['CreditItems'.$identifier]->Branch . "'"; } } @@ -1738,7 +1742,7 @@ /*first reverse credit the cost of sales entry*/ $COGSAccount = GetCOGSGLAccount($Area, $CreditLine->StockID, - $_SESSION['CreditItems']->DefaultSalesType, + $_SESSION['CreditItems'.$identifier]->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1753,7 +1757,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $COGSAccount . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', '" . ($CreditLine->StandardCost * -$CreditLine->Quantity) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of the stock credited GL posting could not be inserted because'); @@ -1778,7 +1782,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $_POST['WriteOffGLCode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' )"; @@ -1801,7 +1805,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->StandardCost . "', '" . ($CreditLine->StandardCost * $CreditLine->Quantity) . "' )"; @@ -1817,7 +1821,7 @@ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, $CreditLine->StockID, - $_SESSION['CreditItems']->DefaultSalesType, + $_SESSION['CreditItems'.$identifier]->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, @@ -1832,7 +1836,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->Price . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " x " . $CreditLine->Quantity . " @ " . $CreditLine->Price . "', '" . ($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate'] . "' )"; @@ -1854,7 +1858,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', '" . -($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate'] . "' )"; @@ -1871,7 +1875,7 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post credit note transaction to GL credit debtors, debit freight re-charged and debit sales */ - if (($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal) !=0) { + if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1884,14 +1888,14 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . -($_SESSION['CreditItems']->total + $_SESSION['CreditItems']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate'] . "')"; + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . -($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting for the credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); } - if ($_SESSION['CreditItems']->FreightCost !=0) { + if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1904,8 +1908,8 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', - '" . $_SESSION['CreditItems']->FreightCost/$_SESSION['CurrencyRate'] . "')"; + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->FreightCost/$_SESSION['CurrencyRate'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting for this credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1925,7 +1929,7 @@ '" . $SQLCreditDate . "', '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', - '" . $_SESSION['CreditItems']->DebtorNo . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', '" . ($TaxAmount/$_SESSION['CurrencyRate']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); @@ -1937,8 +1941,8 @@ DB_Txn_Commit($db); - unset($_SESSION['CreditItems']->LineItems); - unset($_SESSION['CreditItems']); + unset($_SESSION['CreditItems'.$identifier]->LineItems); + unset($_SESSION['CreditItems'.$identifier]); echo _('Credit Note number') . ' ' . $CreditNo . ' ' . _('processed') . '<br />'; echo '<a target="_blank" href="' . $rootpath . '/PrintCustTrans.php?FromTransNo=' . $CreditNo . '&InvOrCredit=Credit">' . _('Show this Credit Note on screen') . '</a><br />'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-29 05:55:03 UTC (rev 4643) +++ trunk/doc/Change.log 2011-07-30 06:58:14 UTC (rev 4644) @@ -1,5 +1,8 @@ webERP Change Log +30/7/11 Phil: SelectCreditItems.php made it so if several sessions creating a credit note they no longer over-write each other. +30/7/11 Ricard: POItems.php now checks for return of more than 1 purchasing data from the supplier and takes the newest record + 27/7/11 Version 4.05 27/7/11 includes/LanguageSetup.php now checks for existence of LC_MESSAGES (it doesn't exist on windows servers) and uses LC_ALL as the fall back only Modified: trunk/includes/PDFTransPageHeader.inc =================================================================== --- trunk/includes/PDFTransPageHeader.inc 2011-07-29 05:55:03 UTC (rev 4643) +++ trunk/includes/PDFTransPageHeader.inc 2011-07-30 06:58:14 UTC (rev 4644) @@ -185,10 +185,10 @@ /*Print a vertical line */ $pdf->line($Left_Margin+248, $YPos-10+$line_height+3,$Left_Margin+248, $YPos - 18); - -$pdf->addText($Left_Margin + 252, $YPos, $FontSize, _('Customer Order Ref.') . ':'); -$pdf->addText($Left_Margin+340, $YPos, $FontSize, $myrow['customerref']); - +if ($InvOrCredit=='Invoice'){ + $pdf->addText($Left_Margin + 252, $YPos, $FontSize, _('Customer Order Ref.') . ':'); + $pdf->add... [truncated message content] |
From: <dai...@us...> - 2011-07-31 01:31:47
|
Revision: 4645 http://web-erp.svn.sourceforge.net/web-erp/?rev=4645&view=rev Author: daintree Date: 2011-07-31 01:31:41 +0000 (Sun, 31 Jul 2011) Log Message: ----------- Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/doc/Change.log Added Paths: ----------- trunk/BackupDatabase.php Added: trunk/BackupDatabase.php =================================================================== --- trunk/BackupDatabase.php (rev 0) +++ trunk/BackupDatabase.php 2011-07-31 01:31:41 UTC (rev 4645) @@ -0,0 +1,48 @@ +<?php +/* $Id BackupDatabase.php 4183 2010-12-14 09:30:20Z daintree $ */ + +$PageSecurity = 15; //hard coded in case database is old and PageSecurity stuff cannot be retrieved + +include('includes/session.inc'); +$title = _('Backup webERP Database'); +include('includes/header.inc'); + +if (isset($_GET['BackupFile'])){ + unlink($_SERVER['DOCUMENT_ROOT'] . $_GET['BackupFile']); + prnMsg(_('The backup file has been deleted'),'success'); +} else { + + $BackupFile = $rootpath . '/companies/' . $_SESSION['DatabaseName'] .'/' . _('Backup') . '_' . Date('Y-m-d-H-i-s') . '.sql.gz'; + $Command = 'mysqldump --opt -h' . $host . ' -u' . $dbuser . ' -p' . $dbpassword . ' ' . $_SESSION['DatabaseName'] . '| gzip > ' . + $_SERVER['DOCUMENT_ROOT'] . $BackupFile; + + + $CommandOutput = array(); + exec($Command,$CommandOutput, $ReturnValue); + + if ($ReturnValue ==0) { + prnMsg(_('The backup file has now been created. You must now download this to your computer because in case the web-server has a disk failure the backup would then not on the same machine. Use the link below') . '<br /><br /><a href="' . $BackupFile . '">' . _('Download the backup file to your locale machine') . '</a>','success'); + prnMsg(_('Once you have downloaded the database backup file to your local machine you should use the link below to delete it - backup files can consume a lot of space on your hosting account and will accumulate if not deleted - they also contain sensitive information which would otherwise be available for others to download!'),'info'); + echo '<br /> + <br /> + <a href="'. $_SERVER['PHP_SELF'] . '?BackupFile=' .$BackupFile .'">' . _('Delete the backup file off the server') . '</a>'; + } else { + prnMsg(_('There was some problem producing a backup using mysqldump. Normally this relates to a permissions issue - the web-server user must have permission to write to the companies directory'),'error'); + } +} +/* +//this could be a weighty file attachment!! +include('includes/htmlMimeMail.php'); +$mail = new htmlMimeMail(); +$attachment = $mail->getFile( $BackupFile); +$mail->setText(_('webERP backup file attached')); +$mail->addAttachment($attachment, $BackupFile, 'application/gz'); +$mail->setSubject(_('Database Backup')); +$mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>'); +$result = $mail->send(array('"' . $_SESSION['UsersRealName'] . '" <' . $_SESSION['UserEmail'] . '>')); + +prnMsg(_('A backup of the database has been taken and emailed to you'), 'info'); +unlink($BackupFile); // would be a security issue to leave it there for all to download/see +*/ +include('includes/footer.inc'); +?> \ No newline at end of file Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-07-30 06:58:14 UTC (rev 4644) +++ trunk/UpgradeDatabase.php 2011-07-31 01:31:41 UTC (rev 4645) @@ -9,7 +9,6 @@ if (!isset($_POST['DoUpgrade'])){ - prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('You should do a backup now before proceeding!'),'info'); echo '<p><form method="post" action="' . $_SERVER['PHP_SELF'] . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -35,11 +34,16 @@ if ($_SESSION['VersionNumber']=='4.00RC1'){ $_SESSION['VersionNumber']='3.12'; } - prnMsg(_('The webERP code is version') . ' ' . $Version . ' ' . _('and the database version is') . ' ' . $_SESSION['VersionNumber'],'info'); - echo '<input type="hidden" name="OldVersion" value="' . $_SESSION['VersionNumber'] . '" />'; + if ( $_SESSION['VersionNumber'] == $Version){ + prnMsg(_('The database is up to date, there are no upgrades to perform'),'info'); + } else { + prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('The webERP code is version') . ' ' . $Version . ' ' . _('and the database version is') . ' ' . $_SESSION['VersionNumber'] . '<br /><a target="_blank" href="' . $rootpath . '/BackupDatabase.php">' ._('Click to do a database backup now before proceeding!') . '</a>','info'); + + echo '<input type="hidden" name="OldVersion" value="' . $_SESSION['VersionNumber'] . '" />'; + echo '<div class="centre"><input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /></div>'; + } } - - echo '<div class="centre"><input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /></div>'; + echo '</form>'; } @@ -47,26 +51,6 @@ if ($dbType=='mysql' OR $dbType =='mysqli'){ - /* First do a backup - $BackupFile = $PathPrefix . './companies/' . $_SESSION['DatabaseName'] .'/' . _('Backup') . '_' . Date('Y-m-d-H-i-s') . '.sql.gz'; - $Command = 'mysqldump --opt -h' . $host . ' -u' . $dbuser . ' -p' . $dbpassword . ' ' . $_SESSION['DatabaseName'] . '| gzip > ' . $BackupFile; - system($Command); - - //this could be a weighty file attachment!! - include('includes/htmlMimeMail.php'); - $mail = new htmlMimeMail(); - $attachment = $mail->getFile( $BackupFile); - $mail->setText(_('webERP backup file attached')); - $mail->addAttachment($attachment, $BackupFile, 'application/gz'); - $mail->setSubject(_('Database Backup')); - $mail->setFrom($_SESSION['CompanyRecord']['coyname'] . '<' . $_SESSION['CompanyRecord']['email'] . '>'); - $result = $mail->send(array('"' . $_SESSION['UsersRealName'] . '" <' . $_SESSION['UserEmail'] . '>')); - - prnMsg(_('A backup of the database has been taken and emailed to you'), 'info'); - unlink($BackupFile); // would be a security issue to leave it there for all to download/see - - */ - $SQLScripts = array(); if ($_POST['OldVersion']=='Manual') { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-07-30 06:58:14 UTC (rev 4644) +++ trunk/doc/Change.log 2011-07-31 01:31:41 UTC (rev 4645) @@ -1,5 +1,6 @@ webERP Change Log +31/7/11 Phil: BackupDatabase.php script 30/7/11 Phil: SelectCreditItems.php made it so if several sessions creating a credit note they no longer over-write each other. 30/7/11 Ricard: POItems.php now checks for return of more than 1 purchasing data from the supplier and takes the newest record This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |