This list is closed, nobody may subscribe to it.
2011 |
Jan
(14) |
Feb
(42) |
Mar
(56) |
Apr
(60) |
May
(54) |
Jun
(48) |
Jul
(74) |
Aug
(52) |
Sep
(68) |
Oct
(64) |
Nov
(42) |
Dec
(62) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(142) |
Feb
(270) |
Mar
(374) |
Apr
(230) |
May
(214) |
Jun
(116) |
Jul
(234) |
Aug
(66) |
Sep
(120) |
Oct
(16) |
Nov
(17) |
Dec
(41) |
2013 |
Jan
(19) |
Feb
(18) |
Mar
(8) |
Apr
(40) |
May
(121) |
Jun
(42) |
Jul
(127) |
Aug
(145) |
Sep
(27) |
Oct
(38) |
Nov
(83) |
Dec
(61) |
2014 |
Jan
(33) |
Feb
(35) |
Mar
(59) |
Apr
(41) |
May
(38) |
Jun
(45) |
Jul
(17) |
Aug
(58) |
Sep
(46) |
Oct
(51) |
Nov
(55) |
Dec
(36) |
2015 |
Jan
(57) |
Feb
(67) |
Mar
(70) |
Apr
(34) |
May
(32) |
Jun
(11) |
Jul
(3) |
Aug
(17) |
Sep
(16) |
Oct
(13) |
Nov
(30) |
Dec
(30) |
2016 |
Jan
(17) |
Feb
(12) |
Mar
(17) |
Apr
(20) |
May
(47) |
Jun
(15) |
Jul
(13) |
Aug
(30) |
Sep
(32) |
Oct
(20) |
Nov
(32) |
Dec
(24) |
2017 |
Jan
(16) |
Feb
|
Mar
(11) |
Apr
(11) |
May
(5) |
Jun
(42) |
Jul
(9) |
Aug
(10) |
Sep
(14) |
Oct
(15) |
Nov
(2) |
Dec
(29) |
2018 |
Jan
(28) |
Feb
(49) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dai...@us...> - 2012-01-29 09:42:51
|
Revision: 4850 http://web-erp.svn.sourceforge.net/web-erp/?rev=4850&view=rev Author: daintree Date: 2012-01-29 09:42:44 +0000 (Sun, 29 Jan 2012) Log Message: ----------- extended API to create invoices from salesorders Modified Paths: -------------- trunk/api/api_errorcodes.php trunk/api/api_php.php trunk/api/api_salesorders.php trunk/api/api_xml-rpc.php Modified: trunk/api/api_errorcodes.php =================================================================== --- trunk/api/api_errorcodes.php 2012-01-29 09:03:14 UTC (rev 4849) +++ trunk/api/api_errorcodes.php 2012-01-29 09:42:44 UTC (rev 4850) @@ -160,6 +160,12 @@ Define('BatchIsEmpty', 1155); Define('NoSuchArea', 1156); Define('NoSuchSalesMan', 1157); + Define('NoCompanyRecord',1158); + Define('NoReadOrder',1159); + Define('NoReadOrderLines',1160); + Define('NoTaxProvince',1161); + Define('TaxRatesFailed',1162); + /* Array of Descriptions of errors */ $ErrorDescription['1'] = _('No Authorisation'); @@ -320,5 +326,10 @@ $ErrorDescription['1155'] = _('Batch is empty'); $ErrorDescription['1156'] = _('No such area'); $ErrorDescription['1157'] = _('No such salesman'); + $ErrorDescription['1158'] = _('Unable to read company record'); + $ErrorDescription['1159'] = _('Unable to read sales order'); + $ErrorDescription['1160'] = _('Unable to read sales order lines'); + $ErrorDescription['1161'] = _('Unable to get tax province of location'); + $ErrorDescription['1162'] = _('Unable to read tax rates for this item and tax group'); ?> \ No newline at end of file Modified: trunk/api/api_php.php =================================================================== --- trunk/api/api_php.php 2012-01-29 09:03:14 UTC (rev 4849) +++ trunk/api/api_php.php 2012-01-29 09:42:44 UTC (rev 4850) @@ -14,7 +14,7 @@ /* Include SQL_CommonFunctions.inc, to use GetNextTransNo().*/ include($PathPrefix . 'includes/SQL_CommonFunctions.inc'); /* Required for creating invoices/credits */ - include($PathPrefix . 'includes/GetSalesTransGLCode.inc'); + include($PathPrefix . 'includes/GetSalesTransGLCodes.inc'); /* Get weberp authentication, and return a valid database connection */ @@ -22,7 +22,7 @@ if (!isset($_SESSION['AccessLevel']) OR $_SESSION['AccessLevel'] == '') { // Login to default database = old clients. - if ($user != '' && $password != '') { + if ($user != '' AND $password != '') { global $api_DatabaseName; $rc = LoginAPI ($api_DatabaseName, $user, $password); if ($rc[0] == UL_OK ) { Modified: trunk/api/api_salesorders.php =================================================================== --- trunk/api/api_salesorders.php 2012-01-29 09:03:14 UTC (rev 4849) +++ trunk/api/api_salesorders.php 2012-01-29 09:42:44 UTC (rev 4850) @@ -116,15 +116,15 @@ /* Check that the delivery date is a valid date. The date * must be in the same format as the date format specified in the * target webERP company */ - function VerifyDeliveryDate($deliverydate, $i, $Errors, $db) { + function VerifyDeliveryDate($DeliveryDate, $i, $Errors, $db) { $sql="SELECT confvalue FROM config WHERE confname='DefaultDateFormat'"; $result=api_DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (mb_strstr($deliverydate,'/')) { - $DateArray = explode('/',$deliverydate); + if (mb_strstr($DeliveryDate,'/')) { + $DateArray = explode('/',$DeliveryDate); } elseif (mb_strstr($PeriodEnd,'.')) { - $DateArray = explode('.',$deliverydate); + $DateArray = explode('.',$DeliveryDate); } if ($DateFormat=='d/m/Y') { $Day=$DateArray[0]; @@ -349,10 +349,6 @@ VALUES (" . mb_substr($FieldValues,0,-2). ")"; if (sizeof($Errors)==0) { - /*debug info to file - $fp = fopen( '/root/Web-Server/apidebug/api-sql.sql', "w"); - fputs($fp, $sql); - */ $result = api_DB_Query($sql, $db); if (DB_error_no($db) != 0) { $Errors[0] = DatabaseUpdateFailed; @@ -464,6 +460,7 @@ * already exist in webERP. */ function InsertSalesOrderLine($OrderLine, $user, $password) { + $Errors = array(); $db = db($user, $password); if (gettype($db)=='integer') { @@ -610,6 +607,7 @@ then it returns an $Errors array. */ function GetSalesOrderLine($OrderNo, $user, $password) { + $Errors = array(); $db = db($user, $password); if (gettype($db)=='integer') { @@ -631,8 +629,12 @@ function InvoiceSalesOrder($OrderNo, $User, $Password) { + /*debug info to file */ + $fp = fopen( '/root/Web-Server/apidebug/debuginfo.txt', "w"); + fputs($fp, 'starting to invoice order ' . $OrderNo); + $Errors = array(); - $db = db($user, $password); + $db = db($User, $Password); if (gettype($db)=='integer') { $Errors[0]=NoAuthorisation; return $Errors; @@ -648,68 +650,92 @@ gllink_debtors, gllink_stock FROM companies - WHERE coycode=1";,$db); + WHERE coycode=1",$db); $CompanyRecord = DB_fetch_array($ReadCoyResult); - + if (DB_error_no($db) != 0) { + $Errors[] = NoCompanyRecord; + } + + fputs($fp, 'Got company info' . "\n"); + $OrderHeaderSQL = "SELECT salesorders.debtorno, - debtorsmaster.name, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.ordertype, - salesorders.shipvia, - custbranch.area, - custbranch.taxgroupid, - debtorsmaster.currcode, - currencies.rate, - salesorders.fromstkloc, - custbranch.salesman - FROM salesorders - INNER JOIN debtorsmaster - ON salesorders.debtorno = debtorsmaster.debtorno - INNER JOIN custbranch - ON salesorders.debtorno = custbranch.debtorno - AND salesorders.branchcode = custbranch.branchcode - INNER JOIN locations - ON locations.loccode=salesorders.fromstkloc - INNER JOIN currencies - ON debtorsmaster.currcode=currencies.currabrev - WHERE salesorders.orderno = '" . $OrderNumber . "'"; + debtorsmaster.name, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.ordertype, + salesorders.shipvia, + custbranch.area, + custbranch.taxgroupid, + debtorsmaster.currcode, + currencies.rate, + salesorders.fromstkloc, + custbranch.salesman + FROM salesorders + INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN custbranch + ON salesorders.debtorno = custbranch.debtorno + AND salesorders.branchcode = custbranch.branchcode + INNER JOIN locations + ON locations.loccode=salesorders.fromstkloc + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE salesorders.orderno = '" . $OrderNumber . "'"; $OrderHeaderResult = api_DB_query($OrderHeaderSQL,$db); + if (DB_error_no($db) != 0) { + $Errors[] = NoReadOrder; + } + + fputs($fp, 'Got order header' . "\n"); + $OrderHeader = DB_fetch_array($OrderHeaderResult); $TaxProvResult = api_DB_query("SELECT taxprovinceid FROM locations WHERE loccode='" . $OrderHeader['fromstkloc'] ."'",$db); $Result = api_DB_query($SQL,$db); + if (DB_error_no($db) != 0) { + $Errors[] = NoTaxProvince; + } $myrow = DB_fetch_row($Result); $DispTaxProvinceID = $myrow[0]; - - $LineItemsSQL = "SELECT stkcode, unitprice, quantity, discountpercent, - taxcatid + taxcatid, + mbflag, + materialcost+labourcost+overheadcost AS standardcost FROM salesorderdetails INNER JOIN stockmaster ON salesorderdetails.stkcode = stockmaster.stockid - WHERE orderno ='" . $OrderNo . "'"; + WHERE orderno ='" . $OrderNo . "' + AND completed=0"; $LineItemsResult = api_DB_query($LineItemsSQL,$db); - + if (DB_error_no($db) != 0 OR DB_num_rows($LineItemsResult)==0) { + $Errors[] = NoReadOrderLines; + return $Errors; + } + fputs($fp, 'Got order line items' . "\n"); + /*Start an SQL transaction */ $result = DB_Txn_Begin($db); /*Now Get the next invoice number - function in SQL_CommonFunctions*/ $InvoiceNo = GetNextTransNo(10, $db); $PeriodNo = GetCurrentPeriod($db); + fputs($fp, 'Got invoice number ' . $InvoiceNo . "\n and into PeriodNo " . $PeriodNo . "\n"); + $TotalFXNetInvoice = 0; $TotalFXTax = 0; $LineCounter =0; while ($OrderLineRow = DB_fetch_array($LineItemsResult)) { - + + $StandardCost = $OrderLineRow['standardcost']; + $LineNetAmount = $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] *(1- floatval($OrderLineRow['discountpercent'])); /*Gets the Taxes and rates applicable to this line from the TaxGroup of the branch and TaxCategory of the item @@ -731,7 +757,9 @@ ORDER BY taxgrouptaxes.calculationorder"; $GetTaxRatesResult = api_DB_query($SQL,$db,'','',true); - + if (DB_error_no($db) != 0) { + $Errors[] = TaxRatesFailed; + } $LineTaxAmount = 0; $TaxTotals =array(); @@ -762,7 +790,7 @@ 'TaxAuthAmount'=>$TaxAuthAmount); $LineTaxAmount += $TaxAuthAmount; - } + }//end loop around Taxes $LineNetAmount = $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] *(1- floatval($OrderLineRow['discountpercent'])); @@ -774,54 +802,178 @@ SET qtyinvoiced = qtyinvoiced + " . $OrderLineRow['quantity'] . ", actualdispatchdate = '" . $OrderHeader['orddate']. "', completed='1' - WHERE orderno = '" . $OrderNo . "' - AND stkcode = '" . $OrderLineRow['stkcode'] . "'"; + WHERE orderno = '" . $OrderNo . "' + AND stkcode = '" . $OrderLineRow['stkcode'] . "'"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales order detail record could not be updated because'); - $DbgMsg = _('The following SQL to update the sales order detail record was used'); - $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + $Result = api_DB_query($SQL,$db,'','',true); - // Insert stock movements - with unit cost - $LocalCurrencyPrice= ($OrderLineRow['unitprice'] *(1- floatval($OrderLineRow['discountpercent'])))/ $OrderHeader['rate']; + if ($OrderHeader['mbflag']=='B' OR $OrderHeader['mbflag']=='M') { + $Assembly = False; + /* Need to get the current location quantity + will need it later for the stock movement */ + $SQL="SELECT locstock.quantity + FROM locstock + WHERE locstock.stockid='" . $OrderLineRow['stkcode'] . "' + AND loccode= '" . $OrderHeader['fromstkloc'] . "'"; + $Result = api_DB_query($SQL, $db); + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; + } else { + /* There must be some error this should never happen */ + $QtyOnHandPrior = 0; + } -/*Can't assume dummy/service items need the cogs stuff here too */ + $SQL = "UPDATE locstock + SET quantity = locstock.quantity - " . $OrderLineRow['quantity'] . " + WHERE locstock.stockid = '" . $OrderLineRow['stkcode'] . "' + AND loccode = '" . $OrderHeader['fromstkloc'] . "'"; + $Result = api_DB_query($SQL,$db,'','',true); + + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh) + VALUES ('" . $OrderLineRow['stkcode'] . "', + '10', + '" . $InvoiceNo . "', + '" . $OrderHeader['fromstkloc'] . "', + '" . $OrderHeader['orddate'] . "', + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLineRow['quantity'] . "', + '" . $OrderLineRow['discountpercent'] . "', + '" . $StandardCost . "', + '" . ($QtyOnHandPrior - $OrderLineRow['quantity']) . "' )"; + + $Result = api_DB_query($SQL,$db,'','',true); + } else if ($OrderHeader['mbflag']=='A'){ /* its an assembly */ + /*Need to get the BOM for this part and make + stock moves for the components then update the Location stock balances */ + $Assembly=True; + $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 INNER JOIN stockmaster + ON bom.component=stockmaster.stockid + WHERE bom.parent='" . $OrderLineRow['stkcode'] . "' + AND bom.effectiveto >= '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + $AssResult = api_DB_query($SQL,$db); - // its a dummy item dummies always have nil stock (by definition so new qty on hand will be nil - $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost) - VALUES ( - '" . $OrderLineRow['stkcode'] . "', - '10', - '" . $InvoiceNo . "', - '" . $OrderHeader['fromstkloc'] . "', - '" . $OrderHeader['orddate'] . "', - '" . $OrderHeader['debtorno'] . "', - '" . $OrderHeader['branchcode'] . "', - '" . $LocalCurrencyPrice . "', - '" . $PeriodNo . "', - '" . $OrderNo . "', - '" . -$OrderLineRow['quantity'] . "', - '" . $OrderLineRow['discountpercent'] . "', - '0')"; + while ($AssParts = DB_fetch_array($AssResult,$db)){ - $Result = api_DB_query($SQL,$db,'','',true); + $StandardCost += ($AssParts['standard'] * $AssParts['quantity']) ; + /* Need to get the current location quantity + will need it later for the stock movement */ + $SQL="SELECT locstock.quantity + FROM locstock + WHERE locstock.stockid='" . $AssParts['component'] . "' + AND loccode= '" . $OrderHeader['fromstkloc'] . "'"; + $Result = api_DB_query($SQL,$db); + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; + } else { + /*There must be some error this should never happen */ + $QtyOnHandPrior = 0; + } + if (empty($AssParts['standard'])) { + $AssParts['standard']=0; + } + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + prd, + reference, + qty, + standardcost, + show_on_inv_crds, + newqoh) + VALUES ('" . $AssParts['component'] . "', + 10, + '" . $InvoiceNo . "', + '" . $OrderHeader['fromstkloc'] . "', + '" . $DefaultDispatchDate . "', + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $PeriodNo . "', + '" . _('Assembly') . ': ' . $OrderLineRow['stkcode'] . ' ' . _('Order') . ': ' . $OrderNo . "', + '" . -$AssParts['quantity'] * $OrderLineRow['quantity'] . "', + '" . $AssParts['standard'] . "', + 0, + '" . ($QtyOnHandPrior - $AssParts['quantity'] * $OrderLineRow['quantity']) . "' )"; + + $Result = DB_query($SQL,$db,'','',true); + + $SQL = "UPDATE locstock + SET quantity = locstock.quantity - " . ($AssParts['quantity'] * $OrderLineRow['quantity']) . " + WHERE locstock.stockid = '" . $AssParts['component'] . "' + AND loccode = '" . $OrderHeader['fromlocstk'] . "'"; + + $Result = DB_query($SQL,$db,'','',true); + } /* end of assembly explosion and updates */ + } /* end of its an assembly */ + + // Insert stock movements - with unit cost + $LocalCurrencyPrice= ($OrderLineRow['unitprice'] *(1- floatval($OrderLineRow['discountpercent'])))/ $OrderHeader['rate']; + if ($OrderHeader['mbflag']=='A' OR $OrderHeader['mbflag']=='D'){ + /*it's a Dummy/Service item or an Assembly item - still need stock movement record + * but quantites on hand are always nil */ + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh) + VALUES ('" . $OrderLineRow['stkcode'] . "', + '10', + '" . $InvoiceNo . "', + '" . $OrderHeader['fromstkloc'] . "', + '" . $OrderHeader['orddate'] . "', + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLineRow['quantity'] . "', + '" . $OrderLineRow['discountpercent'] . "', + '" . $StandardCost . "', + '0' )"; + + $Result = api_DB_query($SQL,$db,'','',true); + } /*Get the ID of the StockMove... */ $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); @@ -839,9 +991,7 @@ '" . $Tax['TaxCalculationOrder'] . "', '" . $Tax['TaxOnTax'] . "')"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Taxes and rates applicable to this invoice line item could not be inserted because'); - $DbgMsg = _('The following SQL to insert the stock movement tax detail records was used'); - $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + $Result = DB_query($SQL,$db,'','',true); } /*Insert Sales Analysis records */ @@ -936,10 +1086,52 @@ $Result = api_DB_query($SQL,$db,'','',true); + if ($CompanyRecord['gllink_stock']==1 AND $StandardCost !=0){ + +/*first the cost of sales entry - GL accounts are retrieved using the function GetCOGSGLAccount from includes/GetSalesTransGLCodes.inc */ + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (10, + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . GetCOGSGLAccount($OrderHeader['area'], $OrderLineRow['stkcode'], $OrderHeader['ordertype'], $db) . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . " x " . $OrderLineRow['quantity'] . " @ " . $StandardCost . "', + '" . ($StandardCost * $OrderLineRow['quantity']) . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + +/*now the stock entry - this is set to the cost act in the case of a fixed asset disposal */ + $StockGLCode = GetStockGLCode($OrderLineRow['stkcode'],$db); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (10, + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $StockGLCode['stockact'] . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . " x " . $OrderLineRow['quantity'] . " @ " . $StandardCost . "', + '" . (-$StandardCost * $OrderLineRow['quantity']) . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + } /* end of if GL and stock integrated and standard cost !=0 and not an asset */ + if ($CompanyRecord['gllink_debtors']==1 AND $OrderLineRow['unitprice'] !=0){ //Post sales transaction to GL credit sales - $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLineRow['stkcode'], $OrderHeader['ordertype'], $db); + $SalesGLAccounts = GetSalesGLAccount($OrderHeader['area'], $OrderLineRow['stkcode'], $OrderHeader['ordertype'], $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -958,28 +1150,6 @@ )"; $Result = api_DB_query($SQL,$db,'','',true); - /* We also need the COGS stuff in here */ - - - - - - - - - - - - - - - - - - - - - if ($OrderLineRow['discountpercent'] !=0){ $SQL = "INSERT INTO gltrans (type, @@ -989,21 +1159,20 @@ account, narrative, amount) - VALUES ('10', - '" . $InvoiceNo . "', - '" . $OrderHeader['orddate'] . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['discountglcode'] . "', - '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . ' @ ' . ($OrderLineRow['discountpercent'] * 100) . "%', - '" . $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] * $OrderLineRow['discountpercent']/$OrderHeader['rate'] . "' )"; + VALUES (10, + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . " @ " . ($OrderLineRow['discountpercent'] * 100) . "%', + '" . ($OrderLineRow['unitprice'] * $OrderLineRow['quantity'] * $OrderLineRow['discountpercent']/$OrderHeader['rate']) . "')"; - $Result = api_DB_query($SQL,$db,'','',true); - + $Result = DB_query($SQL,$db,'','',true); } /*end of if discount !=0 */ } /*end of if sales integrated with gl */ - $LineCounter++; + $LineCounter++; //needed for the array of taxes by line } /*end of OrderLine loop */ $TotalInvLocalCurr = ($TotalFXNetInvoice + $TotalFXTax)/$OrderHeader['rate']; @@ -1054,8 +1223,7 @@ $Result = api_DB_query($SQL,$db,'','',true); } - - + EnsureGLEntriesBalance(10,$InvoiceNo,$db); } /*end of if Sales and GL integrated */ /*Update order header for invoice charged on */ @@ -1099,29 +1267,26 @@ $DebtorTransID = DB_Last_Insert_ID($db,'debtortrans','id'); /*for each Tax - need to insert into debtortranstaxes */ - - - - $SQL = "INSERT INTO debtortranstaxes (debtortransid, - taxauthid, - taxamount) - VALUES ('" . $DebtorTransID . "', - '" . $TaxAuthID . "', - '" . $Tax['FXAmount']/$OrderHeader['rate'] . "')"; + foreach ($TaxTotals AS $TaxAuthID => $TaxAmount) { - $Result = api_DB_query($SQL,$db,'','',true); - - $Result = DB_Txn_Commit($db); + $SQL = "INSERT INTO debtortranstaxes (debtortransid, + taxauthid, + taxamount) + VALUES ('" . $DebtorTransID . "', + '" . $TaxAuthID . "', + '" . $TaxAmount/$OrderHeader['rate'] . "')"; + $Result = api_DB_query($SQL,$db,'','',true); + } if (sizeof($Errors)==0) { + $Result = DB_Txn_Commit($db); $Errors[0]=0; $Errors[1]=$InvoiceNo; - } + } else { + $Result = DB_Txn_Rollback($db); + } return $Errors; - - - - } + } //end InvoiceSalesOrder function function GetCurrentPeriod (&$db) { @@ -1206,31 +1371,4 @@ return $myrow[0]; } - function PeriodExists($TransDate, &$db) { - - /* Find the date a month on */ - $MonthAfterTransDate = Mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)); - - $GetPrdSQL = "SELECT periodno FROM periods WHERE lastdate_in_period < '" . Date('Y/m/d', $MonthAfterTransDate) . "' AND lastdate_in_period >= '" . Date('Y/m/d', $TransDate) . "'"; - - $GetPrdResult = api_DB_query($GetPrdSQL,$db,$ErrMsg); - - if (DB_num_rows($GetPrdResult)==0) { - return false; - } else { - return true; - } - - } - - function CreatePeriod($PeriodNo, $PeriodEnd, &$db) { - $InsertPrdSQL = "INSERT INTO periods (periodno, - lastdate_in_period) - VALUES ('" . $PeriodNo . "', - '" . Date('Y-m-d', $PeriodEnd) . "')"; - - $InsertPrdResult = api_DB_query($InsertPrdSQL, $db); - } - - ?> \ No newline at end of file Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2012-01-29 09:03:14 UTC (rev 4849) +++ trunk/api/api_xml-rpc.php 2012-01-29 09:42:44 UTC (rev 4850) @@ -518,12 +518,10 @@ function xmlrpc_GetHoldReasonList($xmlrpcmsg){ ob_start('ob_file_callback'); -/*x*/ if ($xmlrpcmsg->getNumParams() == 2) -/*x*/ { -/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonList($xmlrpcmsg->getParam( 0 )->scalarval( ), -/*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); +/*x*/ if ($xmlrpcmsg->getNumParams() == 2) { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonList($xmlrpcmsg->getParam( 0 )->scalarval( ), $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); /*x*/ } else { -/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonList( '', ''))); + $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonList( '', ''))); /*x*/ } ob_end_flush(); return $rtn; @@ -548,11 +546,8 @@ function xmlrpc_GetHoldReasonDetails($xmlrpcmsg){ ob_start('ob_file_callback'); -/*x*/ if ($xmlrpcmsg->getNumParams() == 3) -/*x*/ { -/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonDetails($xmlrpcmsg->getParam( 0 )->scalarval( ), -/*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ), -/*x*/ $xmlrpcmsg->getParam( 2 )->scalarval( ))) ); +/*x*/ if ($xmlrpcmsg->getNumParams() == 3) { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonDetails($xmlrpcmsg->getParam( 0 )->scalarval( ), $xmlrpcmsg->getParam( 1 )->scalarval( ),$xmlrpcmsg->getParam( 2 )->scalarval( ))) ); /*x*/ } else { /*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonDetails($xmlrpcmsg->getParam( 0 )->scalarval( ), '', ''))); /*x*/ } @@ -1149,8 +1144,7 @@ function xmlrpc_InsertSalesOrderHeader($xmlrpcmsg){ ob_start('ob_file_callback'); -/*x*/ if ($xmlrpcmsg->getNumParams() == 3) -/*x*/ { +/*x*/ if ($xmlrpcmsg->getNumParams() == 3) { /*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InsertSalesOrderHeader(php_xmlrpc_decode($xmlrpcmsg->getParam( 0 )), /*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ), /*x*/ $xmlrpcmsg->getParam( 2 )->scalarval( ))) ); @@ -1165,6 +1159,36 @@ unset($Parameter); unset($ReturnValue); + $Description = 'This function is used to invoice a sales order for the full quantity on the order assuming it is all dispatched. NB It does not deal with serialised/controlled items.'; + $Parameter[0]['name'] = _('Sales Order to invoice'); + $Parameter[0]['description'] = _('An integer representing the webERP sales order number'); + $Parameter[1]['name'] = _('User name'); + $Parameter[1]['description'] = _('A valid weberp username. This user should have security access to this data.'); + $Parameter[2]['name'] = _('User password'); + $Parameter[2]['description'] = _('The weberp password associated with this user name. '); + $ReturnValue[0] = _('If successful this function returns a two element array; the first element is 0 for success or an error code, while the second element is the invoice number.'); + +/*E*/$InvoiceSalesOrder_sig = array(array($xmlrpcStruct,$xmlrpcStruct), +/*x*/ array($xmlrpcStruct,$xmlrpcStruct,$xmlrpcString,$xmlrpcString)); + $InvoiceSalesOrder_doc = apiBuildDocHTML( $Description,$Parameter,$ReturnValue ); + + function xmlrpc_InvoiceSalesOrder($xmlrpcmsg){ + ob_start('ob_file_callback'); +/*x*/ if ($xmlrpcmsg->getNumParams() == 3) { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InvoiceSalesOrder($xmlrpcmsg->getParam( 0 )->scalarval( ), $xmlrpcmsg->getParam( 1 )->scalarval( ), $xmlrpcmsg->getParam( 2 )->scalarval( ))) ); + } else { //do it with the current login +/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InvoiceSalesOrder($xmlrpcmsg->getParam( 0 )->scalarval( ), '', ''))); +/*x*/ } + ob_end_flush(); + return $rtn; + } + + unset($Description); + unset($Parameter); + unset($ReturnValue); + + + $Description = 'This function is used to modify the header details of a sales order'; $Parameter[0]['name'] = _('Modify Sales Order Header Details'); $Parameter[0]['description'] = _('A set of key/value pairs where the key must be identical to the name of the field to be updated. ') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-29 09:42:51
|
Revision: 4850 http://web-erp.svn.sourceforge.net/web-erp/?rev=4850&view=rev Author: daintree Date: 2012-01-29 09:42:44 +0000 (Sun, 29 Jan 2012) Log Message: ----------- extended API to create invoices from salesorders Modified Paths: -------------- trunk/api/api_errorcodes.php trunk/api/api_php.php trunk/api/api_salesorders.php trunk/api/api_xml-rpc.php Modified: trunk/api/api_errorcodes.php =================================================================== --- trunk/api/api_errorcodes.php 2012-01-29 09:03:14 UTC (rev 4849) +++ trunk/api/api_errorcodes.php 2012-01-29 09:42:44 UTC (rev 4850) @@ -160,6 +160,12 @@ Define('BatchIsEmpty', 1155); Define('NoSuchArea', 1156); Define('NoSuchSalesMan', 1157); + Define('NoCompanyRecord',1158); + Define('NoReadOrder',1159); + Define('NoReadOrderLines',1160); + Define('NoTaxProvince',1161); + Define('TaxRatesFailed',1162); + /* Array of Descriptions of errors */ $ErrorDescription['1'] = _('No Authorisation'); @@ -320,5 +326,10 @@ $ErrorDescription['1155'] = _('Batch is empty'); $ErrorDescription['1156'] = _('No such area'); $ErrorDescription['1157'] = _('No such salesman'); + $ErrorDescription['1158'] = _('Unable to read company record'); + $ErrorDescription['1159'] = _('Unable to read sales order'); + $ErrorDescription['1160'] = _('Unable to read sales order lines'); + $ErrorDescription['1161'] = _('Unable to get tax province of location'); + $ErrorDescription['1162'] = _('Unable to read tax rates for this item and tax group'); ?> \ No newline at end of file Modified: trunk/api/api_php.php =================================================================== --- trunk/api/api_php.php 2012-01-29 09:03:14 UTC (rev 4849) +++ trunk/api/api_php.php 2012-01-29 09:42:44 UTC (rev 4850) @@ -14,7 +14,7 @@ /* Include SQL_CommonFunctions.inc, to use GetNextTransNo().*/ include($PathPrefix . 'includes/SQL_CommonFunctions.inc'); /* Required for creating invoices/credits */ - include($PathPrefix . 'includes/GetSalesTransGLCode.inc'); + include($PathPrefix . 'includes/GetSalesTransGLCodes.inc'); /* Get weberp authentication, and return a valid database connection */ @@ -22,7 +22,7 @@ if (!isset($_SESSION['AccessLevel']) OR $_SESSION['AccessLevel'] == '') { // Login to default database = old clients. - if ($user != '' && $password != '') { + if ($user != '' AND $password != '') { global $api_DatabaseName; $rc = LoginAPI ($api_DatabaseName, $user, $password); if ($rc[0] == UL_OK ) { Modified: trunk/api/api_salesorders.php =================================================================== --- trunk/api/api_salesorders.php 2012-01-29 09:03:14 UTC (rev 4849) +++ trunk/api/api_salesorders.php 2012-01-29 09:42:44 UTC (rev 4850) @@ -116,15 +116,15 @@ /* Check that the delivery date is a valid date. The date * must be in the same format as the date format specified in the * target webERP company */ - function VerifyDeliveryDate($deliverydate, $i, $Errors, $db) { + function VerifyDeliveryDate($DeliveryDate, $i, $Errors, $db) { $sql="SELECT confvalue FROM config WHERE confname='DefaultDateFormat'"; $result=api_DB_query($sql, $db); $myrow=DB_fetch_array($result); $DateFormat=$myrow[0]; - if (mb_strstr($deliverydate,'/')) { - $DateArray = explode('/',$deliverydate); + if (mb_strstr($DeliveryDate,'/')) { + $DateArray = explode('/',$DeliveryDate); } elseif (mb_strstr($PeriodEnd,'.')) { - $DateArray = explode('.',$deliverydate); + $DateArray = explode('.',$DeliveryDate); } if ($DateFormat=='d/m/Y') { $Day=$DateArray[0]; @@ -349,10 +349,6 @@ VALUES (" . mb_substr($FieldValues,0,-2). ")"; if (sizeof($Errors)==0) { - /*debug info to file - $fp = fopen( '/root/Web-Server/apidebug/api-sql.sql', "w"); - fputs($fp, $sql); - */ $result = api_DB_Query($sql, $db); if (DB_error_no($db) != 0) { $Errors[0] = DatabaseUpdateFailed; @@ -464,6 +460,7 @@ * already exist in webERP. */ function InsertSalesOrderLine($OrderLine, $user, $password) { + $Errors = array(); $db = db($user, $password); if (gettype($db)=='integer') { @@ -610,6 +607,7 @@ then it returns an $Errors array. */ function GetSalesOrderLine($OrderNo, $user, $password) { + $Errors = array(); $db = db($user, $password); if (gettype($db)=='integer') { @@ -631,8 +629,12 @@ function InvoiceSalesOrder($OrderNo, $User, $Password) { + /*debug info to file */ + $fp = fopen( '/root/Web-Server/apidebug/debuginfo.txt', "w"); + fputs($fp, 'starting to invoice order ' . $OrderNo); + $Errors = array(); - $db = db($user, $password); + $db = db($User, $Password); if (gettype($db)=='integer') { $Errors[0]=NoAuthorisation; return $Errors; @@ -648,68 +650,92 @@ gllink_debtors, gllink_stock FROM companies - WHERE coycode=1";,$db); + WHERE coycode=1",$db); $CompanyRecord = DB_fetch_array($ReadCoyResult); - + if (DB_error_no($db) != 0) { + $Errors[] = NoCompanyRecord; + } + + fputs($fp, 'Got company info' . "\n"); + $OrderHeaderSQL = "SELECT salesorders.debtorno, - debtorsmaster.name, - salesorders.branchcode, - salesorders.customerref, - salesorders.orddate, - salesorders.ordertype, - salesorders.shipvia, - custbranch.area, - custbranch.taxgroupid, - debtorsmaster.currcode, - currencies.rate, - salesorders.fromstkloc, - custbranch.salesman - FROM salesorders - INNER JOIN debtorsmaster - ON salesorders.debtorno = debtorsmaster.debtorno - INNER JOIN custbranch - ON salesorders.debtorno = custbranch.debtorno - AND salesorders.branchcode = custbranch.branchcode - INNER JOIN locations - ON locations.loccode=salesorders.fromstkloc - INNER JOIN currencies - ON debtorsmaster.currcode=currencies.currabrev - WHERE salesorders.orderno = '" . $OrderNumber . "'"; + debtorsmaster.name, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.ordertype, + salesorders.shipvia, + custbranch.area, + custbranch.taxgroupid, + debtorsmaster.currcode, + currencies.rate, + salesorders.fromstkloc, + custbranch.salesman + FROM salesorders + INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN custbranch + ON salesorders.debtorno = custbranch.debtorno + AND salesorders.branchcode = custbranch.branchcode + INNER JOIN locations + ON locations.loccode=salesorders.fromstkloc + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE salesorders.orderno = '" . $OrderNumber . "'"; $OrderHeaderResult = api_DB_query($OrderHeaderSQL,$db); + if (DB_error_no($db) != 0) { + $Errors[] = NoReadOrder; + } + + fputs($fp, 'Got order header' . "\n"); + $OrderHeader = DB_fetch_array($OrderHeaderResult); $TaxProvResult = api_DB_query("SELECT taxprovinceid FROM locations WHERE loccode='" . $OrderHeader['fromstkloc'] ."'",$db); $Result = api_DB_query($SQL,$db); + if (DB_error_no($db) != 0) { + $Errors[] = NoTaxProvince; + } $myrow = DB_fetch_row($Result); $DispTaxProvinceID = $myrow[0]; - - $LineItemsSQL = "SELECT stkcode, unitprice, quantity, discountpercent, - taxcatid + taxcatid, + mbflag, + materialcost+labourcost+overheadcost AS standardcost FROM salesorderdetails INNER JOIN stockmaster ON salesorderdetails.stkcode = stockmaster.stockid - WHERE orderno ='" . $OrderNo . "'"; + WHERE orderno ='" . $OrderNo . "' + AND completed=0"; $LineItemsResult = api_DB_query($LineItemsSQL,$db); - + if (DB_error_no($db) != 0 OR DB_num_rows($LineItemsResult)==0) { + $Errors[] = NoReadOrderLines; + return $Errors; + } + fputs($fp, 'Got order line items' . "\n"); + /*Start an SQL transaction */ $result = DB_Txn_Begin($db); /*Now Get the next invoice number - function in SQL_CommonFunctions*/ $InvoiceNo = GetNextTransNo(10, $db); $PeriodNo = GetCurrentPeriod($db); + fputs($fp, 'Got invoice number ' . $InvoiceNo . "\n and into PeriodNo " . $PeriodNo . "\n"); + $TotalFXNetInvoice = 0; $TotalFXTax = 0; $LineCounter =0; while ($OrderLineRow = DB_fetch_array($LineItemsResult)) { - + + $StandardCost = $OrderLineRow['standardcost']; + $LineNetAmount = $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] *(1- floatval($OrderLineRow['discountpercent'])); /*Gets the Taxes and rates applicable to this line from the TaxGroup of the branch and TaxCategory of the item @@ -731,7 +757,9 @@ ORDER BY taxgrouptaxes.calculationorder"; $GetTaxRatesResult = api_DB_query($SQL,$db,'','',true); - + if (DB_error_no($db) != 0) { + $Errors[] = TaxRatesFailed; + } $LineTaxAmount = 0; $TaxTotals =array(); @@ -762,7 +790,7 @@ 'TaxAuthAmount'=>$TaxAuthAmount); $LineTaxAmount += $TaxAuthAmount; - } + }//end loop around Taxes $LineNetAmount = $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] *(1- floatval($OrderLineRow['discountpercent'])); @@ -774,54 +802,178 @@ SET qtyinvoiced = qtyinvoiced + " . $OrderLineRow['quantity'] . ", actualdispatchdate = '" . $OrderHeader['orddate']. "', completed='1' - WHERE orderno = '" . $OrderNo . "' - AND stkcode = '" . $OrderLineRow['stkcode'] . "'"; + WHERE orderno = '" . $OrderNo . "' + AND stkcode = '" . $OrderLineRow['stkcode'] . "'"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales order detail record could not be updated because'); - $DbgMsg = _('The following SQL to update the sales order detail record was used'); - $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + $Result = api_DB_query($SQL,$db,'','',true); - // Insert stock movements - with unit cost - $LocalCurrencyPrice= ($OrderLineRow['unitprice'] *(1- floatval($OrderLineRow['discountpercent'])))/ $OrderHeader['rate']; + if ($OrderHeader['mbflag']=='B' OR $OrderHeader['mbflag']=='M') { + $Assembly = False; + /* Need to get the current location quantity + will need it later for the stock movement */ + $SQL="SELECT locstock.quantity + FROM locstock + WHERE locstock.stockid='" . $OrderLineRow['stkcode'] . "' + AND loccode= '" . $OrderHeader['fromstkloc'] . "'"; + $Result = api_DB_query($SQL, $db); + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; + } else { + /* There must be some error this should never happen */ + $QtyOnHandPrior = 0; + } -/*Can't assume dummy/service items need the cogs stuff here too */ + $SQL = "UPDATE locstock + SET quantity = locstock.quantity - " . $OrderLineRow['quantity'] . " + WHERE locstock.stockid = '" . $OrderLineRow['stkcode'] . "' + AND loccode = '" . $OrderHeader['fromstkloc'] . "'"; + $Result = api_DB_query($SQL,$db,'','',true); + + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh) + VALUES ('" . $OrderLineRow['stkcode'] . "', + '10', + '" . $InvoiceNo . "', + '" . $OrderHeader['fromstkloc'] . "', + '" . $OrderHeader['orddate'] . "', + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLineRow['quantity'] . "', + '" . $OrderLineRow['discountpercent'] . "', + '" . $StandardCost . "', + '" . ($QtyOnHandPrior - $OrderLineRow['quantity']) . "' )"; + + $Result = api_DB_query($SQL,$db,'','',true); + } else if ($OrderHeader['mbflag']=='A'){ /* its an assembly */ + /*Need to get the BOM for this part and make + stock moves for the components then update the Location stock balances */ + $Assembly=True; + $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 INNER JOIN stockmaster + ON bom.component=stockmaster.stockid + WHERE bom.parent='" . $OrderLineRow['stkcode'] . "' + AND bom.effectiveto >= '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + $AssResult = api_DB_query($SQL,$db); - // its a dummy item dummies always have nil stock (by definition so new qty on hand will be nil - $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost) - VALUES ( - '" . $OrderLineRow['stkcode'] . "', - '10', - '" . $InvoiceNo . "', - '" . $OrderHeader['fromstkloc'] . "', - '" . $OrderHeader['orddate'] . "', - '" . $OrderHeader['debtorno'] . "', - '" . $OrderHeader['branchcode'] . "', - '" . $LocalCurrencyPrice . "', - '" . $PeriodNo . "', - '" . $OrderNo . "', - '" . -$OrderLineRow['quantity'] . "', - '" . $OrderLineRow['discountpercent'] . "', - '0')"; + while ($AssParts = DB_fetch_array($AssResult,$db)){ - $Result = api_DB_query($SQL,$db,'','',true); + $StandardCost += ($AssParts['standard'] * $AssParts['quantity']) ; + /* Need to get the current location quantity + will need it later for the stock movement */ + $SQL="SELECT locstock.quantity + FROM locstock + WHERE locstock.stockid='" . $AssParts['component'] . "' + AND loccode= '" . $OrderHeader['fromstkloc'] . "'"; + $Result = api_DB_query($SQL,$db); + if (DB_num_rows($Result)==1){ + $LocQtyRow = DB_fetch_row($Result); + $QtyOnHandPrior = $LocQtyRow[0]; + } else { + /*There must be some error this should never happen */ + $QtyOnHandPrior = 0; + } + if (empty($AssParts['standard'])) { + $AssParts['standard']=0; + } + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + prd, + reference, + qty, + standardcost, + show_on_inv_crds, + newqoh) + VALUES ('" . $AssParts['component'] . "', + 10, + '" . $InvoiceNo . "', + '" . $OrderHeader['fromstkloc'] . "', + '" . $DefaultDispatchDate . "', + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $PeriodNo . "', + '" . _('Assembly') . ': ' . $OrderLineRow['stkcode'] . ' ' . _('Order') . ': ' . $OrderNo . "', + '" . -$AssParts['quantity'] * $OrderLineRow['quantity'] . "', + '" . $AssParts['standard'] . "', + 0, + '" . ($QtyOnHandPrior - $AssParts['quantity'] * $OrderLineRow['quantity']) . "' )"; + + $Result = DB_query($SQL,$db,'','',true); + + $SQL = "UPDATE locstock + SET quantity = locstock.quantity - " . ($AssParts['quantity'] * $OrderLineRow['quantity']) . " + WHERE locstock.stockid = '" . $AssParts['component'] . "' + AND loccode = '" . $OrderHeader['fromlocstk'] . "'"; + + $Result = DB_query($SQL,$db,'','',true); + } /* end of assembly explosion and updates */ + } /* end of its an assembly */ + + // Insert stock movements - with unit cost + $LocalCurrencyPrice= ($OrderLineRow['unitprice'] *(1- floatval($OrderLineRow['discountpercent'])))/ $OrderHeader['rate']; + if ($OrderHeader['mbflag']=='A' OR $OrderHeader['mbflag']=='D'){ + /*it's a Dummy/Service item or an Assembly item - still need stock movement record + * but quantites on hand are always nil */ + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh) + VALUES ('" . $OrderLineRow['stkcode'] . "', + '10', + '" . $InvoiceNo . "', + '" . $OrderHeader['fromstkloc'] . "', + '" . $OrderHeader['orddate'] . "', + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLineRow['quantity'] . "', + '" . $OrderLineRow['discountpercent'] . "', + '" . $StandardCost . "', + '0' )"; + + $Result = api_DB_query($SQL,$db,'','',true); + } /*Get the ID of the StockMove... */ $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); @@ -839,9 +991,7 @@ '" . $Tax['TaxCalculationOrder'] . "', '" . $Tax['TaxOnTax'] . "')"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Taxes and rates applicable to this invoice line item could not be inserted because'); - $DbgMsg = _('The following SQL to insert the stock movement tax detail records was used'); - $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + $Result = DB_query($SQL,$db,'','',true); } /*Insert Sales Analysis records */ @@ -936,10 +1086,52 @@ $Result = api_DB_query($SQL,$db,'','',true); + if ($CompanyRecord['gllink_stock']==1 AND $StandardCost !=0){ + +/*first the cost of sales entry - GL accounts are retrieved using the function GetCOGSGLAccount from includes/GetSalesTransGLCodes.inc */ + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (10, + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . GetCOGSGLAccount($OrderHeader['area'], $OrderLineRow['stkcode'], $OrderHeader['ordertype'], $db) . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . " x " . $OrderLineRow['quantity'] . " @ " . $StandardCost . "', + '" . ($StandardCost * $OrderLineRow['quantity']) . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + +/*now the stock entry - this is set to the cost act in the case of a fixed asset disposal */ + $StockGLCode = GetStockGLCode($OrderLineRow['stkcode'],$db); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (10, + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $StockGLCode['stockact'] . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . " x " . $OrderLineRow['quantity'] . " @ " . $StandardCost . "', + '" . (-$StandardCost * $OrderLineRow['quantity']) . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + } /* end of if GL and stock integrated and standard cost !=0 and not an asset */ + if ($CompanyRecord['gllink_debtors']==1 AND $OrderLineRow['unitprice'] !=0){ //Post sales transaction to GL credit sales - $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLineRow['stkcode'], $OrderHeader['ordertype'], $db); + $SalesGLAccounts = GetSalesGLAccount($OrderHeader['area'], $OrderLineRow['stkcode'], $OrderHeader['ordertype'], $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -958,28 +1150,6 @@ )"; $Result = api_DB_query($SQL,$db,'','',true); - /* We also need the COGS stuff in here */ - - - - - - - - - - - - - - - - - - - - - if ($OrderLineRow['discountpercent'] !=0){ $SQL = "INSERT INTO gltrans (type, @@ -989,21 +1159,20 @@ account, narrative, amount) - VALUES ('10', - '" . $InvoiceNo . "', - '" . $OrderHeader['orddate'] . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['discountglcode'] . "', - '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . ' @ ' . ($OrderLineRow['discountpercent'] * 100) . "%', - '" . $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] * $OrderLineRow['discountpercent']/$OrderHeader['rate'] . "' )"; + VALUES (10, + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . " @ " . ($OrderLineRow['discountpercent'] * 100) . "%', + '" . ($OrderLineRow['unitprice'] * $OrderLineRow['quantity'] * $OrderLineRow['discountpercent']/$OrderHeader['rate']) . "')"; - $Result = api_DB_query($SQL,$db,'','',true); - + $Result = DB_query($SQL,$db,'','',true); } /*end of if discount !=0 */ } /*end of if sales integrated with gl */ - $LineCounter++; + $LineCounter++; //needed for the array of taxes by line } /*end of OrderLine loop */ $TotalInvLocalCurr = ($TotalFXNetInvoice + $TotalFXTax)/$OrderHeader['rate']; @@ -1054,8 +1223,7 @@ $Result = api_DB_query($SQL,$db,'','',true); } - - + EnsureGLEntriesBalance(10,$InvoiceNo,$db); } /*end of if Sales and GL integrated */ /*Update order header for invoice charged on */ @@ -1099,29 +1267,26 @@ $DebtorTransID = DB_Last_Insert_ID($db,'debtortrans','id'); /*for each Tax - need to insert into debtortranstaxes */ - - - - $SQL = "INSERT INTO debtortranstaxes (debtortransid, - taxauthid, - taxamount) - VALUES ('" . $DebtorTransID . "', - '" . $TaxAuthID . "', - '" . $Tax['FXAmount']/$OrderHeader['rate'] . "')"; + foreach ($TaxTotals AS $TaxAuthID => $TaxAmount) { - $Result = api_DB_query($SQL,$db,'','',true); - - $Result = DB_Txn_Commit($db); + $SQL = "INSERT INTO debtortranstaxes (debtortransid, + taxauthid, + taxamount) + VALUES ('" . $DebtorTransID . "', + '" . $TaxAuthID . "', + '" . $TaxAmount/$OrderHeader['rate'] . "')"; + $Result = api_DB_query($SQL,$db,'','',true); + } if (sizeof($Errors)==0) { + $Result = DB_Txn_Commit($db); $Errors[0]=0; $Errors[1]=$InvoiceNo; - } + } else { + $Result = DB_Txn_Rollback($db); + } return $Errors; - - - - } + } //end InvoiceSalesOrder function function GetCurrentPeriod (&$db) { @@ -1206,31 +1371,4 @@ return $myrow[0]; } - function PeriodExists($TransDate, &$db) { - - /* Find the date a month on */ - $MonthAfterTransDate = Mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)); - - $GetPrdSQL = "SELECT periodno FROM periods WHERE lastdate_in_period < '" . Date('Y/m/d', $MonthAfterTransDate) . "' AND lastdate_in_period >= '" . Date('Y/m/d', $TransDate) . "'"; - - $GetPrdResult = api_DB_query($GetPrdSQL,$db,$ErrMsg); - - if (DB_num_rows($GetPrdResult)==0) { - return false; - } else { - return true; - } - - } - - function CreatePeriod($PeriodNo, $PeriodEnd, &$db) { - $InsertPrdSQL = "INSERT INTO periods (periodno, - lastdate_in_period) - VALUES ('" . $PeriodNo . "', - '" . Date('Y-m-d', $PeriodEnd) . "')"; - - $InsertPrdResult = api_DB_query($InsertPrdSQL, $db); - } - - ?> \ No newline at end of file Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2012-01-29 09:03:14 UTC (rev 4849) +++ trunk/api/api_xml-rpc.php 2012-01-29 09:42:44 UTC (rev 4850) @@ -518,12 +518,10 @@ function xmlrpc_GetHoldReasonList($xmlrpcmsg){ ob_start('ob_file_callback'); -/*x*/ if ($xmlrpcmsg->getNumParams() == 2) -/*x*/ { -/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonList($xmlrpcmsg->getParam( 0 )->scalarval( ), -/*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); +/*x*/ if ($xmlrpcmsg->getNumParams() == 2) { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonList($xmlrpcmsg->getParam( 0 )->scalarval( ), $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); /*x*/ } else { -/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonList( '', ''))); + $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonList( '', ''))); /*x*/ } ob_end_flush(); return $rtn; @@ -548,11 +546,8 @@ function xmlrpc_GetHoldReasonDetails($xmlrpcmsg){ ob_start('ob_file_callback'); -/*x*/ if ($xmlrpcmsg->getNumParams() == 3) -/*x*/ { -/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonDetails($xmlrpcmsg->getParam( 0 )->scalarval( ), -/*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ), -/*x*/ $xmlrpcmsg->getParam( 2 )->scalarval( ))) ); +/*x*/ if ($xmlrpcmsg->getNumParams() == 3) { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonDetails($xmlrpcmsg->getParam( 0 )->scalarval( ), $xmlrpcmsg->getParam( 1 )->scalarval( ),$xmlrpcmsg->getParam( 2 )->scalarval( ))) ); /*x*/ } else { /*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetHoldReasonDetails($xmlrpcmsg->getParam( 0 )->scalarval( ), '', ''))); /*x*/ } @@ -1149,8 +1144,7 @@ function xmlrpc_InsertSalesOrderHeader($xmlrpcmsg){ ob_start('ob_file_callback'); -/*x*/ if ($xmlrpcmsg->getNumParams() == 3) -/*x*/ { +/*x*/ if ($xmlrpcmsg->getNumParams() == 3) { /*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InsertSalesOrderHeader(php_xmlrpc_decode($xmlrpcmsg->getParam( 0 )), /*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ), /*x*/ $xmlrpcmsg->getParam( 2 )->scalarval( ))) ); @@ -1165,6 +1159,36 @@ unset($Parameter); unset($ReturnValue); + $Description = 'This function is used to invoice a sales order for the full quantity on the order assuming it is all dispatched. NB It does not deal with serialised/controlled items.'; + $Parameter[0]['name'] = _('Sales Order to invoice'); + $Parameter[0]['description'] = _('An integer representing the webERP sales order number'); + $Parameter[1]['name'] = _('User name'); + $Parameter[1]['description'] = _('A valid weberp username. This user should have security access to this data.'); + $Parameter[2]['name'] = _('User password'); + $Parameter[2]['description'] = _('The weberp password associated with this user name. '); + $ReturnValue[0] = _('If successful this function returns a two element array; the first element is 0 for success or an error code, while the second element is the invoice number.'); + +/*E*/$InvoiceSalesOrder_sig = array(array($xmlrpcStruct,$xmlrpcStruct), +/*x*/ array($xmlrpcStruct,$xmlrpcStruct,$xmlrpcString,$xmlrpcString)); + $InvoiceSalesOrder_doc = apiBuildDocHTML( $Description,$Parameter,$ReturnValue ); + + function xmlrpc_InvoiceSalesOrder($xmlrpcmsg){ + ob_start('ob_file_callback'); +/*x*/ if ($xmlrpcmsg->getNumParams() == 3) { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InvoiceSalesOrder($xmlrpcmsg->getParam( 0 )->scalarval( ), $xmlrpcmsg->getParam( 1 )->scalarval( ), $xmlrpcmsg->getParam( 2 )->scalarval( ))) ); + } else { //do it with the current login +/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(InvoiceSalesOrder($xmlrpcmsg->getParam( 0 )->scalarval( ), '', ''))); +/*x*/ } + ob_end_flush(); + return $rtn; + } + + unset($Description); + unset($Parameter); + unset($ReturnValue); + + + $Description = 'This function is used to modify the header details of a sales order'; $Parameter[0]['name'] = _('Modify Sales Order Header Details'); $Parameter[0]['description'] = _('A set of key/value pairs where the key must be identical to the name of the field to be updated. ') This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-01-29 09:03:20
|
Revision: 4849 http://web-erp.svn.sourceforge.net/web-erp/?rev=4849&view=rev Author: tim_schofield Date: 2012-01-29 09:03:14 +0000 (Sun, 29 Jan 2012) Log Message: ----------- Fix typo preventing the tag description being properly shown Modified Paths: -------------- trunk/PcExpenses.php Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2012-01-29 03:23:11 UTC (rev 4848) +++ trunk/PcExpenses.php 2012-01-29 09:03:14 UTC (rev 4849) @@ -83,10 +83,10 @@ echo prnMsg(_('A general ledger code must be selected for this expense'),'error'); echo '<br />'; } - + if (isset($SelectedExpense) AND $InputError !=1) { - $sql = "UPDATE pcexpenses + $sql = "UPDATE pcexpenses SET description = '" . $_POST['Description'] . "', glaccount = '" . $_POST['GLAccount'] . "', tag = '" . $_POST['Tag'] . "' @@ -120,7 +120,7 @@ '" . $_POST['Description'] . "', '" . $_POST['GLAccount'] . "', '" . $_POST['Tag'] . "')"; - + $msg = _('Expense ') . ' ' . $_POST['CodeExpense'] . ' ' . _('has been created'); $checkSql = "SELECT count(codeexpense) FROM pcexpenses"; @@ -207,7 +207,7 @@ $ResultDes = DB_query($sqldesc,$db); $Description=DB_fetch_array($ResultDes); - + $SqlDescTag="SELECT tagdescription FROM tags WHERE tagref='". $myrow[3] . "'"; @@ -227,7 +227,7 @@ $myrow[1], $myrow[2], $Description['accountname'], - $DescriptionTag['tagdesciption'], + $DescriptionTag['tagdescription'], htmlspecialchars($_SERVER['PHP_SELF']) . '?', $myrow[0], htmlspecialchars($_SERVER['PHP_SELF']) . '?', $myrow[0]); } @@ -315,7 +315,7 @@ } //end while loop echo '</select></td></tr>'; - + //Select the tag DB_free_result($result); echo '<tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-01-29 09:03:20
|
Revision: 4849 http://web-erp.svn.sourceforge.net/web-erp/?rev=4849&view=rev Author: tim_schofield Date: 2012-01-29 09:03:14 +0000 (Sun, 29 Jan 2012) Log Message: ----------- Fix typo preventing the tag description being properly shown Modified Paths: -------------- trunk/PcExpenses.php Modified: trunk/PcExpenses.php =================================================================== --- trunk/PcExpenses.php 2012-01-29 03:23:11 UTC (rev 4848) +++ trunk/PcExpenses.php 2012-01-29 09:03:14 UTC (rev 4849) @@ -83,10 +83,10 @@ echo prnMsg(_('A general ledger code must be selected for this expense'),'error'); echo '<br />'; } - + if (isset($SelectedExpense) AND $InputError !=1) { - $sql = "UPDATE pcexpenses + $sql = "UPDATE pcexpenses SET description = '" . $_POST['Description'] . "', glaccount = '" . $_POST['GLAccount'] . "', tag = '" . $_POST['Tag'] . "' @@ -120,7 +120,7 @@ '" . $_POST['Description'] . "', '" . $_POST['GLAccount'] . "', '" . $_POST['Tag'] . "')"; - + $msg = _('Expense ') . ' ' . $_POST['CodeExpense'] . ' ' . _('has been created'); $checkSql = "SELECT count(codeexpense) FROM pcexpenses"; @@ -207,7 +207,7 @@ $ResultDes = DB_query($sqldesc,$db); $Description=DB_fetch_array($ResultDes); - + $SqlDescTag="SELECT tagdescription FROM tags WHERE tagref='". $myrow[3] . "'"; @@ -227,7 +227,7 @@ $myrow[1], $myrow[2], $Description['accountname'], - $DescriptionTag['tagdesciption'], + $DescriptionTag['tagdescription'], htmlspecialchars($_SERVER['PHP_SELF']) . '?', $myrow[0], htmlspecialchars($_SERVER['PHP_SELF']) . '?', $myrow[0]); } @@ -315,7 +315,7 @@ } //end while loop echo '</select></td></tr>'; - + //Select the tag DB_free_result($result); echo '<tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-29 03:23:18
|
Revision: 4848 http://web-erp.svn.sourceforge.net/web-erp/?rev=4848&view=rev Author: daintree Date: 2012-01-29 03:23:11 +0000 (Sun, 29 Jan 2012) Log Message: ----------- fix Z_ChangeStockCode.php for SalesCategories Modified Paths: -------------- trunk/Z_ChangeStockCode.php trunk/doc/Change.log Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2012-01-29 03:10:08 UTC (rev 4847) +++ trunk/Z_ChangeStockCode.php 2012-01-29 03:23:11 UTC (rev 4848) @@ -285,7 +285,13 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); echo ' ... ' . _('completed'); + echo '<br />' . _('Changing sales category information'); + $sql = "UPDATE salescatprod SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the sales category records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + echo '<br />' . _('Changing any serialised item information'); @@ -297,6 +303,8 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); echo ' ... ' . _('completed'); + + DB_ReinstateForeignKeys($db); $result = DB_Txn_Commit($db); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-29 03:10:08 UTC (rev 4847) +++ trunk/doc/Change.log 2012-01-29 03:23:11 UTC (rev 4848) @@ -1,5 +1,7 @@ webERP Change Log +29/1/12 Phil: Alterations to API to fix SQL and to start work on adding InvoiceSalesOrder method +29/1/12 Phil: Z_ChangeStockCode.php now alters SalesCategories of items being changed 28/1/12 Ahmed.Fawzy: StockCategories.php fixes for numericvalue not displaying and errored with "minimum value is not numeric" 28/1/12 Phil: ConfirmDispatch_Invoice.php corrected link to ConfirmDispatchControlled_Invoice.php to send $identifier to get the correct session variable containing the order to invoice 28/1/12 Tim: SpecialOrder.php added $identifier to session class variable to avoid overlapping sessions in multiple tabs. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-29 03:23:18
|
Revision: 4848 http://web-erp.svn.sourceforge.net/web-erp/?rev=4848&view=rev Author: daintree Date: 2012-01-29 03:23:11 +0000 (Sun, 29 Jan 2012) Log Message: ----------- fix Z_ChangeStockCode.php for SalesCategories Modified Paths: -------------- trunk/Z_ChangeStockCode.php trunk/doc/Change.log Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2012-01-29 03:10:08 UTC (rev 4847) +++ trunk/Z_ChangeStockCode.php 2012-01-29 03:23:11 UTC (rev 4848) @@ -285,7 +285,13 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); echo ' ... ' . _('completed'); + echo '<br />' . _('Changing sales category information'); + $sql = "UPDATE salescatprod SET stockid='" . $_POST['NewStockID'] . "' WHERE stockid='" . $_POST['OldStockID'] . "'"; + $ErrMsg = _('The SQL to update the sales category records failed'); + $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + echo '<br />' . _('Changing any serialised item information'); @@ -297,6 +303,8 @@ $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); echo ' ... ' . _('completed'); + + DB_ReinstateForeignKeys($db); $result = DB_Txn_Commit($db); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-29 03:10:08 UTC (rev 4847) +++ trunk/doc/Change.log 2012-01-29 03:23:11 UTC (rev 4848) @@ -1,5 +1,7 @@ webERP Change Log +29/1/12 Phil: Alterations to API to fix SQL and to start work on adding InvoiceSalesOrder method +29/1/12 Phil: Z_ChangeStockCode.php now alters SalesCategories of items being changed 28/1/12 Ahmed.Fawzy: StockCategories.php fixes for numericvalue not displaying and errored with "minimum value is not numeric" 28/1/12 Phil: ConfirmDispatch_Invoice.php corrected link to ConfirmDispatchControlled_Invoice.php to send $identifier to get the correct session variable containing the order to invoice 28/1/12 Tim: SpecialOrder.php added $identifier to session class variable to avoid overlapping sessions in multiple tabs. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-29 03:10:16
|
Revision: 4847 http://web-erp.svn.sourceforge.net/web-erp/?rev=4847&view=rev Author: daintree Date: 2012-01-29 03:10:08 +0000 (Sun, 29 Jan 2012) Log Message: ----------- start on API Invoice Order method Modified Paths: -------------- trunk/api/api_php.php trunk/api/api_salesorders.php trunk/api/api_session.inc trunk/api/api_webERPsettings.php trunk/api/api_xml-rpc.php trunk/includes/DateFunctions.inc trunk/includes/GetSalesTransGLCodes.inc trunk/includes/UserLogin.php Modified: trunk/api/api_php.php =================================================================== --- trunk/api/api_php.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_php.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -12,7 +12,9 @@ include('api_errorcodes.php'); /* Include SQL_CommonFunctions.inc, to use GetNextTransNo().*/ - include($PathPrefix.'includes/SQL_CommonFunctions.inc'); + include($PathPrefix . 'includes/SQL_CommonFunctions.inc'); + /* Required for creating invoices/credits */ + include($PathPrefix . 'includes/GetSalesTransGLCode.inc'); /* Get weberp authentication, and return a valid database connection */ Modified: trunk/api/api_salesorders.php =================================================================== --- trunk/api/api_salesorders.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_salesorders.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -340,13 +340,19 @@ $OrderHeader['orderno'] = GetNextTransNo(30,$db); foreach ($OrderHeader as $key => $value) { $FieldNames.=$key.', '; - if (in_array($key, $SOH_DateFields) ) + if (in_array($key, $SOH_DateFields) ) { $value = FormatDateforSQL($value); // Fix dates - $FieldValues.='"'.$value.'", '; + } + $FieldValues.="'".$value."', "; } $sql = 'INSERT INTO salesorders ('.mb_substr($FieldNames,0,-2).") - VALUES ('" . mb_substr($FieldValues,0,-2). "')"; + VALUES (" . mb_substr($FieldValues,0,-2). ")"; if (sizeof($Errors)==0) { + + /*debug info to file + $fp = fopen( '/root/Web-Server/apidebug/api-sql.sql', "w"); + fputs($fp, $sql); + */ $result = api_DB_Query($sql, $db); if (DB_error_no($db) != 0) { $Errors[0] = DatabaseUpdateFailed; @@ -436,8 +442,9 @@ global $SOH_DateFields; $sql='UPDATE salesorders SET '; foreach ($OrderHeader as $key => $value) { - if (in_array($key, $SOH_DateFields) ) + if (in_array($key, $SOH_DateFields) ) { $value = FormatDateforSQL($value); // Fix dates + } $sql .= $key.'="'.$value.'", '; } $sql = mb_substr($sql,0,-2). " WHERE orderno='" . $OrderHeader['orderno']. "'"; @@ -495,12 +502,13 @@ $FieldNames.=$key.', '; if ($key == 'actualdispatchdate') { $value = FormatDateWithTimeForSQL($value); - } elseif ($key == 'itemdue') + } elseif ($key == 'itemdue') { $value = FormatDateForSQL($value); - $FieldValues.='"'.$value.'", '; + } + $FieldValues.= "'" . $value . "', "; } - $sql = 'INSERT INTO salesorderdetails (' . mb_substr($FieldNames,0,-2) . ") - VALUES ('" . mb_substr($FieldValues,0,-2) . "')"; + $sql = "INSERT INTO salesorderdetails (" . mb_substr($FieldNames,0,-2) . ") + VALUES (" . mb_substr($FieldValues,0,-2) . ")"; if (sizeof($Errors)==0) { $result = api_DB_Query($sql, $db); if (DB_error_no($db) != 0) { @@ -620,4 +628,609 @@ return $Errors; } } + + + function InvoiceSalesOrder($OrderNo, $User, $Password) { + $Errors = array(); + $db = db($user, $password); + if (gettype($db)=='integer') { + $Errors[0]=NoAuthorisation; + return $Errors; + } + $Errors=VerifyOrderHeaderExists($OrderNo, sizeof($Errors), $Errors, $db); + if (sizeof($Errors)!=0) { + return $Errors; + } + /*Does not deal with assembly items or serialise/lot track items - for use by POS */ + /*Get Company Defaults */ + $ReadCoyResult = api_DB_query("SELECT debtorsact, + freightact, + gllink_debtors, + gllink_stock + FROM companies + WHERE coycode=1";,$db); + + $CompanyRecord = DB_fetch_array($ReadCoyResult); + + $OrderHeaderSQL = "SELECT salesorders.debtorno, + debtorsmaster.name, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.ordertype, + salesorders.shipvia, + custbranch.area, + custbranch.taxgroupid, + debtorsmaster.currcode, + currencies.rate, + salesorders.fromstkloc, + custbranch.salesman + FROM salesorders + INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN custbranch + ON salesorders.debtorno = custbranch.debtorno + AND salesorders.branchcode = custbranch.branchcode + INNER JOIN locations + ON locations.loccode=salesorders.fromstkloc + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE salesorders.orderno = '" . $OrderNumber . "'"; + + $OrderHeaderResult = api_DB_query($OrderHeaderSQL,$db); + $OrderHeader = DB_fetch_array($OrderHeaderResult); + + $TaxProvResult = api_DB_query("SELECT taxprovinceid FROM locations WHERE loccode='" . $OrderHeader['fromstkloc'] ."'",$db); + $Result = api_DB_query($SQL,$db); + $myrow = DB_fetch_row($Result); + $DispTaxProvinceID = $myrow[0]; + + + + $LineItemsSQL = "SELECT stkcode, + unitprice, + quantity, + discountpercent, + taxcatid + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + WHERE orderno ='" . $OrderNo . "'"; + + $LineItemsResult = api_DB_query($LineItemsSQL,$db); + + /*Start an SQL transaction */ + $result = DB_Txn_Begin($db); + /*Now Get the next invoice number - function in SQL_CommonFunctions*/ + $InvoiceNo = GetNextTransNo(10, $db); + $PeriodNo = GetCurrentPeriod($db); + + $TotalFXNetInvoice = 0; + $TotalFXTax = 0; + $LineCounter =0; + + while ($OrderLineRow = DB_fetch_array($LineItemsResult)) { + + $LineNetAmount = $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] *(1- floatval($OrderLineRow['discountpercent'])); + + /*Gets the Taxes and rates applicable to this line from the TaxGroup of the branch and TaxCategory of the item + and the taxprovince of the dispatch location */ + + $SQL = "SELECT taxgrouptaxes.calculationorder, + taxauthorities.description, + taxgrouptaxes.taxauthid, + taxauthorities.taxglcode, + taxgrouptaxes.taxontax, + taxauthrates.taxrate + FROM taxauthrates INNER JOIN taxgrouptaxes ON + taxauthrates.taxauthority=taxgrouptaxes.taxauthid + INNER JOIN taxauthorities ON + taxauthrates.taxauthority=taxauthorities.taxid + WHERE taxgrouptaxes.taxgroupid='" . $OrderHeader['taxgroupid'] . "' + AND taxauthrates.dispatchtaxprovince='" . $DispTaxProvinceID . "' + AND taxauthrates.taxcatid = '" . $OrderLineRow['taxcatid'] . "' + ORDER BY taxgrouptaxes.calculationorder"; + + $GetTaxRatesResult = api_DB_query($SQL,$db,'','',true); + + $LineTaxAmount = 0; + $TaxTotals =array(); + + while ($myrow = DB_fetch_array($GetTaxRatesResult)){ + if (!isset($TaxTotals[$myrow['taxauthid']]['FXAmount'])) { + $TaxTotals[$myrow['taxauthid']]['FXAmount']=0; + } + $TaxAuthID=$myrow['taxauthid']; + $TaxTotals[$myrow['taxauthid']]['GLCode'] = $myrow['taxglcode']; + $TaxTotals[$myrow['taxauthid']]['TaxRate'] = $myrow['taxrate']; + $TaxTotals[$myrow['taxauthid']]['TaxAuthDescription'] = $myrow['description']; + + if ($myrow['taxontax'] ==1){ + $TaxAuthAmount = ($LineNetAmount+$LineTaxAmount) * $myrow['taxrate']; + $TaxTotals[$myrow['taxauthid']]['FXAmount'] += ($LineNetAmount+$LineTaxAmount) * $myrow['taxrate']; + } else { + $TaxAuthAmount = $LineNetAmount * $myrow['taxrate']; + $TaxTotals[$myrow['taxauthid']]['FXAmount'] += $LineNetAmount * $myrow['taxrate']; + } + + /*Make an array of the taxes and amounts including GLcodes for later posting - need debtortransid + so can only post once the debtor trans is posted - can only post debtor trans when all tax is calculated */ + $LineTaxes[$LineCounter][$myrow['calculationorder']] = array('TaxCalculationOrder' =>$myrow['calculationorder'], + 'TaxAuthID' =>$myrow['taxauthid'], + 'TaxAuthDescription'=>$myrow['description'], + 'TaxRate'=>$myrow['taxrate'], + 'TaxOnTax'=>$myrow['taxontax'], + 'TaxAuthAmount'=>$TaxAuthAmount); + $LineTaxAmount += $TaxAuthAmount; + + } + + $LineNetAmount = $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] *(1- floatval($OrderLineRow['discountpercent'])); + + $TotalFXNetInvoice += $LineNetAmount; + $TotalFXTax += $LineTaxAmount; + + /*Now update SalesOrderDetails for the quantity invoiced and the actual dispatch dates. */ + $SQL = "UPDATE salesorderdetails + SET qtyinvoiced = qtyinvoiced + " . $OrderLineRow['quantity'] . ", + actualdispatchdate = '" . $OrderHeader['orddate']. "', + completed='1' + WHERE orderno = '" . $OrderNo . "' + AND stkcode = '" . $OrderLineRow['stkcode'] . "'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales order detail record could not be updated because'); + $DbgMsg = _('The following SQL to update the sales order detail record was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + + // Insert stock movements - with unit cost + $LocalCurrencyPrice= ($OrderLineRow['unitprice'] *(1- floatval($OrderLineRow['discountpercent'])))/ $OrderHeader['rate']; + + + +/*Can't assume dummy/service items need the cogs stuff here too */ + + + + // its a dummy item dummies always have nil stock (by definition so new qty on hand will be nil + $SQL = "INSERT INTO stockmoves ( + stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost) + VALUES ( + '" . $OrderLineRow['stkcode'] . "', + '10', + '" . $InvoiceNo . "', + '" . $OrderHeader['fromstkloc'] . "', + '" . $OrderHeader['orddate'] . "', + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLineRow['quantity'] . "', + '" . $OrderLineRow['discountpercent'] . "', + '0')"; + + $Result = api_DB_query($SQL,$db,'','',true); + + /*Get the ID of the StockMove... */ + $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); + + /*Insert the taxes that applied to this line */ + foreach ($LineTaxes[$LineCounter] as $Tax) { + + $SQL = "INSERT INTO stockmovestaxes (stkmoveno, + taxauthid, + taxrate, + taxcalculationorder, + taxontax) + VALUES ('" . $StkMoveNo . "', + '" . $Tax['TaxAuthID'] . "', + '" . $Tax['TaxRate'] . "', + '" . $Tax['TaxCalculationOrder'] . "', + '" . $Tax['TaxOnTax'] . "')"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Taxes and rates applicable to this invoice line item could not be inserted because'); + $DbgMsg = _('The following SQL to insert the stock movement tax detail records was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + } + /*Insert Sales Analysis records */ + + $SQL="SELECT COUNT(*), + salesanalysis.stkcategory, + salesanalysis.area, + salesanalysis.salesperson, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.stockid + FROM salesanalysis, + custbranch, + stockmaster + WHERE salesanalysis.stkcategory=stockmaster.categoryid + AND salesanalysis.stockid=stockmaster.stockid + AND salesanalysis.cust=custbranch.debtorno + AND salesanalysis.custbranch=custbranch.branchcode + AND salesanalysis.area=custbranch.area + AND salesanalysis.salesperson=custbranch.salesman + AND salesanalysis.typeabbrev ='" . $OrderHeader['ordertype'] . "' + AND salesanalysis.periodno='" . $PeriodNo . "' + AND salesanalysis.cust " . LIKE . " '" . $OrderHeader['debtorno'] . "' + AND salesanalysis.custbranch " . LIKE . " '" . $OrderHeader['branchcode'] . "' + AND salesanalysis.stockid " . LIKE . " '" . $OrderLineRow['stkcode'] . "' + AND salesanalysis.budgetoractual='1' + GROUP BY salesanalysis.stockid, + salesanalysis.stkcategory, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.area, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.salesperson"; + + $ErrMsg = _('The count of existing Sales analysis records could not run because'); + $DbgMsg = _('SQL to count the no of sales analysis records'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + + $myrow = DB_fetch_row($Result); + + if ($myrow[0]>0){ /*Update the existing record that already exists */ + + $SQL = "UPDATE salesanalysis + SET amt=amt+" . filter_number_format($OrderLineRow['unitprice'] * $OrderLineRow['quantity'] / $OrderHeader['rate']) . ", + qty=qty +" . $OrderLineRow['quantity'] . ", + disc=disc+" . filter_number_format($OrderLineRow['discountpercent'] * $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] / $OrderHeader['rate']) . " + WHERE salesanalysis.area='" . $myrow[2] . "' + AND salesanalysis.salesperson='" . $myrow[3] . "' + AND typeabbrev ='" . $OrderHeader['ordertype'] . "' + AND periodno = '" . $PeriodNo . "' + AND cust " . LIKE . " '" . $OrderHeader['debtorno'] . "' + AND custbranch " . LIKE . " '" . $OrderHeader['branchcode'] . "' + AND stockid " . LIKE . " '" . $OrderLineRow['stkcode'] . "' + AND salesanalysis.stkcategory ='" . $myrow[1] . "' + AND budgetoractual='1'"; + + } else { /* insert a new sales analysis record */ + + $SQL = "INSERT INTO salesanalysis ( typeabbrev, + periodno, + amt, + cost, + cust, + custbranch, + qty, + disc, + stockid, + area, + budgetoractual, + salesperson, + stkcategory ) + SELECT '" . $OrderHeader['ordertype']. "', + '" . $PeriodNo . "', + '" . $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] / $OrderHeader['rate'] . "', + 0, + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $OrderLineRow['quantity'] . "', + '" . $OrderLineRow['discountpercent'] * $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] / $OrderHeader['rate'] . "', + '" . $OrderLineRow['stkcode'] . "', + custbranch.area, + 1, + custbranch.salesman, + stockmaster.categoryid + FROM stockmaster, custbranch + WHERE stockmaster.stockid = '" . $OrderLineRow['stkcode'] . "' + AND custbranch.debtorno = '" . $OrderHeader['debtorno'] . "' + AND custbranch.branchcode='" . $OrderHeader['branchcode'] . "'"; + } + + $Result = api_DB_query($SQL,$db,'','',true); + + if ($CompanyRecord['gllink_debtors']==1 AND $OrderLineRow['unitprice'] !=0){ + + //Post sales transaction to GL credit sales + $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLineRow['stkcode'], $OrderHeader['ordertype'], $db); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) + VALUES ('10', + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['salesglcode'] . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . " x " . $OrderLineRow['quantity'] . " @ " . $OrderLineRow['unitprice'] . "', + '" . -$OrderLineRow['unitprice'] * $OrderLineRow['quantity']/$OrderHeader['rate'] . "' + )"; + $Result = api_DB_query($SQL,$db,'','',true); + + /* We also need the COGS stuff in here */ + + + + + + + + + + + + + + + + + + + + + + if ($OrderLineRow['discountpercent'] !=0){ + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ('10', + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . ' @ ' . ($OrderLineRow['discountpercent'] * 100) . "%', + '" . $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] * $OrderLineRow['discountpercent']/$OrderHeader['rate'] . "' )"; + + $Result = api_DB_query($SQL,$db,'','',true); + + } /*end of if discount !=0 */ + + } /*end of if sales integrated with gl */ + + $LineCounter++; + } /*end of OrderLine loop */ + + $TotalInvLocalCurr = ($TotalFXNetInvoice + $TotalFXTax)/$OrderHeader['rate']; + + if ($CompanyRecord['gllink_debtors']==1){ + + /*Now post the tax to the GL at local currency equivalent */ + if ($CompanyRecord['gllink_debtors']==1 AND $TaxAuthAmount !=0) { + + + /*Loop through the tax authorities array to post each total to the taxauth glcode */ + foreach ($TaxTotals as $Tax){ + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) + VALUES (10, + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate']. "', + '" . $PeriodNo . "', + '" . $Tax['GLCode'] . "', + '" . $OrderHeader['debtorno'] . "-" . $Tax['TaxAuthDescription'] . "', + '" . -$Tax['FXAmount']/$OrderHeader['rate'] . "' )"; + + $Result = api_DB_query($SQL,$db,'','',true); + } + } + + /*Post debtors transaction to GL debit debtors, credit freight re-charged and credit sales */ + if (($TotalInvLocalCurr) !=0) { + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ('10', + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $CompanyRecord['debtorsact'] . "', + '" . $OrderHeader['debtorno'] . "', + '" . $TotalInvLocalCurr . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + } + + + } /*end of if Sales and GL integrated */ + + /*Update order header for invoice charged on */ + $SQL = "UPDATE salesorders SET comments = CONCAT(comments,' Inv ','" . $InvoiceNo . "') WHERE orderno= '" . $OrderNo . "'"; + $Result = api_DB_query($SQL,$db,'','',true); + + /*Now insert the DebtorTrans */ + + $SQL = "INSERT INTO debtortrans (transno, + type, + debtorno, + branchcode, + trandate, + inputdate, + prd, + reference, + tpe, + order_, + ovamount, + ovgst, + rate, + shipvia) + VALUES ( + '". $InvoiceNo . "', + 10, + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $OrderHeader['orddate'] . "', + '" . date('Y-m-d H-i-s') . "', + '" . $PeriodNo . "', + '" . $OrderHeader['customerref'] . "', + '" . $OrderHeader['sales_type'] . "', + '" . $OrderNo . "', + '" . $TotalFXNetInvoice . "', + '" . $TotalFXTax . "', + '" . $OrderHeader['rate'] . "', + '" . $OrderHeader['shipvia'] . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + + $DebtorTransID = DB_Last_Insert_ID($db,'debtortrans','id'); + + /*for each Tax - need to insert into debtortranstaxes */ + + + + $SQL = "INSERT INTO debtortranstaxes (debtortransid, + taxauthid, + taxamount) + VALUES ('" . $DebtorTransID . "', + '" . $TaxAuthID . "', + '" . $Tax['FXAmount']/$OrderHeader['rate'] . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + + $Result = DB_Txn_Commit($db); + + if (sizeof($Errors)==0) { + $Errors[0]=0; + $Errors[1]=$InvoiceNo; + } + return $Errors; + + + + } + + + function GetCurrentPeriod (&$db) { + + $TransDate = mktime(); //The current date to find the period for + /* Find the unix timestamp of the last period end date in periods table */ + $sql = "SELECT MAX(lastdate_in_period), MAX(periodno) from periods"; + $result = DB_query($sql, $db); + $myrow=DB_fetch_row($result); + + if (is_null($myrow[0])){ + $InsertFirstPeriodResult = api_DB_query("INSERT INTO periods VALUES (0,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))) . "')",$db); + $InsertFirstPeriodResult = api_DB_query("INSERT INTO periods VALUES (1,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+2,0,Date('Y'))) . "')",$db); + $LastPeriod=1; + $LastPeriodEnd = mktime(0,0,0,Date('m')+2,0,Date('Y')); + } else { + $Date_Array = explode('-', $myrow[0]); + $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+1,0,(int)$Date_Array[0]); + $LastPeriod = $myrow[1]; + } + /* Find the unix timestamp of the first period end date in periods table */ + $sql = "SELECT MIN(lastdate_in_period), MIN(periodno) from periods"; + $result = api_DB_query($sql, $db); + $myrow=DB_fetch_row($result); + $Date_Array = explode('-', $myrow[0]); + $FirstPeriodEnd = mktime(0,0,0,$Date_Array[1],0,(int)$Date_Array[0]); + $FirstPeriod = $myrow[1]; + + /* If the period number doesn't exist */ + if (!PeriodExists($TransDate, $db)) { + /* if the transaction is after the last period */ + if ($TransDate > $LastPeriodEnd) { + + $PeriodEnd = mktime(0,0,0,Date('m', $TransDate)+1, 0, Date('Y', $TransDate)); + + while ($PeriodEnd >= $LastPeriodEnd) { + if (Date('m', $LastPeriodEnd)<=13) { + $LastPeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+2, 0, Date('Y', $LastPeriodEnd)); + } else { + $LastPeriodEnd = mktime(0,0,0,2, 0, Date('Y', $LastPeriodEnd)+1); + } + $LastPeriod++; + CreatePeriod($LastPeriod, $LastPeriodEnd, $db); + } + } else { + /* The transaction is before the first period */ + $PeriodEnd = mktime(0,0,0,Date('m', $TransDate), 0, Date('Y', $TransDate)); + $Period = $FirstPeriod - 1; + while ($FirstPeriodEnd > $PeriodEnd) { + CreatePeriod($Period, $FirstPeriodEnd, $db); + $Period--; + if (Date('m', $FirstPeriodEnd)>0) { + $FirstPeriodEnd = mktime(0,0,0,Date('m', $FirstPeriodEnd), 0, Date('Y', $FirstPeriodEnd)); + } else { + $FirstPeriodEnd = mktime(0,0,0,13, 0, Date('Y', $FirstPeriodEnd)); + } + } + } + } else if (!PeriodExists(mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)), $db)) { + /* Make sure the following months period exists */ + $sql = "SELECT MAX(lastdate_in_period), MAX(periodno) from periods"; + $result = DB_query($sql, $db); + $myrow=DB_fetch_row($result); + $Date_Array = explode('-', $myrow[0]); + $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+2,0,(int)$Date_Array[0]); + $LastPeriod = $myrow[1]; + CreatePeriod($LastPeriod+1, $LastPeriodEnd, $db); + } + + /* Now return the period number of the transaction */ + + $MonthAfterTransDate = Mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)); + $GetPrdSQL = "SELECT periodno + FROM periods + WHERE lastdate_in_period < '" . Date('Y-m-d', $MonthAfterTransDate) . "' + AND lastdate_in_period >= '" . Date('Y-m-d', $TransDate) . "'"; + + $ErrMsg = _('An error occurred in retrieving the period number'); + $GetPrdResult = DB_query($GetPrdSQL,$db,$ErrMsg); + $myrow = DB_fetch_row($GetPrdResult); + + return $myrow[0]; + } + + function PeriodExists($TransDate, &$db) { + + /* Find the date a month on */ + $MonthAfterTransDate = Mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)); + + $GetPrdSQL = "SELECT periodno FROM periods WHERE lastdate_in_period < '" . Date('Y/m/d', $MonthAfterTransDate) . "' AND lastdate_in_period >= '" . Date('Y/m/d', $TransDate) . "'"; + + $GetPrdResult = api_DB_query($GetPrdSQL,$db,$ErrMsg); + + if (DB_num_rows($GetPrdResult)==0) { + return false; + } else { + return true; + } + + } + + function CreatePeriod($PeriodNo, $PeriodEnd, &$db) { + $InsertPrdSQL = "INSERT INTO periods (periodno, + lastdate_in_period) + VALUES ('" . $PeriodNo . "', + '" . Date('Y-m-d', $PeriodEnd) . "')"; + + $InsertPrdResult = api_DB_query($InsertPrdSQL, $db); + } + + ?> \ No newline at end of file Modified: trunk/api/api_session.inc =================================================================== --- trunk/api/api_session.inc 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_session.inc 2012-01-29 03:10:08 UTC (rev 4847) @@ -4,13 +4,7 @@ if (!isset($PathPrefix)) { $PathPrefix=''; } -if (!file_exists($PathPrefix . 'config.php')){ - $rootpath = dirname(htmlspecialchars($_SERVER['PHP_SELF'])); - if ($rootpath == '/' OR $rootpath == "\\") { - $rootpath = ''; - } - header('Location:' . $rootpath . '/install/index.php'); -} + include($PathPrefix . 'config.php'); if (isset($SessionSavePath)){ @@ -51,41 +45,7 @@ // value must be set in the script before header.inc is included. $SecurityGroups is an array of // arrays defining access for each group of users. These definitions can be modified by a system admin under setup -if (isset($_SESSION['AllowedPageSecurityTokens']) AND !is_array($_SESSION['AllowedPageSecurityTokens']) AND !isset($AllowAnyone)) { -/* NO HTML output - but may need an XMLRPC style error message here. - Lindsay: 12Jan10 - $title = _('Account Error Report'); - include($PathPrefix . 'includes/header.inc'); - echo '<br /><br /><br />'; - prnMsg(_('Security settings have not been defined for your user account. Please advise your system administrator. It could also be that there is a session problem with your PHP web server'),'error'); - include($PathPrefix . 'includes/footer.inc'); - */ - exit; -} -if (!isset($AllowAnyone)){ - if ((!in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { -/* NO HTML output - but need to return an appropriate error message - Lindsay: 12Jan10 - $title = _('Security Permissions Problem'); - include($PathPrefix . 'includes/header.inc'); - echo '<tr> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr><td class="menu_group_item">'; - echo '<b><font style="size:+1; text-align:center;">' . _('The security settings on your account do not permit you to access this function') . '</font></b>'; - - echo '</td> - </tr> - </table> - </td>'; - - include($PathPrefix . 'includes/footer.inc'); - */ - exit; - } - } - function CryptPass( $Password ) { global $CryptFunction; if ( $CryptFunction == 'sha1' ) { @@ -105,13 +65,11 @@ // data. $result = DB_query($sql, $db, $Emsg, $Dmsg, $Transaction, $TrapErrors); - if (DB_error_no($db) != 0) - { - $_SESSION['db_err_msg'] = "SQL: " . $sql . "\nDB error message: " . - DB_error_msg($db) . "\n"; - } - else - $_SESSION['db_err_msg'] = ''; + if (DB_error_no($db) != 0) { + $_SESSION['db_err_msg'] = "SQL: " . $sql . "\nDB error message: " . DB_error_msg($db) . "\n"; + } else { + $_SESSION['db_err_msg'] = ''; + } return $result; } Modified: trunk/api/api_webERPsettings.php =================================================================== --- trunk/api/api_webERPsettings.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_webERPsettings.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -73,4 +73,22 @@ return $ReturnValue; } +/* This function returns the default shipper in webERP. + */ + + function GetDefaultShipper($user, $password) { + $Errors = array(); + $db = db($user, $password); + if (gettype($db)=='integer') { + $Errors[0]=NoAuthorisation; + return $Errors; + } + $sql = "SELECT confvalue from config WHERE confname='Default_Shipper'"; + $result = DB_query($sql, $db); + $answer=DB_fetch_array($result); + $ReturnValue[0]=0; + $ReturnValue[1]=$answer; + return $ReturnValue; + } + ?> Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_xml-rpc.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -2718,7 +2718,7 @@ /*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultDateFormat($xmlrpcmsg->getParam( 0 )->scalarval( ), /*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); /*x*/ } else { -/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultDateFormat( '', ''))); +/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultDateFormat( '', ''))); /*x*/ } ob_end_flush(); return $rtn; @@ -2728,6 +2728,37 @@ unset($Parameter); unset($ReturnValue); + $Description = _('Returns the webERP default shipper'); + $Parameter[0]['name'] = _('User name'); + $Parameter[0]['description'] = _('A valid weberp username. This user should have security access to this data.'); + $Parameter[1]['name'] = _('User password'); + $Parameter[1]['description'] = _('The weberp password associated with this user name. '); + $ReturnValue[0] = _('If successful this function returns an array of two elements the first should contain an integer of zero for successful and the second an associative arrat containing the key of confvalue the value of which is the Default_Shipper.') + ._('Otherwise an array of error codes is returned. '); + +/*E*/$GetDefaultShipper_sig = array(array($xmlrpcStruct), +/*x*/ array($xmlrpcStruct,$xmlrpcString,$xmlrpcString)); + $GetDefaultShipper_doc = apiBuildDocHTML( $Description,$Parameter,$ReturnValue ); + + function xmlrpc_GetDefaultShipper($xmlrpcmsg){ + ob_start('ob_file_callback'); +/*x*/ if ($xmlrpcmsg->getNumParams() == 2) +/*x*/ { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultShipper($xmlrpcmsg->getParam( 0 )->scalarval( ), +/*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); +/*x*/ } else { +/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultShipper( '', ''))); +/*x*/ } + ob_end_flush(); + return $rtn; + } + + unset($Description); + unset($Parameter); + unset($ReturnValue); + + + $Description = _('Returns the webERP default location'); $Parameter[0]['name'] = _('User name'); $Parameter[0]['description'] = _('A valid weberp username. This user should have security access to this data.'); @@ -3199,6 +3230,10 @@ "function" => "xmlrpc_GetDefaultDateFormat", "signature" => $GetDefaultDateFormat_sig, "docstring" => $GetDefaultDateFormat_doc), + "weberp.xmlrpc_GetDefaultShipper" => array( + "function" => "xmlrpc_GetDefaultShipper", + "signature" => $GetDefaultShipper_sig, + "docstring" => $GetDefaultShipper_doc), "weberp.xmlrpc_GetDefaultCurrency" => array( "function" => "xmlrpc_GetDefaultCurrency", "signature" => $GetDefaultCurrency_sig, Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/includes/DateFunctions.inc 2012-01-29 03:10:08 UTC (rev 4847) @@ -821,19 +821,6 @@ $ErrMsg = _('An error occurred in adding a new period number'); $GetPrdResult = DB_query($GetPrdSQL, $db, $ErrMsg); -/*I don't think this is necessary since GLPostings.inc handles this - * - $sql = "INSERT INTO chartdetails (accountcode, period) - SELECT chartmaster.accountcode, periods.periodno - FROM chartmaster - CROSS JOIN periods - WHERE ( chartmaster.accountcode, periods.periodno ) NOT - IN ( SELECT chartdetails.accountcode, chartdetails.period FROM chartdetails )"; - -//dont trap errors - chart details records created only as required - duplicate messages ignored - $InsNewChartDetails = DB_query($sql,$db,'','','',false); -*/ - } function PeriodExists($TransDate, &$db) { Modified: trunk/includes/GetSalesTransGLCodes.inc =================================================================== --- trunk/includes/GetSalesTransGLCodes.inc 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/includes/GetSalesTransGLCodes.inc 2012-01-29 03:10:08 UTC (rev 4847) @@ -167,11 +167,11 @@ */ $SQL = "SELECT salesglcode, - discountglcode - FROM salesglpostings - WHERE area = '" . $Area . "' - AND stkcat = '" . $StockCategory . "' - AND salestype = '". $SalesType . "'"; + discountglcode + FROM salesglpostings + WHERE area = '" . $Area . "' + AND stkcat = '" . $StockCategory . "' + AND salestype = '". $SalesType . "'"; $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg); Modified: trunk/includes/UserLogin.php =================================================================== --- trunk/includes/UserLogin.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/includes/UserLogin.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -37,10 +37,10 @@ return UL_SHOWLOGIN; } $sql = "SELECT * - FROM www_users - WHERE www_users.userid='" . $Name . "' - AND (www_users.password='" . CryptPass($Password) . "' - OR www_users.password='" . $Password . "')"; + FROM www_users + WHERE www_users.userid='" . $Name . "' + AND (www_users.password='" . CryptPass($Password) . "' + OR www_users.password='" . $Password . "')"; $ErrMsg = _('Could not retrieve user details on login because'); $debug =1; $Auth_Result = DB_query($sql, $db,$ErrMsg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-29 03:10:16
|
Revision: 4847 http://web-erp.svn.sourceforge.net/web-erp/?rev=4847&view=rev Author: daintree Date: 2012-01-29 03:10:08 +0000 (Sun, 29 Jan 2012) Log Message: ----------- start on API Invoice Order method Modified Paths: -------------- trunk/api/api_php.php trunk/api/api_salesorders.php trunk/api/api_session.inc trunk/api/api_webERPsettings.php trunk/api/api_xml-rpc.php trunk/includes/DateFunctions.inc trunk/includes/GetSalesTransGLCodes.inc trunk/includes/UserLogin.php Modified: trunk/api/api_php.php =================================================================== --- trunk/api/api_php.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_php.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -12,7 +12,9 @@ include('api_errorcodes.php'); /* Include SQL_CommonFunctions.inc, to use GetNextTransNo().*/ - include($PathPrefix.'includes/SQL_CommonFunctions.inc'); + include($PathPrefix . 'includes/SQL_CommonFunctions.inc'); + /* Required for creating invoices/credits */ + include($PathPrefix . 'includes/GetSalesTransGLCode.inc'); /* Get weberp authentication, and return a valid database connection */ Modified: trunk/api/api_salesorders.php =================================================================== --- trunk/api/api_salesorders.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_salesorders.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -340,13 +340,19 @@ $OrderHeader['orderno'] = GetNextTransNo(30,$db); foreach ($OrderHeader as $key => $value) { $FieldNames.=$key.', '; - if (in_array($key, $SOH_DateFields) ) + if (in_array($key, $SOH_DateFields) ) { $value = FormatDateforSQL($value); // Fix dates - $FieldValues.='"'.$value.'", '; + } + $FieldValues.="'".$value."', "; } $sql = 'INSERT INTO salesorders ('.mb_substr($FieldNames,0,-2).") - VALUES ('" . mb_substr($FieldValues,0,-2). "')"; + VALUES (" . mb_substr($FieldValues,0,-2). ")"; if (sizeof($Errors)==0) { + + /*debug info to file + $fp = fopen( '/root/Web-Server/apidebug/api-sql.sql', "w"); + fputs($fp, $sql); + */ $result = api_DB_Query($sql, $db); if (DB_error_no($db) != 0) { $Errors[0] = DatabaseUpdateFailed; @@ -436,8 +442,9 @@ global $SOH_DateFields; $sql='UPDATE salesorders SET '; foreach ($OrderHeader as $key => $value) { - if (in_array($key, $SOH_DateFields) ) + if (in_array($key, $SOH_DateFields) ) { $value = FormatDateforSQL($value); // Fix dates + } $sql .= $key.'="'.$value.'", '; } $sql = mb_substr($sql,0,-2). " WHERE orderno='" . $OrderHeader['orderno']. "'"; @@ -495,12 +502,13 @@ $FieldNames.=$key.', '; if ($key == 'actualdispatchdate') { $value = FormatDateWithTimeForSQL($value); - } elseif ($key == 'itemdue') + } elseif ($key == 'itemdue') { $value = FormatDateForSQL($value); - $FieldValues.='"'.$value.'", '; + } + $FieldValues.= "'" . $value . "', "; } - $sql = 'INSERT INTO salesorderdetails (' . mb_substr($FieldNames,0,-2) . ") - VALUES ('" . mb_substr($FieldValues,0,-2) . "')"; + $sql = "INSERT INTO salesorderdetails (" . mb_substr($FieldNames,0,-2) . ") + VALUES (" . mb_substr($FieldValues,0,-2) . ")"; if (sizeof($Errors)==0) { $result = api_DB_Query($sql, $db); if (DB_error_no($db) != 0) { @@ -620,4 +628,609 @@ return $Errors; } } + + + function InvoiceSalesOrder($OrderNo, $User, $Password) { + $Errors = array(); + $db = db($user, $password); + if (gettype($db)=='integer') { + $Errors[0]=NoAuthorisation; + return $Errors; + } + $Errors=VerifyOrderHeaderExists($OrderNo, sizeof($Errors), $Errors, $db); + if (sizeof($Errors)!=0) { + return $Errors; + } + /*Does not deal with assembly items or serialise/lot track items - for use by POS */ + /*Get Company Defaults */ + $ReadCoyResult = api_DB_query("SELECT debtorsact, + freightact, + gllink_debtors, + gllink_stock + FROM companies + WHERE coycode=1";,$db); + + $CompanyRecord = DB_fetch_array($ReadCoyResult); + + $OrderHeaderSQL = "SELECT salesorders.debtorno, + debtorsmaster.name, + salesorders.branchcode, + salesorders.customerref, + salesorders.orddate, + salesorders.ordertype, + salesorders.shipvia, + custbranch.area, + custbranch.taxgroupid, + debtorsmaster.currcode, + currencies.rate, + salesorders.fromstkloc, + custbranch.salesman + FROM salesorders + INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN custbranch + ON salesorders.debtorno = custbranch.debtorno + AND salesorders.branchcode = custbranch.branchcode + INNER JOIN locations + ON locations.loccode=salesorders.fromstkloc + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + WHERE salesorders.orderno = '" . $OrderNumber . "'"; + + $OrderHeaderResult = api_DB_query($OrderHeaderSQL,$db); + $OrderHeader = DB_fetch_array($OrderHeaderResult); + + $TaxProvResult = api_DB_query("SELECT taxprovinceid FROM locations WHERE loccode='" . $OrderHeader['fromstkloc'] ."'",$db); + $Result = api_DB_query($SQL,$db); + $myrow = DB_fetch_row($Result); + $DispTaxProvinceID = $myrow[0]; + + + + $LineItemsSQL = "SELECT stkcode, + unitprice, + quantity, + discountpercent, + taxcatid + FROM salesorderdetails INNER JOIN stockmaster + ON salesorderdetails.stkcode = stockmaster.stockid + WHERE orderno ='" . $OrderNo . "'"; + + $LineItemsResult = api_DB_query($LineItemsSQL,$db); + + /*Start an SQL transaction */ + $result = DB_Txn_Begin($db); + /*Now Get the next invoice number - function in SQL_CommonFunctions*/ + $InvoiceNo = GetNextTransNo(10, $db); + $PeriodNo = GetCurrentPeriod($db); + + $TotalFXNetInvoice = 0; + $TotalFXTax = 0; + $LineCounter =0; + + while ($OrderLineRow = DB_fetch_array($LineItemsResult)) { + + $LineNetAmount = $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] *(1- floatval($OrderLineRow['discountpercent'])); + + /*Gets the Taxes and rates applicable to this line from the TaxGroup of the branch and TaxCategory of the item + and the taxprovince of the dispatch location */ + + $SQL = "SELECT taxgrouptaxes.calculationorder, + taxauthorities.description, + taxgrouptaxes.taxauthid, + taxauthorities.taxglcode, + taxgrouptaxes.taxontax, + taxauthrates.taxrate + FROM taxauthrates INNER JOIN taxgrouptaxes ON + taxauthrates.taxauthority=taxgrouptaxes.taxauthid + INNER JOIN taxauthorities ON + taxauthrates.taxauthority=taxauthorities.taxid + WHERE taxgrouptaxes.taxgroupid='" . $OrderHeader['taxgroupid'] . "' + AND taxauthrates.dispatchtaxprovince='" . $DispTaxProvinceID . "' + AND taxauthrates.taxcatid = '" . $OrderLineRow['taxcatid'] . "' + ORDER BY taxgrouptaxes.calculationorder"; + + $GetTaxRatesResult = api_DB_query($SQL,$db,'','',true); + + $LineTaxAmount = 0; + $TaxTotals =array(); + + while ($myrow = DB_fetch_array($GetTaxRatesResult)){ + if (!isset($TaxTotals[$myrow['taxauthid']]['FXAmount'])) { + $TaxTotals[$myrow['taxauthid']]['FXAmount']=0; + } + $TaxAuthID=$myrow['taxauthid']; + $TaxTotals[$myrow['taxauthid']]['GLCode'] = $myrow['taxglcode']; + $TaxTotals[$myrow['taxauthid']]['TaxRate'] = $myrow['taxrate']; + $TaxTotals[$myrow['taxauthid']]['TaxAuthDescription'] = $myrow['description']; + + if ($myrow['taxontax'] ==1){ + $TaxAuthAmount = ($LineNetAmount+$LineTaxAmount) * $myrow['taxrate']; + $TaxTotals[$myrow['taxauthid']]['FXAmount'] += ($LineNetAmount+$LineTaxAmount) * $myrow['taxrate']; + } else { + $TaxAuthAmount = $LineNetAmount * $myrow['taxrate']; + $TaxTotals[$myrow['taxauthid']]['FXAmount'] += $LineNetAmount * $myrow['taxrate']; + } + + /*Make an array of the taxes and amounts including GLcodes for later posting - need debtortransid + so can only post once the debtor trans is posted - can only post debtor trans when all tax is calculated */ + $LineTaxes[$LineCounter][$myrow['calculationorder']] = array('TaxCalculationOrder' =>$myrow['calculationorder'], + 'TaxAuthID' =>$myrow['taxauthid'], + 'TaxAuthDescription'=>$myrow['description'], + 'TaxRate'=>$myrow['taxrate'], + 'TaxOnTax'=>$myrow['taxontax'], + 'TaxAuthAmount'=>$TaxAuthAmount); + $LineTaxAmount += $TaxAuthAmount; + + } + + $LineNetAmount = $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] *(1- floatval($OrderLineRow['discountpercent'])); + + $TotalFXNetInvoice += $LineNetAmount; + $TotalFXTax += $LineTaxAmount; + + /*Now update SalesOrderDetails for the quantity invoiced and the actual dispatch dates. */ + $SQL = "UPDATE salesorderdetails + SET qtyinvoiced = qtyinvoiced + " . $OrderLineRow['quantity'] . ", + actualdispatchdate = '" . $OrderHeader['orddate']. "', + completed='1' + WHERE orderno = '" . $OrderNo . "' + AND stkcode = '" . $OrderLineRow['stkcode'] . "'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales order detail record could not be updated because'); + $DbgMsg = _('The following SQL to update the sales order detail record was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + + // Insert stock movements - with unit cost + $LocalCurrencyPrice= ($OrderLineRow['unitprice'] *(1- floatval($OrderLineRow['discountpercent'])))/ $OrderHeader['rate']; + + + +/*Can't assume dummy/service items need the cogs stuff here too */ + + + + // its a dummy item dummies always have nil stock (by definition so new qty on hand will be nil + $SQL = "INSERT INTO stockmoves ( + stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost) + VALUES ( + '" . $OrderLineRow['stkcode'] . "', + '10', + '" . $InvoiceNo . "', + '" . $OrderHeader['fromstkloc'] . "', + '" . $OrderHeader['orddate'] . "', + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLineRow['quantity'] . "', + '" . $OrderLineRow['discountpercent'] . "', + '0')"; + + $Result = api_DB_query($SQL,$db,'','',true); + + /*Get the ID of the StockMove... */ + $StkMoveNo = DB_Last_Insert_ID($db,'stockmoves','stkmoveno'); + + /*Insert the taxes that applied to this line */ + foreach ($LineTaxes[$LineCounter] as $Tax) { + + $SQL = "INSERT INTO stockmovestaxes (stkmoveno, + taxauthid, + taxrate, + taxcalculationorder, + taxontax) + VALUES ('" . $StkMoveNo . "', + '" . $Tax['TaxAuthID'] . "', + '" . $Tax['TaxRate'] . "', + '" . $Tax['TaxCalculationOrder'] . "', + '" . $Tax['TaxOnTax'] . "')"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Taxes and rates applicable to this invoice line item could not be inserted because'); + $DbgMsg = _('The following SQL to insert the stock movement tax detail records was used'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + } + /*Insert Sales Analysis records */ + + $SQL="SELECT COUNT(*), + salesanalysis.stkcategory, + salesanalysis.area, + salesanalysis.salesperson, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.stockid + FROM salesanalysis, + custbranch, + stockmaster + WHERE salesanalysis.stkcategory=stockmaster.categoryid + AND salesanalysis.stockid=stockmaster.stockid + AND salesanalysis.cust=custbranch.debtorno + AND salesanalysis.custbranch=custbranch.branchcode + AND salesanalysis.area=custbranch.area + AND salesanalysis.salesperson=custbranch.salesman + AND salesanalysis.typeabbrev ='" . $OrderHeader['ordertype'] . "' + AND salesanalysis.periodno='" . $PeriodNo . "' + AND salesanalysis.cust " . LIKE . " '" . $OrderHeader['debtorno'] . "' + AND salesanalysis.custbranch " . LIKE . " '" . $OrderHeader['branchcode'] . "' + AND salesanalysis.stockid " . LIKE . " '" . $OrderLineRow['stkcode'] . "' + AND salesanalysis.budgetoractual='1' + GROUP BY salesanalysis.stockid, + salesanalysis.stkcategory, + salesanalysis.cust, + salesanalysis.custbranch, + salesanalysis.area, + salesanalysis.periodno, + salesanalysis.typeabbrev, + salesanalysis.salesperson"; + + $ErrMsg = _('The count of existing Sales analysis records could not run because'); + $DbgMsg = _('SQL to count the no of sales analysis records'); + $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + + $myrow = DB_fetch_row($Result); + + if ($myrow[0]>0){ /*Update the existing record that already exists */ + + $SQL = "UPDATE salesanalysis + SET amt=amt+" . filter_number_format($OrderLineRow['unitprice'] * $OrderLineRow['quantity'] / $OrderHeader['rate']) . ", + qty=qty +" . $OrderLineRow['quantity'] . ", + disc=disc+" . filter_number_format($OrderLineRow['discountpercent'] * $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] / $OrderHeader['rate']) . " + WHERE salesanalysis.area='" . $myrow[2] . "' + AND salesanalysis.salesperson='" . $myrow[3] . "' + AND typeabbrev ='" . $OrderHeader['ordertype'] . "' + AND periodno = '" . $PeriodNo . "' + AND cust " . LIKE . " '" . $OrderHeader['debtorno'] . "' + AND custbranch " . LIKE . " '" . $OrderHeader['branchcode'] . "' + AND stockid " . LIKE . " '" . $OrderLineRow['stkcode'] . "' + AND salesanalysis.stkcategory ='" . $myrow[1] . "' + AND budgetoractual='1'"; + + } else { /* insert a new sales analysis record */ + + $SQL = "INSERT INTO salesanalysis ( typeabbrev, + periodno, + amt, + cost, + cust, + custbranch, + qty, + disc, + stockid, + area, + budgetoractual, + salesperson, + stkcategory ) + SELECT '" . $OrderHeader['ordertype']. "', + '" . $PeriodNo . "', + '" . $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] / $OrderHeader['rate'] . "', + 0, + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $OrderLineRow['quantity'] . "', + '" . $OrderLineRow['discountpercent'] * $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] / $OrderHeader['rate'] . "', + '" . $OrderLineRow['stkcode'] . "', + custbranch.area, + 1, + custbranch.salesman, + stockmaster.categoryid + FROM stockmaster, custbranch + WHERE stockmaster.stockid = '" . $OrderLineRow['stkcode'] . "' + AND custbranch.debtorno = '" . $OrderHeader['debtorno'] . "' + AND custbranch.branchcode='" . $OrderHeader['branchcode'] . "'"; + } + + $Result = api_DB_query($SQL,$db,'','',true); + + if ($CompanyRecord['gllink_debtors']==1 AND $OrderLineRow['unitprice'] !=0){ + + //Post sales transaction to GL credit sales + $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLineRow['stkcode'], $OrderHeader['ordertype'], $db); + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) + VALUES ('10', + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['salesglcode'] . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . " x " . $OrderLineRow['quantity'] . " @ " . $OrderLineRow['unitprice'] . "', + '" . -$OrderLineRow['unitprice'] * $OrderLineRow['quantity']/$OrderHeader['rate'] . "' + )"; + $Result = api_DB_query($SQL,$db,'','',true); + + /* We also need the COGS stuff in here */ + + + + + + + + + + + + + + + + + + + + + + if ($OrderLineRow['discountpercent'] !=0){ + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ('10', + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $OrderHeader['debtorno'] . " - " . $OrderLineRow['stkcode'] . ' @ ' . ($OrderLineRow['discountpercent'] * 100) . "%', + '" . $OrderLineRow['unitprice'] * $OrderLineRow['quantity'] * $OrderLineRow['discountpercent']/$OrderHeader['rate'] . "' )"; + + $Result = api_DB_query($SQL,$db,'','',true); + + } /*end of if discount !=0 */ + + } /*end of if sales integrated with gl */ + + $LineCounter++; + } /*end of OrderLine loop */ + + $TotalInvLocalCurr = ($TotalFXNetInvoice + $TotalFXTax)/$OrderHeader['rate']; + + if ($CompanyRecord['gllink_debtors']==1){ + + /*Now post the tax to the GL at local currency equivalent */ + if ($CompanyRecord['gllink_debtors']==1 AND $TaxAuthAmount !=0) { + + + /*Loop through the tax authorities array to post each total to the taxauth glcode */ + foreach ($TaxTotals as $Tax){ + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) + VALUES (10, + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate']. "', + '" . $PeriodNo . "', + '" . $Tax['GLCode'] . "', + '" . $OrderHeader['debtorno'] . "-" . $Tax['TaxAuthDescription'] . "', + '" . -$Tax['FXAmount']/$OrderHeader['rate'] . "' )"; + + $Result = api_DB_query($SQL,$db,'','',true); + } + } + + /*Post debtors transaction to GL debit debtors, credit freight re-charged and credit sales */ + if (($TotalInvLocalCurr) !=0) { + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ('10', + '" . $InvoiceNo . "', + '" . $OrderHeader['orddate'] . "', + '" . $PeriodNo . "', + '" . $CompanyRecord['debtorsact'] . "', + '" . $OrderHeader['debtorno'] . "', + '" . $TotalInvLocalCurr . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + } + + + } /*end of if Sales and GL integrated */ + + /*Update order header for invoice charged on */ + $SQL = "UPDATE salesorders SET comments = CONCAT(comments,' Inv ','" . $InvoiceNo . "') WHERE orderno= '" . $OrderNo . "'"; + $Result = api_DB_query($SQL,$db,'','',true); + + /*Now insert the DebtorTrans */ + + $SQL = "INSERT INTO debtortrans (transno, + type, + debtorno, + branchcode, + trandate, + inputdate, + prd, + reference, + tpe, + order_, + ovamount, + ovgst, + rate, + shipvia) + VALUES ( + '". $InvoiceNo . "', + 10, + '" . $OrderHeader['debtorno'] . "', + '" . $OrderHeader['branchcode'] . "', + '" . $OrderHeader['orddate'] . "', + '" . date('Y-m-d H-i-s') . "', + '" . $PeriodNo . "', + '" . $OrderHeader['customerref'] . "', + '" . $OrderHeader['sales_type'] . "', + '" . $OrderNo . "', + '" . $TotalFXNetInvoice . "', + '" . $TotalFXTax . "', + '" . $OrderHeader['rate'] . "', + '" . $OrderHeader['shipvia'] . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + + $DebtorTransID = DB_Last_Insert_ID($db,'debtortrans','id'); + + /*for each Tax - need to insert into debtortranstaxes */ + + + + $SQL = "INSERT INTO debtortranstaxes (debtortransid, + taxauthid, + taxamount) + VALUES ('" . $DebtorTransID . "', + '" . $TaxAuthID . "', + '" . $Tax['FXAmount']/$OrderHeader['rate'] . "')"; + + $Result = api_DB_query($SQL,$db,'','',true); + + $Result = DB_Txn_Commit($db); + + if (sizeof($Errors)==0) { + $Errors[0]=0; + $Errors[1]=$InvoiceNo; + } + return $Errors; + + + + } + + + function GetCurrentPeriod (&$db) { + + $TransDate = mktime(); //The current date to find the period for + /* Find the unix timestamp of the last period end date in periods table */ + $sql = "SELECT MAX(lastdate_in_period), MAX(periodno) from periods"; + $result = DB_query($sql, $db); + $myrow=DB_fetch_row($result); + + if (is_null($myrow[0])){ + $InsertFirstPeriodResult = api_DB_query("INSERT INTO periods VALUES (0,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))) . "')",$db); + $InsertFirstPeriodResult = api_DB_query("INSERT INTO periods VALUES (1,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+2,0,Date('Y'))) . "')",$db); + $LastPeriod=1; + $LastPeriodEnd = mktime(0,0,0,Date('m')+2,0,Date('Y')); + } else { + $Date_Array = explode('-', $myrow[0]); + $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+1,0,(int)$Date_Array[0]); + $LastPeriod = $myrow[1]; + } + /* Find the unix timestamp of the first period end date in periods table */ + $sql = "SELECT MIN(lastdate_in_period), MIN(periodno) from periods"; + $result = api_DB_query($sql, $db); + $myrow=DB_fetch_row($result); + $Date_Array = explode('-', $myrow[0]); + $FirstPeriodEnd = mktime(0,0,0,$Date_Array[1],0,(int)$Date_Array[0]); + $FirstPeriod = $myrow[1]; + + /* If the period number doesn't exist */ + if (!PeriodExists($TransDate, $db)) { + /* if the transaction is after the last period */ + if ($TransDate > $LastPeriodEnd) { + + $PeriodEnd = mktime(0,0,0,Date('m', $TransDate)+1, 0, Date('Y', $TransDate)); + + while ($PeriodEnd >= $LastPeriodEnd) { + if (Date('m', $LastPeriodEnd)<=13) { + $LastPeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+2, 0, Date('Y', $LastPeriodEnd)); + } else { + $LastPeriodEnd = mktime(0,0,0,2, 0, Date('Y', $LastPeriodEnd)+1); + } + $LastPeriod++; + CreatePeriod($LastPeriod, $LastPeriodEnd, $db); + } + } else { + /* The transaction is before the first period */ + $PeriodEnd = mktime(0,0,0,Date('m', $TransDate), 0, Date('Y', $TransDate)); + $Period = $FirstPeriod - 1; + while ($FirstPeriodEnd > $PeriodEnd) { + CreatePeriod($Period, $FirstPeriodEnd, $db); + $Period--; + if (Date('m', $FirstPeriodEnd)>0) { + $FirstPeriodEnd = mktime(0,0,0,Date('m', $FirstPeriodEnd), 0, Date('Y', $FirstPeriodEnd)); + } else { + $FirstPeriodEnd = mktime(0,0,0,13, 0, Date('Y', $FirstPeriodEnd)); + } + } + } + } else if (!PeriodExists(mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)), $db)) { + /* Make sure the following months period exists */ + $sql = "SELECT MAX(lastdate_in_period), MAX(periodno) from periods"; + $result = DB_query($sql, $db); + $myrow=DB_fetch_row($result); + $Date_Array = explode('-', $myrow[0]); + $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+2,0,(int)$Date_Array[0]); + $LastPeriod = $myrow[1]; + CreatePeriod($LastPeriod+1, $LastPeriodEnd, $db); + } + + /* Now return the period number of the transaction */ + + $MonthAfterTransDate = Mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)); + $GetPrdSQL = "SELECT periodno + FROM periods + WHERE lastdate_in_period < '" . Date('Y-m-d', $MonthAfterTransDate) . "' + AND lastdate_in_period >= '" . Date('Y-m-d', $TransDate) . "'"; + + $ErrMsg = _('An error occurred in retrieving the period number'); + $GetPrdResult = DB_query($GetPrdSQL,$db,$ErrMsg); + $myrow = DB_fetch_row($GetPrdResult); + + return $myrow[0]; + } + + function PeriodExists($TransDate, &$db) { + + /* Find the date a month on */ + $MonthAfterTransDate = Mktime(0,0,0,Date('m',$TransDate)+1,Date('d',$TransDate),Date('Y',$TransDate)); + + $GetPrdSQL = "SELECT periodno FROM periods WHERE lastdate_in_period < '" . Date('Y/m/d', $MonthAfterTransDate) . "' AND lastdate_in_period >= '" . Date('Y/m/d', $TransDate) . "'"; + + $GetPrdResult = api_DB_query($GetPrdSQL,$db,$ErrMsg); + + if (DB_num_rows($GetPrdResult)==0) { + return false; + } else { + return true; + } + + } + + function CreatePeriod($PeriodNo, $PeriodEnd, &$db) { + $InsertPrdSQL = "INSERT INTO periods (periodno, + lastdate_in_period) + VALUES ('" . $PeriodNo . "', + '" . Date('Y-m-d', $PeriodEnd) . "')"; + + $InsertPrdResult = api_DB_query($InsertPrdSQL, $db); + } + + ?> \ No newline at end of file Modified: trunk/api/api_session.inc =================================================================== --- trunk/api/api_session.inc 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_session.inc 2012-01-29 03:10:08 UTC (rev 4847) @@ -4,13 +4,7 @@ if (!isset($PathPrefix)) { $PathPrefix=''; } -if (!file_exists($PathPrefix . 'config.php')){ - $rootpath = dirname(htmlspecialchars($_SERVER['PHP_SELF'])); - if ($rootpath == '/' OR $rootpath == "\\") { - $rootpath = ''; - } - header('Location:' . $rootpath . '/install/index.php'); -} + include($PathPrefix . 'config.php'); if (isset($SessionSavePath)){ @@ -51,41 +45,7 @@ // value must be set in the script before header.inc is included. $SecurityGroups is an array of // arrays defining access for each group of users. These definitions can be modified by a system admin under setup -if (isset($_SESSION['AllowedPageSecurityTokens']) AND !is_array($_SESSION['AllowedPageSecurityTokens']) AND !isset($AllowAnyone)) { -/* NO HTML output - but may need an XMLRPC style error message here. - Lindsay: 12Jan10 - $title = _('Account Error Report'); - include($PathPrefix . 'includes/header.inc'); - echo '<br /><br /><br />'; - prnMsg(_('Security settings have not been defined for your user account. Please advise your system administrator. It could also be that there is a session problem with your PHP web server'),'error'); - include($PathPrefix . 'includes/footer.inc'); - */ - exit; -} -if (!isset($AllowAnyone)){ - if ((!in_array($PageSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PageSecurity))) { -/* NO HTML output - but need to return an appropriate error message - Lindsay: 12Jan10 - $title = _('Security Permissions Problem'); - include($PathPrefix . 'includes/header.inc'); - echo '<tr> - <td class="menu_group_items"> - <table width="100%" class="table_index"> - <tr><td class="menu_group_item">'; - echo '<b><font style="size:+1; text-align:center;">' . _('The security settings on your account do not permit you to access this function') . '</font></b>'; - - echo '</td> - </tr> - </table> - </td>'; - - include($PathPrefix . 'includes/footer.inc'); - */ - exit; - } - } - function CryptPass( $Password ) { global $CryptFunction; if ( $CryptFunction == 'sha1' ) { @@ -105,13 +65,11 @@ // data. $result = DB_query($sql, $db, $Emsg, $Dmsg, $Transaction, $TrapErrors); - if (DB_error_no($db) != 0) - { - $_SESSION['db_err_msg'] = "SQL: " . $sql . "\nDB error message: " . - DB_error_msg($db) . "\n"; - } - else - $_SESSION['db_err_msg'] = ''; + if (DB_error_no($db) != 0) { + $_SESSION['db_err_msg'] = "SQL: " . $sql . "\nDB error message: " . DB_error_msg($db) . "\n"; + } else { + $_SESSION['db_err_msg'] = ''; + } return $result; } Modified: trunk/api/api_webERPsettings.php =================================================================== --- trunk/api/api_webERPsettings.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_webERPsettings.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -73,4 +73,22 @@ return $ReturnValue; } +/* This function returns the default shipper in webERP. + */ + + function GetDefaultShipper($user, $password) { + $Errors = array(); + $db = db($user, $password); + if (gettype($db)=='integer') { + $Errors[0]=NoAuthorisation; + return $Errors; + } + $sql = "SELECT confvalue from config WHERE confname='Default_Shipper'"; + $result = DB_query($sql, $db); + $answer=DB_fetch_array($result); + $ReturnValue[0]=0; + $ReturnValue[1]=$answer; + return $ReturnValue; + } + ?> Modified: trunk/api/api_xml-rpc.php =================================================================== --- trunk/api/api_xml-rpc.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/api/api_xml-rpc.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -2718,7 +2718,7 @@ /*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultDateFormat($xmlrpcmsg->getParam( 0 )->scalarval( ), /*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); /*x*/ } else { -/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultDateFormat( '', ''))); +/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultDateFormat( '', ''))); /*x*/ } ob_end_flush(); return $rtn; @@ -2728,6 +2728,37 @@ unset($Parameter); unset($ReturnValue); + $Description = _('Returns the webERP default shipper'); + $Parameter[0]['name'] = _('User name'); + $Parameter[0]['description'] = _('A valid weberp username. This user should have security access to this data.'); + $Parameter[1]['name'] = _('User password'); + $Parameter[1]['description'] = _('The weberp password associated with this user name. '); + $ReturnValue[0] = _('If successful this function returns an array of two elements the first should contain an integer of zero for successful and the second an associative arrat containing the key of confvalue the value of which is the Default_Shipper.') + ._('Otherwise an array of error codes is returned. '); + +/*E*/$GetDefaultShipper_sig = array(array($xmlrpcStruct), +/*x*/ array($xmlrpcStruct,$xmlrpcString,$xmlrpcString)); + $GetDefaultShipper_doc = apiBuildDocHTML( $Description,$Parameter,$ReturnValue ); + + function xmlrpc_GetDefaultShipper($xmlrpcmsg){ + ob_start('ob_file_callback'); +/*x*/ if ($xmlrpcmsg->getNumParams() == 2) +/*x*/ { +/*x*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultShipper($xmlrpcmsg->getParam( 0 )->scalarval( ), +/*x*/ $xmlrpcmsg->getParam( 1 )->scalarval( ))) ); +/*x*/ } else { +/*e*/ $rtn = new xmlrpcresp( php_xmlrpc_encode(GetDefaultShipper( '', ''))); +/*x*/ } + ob_end_flush(); + return $rtn; + } + + unset($Description); + unset($Parameter); + unset($ReturnValue); + + + $Description = _('Returns the webERP default location'); $Parameter[0]['name'] = _('User name'); $Parameter[0]['description'] = _('A valid weberp username. This user should have security access to this data.'); @@ -3199,6 +3230,10 @@ "function" => "xmlrpc_GetDefaultDateFormat", "signature" => $GetDefaultDateFormat_sig, "docstring" => $GetDefaultDateFormat_doc), + "weberp.xmlrpc_GetDefaultShipper" => array( + "function" => "xmlrpc_GetDefaultShipper", + "signature" => $GetDefaultShipper_sig, + "docstring" => $GetDefaultShipper_doc), "weberp.xmlrpc_GetDefaultCurrency" => array( "function" => "xmlrpc_GetDefaultCurrency", "signature" => $GetDefaultCurrency_sig, Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/includes/DateFunctions.inc 2012-01-29 03:10:08 UTC (rev 4847) @@ -821,19 +821,6 @@ $ErrMsg = _('An error occurred in adding a new period number'); $GetPrdResult = DB_query($GetPrdSQL, $db, $ErrMsg); -/*I don't think this is necessary since GLPostings.inc handles this - * - $sql = "INSERT INTO chartdetails (accountcode, period) - SELECT chartmaster.accountcode, periods.periodno - FROM chartmaster - CROSS JOIN periods - WHERE ( chartmaster.accountcode, periods.periodno ) NOT - IN ( SELECT chartdetails.accountcode, chartdetails.period FROM chartdetails )"; - -//dont trap errors - chart details records created only as required - duplicate messages ignored - $InsNewChartDetails = DB_query($sql,$db,'','','',false); -*/ - } function PeriodExists($TransDate, &$db) { Modified: trunk/includes/GetSalesTransGLCodes.inc =================================================================== --- trunk/includes/GetSalesTransGLCodes.inc 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/includes/GetSalesTransGLCodes.inc 2012-01-29 03:10:08 UTC (rev 4847) @@ -167,11 +167,11 @@ */ $SQL = "SELECT salesglcode, - discountglcode - FROM salesglpostings - WHERE area = '" . $Area . "' - AND stkcat = '" . $StockCategory . "' - AND salestype = '". $SalesType . "'"; + discountglcode + FROM salesglpostings + WHERE area = '" . $Area . "' + AND stkcat = '" . $StockCategory . "' + AND salestype = '". $SalesType . "'"; $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg); Modified: trunk/includes/UserLogin.php =================================================================== --- trunk/includes/UserLogin.php 2012-01-28 01:24:40 UTC (rev 4846) +++ trunk/includes/UserLogin.php 2012-01-29 03:10:08 UTC (rev 4847) @@ -37,10 +37,10 @@ return UL_SHOWLOGIN; } $sql = "SELECT * - FROM www_users - WHERE www_users.userid='" . $Name . "' - AND (www_users.password='" . CryptPass($Password) . "' - OR www_users.password='" . $Password . "')"; + FROM www_users + WHERE www_users.userid='" . $Name . "' + AND (www_users.password='" . CryptPass($Password) . "' + OR www_users.password='" . $Password . "')"; $ErrMsg = _('Could not retrieve user details on login because'); $debug =1; $Auth_Result = DB_query($sql, $db,$ErrMsg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-01-28 01:24:46
|
Revision: 4846 http://web-erp.svn.sourceforge.net/web-erp/?rev=4846&view=rev Author: tim_schofield Date: 2012-01-28 01:24:40 +0000 (Sat, 28 Jan 2012) Log Message: ----------- Fix in inArray() function, correctly passing the text box value Modified Paths: -------------- trunk/javascripts/MiscFunctions.js Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2012-01-27 23:22:26 UTC (rev 4845) +++ trunk/javascripts/MiscFunctions.js 2012-01-28 01:24:40 UTC (rev 4846) @@ -19,7 +19,7 @@ } function inArray(v,tA,m){ for (i=0;i<tA.length;i++) { - if (v.value==tA[i].value) { + if (v==tA[i].value) { return true; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-01-28 01:24:46
|
Revision: 4846 http://web-erp.svn.sourceforge.net/web-erp/?rev=4846&view=rev Author: tim_schofield Date: 2012-01-28 01:24:40 +0000 (Sat, 28 Jan 2012) Log Message: ----------- Fix in inArray() function, correctly passing the text box value Modified Paths: -------------- trunk/javascripts/MiscFunctions.js Modified: trunk/javascripts/MiscFunctions.js =================================================================== --- trunk/javascripts/MiscFunctions.js 2012-01-27 23:22:26 UTC (rev 4845) +++ trunk/javascripts/MiscFunctions.js 2012-01-28 01:24:40 UTC (rev 4846) @@ -19,7 +19,7 @@ } function inArray(v,tA,m){ for (i=0;i<tA.length;i++) { - if (v.value==tA[i].value) { + if (v==tA[i].value) { return true; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-27 23:22:33
|
Revision: 4845 http://web-erp.svn.sourceforge.net/web-erp/?rev=4845&view=rev Author: daintree Date: 2012-01-27 23:22:26 +0000 (Fri, 27 Jan 2012) Log Message: ----------- Ahmed.Fawzy: StockCategories.php fixes for numericvalue not displaying and errored with "minimum value is not numeric" Modified Paths: -------------- trunk/StockCategories.php trunk/doc/Change.log Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2012-01-27 23:11:28 UTC (rev 4844) +++ trunk/StockCategories.php 2012-01-27 23:22:26 UTC (rev 4845) @@ -485,7 +485,8 @@ defaultvalue, reqatsalesorder, minimumvalue, - maximumvalue + maximumvalue, + numericvalue FROM stockcatproperties WHERE categoryid='" . $SelectedCategory . "' ORDER BY stkcatpropid"; @@ -566,7 +567,7 @@ </select></td> <td><input type="textbox" name="PropDefault' . $PropertyCounter . '" /></td> <td><input type="checkbox" name="PropNumeric' . $PropertyCounter . '" /></td> - <td><input type="textbox" class="number" "name="PropMinimum' . $PropertyCounter . '" /></td> + <td><input type="textbox" class="number" name="PropMinimum' . $PropertyCounter . '" /></td> <td><input type="textbox" class="number" name="PropMaximum' . $PropertyCounter . '" /></td> <td align="center"><input type="checkbox" name="PropReqSO' . $PropertyCounter .'" /></td> </tr>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-27 23:11:28 UTC (rev 4844) +++ trunk/doc/Change.log 2012-01-27 23:22:26 UTC (rev 4845) @@ -1,5 +1,6 @@ webERP Change Log +28/1/12 Ahmed.Fawzy: StockCategories.php fixes for numericvalue not displaying and errored with "minimum value is not numeric" 28/1/12 Phil: ConfirmDispatch_Invoice.php corrected link to ConfirmDispatchControlled_Invoice.php to send $identifier to get the correct session variable containing the order to invoice 28/1/12 Tim: SpecialOrder.php added $identifier to session class variable to avoid overlapping sessions in multiple tabs. 27/1/12 Phil: PO_AuthoriseMyOrders.php fixed html in hidden $_POST['StatusComments'] by using htmlentities($_POST['StatusComments']) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-27 23:22:33
|
Revision: 4845 http://web-erp.svn.sourceforge.net/web-erp/?rev=4845&view=rev Author: daintree Date: 2012-01-27 23:22:26 +0000 (Fri, 27 Jan 2012) Log Message: ----------- Ahmed.Fawzy: StockCategories.php fixes for numericvalue not displaying and errored with "minimum value is not numeric" Modified Paths: -------------- trunk/StockCategories.php trunk/doc/Change.log Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2012-01-27 23:11:28 UTC (rev 4844) +++ trunk/StockCategories.php 2012-01-27 23:22:26 UTC (rev 4845) @@ -485,7 +485,8 @@ defaultvalue, reqatsalesorder, minimumvalue, - maximumvalue + maximumvalue, + numericvalue FROM stockcatproperties WHERE categoryid='" . $SelectedCategory . "' ORDER BY stkcatpropid"; @@ -566,7 +567,7 @@ </select></td> <td><input type="textbox" name="PropDefault' . $PropertyCounter . '" /></td> <td><input type="checkbox" name="PropNumeric' . $PropertyCounter . '" /></td> - <td><input type="textbox" class="number" "name="PropMinimum' . $PropertyCounter . '" /></td> + <td><input type="textbox" class="number" name="PropMinimum' . $PropertyCounter . '" /></td> <td><input type="textbox" class="number" name="PropMaximum' . $PropertyCounter . '" /></td> <td align="center"><input type="checkbox" name="PropReqSO' . $PropertyCounter .'" /></td> </tr>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-27 23:11:28 UTC (rev 4844) +++ trunk/doc/Change.log 2012-01-27 23:22:26 UTC (rev 4845) @@ -1,5 +1,6 @@ webERP Change Log +28/1/12 Ahmed.Fawzy: StockCategories.php fixes for numericvalue not displaying and errored with "minimum value is not numeric" 28/1/12 Phil: ConfirmDispatch_Invoice.php corrected link to ConfirmDispatchControlled_Invoice.php to send $identifier to get the correct session variable containing the order to invoice 28/1/12 Tim: SpecialOrder.php added $identifier to session class variable to avoid overlapping sessions in multiple tabs. 27/1/12 Phil: PO_AuthoriseMyOrders.php fixed html in hidden $_POST['StatusComments'] by using htmlentities($_POST['StatusComments']) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-27 23:11:35
|
Revision: 4844 http://web-erp.svn.sourceforge.net/web-erp/?rev=4844&view=rev Author: daintree Date: 2012-01-27 23:11:28 +0000 (Fri, 27 Jan 2012) Log Message: ----------- fix link for controlled invoice lines Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/doc/Change.log trunk/includes/DefineSpecialOrderClass.php Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-01-27 16:37:31 UTC (rev 4843) +++ trunk/ConfirmDispatch_Invoice.php 2012-01-27 23:11:28 UTC (rev 4844) @@ -395,7 +395,7 @@ if ($LnItm->Controlled==1){ if (!isset($_POST['ProcessInvoice'])) { - echo '<td><a href="' . $rootpath . '/ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber.'">'; + echo '<td><a href="' . $rootpath . '/ConfirmDispatchControlled_Invoice.php?identifier=' . $identifier . '&LineNo='. $LnItm->LineNumber.'">'; if ($LnItm->Serialised==1){ echo _('Enter Serial Numbers'); } else { /*Just batch/roll/lot control */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-27 16:37:31 UTC (rev 4843) +++ trunk/doc/Change.log 2012-01-27 23:11:28 UTC (rev 4844) @@ -1,5 +1,7 @@ webERP Change Log +28/1/12 Phil: ConfirmDispatch_Invoice.php corrected link to ConfirmDispatchControlled_Invoice.php to send $identifier to get the correct session variable containing the order to invoice +28/1/12 Tim: SpecialOrder.php added $identifier to session class variable to avoid overlapping sessions in multiple tabs. 27/1/12 Phil: PO_AuthoriseMyOrders.php fixed html in hidden $_POST['StatusComments'] by using htmlentities($_POST['StatusComments']) 25/1/12 Vitaly: Added quotes and missing closing tags in multiple files 24/1/12 Vitaly: Added quotes to attributes in multiple files and changed option selected to selected="selected". Modified: trunk/includes/DefineSpecialOrderClass.php =================================================================== --- trunk/includes/DefineSpecialOrderClass.php 2012-01-27 16:37:31 UTC (rev 4843) +++ trunk/includes/DefineSpecialOrderClass.php 2012-01-27 23:11:28 UTC (rev 4844) @@ -37,7 +37,7 @@ } function add_to_order($LineNo, $Qty, $ItemDescr, $Price, $Cost, $StkCat, $ReqDelDate){ - if ($Qty!=0 && isset($Qty)){ + if ($Qty!=0 AND isset($Qty)){ $this->LineItems[$LineNo] = new LineDetails($LineNo, $Qty, $ItemDescr, $Price, $Cost, $StkCat, $ReqDelDate); $this->LinesOnOrder++; Return 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-27 23:11:35
|
Revision: 4844 http://web-erp.svn.sourceforge.net/web-erp/?rev=4844&view=rev Author: daintree Date: 2012-01-27 23:11:28 +0000 (Fri, 27 Jan 2012) Log Message: ----------- fix link for controlled invoice lines Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/doc/Change.log trunk/includes/DefineSpecialOrderClass.php Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-01-27 16:37:31 UTC (rev 4843) +++ trunk/ConfirmDispatch_Invoice.php 2012-01-27 23:11:28 UTC (rev 4844) @@ -395,7 +395,7 @@ if ($LnItm->Controlled==1){ if (!isset($_POST['ProcessInvoice'])) { - echo '<td><a href="' . $rootpath . '/ConfirmDispatchControlled_Invoice.php?LineNo='. $LnItm->LineNumber.'">'; + echo '<td><a href="' . $rootpath . '/ConfirmDispatchControlled_Invoice.php?identifier=' . $identifier . '&LineNo='. $LnItm->LineNumber.'">'; if ($LnItm->Serialised==1){ echo _('Enter Serial Numbers'); } else { /*Just batch/roll/lot control */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-27 16:37:31 UTC (rev 4843) +++ trunk/doc/Change.log 2012-01-27 23:11:28 UTC (rev 4844) @@ -1,5 +1,7 @@ webERP Change Log +28/1/12 Phil: ConfirmDispatch_Invoice.php corrected link to ConfirmDispatchControlled_Invoice.php to send $identifier to get the correct session variable containing the order to invoice +28/1/12 Tim: SpecialOrder.php added $identifier to session class variable to avoid overlapping sessions in multiple tabs. 27/1/12 Phil: PO_AuthoriseMyOrders.php fixed html in hidden $_POST['StatusComments'] by using htmlentities($_POST['StatusComments']) 25/1/12 Vitaly: Added quotes and missing closing tags in multiple files 24/1/12 Vitaly: Added quotes to attributes in multiple files and changed option selected to selected="selected". Modified: trunk/includes/DefineSpecialOrderClass.php =================================================================== --- trunk/includes/DefineSpecialOrderClass.php 2012-01-27 16:37:31 UTC (rev 4843) +++ trunk/includes/DefineSpecialOrderClass.php 2012-01-27 23:11:28 UTC (rev 4844) @@ -37,7 +37,7 @@ } function add_to_order($LineNo, $Qty, $ItemDescr, $Price, $Cost, $StkCat, $ReqDelDate){ - if ($Qty!=0 && isset($Qty)){ + if ($Qty!=0 AND isset($Qty)){ $this->LineItems[$LineNo] = new LineDetails($LineNo, $Qty, $ItemDescr, $Price, $Cost, $StkCat, $ReqDelDate); $this->LinesOnOrder++; Return 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-01-27 16:37:42
|
Revision: 4843 http://web-erp.svn.sourceforge.net/web-erp/?rev=4843&view=rev Author: tim_schofield Date: 2012-01-27 16:37:31 +0000 (Fri, 27 Jan 2012) Log Message: ----------- Fix for the scenario when multiple special orders are open at the same time and session variable was getting overwritten Modified Paths: -------------- trunk/SpecialOrder.php Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2012-01-27 10:14:17 UTC (rev 4842) +++ trunk/SpecialOrder.php 2012-01-27 16:37:31 UTC (rev 4843) @@ -11,12 +11,18 @@ include('includes/header.inc'); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other supplier tender sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier) . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - if (isset($_GET['NewSpecial']) and $_GET['NewSpecial']=='yes'){ - unset($_SESSION['SPL']); + unset($_SESSION['SPL'.$identifier]); } if (!isset($_SESSION['SupplierID'])){ @@ -27,7 +33,7 @@ exit; } -if (!isset($_SESSION['CustomerID']) OR $_SESSION['CustomerID']==""){ +if (!isset($_SESSION['CustomerID']) or $_SESSION['CustomerID']==''){ echo '<br /> <br />' . _('To set up a special') . ', ' . _('the customer must first be selected from the Select Customer page') . ' <br /> @@ -37,20 +43,20 @@ } if (isset($_POST['Cancel'])){ - unset($_SESSION['SPL']); + unset($_SESSION['SPL'.$identifier]); } -if (!isset($_SESSION['SPL'])){ - /* It must be a new special order being created $_SESSION['SPL'] would be set up from the order modification code above if a modification to an existing order. */ +if (!isset($_SESSION['SPL'.$identifier])){ + /* It must be a new special order being created $_SESSION['SPL'.$identifier] would be set up from the order modification code above if a modification to an existing order. */ - $_SESSION['SPL'] = new SpecialOrder; + $_SESSION['SPL'.$identifier] = new SpecialOrder; } /*if not already done populate the SPL object with supplier data */ -if (!isset($_SESSION['SPL']->SupplierID)){ +if (!isset($_SESSION['SPL'.$identifier]->SupplierID)){ $sql = "SELECT suppliers.suppname, suppliers.currcode, currencies.rate, @@ -63,13 +69,13 @@ $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); $myrow = DB_fetch_array($result); - $_SESSION['SPL']->SupplierID = $_SESSION['SupplierID']; - $_SESSION['SPL']->SupplierName = $myrow['suppname']; - $_SESSION['SPL']->SuppCurrCode = $myrow['currcode']; - $_SESSION['SPL']->SuppCurrExRate = $myrow['rate']; - $_SESSION['SPL']->SuppCurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['SPL'.$identifier]->SupplierID = $_SESSION['SupplierID']; + $_SESSION['SPL'.$identifier]->SupplierName = $myrow['suppname']; + $_SESSION['SPL'.$identifier]->SuppCurrCode = $myrow['currcode']; + $_SESSION['SPL'.$identifier]->SuppCurrExRate = $myrow['rate']; + $_SESSION['SPL'.$identifier]->SuppCurrDecimalPlaces = $myrow['decimalplaces']; } -if (!isset($_SESSION['SPL']->CustomerID)){ +if (!isset($_SESSION['SPL'.$identifier]->CustomerID)){ // Now check to ensure this account is not on hold */ $sql = "SELECT debtorsmaster.name, holdreasons.dissallowinvoices, @@ -78,7 +84,7 @@ currencies.decimalplaces FROM debtorsmaster INNER JOIN holdreasons ON debtorsmaster.holdreason=holdreasons.reasoncode - INNER JOIN currencies + INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev WHERE debtorsmaster.debtorno = '" . $_SESSION['CustomerID'] . "'"; @@ -89,38 +95,38 @@ $myrow = DB_fetch_array($result); if ($myrow['dissallowinvoices'] != 1){ if ($myrow['dissallowinvoices']==2){ - prnMsg(_('The') . ' ' . $myrow[0] . ' ' . _('account is currently flagged as an account that needs to be watched please contact the credit control personnel to discuss'),'warn'); + prnMsg(_('The') . ' ' . $myrow['name'] . ' ' . _('account is currently flagged as an account that needs to be watched please contact the credit control personnel to discuss'),'warn'); } } - $_SESSION['SPL']->CustomerID = $_SESSION['CustomerID']; - $_SESSION['SPL']->CustomerName = $myrow['name']; - $_SESSION['SPL']->CustCurrCode = $myrow['currcode']; - $_SESSION['SPL']->CustCurrExRate = $myrow['rate']; - $_SESSION['SPL']->CustCurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['SPL'.$identifier]->CustomerID = $_SESSION['CustomerID']; + $_SESSION['SPL'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['SPL'.$identifier]->CustCurrCode = $myrow['currcode']; + $_SESSION['SPL'.$identifier]->CustCurrExRate = $myrow['rate']; + $_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces = $myrow['decimalplaces']; } if (isset($_POST['SelectBranch'])){ $sql = "SELECT brname FROM custbranch - WHERE debtorno='" . $_SESSION['SPL']->CustomerID . "' + WHERE debtorno='" . $_SESSION['SPL'.$identifier]->CustomerID . "' AND branchcode='" . $_POST['SelectBranch'] . "'"; $BranchResult = DB_query($sql,$db); $myrow=DB_fetch_array($BranchResult); - $_SESSION['SPL']->BranchCode = $_POST['SelectBranch']; - $_SESSION['SPL']->BranchName = $myrow['brname']; + $_SESSION['SPL'.$identifier]->BranchCode = $_POST['SelectBranch']; + $_SESSION['SPL'.$identifier]->BranchName = $myrow['brname']; } echo '<div class="centre">'; -if (!isset($_SESSION['SPL']->BranchCode)){ +if (!isset($_SESSION['SPL'.$identifier]->BranchCode)){ echo '<br /> - <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL']->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL']->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL']->CustomerName . ' (' . $_SESSION['SPL']->CustCurrCode . ')'; + <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL'.$identifier]->CustomerName . ' (' . $_SESSION['SPL'.$identifier]->CustCurrCode . ')'; } else { echo '<br /> - <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL']->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL']->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL']->CustomerName . ' (' . $_SESSION['SPL']->CustCurrCode . ') - ' . _('delivered to') . ' ' . $_SESSION['SPL']->BranchName . ' ' . _('branch'); + <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL'.$identifier]->CustomerName . ' (' . $_SESSION['SPL'.$identifier]->CustCurrCode . ') - ' . _('delivered to') . ' ' . $_SESSION['SPL'.$identifier]->BranchName . ' ' . _('branch'); } echo '</font></div>'; /*if the branch details and delivery details have not been entered then select them from the list */ -if (!isset($_SESSION['SPL']->BranchCode)){ +if (!isset($_SESSION['SPL'.$identifier]->BranchCode)){ $sql = "SELECT branchcode, brname @@ -128,7 +134,7 @@ WHERE debtorno='" . $_SESSION['CustomerID'] . "'"; $BranchResult = DB_query($sql,$db); - If (DB_num_rows($BranchResult)>0) { + if (DB_num_rows($BranchResult)>0) { echo '<div class="centre">'; echo '<br /> @@ -159,8 +165,8 @@ printf('<td><input type="submit" name="SelectBranch" value="%s" /></td> <td>%s</td> - </tr>', - $myrow['branchcode'], + </tr>', + $myrow['branchcode'], $myrow['brname']); //end of page full new headings if @@ -181,7 +187,7 @@ If(isset($_GET['Delete'])){ /*User hit the delete link on a line */ - $_SESSION['SPL']->remove_from_order($_GET['Delete']); + $_SESSION['SPL'.$identifier]->remove_from_order($_GET['Delete']); } @@ -220,7 +226,7 @@ prnMsg( _('Cannot Enter this order line') . '<br />' . _('The cost entered must be numeric'),'warn'); } - if (((filter_number_format($_POST['Price'])/$_SESSION['SPL']->CustCurrExRate)-(filter_number_format($_POST['Cost'])/$_SESSION['SPL']->SuppCurrExRate))<0){ + if (((filter_number_format($_POST['Price'])/$_SESSION['SPL'.$identifier]->CustCurrExRate)-(filter_number_format($_POST['Cost'])/$_SESSION['SPL'.$identifier]->SuppCurrExRate))<0){ $AllowAdd = False; prnMsg( _('Cannot Enter this order line') . '<br />' . _('The sale is at a lower price than the cost'),'warn'); } @@ -231,12 +237,12 @@ } If ($AllowAdd == True){ - $_SESSION['SPL']->add_to_order ($_POST['LineNo'], - filter_number_format($_POST['Qty']), - $_POST['ItemDescription'], - filter_number_format($_POST['Price']), - filter_number_format($_POST['Cost']), - $_POST['StkCat'], + $_SESSION['SPL'.$identifier]->add_to_order ($_POST['LineNo'], + filter_number_format($_POST['Qty']), + $_POST['ItemDescription'], + filter_number_format($_POST['Price']), + filter_number_format($_POST['Cost']), + $_POST['StkCat'], $_POST['ReqDelDate']); unset($_POST['Price']); @@ -249,19 +255,19 @@ } if (isset($_POST['StkLocation'])) { - $_SESSION['SPL']->StkLocation = $_POST['StkLocation']; + $_SESSION['SPL'.$identifier]->StkLocation = $_POST['StkLocation']; } if (isset($_POST['Initiator'])) { - $_SESSION['SPL']->Initiator = $_POST['Initiator']; + $_SESSION['SPL'.$identifier]->Initiator = $_POST['Initiator']; } if (isset($_POST['QuotationRef'])) { - $_SESSION['SPL']->QuotationRef = $_POST['QuotationRef']; + $_SESSION['SPL'.$identifier]->QuotationRef = $_POST['QuotationRef']; } if (isset($_POST['Comments'])) { - $_SESSION['SPL']->Comments = $_POST['Comments']; + $_SESSION['SPL'.$identifier]->Comments = $_POST['Comments']; } if (isset($_POST['CustRef'])) { - $_SESSION['SPL']->CustRef = $_POST['CustRef']; + $_SESSION['SPL'.$identifier]->CustRef = $_POST['CustRef']; } if (isset($_POST['Commit'])){ /*User wishes to commit the order to the database */ @@ -269,13 +275,13 @@ /*First do some validation Is the delivery information all entered*/ $InputError=0; /*Start off assuming the best */ - if ($_SESSION['SPL']->StkLocation=='' - OR ! isset($_SESSION['SPL']->StkLocation)){ + if ($_SESSION['SPL'.$identifier]->StkLocation=='' + or ! isset($_SESSION['SPL'.$identifier]->StkLocation)){ prnMsg( _('The purchase order can not be committed to the database because there is no stock location specified to book any stock items into'),'error'); $InputError=1; - } elseif ($_SESSION['SPL']->LinesOnOrder <=0){ + } elseif ($_SESSION['SPL'.$identifier]->LinesOnOrder <=0){ $InputError=1; - prnMsg(_('The purchase order can not be committed to the database because there are no lines entered on this order'),'error'); + prnMsg(_('The purchase order can not be committed to the database because there are no lines entered on this order'),'error'); }elseif (mb_strlen($_POST['QuotationRef'])<3){ $InputError=1; prnMsg( _('The reference for this order is less than 3 characters') . ' - ' . _('a reference more than 3 characters is required before the order can be added'),'error'); @@ -291,37 +297,37 @@ } else { $UserDetails = ' ' . $_SESSION['UsersRealName'] . ' '; } - - if ($_SESSION['AutoAuthorisePO']==1) { + + if ($_SESSION['AutoAuthorisePO']==1) { //if the user has authority to authorise the PO then it will automatically be authorised $AuthSQL ="SELECT authlevel FROM purchorderauth WHERE userid='".$_SESSION['UserID']."' - AND currabrev='".$_SESSION['SPL']->SuppCurrCode."'"; + AND currabrev='".$_SESSION['SPL'.$identifier]->SuppCurrCode."'"; $AuthResult=DB_query($AuthSQL,$db); $AuthRow=DB_fetch_array($AuthResult); - - if (DB_num_rows($AuthResult) > 0 - AND $AuthRow['authlevel'] > $_SESSION['SPL']->Order_Value()) { //user has authority to authrorise as well as create the order + + if (DB_num_rows($AuthResult) > 0 + and $AuthRow['authlevel'] > $_SESSION['SPL'.$identifier]->Order_Value()) { //user has authority to authrorise as well as create the order $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . $UserDetails . '<br />'; - $_SESSION['SPL']->AllowPrintPO=1; - $_SESSION['SPL']->Status = 'Authorised'; + $_SESSION['SPL'.$identifier]->AllowPrintPO=1; + $_SESSION['SPL'.$identifier]->Status = 'Authorised'; } else { // no authority to authorise this order if (DB_num_rows($AuthResult) ==0){ - $AuthMessage = _('Your authority to approve purchase orders in') . ' ' . $_SESSION['SPL']->SuppCurrCode . ' ' . _('has not yet been set up') . '<br />'; + $AuthMessage = _('Your authority to approve purchase orders in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('has not yet been set up') . '<br />'; } else { - $AuthMessage = _('You can only authorise up to').' '.$_SESSION['SPL']->SuppCurrCode.' '.$AuthRow['authlevel'] .'.<br />'; + $AuthMessage = _('You can only authorise up to').' '.$_SESSION['SPL'.$identifier]->SuppCurrCode.' '.$AuthRow['authlevel'] .'.<br />'; } - - prnMsg( _('You do not have permission to authorise this purchase order').'.<br />'. _('This order is for').' '. $_SESSION['SPL']->SuppCurrCode . ' '. $_SESSION['SPL']->Order_Value() .'. '. $AuthMessage . _('If you think this is a mistake please contact the systems administrator') . '<br />'. _('The order will be created with a status of pending and will require authorisation'), 'warn'); - + + prnMsg( _('You do not have permission to authorise this purchase order').'.<br />'. _('This order is for').' '. $_SESSION['SPL'.$identifier]->SuppCurrCode . ' '. $_SESSION['SPL'.$identifier]->Order_Value() .'. '. $AuthMessage . _('If you think this is a mistake please contact the systems administrator') . '<br />'. _('The order will be created with a status of pending and will require authorisation'), 'warn'); + $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . $UserDetails; - $_SESSION['SPL']->Status = 'Pending'; + $_SESSION['SPL'.$identifier]->Status = 'Pending'; } } else { //auto authorise is set to off $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . $UserDetails; - $_SESSION['SPL']->Status = 'Pending'; + $_SESSION['SPL'.$identifier]->Status = 'Pending'; } $sql = "SELECT contact, @@ -332,7 +338,7 @@ deladd5, deladd6 FROM locations - WHERE loccode='" . $_SESSION['SPL']->StkLocation . "'"; + WHERE loccode='" . $_SESSION['SPL'.$identifier]->StkLocation . "'"; $StkLocAddResult = DB_query($sql,$db); $StkLocAddress = DB_fetch_array($StkLocAddResult); @@ -359,39 +365,39 @@ allowprint, revised, deliverydate) - VALUES ('" . $_SESSION['SPL']->SupplierID . "', - '" . $_SESSION['SPL']->Comments . "', + VALUES ('" . $_SESSION['SPL'.$identifier]->SupplierID . "', + '" . $_SESSION['SPL'.$identifier]->Comments . "', '" . Date('Y-m-d') . "', - '" . $_SESSION['SPL']->SuppCurrExRate . "', - '" . $_SESSION['SPL']->Initiator . "', - '" . $_SESSION['SPL']->QuotationRef . "', - '" . $_SESSION['SPL']->StkLocation . "', - '" . DB_escape_string($StkLocAddress['deladd1']) . "', - '" . DB_escape_string($StkLocAddress['deladd2']) . "', - '" . DB_escape_string($StkLocAddress['deladd3']) . "', - '" . DB_escape_string($StkLocAddress['deladd4']) . "', - '" . DB_escape_string($StkLocAddress['deladd5']) . "', - '" . DB_escape_string($StkLocAddress['deladd6']) . "', - '" . DB_escape_string($StkLocAddress['contact']) . "', - '" . $_SESSION['SPL']->Status . "', + '" . $_SESSION['SPL'.$identifier]->SuppCurrExRate . "', + '" . $_SESSION['SPL'.$identifier]->Initiator . "', + '" . $_SESSION['SPL'.$identifier]->QuotationRef . "', + '" . $_SESSION['SPL'.$identifier]->StkLocation . "', + '" . $StkLocAddress['deladd1'] . "', + '" . $StkLocAddress['deladd2'] . "', + '" . $StkLocAddress['deladd3'] . "', + '" . $StkLocAddress['deladd4'] . "', + '" . $StkLocAddress['deladd5'] . "', + '" . $StkLocAddress['deladd6'] . "', + '" . $StkLocAddress['contact'] . "', + '" . $_SESSION['SPL'.$identifier]->Status . "', '" . htmlentities($StatusComment, ENT_QUOTES,'UTF-8') . "', - '" . $_SESSION['SPL']->AllowPrintPO . "', + '" . $_SESSION['SPL'.$identifier]->AllowPrintPO . "', '" . Date('Y-m-d') . "', '" . Date('Y-m-d') . "')"; - + $ErrMsg = _('The purchase order header record could not be inserted into the database because'); $DbgMsg = _('The SQL statement used to insert the purchase order header record and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - $_SESSION['SPL']->PurchOrderNo = GetNextTransNo(18, $db); + $_SESSION['SPL'.$identifier]->PurchOrderNo = GetNextTransNo(18, $db); /*Insert the purchase order detail records */ - foreach ($_SESSION['SPL']->LineItems as $SPLLine) { + foreach ($_SESSION['SPL'.$identifier]->LineItems as $SPLLine) { /*Set up the part codes required for this order */ - $PartCode = "*" . $_SESSION['SPL']->PurchOrderNo . "_" . $SPLLine->LineNo; + $PartCode = "*" . $_SESSION['SPL'.$identifier]->PurchOrderNo . "_" . $SPLLine->LineNo; $PartAlreadyExists =True; /*assume the worst */ $Counter = 0; @@ -402,7 +408,7 @@ if ($PartCount[0]!=0){ $PartAlreadyExists =True; if (mb_strlen($PartCode)==20){ - $PartCode = "*" . mb_strtoupper(mb_substr($_SESSION['SPL']->PurchOrderNo,0,13)) . "_" . $SPLLine->LineNo; + $PartCode = '*' . mb_strtoupper(mb_substr($_SESSION['SPL'.$identifier]->PurchOrderNo,0,13)) . '_' . $SPLLine->LineNo; } $PartCode = $PartCode . $Counter; $Counter++; @@ -411,7 +417,7 @@ } } - $_SESSION['SPL']->LineItems[$SPLLine->LineNo]->PartCode = $PartCode; + $_SESSION['SPL'.$identifier]->LineItems[$SPLLine->LineNo]->PartCode = $PartCode; $sql = "INSERT INTO stockmaster (stockid, categoryid, @@ -425,20 +431,20 @@ '" . $SPLLine->Cost . "')"; - $ErrMsg = _('The item record for line') . ' ' . $SPLLine->LineNo . ' ' . _('could not be create because'); + $ErrMsg = _('The item record for line') . ' ' . $SPLLine->LineNo . ' ' . _('could not be create because'); $DbgMsg = _('The SQL statement used to insert the item and failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - $sql = "INSERT INTO locstock (loccode, stockid) + $sql = "INSERT INTO locstock (loccode, stockid) SELECT loccode,'" . $PartCode . "' FROM locations"; - $ErrMsg = _('The item stock locations for the special order line') . " " . $SPLLine->LineNo . " " ._('could not be created because'); + $ErrMsg = _('The item stock locations for the special order line') . ' ' . $SPLLine->LineNo . ' ' ._('could not be created because'); $DbgMsg = _('The SQL statement used to insert the location stock records and failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); /*need to get the stock category GL information */ $sql = "SELECT stockact FROM stockcategory WHERE categoryid = '" . $SPLLine->StkCat . "'"; - $ErrMsg = _('The item stock category information for the special order line') ." " . $SPLLine->LineNo . ' ' . _('could not be retrieved because'); + $ErrMsg = _('The item stock category information for the special order line') . ' ' . $SPLLine->LineNo . ' ' . _('could not be retrieved because'); $DbgMsg = _('The SQL statement used to get the category information and that failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); @@ -455,7 +461,7 @@ unitprice, quantityord) VALUES ('"; - $sql = $sql . $_SESSION['SPL']->PurchOrderNo . "', + $sql = $sql . $_SESSION['SPL'.$identifier]->PurchOrderNo . "', '" . $PartCode . "', '" . $OrderDate . "', '" . $SPLLine->ItemDescription . "', @@ -469,8 +475,8 @@ } /* end of the loop round the detail line items on the order */ - - echo '<br /><a href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['SPL']->PurchOrderNo . '">' . _('Print Purchase Order') . '</a>'; + echo '<br /><br />' . _('Purchase Order') . ' ' . $_SESSION['SPL'.$identifier]->PurchOrderNo . ' ' . _('on') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('has been created'); + echo '<br /><a href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['SPL'.$identifier]->PurchOrderNo . '">' . _('Print Purchase Order') . '</a>'; /*Now insert the sales order too */ @@ -488,15 +494,15 @@ phoneno FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno=debtorsmaster.debtorno - WHERE custbranch.debtorno='" . $_SESSION['SPL']->CustomerID . "' - AND custbranch.branchcode = '" . $_SESSION['SPL']->BranchCode . "'"; + WHERE custbranch.debtorno='" . $_SESSION['SPL'.$identifier]->CustomerID . "' + AND custbranch.branchcode = '" . $_SESSION['SPL'.$identifier]->BranchCode . "'"; $ErrMsg = _('The delivery and sales type for the customer could not be retrieved for this special order') . ' ' . $SPLLine->LineNo . ' ' . _('because'); $DbgMsg = _('The SQL statement used to get the delivery details and that failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); $BranchDetails=DB_fetch_array($result); - $OrderNo=GetNextTransNo (30, $db); + $SalesOrderNo=GetNextTransNo (30, $db); $HeaderSQL = "INSERT INTO salesorders (orderno, debtorno, branchcode, @@ -515,10 +521,10 @@ contactemail, fromstkloc, deliverydate) - VALUES ('" . $OrderNo."', - '" . $_SESSION['SPL']->CustomerID . "', - '" . $_SESSION['SPL']->BranchCode . "', - '" . $_SESSION['SPL']->CustRef ."', + VALUES ('" . $SalesOrderNo."', + '" . $_SESSION['SPL'.$identifier]->CustomerID . "', + '" . $_SESSION['SPL'.$identifier]->BranchCode . "', + '" . $_SESSION['SPL'.$identifier]->CustRef ."', '" . Date('Y-m-d') . "', '" . $BranchDetails['salestype'] . "', '" . $BranchDetails['defaultshipvia'] ."', @@ -531,7 +537,7 @@ '" . $BranchDetails['braddress6'] . "', '" . $BranchDetails['phoneno'] . "', '" . $BranchDetails['email'] . "', - '" . $_SESSION['SPL']->StkLocation ."', + '" . $_SESSION['SPL'.$identifier]->StkLocation ."', '" . $OrderDate . "')"; $ErrMsg = _('The sales order cannot be added because'); @@ -542,33 +548,36 @@ unitprice, quantity, orderlineno) - VALUES ('" . $OrderNo . "'"; + VALUES ('" . $SalesOrderNo . "'"; $ErrMsg = _('There was a problem inserting a line into the sales order because'); - foreach ($_SESSION['SPL']->LineItems as $StockItem) { + foreach ($_SESSION['SPL'.$identifier]->LineItems as $StockItem) { - $LineItemsSQL = $StartOf_LineItemsSQL . ", + $LineItemsSQL = $StartOf_LineItemsSQL . ", '" . $StockItem->PartCode . "', - '". $StockItem->Price . "', - '" . $StockItem->Quantity . "', + '". $StockItem->Price . "', + '" . $StockItem->Quantity . "', '" . $StockItem->LineNo . "')"; $Ins_LineItemResult = DB_query($LineItemsSQL,$db,$ErrMsg); } /* inserted line items into sales order details */ - prnMsg(_('Purchase Order') . ' ' . $_SESSION['SPL']->PurchOrderNo . ' ' . _('on') . ' ' . $_SESSION['SPL']->SupplierName . ' ' . _('has been created') .'<br/>' . _('Sales Order Number') . ' ' . $OrderNo . ' ' . _('has been entered') . '. <br/>' . _('Orders created on a cash sales account may need the delivery details for the order to be modified') . '<br />' . _('A freight charge may also be applicable'),'success'); + unset($_SESSION['SPL'.$identifier]); + prnMsg(_('Sales Order Number') . ' ' . $SalesOrderNo . ' ' . _('has been entered') . '. <br />' . + _('Orders created on a cash sales account may need the delivery details for the order to be modified') . '. <br /><br />' . + _('A freight charge may also be applicable'),'success'); if (count($_SESSION['AllowedPageSecurityTokens'])>1){ /* Only allow print of packing slip for internal staff - customer logon's cannot go here */ - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $OrderNo . '">' . _('Print packing slip') . ' (' . _('Preprinted stationery') . ')</a>'; - echo '<p><a href="' . $rootpath . '/PrintCustOrder_generic.php?TransNo=' . $OrderNo . '">' . _('Print packing slip') . ' (' . _('Laser') . ')</a>'; + echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $SalesOrderNo . '">' . _('Print packing slip') . ' (' . _('Preprinted stationery') . ')</a></p>'; + echo '<p><a href="' . $rootpath . '/PrintCustOrder_generic.php?TransNo=' . $SalesOrderNo . '">' . _('Print packing slip') . ' (' . _('Laser') . ')</a></p>'; } - $Result = DB_Txn_Commit($db); - unset ($_SESSION['SPL']); + $Result = DB_Txn_Commit($db); + unset($_SESSION['SPL'.$identifier]); /*Clear the PO data to allow a newy to be input*/ echo '<br /><br /><a href="' . $rootpath . '/SpecialOrder.php">' . _('Enter A New Special Order') . '</a>'; exit; } /*end if there were no input errors trapped */ @@ -581,60 +590,60 @@ $sql = "SELECT loccode, locationname FROM locations"; $LocnResult = DB_query($sql,$db); -if (!isset($_SESSION['SPL']->StkLocation) OR $_SESSION['SPL']->StkLocation==''){ /*If this is the first time the form loaded set up defaults */ - $_SESSION['SPL']->StkLocation = $_SESSION['UserStockLocation']; +if (!isset($_SESSION['SPL'.$identifier]->StkLocation) or $_SESSION['SPL'.$identifier]->StkLocation==''){ /*If this is the first time the form loaded set up defaults */ + $_SESSION['SPL'.$identifier]->StkLocation = $_SESSION['UserStockLocation']; } while ($LocnRow=DB_fetch_array($LocnResult)){ - if ($_SESSION['SPL']->StkLocation == $LocnRow['loccode']){ - echo '<option selected="selected" value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; + if ($_SESSION['SPL'.$identifier]->StkLocation == $LocnRow['loccode']){ + echo '<option selected="True" value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; } else { - echo '<option value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; + echo '<option value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; } } echo '</select></td>'; -echo '<td>' . _('Initiated By') . ': <input type="text" name="Initiator" size="11" maxlength="10" value="' . $_SESSION['SPL']->Initiator . '" /></td> - <td>' . _('Special Ref') . ': <input type="text" name="QuotationRef" size="16" maxlength="15" value="' . $_SESSION['SPL']->QuotationRef . '" /></td> - <td>' . _('Customer Ref') . ': <input type="text" name="CustRef" size="11" maxlength="10" value="' . $_SESSION['SPL']->CustRef . '" /></td> +echo '<td>' . _('Initiated By') . ': <input type="text" name="Initiator" size="11" maxlength="10" value="' . $_SESSION['SPL'.$identifier]->Initiator . '" /></td> + <td>' . _('Special Ref') . ': <input type="text" name="QuotationRef" size="16" maxlength="15" value="' . $_SESSION['SPL'.$identifier]->QuotationRef . '" /></td> + <td>' . _('Customer Ref') . ': <input type="text" name="CustRef" size="11" maxlength="10" value="' . $_SESSION['SPL'.$identifier]->CustRef . '" /></td> </tr> <tr> - <td valign="top" colspan="2">' . _('Comments') . ': <textarea name="Comments" cols="70" rows="2">' . $_SESSION['SPL']->Comments . '</textarea></td> + <td valign="top" colspan="2">' . _('Comments') . ': <textarea name="Comments" cols="70" rows="2">' . $_SESSION['SPL'.$identifier]->Comments . '</textarea></td> </tr> </table> <hr>'; /* Rule off the header */ /*Now show the order so far */ -if (count($_SESSION['SPL']->LineItems)>0){ +if (count($_SESSION['SPL'.$identifier]->LineItems)>0){ echo '<div class="centre"><b>' . _('Special Order Summary') . '</b></div>'; - echo '<table class="selection">'; + echo '<table class="selection" cellpadding="2" colspan="7" border="1">'; echo '<tr> <th>' . _('Item Description') . '</th> <th>' . _('Delivery') . '</th> <th>' . _('Quantity') . '</th> - <th>' . _('Purchase Cost') . '<br />' . $_SESSION['SPL']->SuppCurrCode . '</th> - <th>' . _('Sell Price') . '<br />' . $_SESSION['SPL']->CustCurrCode . '</th> - <th>' . _('Total Cost') . '<br />' . $_SESSION['SPL']->SuppCurrCode . '</th> - <th>' . _('Total Price') . '<br />' . $_SESSION['SPL']->CustCurrCode . '</th> + <th>' . _('Purchase Cost') . '<br />' . $_SESSION['SPL'.$identifier]->SuppCurrCode . '</th> + <th>' . _('Sell Price') . '<br />' . $_SESSION['SPL'.$identifier]->CustCurrCode . '</th> + <th>' . _('Total Cost') . '<br />' . $_SESSION['SPL'.$identifier]->SuppCurrCode . '</th> + <th>' . _('Total Price') . '<br />' . $_SESSION['SPL'.$identifier]->CustCurrCode . '</th> <th>' . _('Total Cost') . '<br />' . $_SESSION['CompanyRecord']['currencydefault'] . '</th> <th>' . _('Total Price') . '<br />' . $_SESSION['CompanyRecord']['currencydefault'] . '</th> </tr>'; - $_SESSION['SPL']->total = 0; + $_SESSION['SPL'.$identifier]->total = 0; $k = 0; //row colour counter - foreach ($_SESSION['SPL']->LineItems as $SPLLine) { + foreach ($_SESSION['SPL'.$identifier]->LineItems as $SPLLine) { $LineTotal = $SPLLine->Quantity * $SPLLine->Price; $LineCostTotal = $SPLLine->Quantity * $SPLLine->Cost; - $DisplayLineTotal = locale_number_format($LineTotal,$_SESSION['SPL']->CustCurrDecimalPlaces); - $DisplayLineCostTotal = locale_number_format($LineCostTotal,$_SESSION['SPL']->SuppCurrDecimalPlaces); - $DisplayLineTotalCurr = locale_number_format($LineTotal/$_SESSION['SPL']->CustCurrExRate,$_SESSION['CompanyRecord']['decimalplaces']); - $DisplayLineCostTotalCurr = locale_number_format($LineCostTotal/$_SESSION['SPL']->SuppCurrExRate,$_SESSION['CompanyRecord']['decimalplaces']); - $DisplayCost = locale_number_format($SPLLine->Cost,$_SESSION['SPL']->SuppCurrDecimalPlaces); - $DisplayPrice = locale_number_format($SPLLine->Price,$_SESSION['SPL']->CustCurrDecimalPlaces); + $DisplayLineTotal = locale_number_format($LineTotal,$_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces); + $DisplayLineCostTotal = locale_number_format($LineCostTotal,$_SESSION['SPL'.$identifier]->SuppCurrDecimalPlaces); + $DisplayLineTotalCurr = locale_number_format($LineTotal/$_SESSION['SPL'.$identifier]->CustCurrExRate,$_SESSION['CompanyRecord']['decimalplaces']); + $DisplayLineCostTotalCurr = locale_number_format($LineCostTotal/$_SESSION['SPL'.$identifier]->SuppCurrExRate,$_SESSION['CompanyRecord']['decimalplaces']); + $DisplayCost = locale_number_format($SPLLine->Cost,$_SESSION['SPL'.$identifier]->SuppCurrDecimalPlaces); + $DisplayPrice = locale_number_format($SPLLine->Price,$_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces); $DisplayQuantity = locale_number_format($SPLLine->Quantity,'Variable'); if ($k==1){ @@ -653,12 +662,13 @@ <td class="number">' . $DisplayLineTotal . '</td> <td class="number">' . $DisplayLineCostTotalCurr . '</td> <td class="number">' . $DisplayLineTotalCurr . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $SPLLine->LineNo . '">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $SPLLine->LineNo . '">' . _('Delete') . '</a></td> + </tr>'; - $_SESSION['SPL']->total += ($LineTotal/$_SESSION['SPL']->CustCurrExRate); + $_SESSION['SPL'.$identifier]->total += ($LineTotal/$_SESSION['SPL'.$identifier]->CustCurrExRate); } - $DisplayTotal = locale_number_format($_SESSION['SPL']->total,$_SESSION['SPL']->CustCurrDecimalPlaces); + $DisplayTotal = locale_number_format($_SESSION['SPL'.$identifier]->total,$_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces); echo '<tr> <td colspan="8" class="number">' . _('TOTAL Excl Tax') . '</td> <td class="number"><b>' . $DisplayTotal . '</b></td> @@ -671,7 +681,7 @@ echo '<table>'; -echo '<input type="hidden" name="LineNo" value="' . ($_SESSION['SPL']->LinesOnOrder + 1) .'" />'; +echo '<input type="hidden" name="LineNo" value="' . ($_SESSION['SPL'.$identifier]->LinesOnOrder + 1) .'" />'; if (!isset($_POST['ItemDescription'])) { $_POST['ItemDescription']=''; @@ -681,7 +691,6 @@ <td><input type="text" name="ItemDescription" size="40" maxlength="40" value="' . $_POST['ItemDescription'] . '" /></td> </tr>'; - echo '<tr> <td>' . _('Category') . ':</td> <td><select name="StkCat">'; @@ -693,7 +702,7 @@ while ($myrow=DB_fetch_array($result)){ if (isset($_POST['StkCat']) and $myrow['categoryid']==$_POST['StkCat']){ - echo '<option selected="selected" value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + echo '<option selected="True" value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } @@ -701,7 +710,6 @@ echo '</select></td> </tr>'; - /*default the order quantity to 1 unit */ $_POST['Qty'] = 1; @@ -715,15 +723,15 @@ } echo '<tr> <td>' . _('Unit Cost') . ':</td> - <td><input type="text" class="number" size="15" maxlength="14" name="Cost" value="' . locale_number_format($_POST['Cost'],$_SESSION['SPL']->SuppCurrDecimalPlaces) . '" /></td> + <td><input type="text" class="number" size="15" maxlength="14" name="Cost" value="' . locale_number_format($_POST['Cost'],$_SESSION['SPL'.$identifier]->SuppCurrDecimalPlaces) . '" /></td> </tr>'; -if (!isset($_POST['Price'])) { +if (!isset($_POST['Price'])) { $_POST['Price']=0; } echo '<tr> <td>' . _('Unit Price') . ':</td> - <td><input type="text" class="number" size="15" maxlength="14" name="Price" value="' . locale_number_format($_POST['Price'],$_SESSION['SPL']->CustCurrDecimalPlaces) . '" /></td> + <td><input type="text" class="number" size="15" maxlength="14" name="Price" value="' . locale_number_format($_POST['Price'],$_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces) . '" /></td> </tr>'; /*Default the required delivery date to tomorrow as a starting point */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-01-27 16:37:42
|
Revision: 4843 http://web-erp.svn.sourceforge.net/web-erp/?rev=4843&view=rev Author: tim_schofield Date: 2012-01-27 16:37:31 +0000 (Fri, 27 Jan 2012) Log Message: ----------- Fix for the scenario when multiple special orders are open at the same time and session variable was getting overwritten Modified Paths: -------------- trunk/SpecialOrder.php Modified: trunk/SpecialOrder.php =================================================================== --- trunk/SpecialOrder.php 2012-01-27 10:14:17 UTC (rev 4842) +++ trunk/SpecialOrder.php 2012-01-27 16:37:31 UTC (rev 4843) @@ -11,12 +11,18 @@ include('includes/header.inc'); -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other supplier tender sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'].'?identifier='.$identifier) . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - if (isset($_GET['NewSpecial']) and $_GET['NewSpecial']=='yes'){ - unset($_SESSION['SPL']); + unset($_SESSION['SPL'.$identifier]); } if (!isset($_SESSION['SupplierID'])){ @@ -27,7 +33,7 @@ exit; } -if (!isset($_SESSION['CustomerID']) OR $_SESSION['CustomerID']==""){ +if (!isset($_SESSION['CustomerID']) or $_SESSION['CustomerID']==''){ echo '<br /> <br />' . _('To set up a special') . ', ' . _('the customer must first be selected from the Select Customer page') . ' <br /> @@ -37,20 +43,20 @@ } if (isset($_POST['Cancel'])){ - unset($_SESSION['SPL']); + unset($_SESSION['SPL'.$identifier]); } -if (!isset($_SESSION['SPL'])){ - /* It must be a new special order being created $_SESSION['SPL'] would be set up from the order modification code above if a modification to an existing order. */ +if (!isset($_SESSION['SPL'.$identifier])){ + /* It must be a new special order being created $_SESSION['SPL'.$identifier] would be set up from the order modification code above if a modification to an existing order. */ - $_SESSION['SPL'] = new SpecialOrder; + $_SESSION['SPL'.$identifier] = new SpecialOrder; } /*if not already done populate the SPL object with supplier data */ -if (!isset($_SESSION['SPL']->SupplierID)){ +if (!isset($_SESSION['SPL'.$identifier]->SupplierID)){ $sql = "SELECT suppliers.suppname, suppliers.currcode, currencies.rate, @@ -63,13 +69,13 @@ $result =DB_query($sql,$db,$ErrMsg,$DbgMsg); $myrow = DB_fetch_array($result); - $_SESSION['SPL']->SupplierID = $_SESSION['SupplierID']; - $_SESSION['SPL']->SupplierName = $myrow['suppname']; - $_SESSION['SPL']->SuppCurrCode = $myrow['currcode']; - $_SESSION['SPL']->SuppCurrExRate = $myrow['rate']; - $_SESSION['SPL']->SuppCurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['SPL'.$identifier]->SupplierID = $_SESSION['SupplierID']; + $_SESSION['SPL'.$identifier]->SupplierName = $myrow['suppname']; + $_SESSION['SPL'.$identifier]->SuppCurrCode = $myrow['currcode']; + $_SESSION['SPL'.$identifier]->SuppCurrExRate = $myrow['rate']; + $_SESSION['SPL'.$identifier]->SuppCurrDecimalPlaces = $myrow['decimalplaces']; } -if (!isset($_SESSION['SPL']->CustomerID)){ +if (!isset($_SESSION['SPL'.$identifier]->CustomerID)){ // Now check to ensure this account is not on hold */ $sql = "SELECT debtorsmaster.name, holdreasons.dissallowinvoices, @@ -78,7 +84,7 @@ currencies.decimalplaces FROM debtorsmaster INNER JOIN holdreasons ON debtorsmaster.holdreason=holdreasons.reasoncode - INNER JOIN currencies + INNER JOIN currencies ON debtorsmaster.currcode=currencies.currabrev WHERE debtorsmaster.debtorno = '" . $_SESSION['CustomerID'] . "'"; @@ -89,38 +95,38 @@ $myrow = DB_fetch_array($result); if ($myrow['dissallowinvoices'] != 1){ if ($myrow['dissallowinvoices']==2){ - prnMsg(_('The') . ' ' . $myrow[0] . ' ' . _('account is currently flagged as an account that needs to be watched please contact the credit control personnel to discuss'),'warn'); + prnMsg(_('The') . ' ' . $myrow['name'] . ' ' . _('account is currently flagged as an account that needs to be watched please contact the credit control personnel to discuss'),'warn'); } } - $_SESSION['SPL']->CustomerID = $_SESSION['CustomerID']; - $_SESSION['SPL']->CustomerName = $myrow['name']; - $_SESSION['SPL']->CustCurrCode = $myrow['currcode']; - $_SESSION['SPL']->CustCurrExRate = $myrow['rate']; - $_SESSION['SPL']->CustCurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['SPL'.$identifier]->CustomerID = $_SESSION['CustomerID']; + $_SESSION['SPL'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['SPL'.$identifier]->CustCurrCode = $myrow['currcode']; + $_SESSION['SPL'.$identifier]->CustCurrExRate = $myrow['rate']; + $_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces = $myrow['decimalplaces']; } if (isset($_POST['SelectBranch'])){ $sql = "SELECT brname FROM custbranch - WHERE debtorno='" . $_SESSION['SPL']->CustomerID . "' + WHERE debtorno='" . $_SESSION['SPL'.$identifier]->CustomerID . "' AND branchcode='" . $_POST['SelectBranch'] . "'"; $BranchResult = DB_query($sql,$db); $myrow=DB_fetch_array($BranchResult); - $_SESSION['SPL']->BranchCode = $_POST['SelectBranch']; - $_SESSION['SPL']->BranchName = $myrow['brname']; + $_SESSION['SPL'.$identifier]->BranchCode = $_POST['SelectBranch']; + $_SESSION['SPL'.$identifier]->BranchName = $myrow['brname']; } echo '<div class="centre">'; -if (!isset($_SESSION['SPL']->BranchCode)){ +if (!isset($_SESSION['SPL'.$identifier]->BranchCode)){ echo '<br /> - <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL']->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL']->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL']->CustomerName . ' (' . $_SESSION['SPL']->CustCurrCode . ')'; + <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL'.$identifier]->CustomerName . ' (' . $_SESSION['SPL'.$identifier]->CustCurrCode . ')'; } else { echo '<br /> - <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL']->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL']->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL']->CustomerName . ' (' . $_SESSION['SPL']->CustCurrCode . ') - ' . _('delivered to') . ' ' . $_SESSION['SPL']->BranchName . ' ' . _('branch'); + <font size="4" color="blue">' . _('Purchase from') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('for') . ' ' . $_SESSION['SPL'.$identifier]->CustomerName . ' (' . $_SESSION['SPL'.$identifier]->CustCurrCode . ') - ' . _('delivered to') . ' ' . $_SESSION['SPL'.$identifier]->BranchName . ' ' . _('branch'); } echo '</font></div>'; /*if the branch details and delivery details have not been entered then select them from the list */ -if (!isset($_SESSION['SPL']->BranchCode)){ +if (!isset($_SESSION['SPL'.$identifier]->BranchCode)){ $sql = "SELECT branchcode, brname @@ -128,7 +134,7 @@ WHERE debtorno='" . $_SESSION['CustomerID'] . "'"; $BranchResult = DB_query($sql,$db); - If (DB_num_rows($BranchResult)>0) { + if (DB_num_rows($BranchResult)>0) { echo '<div class="centre">'; echo '<br /> @@ -159,8 +165,8 @@ printf('<td><input type="submit" name="SelectBranch" value="%s" /></td> <td>%s</td> - </tr>', - $myrow['branchcode'], + </tr>', + $myrow['branchcode'], $myrow['brname']); //end of page full new headings if @@ -181,7 +187,7 @@ If(isset($_GET['Delete'])){ /*User hit the delete link on a line */ - $_SESSION['SPL']->remove_from_order($_GET['Delete']); + $_SESSION['SPL'.$identifier]->remove_from_order($_GET['Delete']); } @@ -220,7 +226,7 @@ prnMsg( _('Cannot Enter this order line') . '<br />' . _('The cost entered must be numeric'),'warn'); } - if (((filter_number_format($_POST['Price'])/$_SESSION['SPL']->CustCurrExRate)-(filter_number_format($_POST['Cost'])/$_SESSION['SPL']->SuppCurrExRate))<0){ + if (((filter_number_format($_POST['Price'])/$_SESSION['SPL'.$identifier]->CustCurrExRate)-(filter_number_format($_POST['Cost'])/$_SESSION['SPL'.$identifier]->SuppCurrExRate))<0){ $AllowAdd = False; prnMsg( _('Cannot Enter this order line') . '<br />' . _('The sale is at a lower price than the cost'),'warn'); } @@ -231,12 +237,12 @@ } If ($AllowAdd == True){ - $_SESSION['SPL']->add_to_order ($_POST['LineNo'], - filter_number_format($_POST['Qty']), - $_POST['ItemDescription'], - filter_number_format($_POST['Price']), - filter_number_format($_POST['Cost']), - $_POST['StkCat'], + $_SESSION['SPL'.$identifier]->add_to_order ($_POST['LineNo'], + filter_number_format($_POST['Qty']), + $_POST['ItemDescription'], + filter_number_format($_POST['Price']), + filter_number_format($_POST['Cost']), + $_POST['StkCat'], $_POST['ReqDelDate']); unset($_POST['Price']); @@ -249,19 +255,19 @@ } if (isset($_POST['StkLocation'])) { - $_SESSION['SPL']->StkLocation = $_POST['StkLocation']; + $_SESSION['SPL'.$identifier]->StkLocation = $_POST['StkLocation']; } if (isset($_POST['Initiator'])) { - $_SESSION['SPL']->Initiator = $_POST['Initiator']; + $_SESSION['SPL'.$identifier]->Initiator = $_POST['Initiator']; } if (isset($_POST['QuotationRef'])) { - $_SESSION['SPL']->QuotationRef = $_POST['QuotationRef']; + $_SESSION['SPL'.$identifier]->QuotationRef = $_POST['QuotationRef']; } if (isset($_POST['Comments'])) { - $_SESSION['SPL']->Comments = $_POST['Comments']; + $_SESSION['SPL'.$identifier]->Comments = $_POST['Comments']; } if (isset($_POST['CustRef'])) { - $_SESSION['SPL']->CustRef = $_POST['CustRef']; + $_SESSION['SPL'.$identifier]->CustRef = $_POST['CustRef']; } if (isset($_POST['Commit'])){ /*User wishes to commit the order to the database */ @@ -269,13 +275,13 @@ /*First do some validation Is the delivery information all entered*/ $InputError=0; /*Start off assuming the best */ - if ($_SESSION['SPL']->StkLocation=='' - OR ! isset($_SESSION['SPL']->StkLocation)){ + if ($_SESSION['SPL'.$identifier]->StkLocation=='' + or ! isset($_SESSION['SPL'.$identifier]->StkLocation)){ prnMsg( _('The purchase order can not be committed to the database because there is no stock location specified to book any stock items into'),'error'); $InputError=1; - } elseif ($_SESSION['SPL']->LinesOnOrder <=0){ + } elseif ($_SESSION['SPL'.$identifier]->LinesOnOrder <=0){ $InputError=1; - prnMsg(_('The purchase order can not be committed to the database because there are no lines entered on this order'),'error'); + prnMsg(_('The purchase order can not be committed to the database because there are no lines entered on this order'),'error'); }elseif (mb_strlen($_POST['QuotationRef'])<3){ $InputError=1; prnMsg( _('The reference for this order is less than 3 characters') . ' - ' . _('a reference more than 3 characters is required before the order can be added'),'error'); @@ -291,37 +297,37 @@ } else { $UserDetails = ' ' . $_SESSION['UsersRealName'] . ' '; } - - if ($_SESSION['AutoAuthorisePO']==1) { + + if ($_SESSION['AutoAuthorisePO']==1) { //if the user has authority to authorise the PO then it will automatically be authorised $AuthSQL ="SELECT authlevel FROM purchorderauth WHERE userid='".$_SESSION['UserID']."' - AND currabrev='".$_SESSION['SPL']->SuppCurrCode."'"; + AND currabrev='".$_SESSION['SPL'.$identifier]->SuppCurrCode."'"; $AuthResult=DB_query($AuthSQL,$db); $AuthRow=DB_fetch_array($AuthResult); - - if (DB_num_rows($AuthResult) > 0 - AND $AuthRow['authlevel'] > $_SESSION['SPL']->Order_Value()) { //user has authority to authrorise as well as create the order + + if (DB_num_rows($AuthResult) > 0 + and $AuthRow['authlevel'] > $_SESSION['SPL'.$identifier]->Order_Value()) { //user has authority to authrorise as well as create the order $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . $UserDetails . '<br />'; - $_SESSION['SPL']->AllowPrintPO=1; - $_SESSION['SPL']->Status = 'Authorised'; + $_SESSION['SPL'.$identifier]->AllowPrintPO=1; + $_SESSION['SPL'.$identifier]->Status = 'Authorised'; } else { // no authority to authorise this order if (DB_num_rows($AuthResult) ==0){ - $AuthMessage = _('Your authority to approve purchase orders in') . ' ' . $_SESSION['SPL']->SuppCurrCode . ' ' . _('has not yet been set up') . '<br />'; + $AuthMessage = _('Your authority to approve purchase orders in') . ' ' . $_SESSION['SPL'.$identifier]->SuppCurrCode . ' ' . _('has not yet been set up') . '<br />'; } else { - $AuthMessage = _('You can only authorise up to').' '.$_SESSION['SPL']->SuppCurrCode.' '.$AuthRow['authlevel'] .'.<br />'; + $AuthMessage = _('You can only authorise up to').' '.$_SESSION['SPL'.$identifier]->SuppCurrCode.' '.$AuthRow['authlevel'] .'.<br />'; } - - prnMsg( _('You do not have permission to authorise this purchase order').'.<br />'. _('This order is for').' '. $_SESSION['SPL']->SuppCurrCode . ' '. $_SESSION['SPL']->Order_Value() .'. '. $AuthMessage . _('If you think this is a mistake please contact the systems administrator') . '<br />'. _('The order will be created with a status of pending and will require authorisation'), 'warn'); - + + prnMsg( _('You do not have permission to authorise this purchase order').'.<br />'. _('This order is for').' '. $_SESSION['SPL'.$identifier]->SuppCurrCode . ' '. $_SESSION['SPL'.$identifier]->Order_Value() .'. '. $AuthMessage . _('If you think this is a mistake please contact the systems administrator') . '<br />'. _('The order will be created with a status of pending and will require authorisation'), 'warn'); + $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . $UserDetails; - $_SESSION['SPL']->Status = 'Pending'; + $_SESSION['SPL'.$identifier]->Status = 'Pending'; } } else { //auto authorise is set to off $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . $UserDetails; - $_SESSION['SPL']->Status = 'Pending'; + $_SESSION['SPL'.$identifier]->Status = 'Pending'; } $sql = "SELECT contact, @@ -332,7 +338,7 @@ deladd5, deladd6 FROM locations - WHERE loccode='" . $_SESSION['SPL']->StkLocation . "'"; + WHERE loccode='" . $_SESSION['SPL'.$identifier]->StkLocation . "'"; $StkLocAddResult = DB_query($sql,$db); $StkLocAddress = DB_fetch_array($StkLocAddResult); @@ -359,39 +365,39 @@ allowprint, revised, deliverydate) - VALUES ('" . $_SESSION['SPL']->SupplierID . "', - '" . $_SESSION['SPL']->Comments . "', + VALUES ('" . $_SESSION['SPL'.$identifier]->SupplierID . "', + '" . $_SESSION['SPL'.$identifier]->Comments . "', '" . Date('Y-m-d') . "', - '" . $_SESSION['SPL']->SuppCurrExRate . "', - '" . $_SESSION['SPL']->Initiator . "', - '" . $_SESSION['SPL']->QuotationRef . "', - '" . $_SESSION['SPL']->StkLocation . "', - '" . DB_escape_string($StkLocAddress['deladd1']) . "', - '" . DB_escape_string($StkLocAddress['deladd2']) . "', - '" . DB_escape_string($StkLocAddress['deladd3']) . "', - '" . DB_escape_string($StkLocAddress['deladd4']) . "', - '" . DB_escape_string($StkLocAddress['deladd5']) . "', - '" . DB_escape_string($StkLocAddress['deladd6']) . "', - '" . DB_escape_string($StkLocAddress['contact']) . "', - '" . $_SESSION['SPL']->Status . "', + '" . $_SESSION['SPL'.$identifier]->SuppCurrExRate . "', + '" . $_SESSION['SPL'.$identifier]->Initiator . "', + '" . $_SESSION['SPL'.$identifier]->QuotationRef . "', + '" . $_SESSION['SPL'.$identifier]->StkLocation . "', + '" . $StkLocAddress['deladd1'] . "', + '" . $StkLocAddress['deladd2'] . "', + '" . $StkLocAddress['deladd3'] . "', + '" . $StkLocAddress['deladd4'] . "', + '" . $StkLocAddress['deladd5'] . "', + '" . $StkLocAddress['deladd6'] . "', + '" . $StkLocAddress['contact'] . "', + '" . $_SESSION['SPL'.$identifier]->Status . "', '" . htmlentities($StatusComment, ENT_QUOTES,'UTF-8') . "', - '" . $_SESSION['SPL']->AllowPrintPO . "', + '" . $_SESSION['SPL'.$identifier]->AllowPrintPO . "', '" . Date('Y-m-d') . "', '" . Date('Y-m-d') . "')"; - + $ErrMsg = _('The purchase order header record could not be inserted into the database because'); $DbgMsg = _('The SQL statement used to insert the purchase order header record and failed was'); $result = DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - $_SESSION['SPL']->PurchOrderNo = GetNextTransNo(18, $db); + $_SESSION['SPL'.$identifier]->PurchOrderNo = GetNextTransNo(18, $db); /*Insert the purchase order detail records */ - foreach ($_SESSION['SPL']->LineItems as $SPLLine) { + foreach ($_SESSION['SPL'.$identifier]->LineItems as $SPLLine) { /*Set up the part codes required for this order */ - $PartCode = "*" . $_SESSION['SPL']->PurchOrderNo . "_" . $SPLLine->LineNo; + $PartCode = "*" . $_SESSION['SPL'.$identifier]->PurchOrderNo . "_" . $SPLLine->LineNo; $PartAlreadyExists =True; /*assume the worst */ $Counter = 0; @@ -402,7 +408,7 @@ if ($PartCount[0]!=0){ $PartAlreadyExists =True; if (mb_strlen($PartCode)==20){ - $PartCode = "*" . mb_strtoupper(mb_substr($_SESSION['SPL']->PurchOrderNo,0,13)) . "_" . $SPLLine->LineNo; + $PartCode = '*' . mb_strtoupper(mb_substr($_SESSION['SPL'.$identifier]->PurchOrderNo,0,13)) . '_' . $SPLLine->LineNo; } $PartCode = $PartCode . $Counter; $Counter++; @@ -411,7 +417,7 @@ } } - $_SESSION['SPL']->LineItems[$SPLLine->LineNo]->PartCode = $PartCode; + $_SESSION['SPL'.$identifier]->LineItems[$SPLLine->LineNo]->PartCode = $PartCode; $sql = "INSERT INTO stockmaster (stockid, categoryid, @@ -425,20 +431,20 @@ '" . $SPLLine->Cost . "')"; - $ErrMsg = _('The item record for line') . ' ' . $SPLLine->LineNo . ' ' . _('could not be create because'); + $ErrMsg = _('The item record for line') . ' ' . $SPLLine->LineNo . ' ' . _('could not be create because'); $DbgMsg = _('The SQL statement used to insert the item and failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); - $sql = "INSERT INTO locstock (loccode, stockid) + $sql = "INSERT INTO locstock (loccode, stockid) SELECT loccode,'" . $PartCode . "' FROM locations"; - $ErrMsg = _('The item stock locations for the special order line') . " " . $SPLLine->LineNo . " " ._('could not be created because'); + $ErrMsg = _('The item stock locations for the special order line') . ' ' . $SPLLine->LineNo . ' ' ._('could not be created because'); $DbgMsg = _('The SQL statement used to insert the location stock records and failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); /*need to get the stock category GL information */ $sql = "SELECT stockact FROM stockcategory WHERE categoryid = '" . $SPLLine->StkCat . "'"; - $ErrMsg = _('The item stock category information for the special order line') ." " . $SPLLine->LineNo . ' ' . _('could not be retrieved because'); + $ErrMsg = _('The item stock category information for the special order line') . ' ' . $SPLLine->LineNo . ' ' . _('could not be retrieved because'); $DbgMsg = _('The SQL statement used to get the category information and that failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); @@ -455,7 +461,7 @@ unitprice, quantityord) VALUES ('"; - $sql = $sql . $_SESSION['SPL']->PurchOrderNo . "', + $sql = $sql . $_SESSION['SPL'.$identifier]->PurchOrderNo . "', '" . $PartCode . "', '" . $OrderDate . "', '" . $SPLLine->ItemDescription . "', @@ -469,8 +475,8 @@ } /* end of the loop round the detail line items on the order */ - - echo '<br /><a href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['SPL']->PurchOrderNo . '">' . _('Print Purchase Order') . '</a>'; + echo '<br /><br />' . _('Purchase Order') . ' ' . $_SESSION['SPL'.$identifier]->PurchOrderNo . ' ' . _('on') . ' ' . $_SESSION['SPL'.$identifier]->SupplierName . ' ' . _('has been created'); + echo '<br /><a href="' . $rootpath . '/PO_PDFPurchOrder.php?OrderNo=' . $_SESSION['SPL'.$identifier]->PurchOrderNo . '">' . _('Print Purchase Order') . '</a>'; /*Now insert the sales order too */ @@ -488,15 +494,15 @@ phoneno FROM custbranch INNER JOIN debtorsmaster ON custbranch.debtorno=debtorsmaster.debtorno - WHERE custbranch.debtorno='" . $_SESSION['SPL']->CustomerID . "' - AND custbranch.branchcode = '" . $_SESSION['SPL']->BranchCode . "'"; + WHERE custbranch.debtorno='" . $_SESSION['SPL'.$identifier]->CustomerID . "' + AND custbranch.branchcode = '" . $_SESSION['SPL'.$identifier]->BranchCode . "'"; $ErrMsg = _('The delivery and sales type for the customer could not be retrieved for this special order') . ' ' . $SPLLine->LineNo . ' ' . _('because'); $DbgMsg = _('The SQL statement used to get the delivery details and that failed was'); $result =DB_query($sql,$db,$ErrMsg,$DbgMsg,true); $BranchDetails=DB_fetch_array($result); - $OrderNo=GetNextTransNo (30, $db); + $SalesOrderNo=GetNextTransNo (30, $db); $HeaderSQL = "INSERT INTO salesorders (orderno, debtorno, branchcode, @@ -515,10 +521,10 @@ contactemail, fromstkloc, deliverydate) - VALUES ('" . $OrderNo."', - '" . $_SESSION['SPL']->CustomerID . "', - '" . $_SESSION['SPL']->BranchCode . "', - '" . $_SESSION['SPL']->CustRef ."', + VALUES ('" . $SalesOrderNo."', + '" . $_SESSION['SPL'.$identifier]->CustomerID . "', + '" . $_SESSION['SPL'.$identifier]->BranchCode . "', + '" . $_SESSION['SPL'.$identifier]->CustRef ."', '" . Date('Y-m-d') . "', '" . $BranchDetails['salestype'] . "', '" . $BranchDetails['defaultshipvia'] ."', @@ -531,7 +537,7 @@ '" . $BranchDetails['braddress6'] . "', '" . $BranchDetails['phoneno'] . "', '" . $BranchDetails['email'] . "', - '" . $_SESSION['SPL']->StkLocation ."', + '" . $_SESSION['SPL'.$identifier]->StkLocation ."', '" . $OrderDate . "')"; $ErrMsg = _('The sales order cannot be added because'); @@ -542,33 +548,36 @@ unitprice, quantity, orderlineno) - VALUES ('" . $OrderNo . "'"; + VALUES ('" . $SalesOrderNo . "'"; $ErrMsg = _('There was a problem inserting a line into the sales order because'); - foreach ($_SESSION['SPL']->LineItems as $StockItem) { + foreach ($_SESSION['SPL'.$identifier]->LineItems as $StockItem) { - $LineItemsSQL = $StartOf_LineItemsSQL . ", + $LineItemsSQL = $StartOf_LineItemsSQL . ", '" . $StockItem->PartCode . "', - '". $StockItem->Price . "', - '" . $StockItem->Quantity . "', + '". $StockItem->Price . "', + '" . $StockItem->Quantity . "', '" . $StockItem->LineNo . "')"; $Ins_LineItemResult = DB_query($LineItemsSQL,$db,$ErrMsg); } /* inserted line items into sales order details */ - prnMsg(_('Purchase Order') . ' ' . $_SESSION['SPL']->PurchOrderNo . ' ' . _('on') . ' ' . $_SESSION['SPL']->SupplierName . ' ' . _('has been created') .'<br/>' . _('Sales Order Number') . ' ' . $OrderNo . ' ' . _('has been entered') . '. <br/>' . _('Orders created on a cash sales account may need the delivery details for the order to be modified') . '<br />' . _('A freight charge may also be applicable'),'success'); + unset($_SESSION['SPL'.$identifier]); + prnMsg(_('Sales Order Number') . ' ' . $SalesOrderNo . ' ' . _('has been entered') . '. <br />' . + _('Orders created on a cash sales account may need the delivery details for the order to be modified') . '. <br /><br />' . + _('A freight charge may also be applicable'),'success'); if (count($_SESSION['AllowedPageSecurityTokens'])>1){ /* Only allow print of packing slip for internal staff - customer logon's cannot go here */ - echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $OrderNo . '">' . _('Print packing slip') . ' (' . _('Preprinted stationery') . ')</a>'; - echo '<p><a href="' . $rootpath . '/PrintCustOrder_generic.php?TransNo=' . $OrderNo . '">' . _('Print packing slip') . ' (' . _('Laser') . ')</a>'; + echo '<p><a href="' . $rootpath . '/PrintCustOrder.php?TransNo=' . $SalesOrderNo . '">' . _('Print packing slip') . ' (' . _('Preprinted stationery') . ')</a></p>'; + echo '<p><a href="' . $rootpath . '/PrintCustOrder_generic.php?TransNo=' . $SalesOrderNo . '">' . _('Print packing slip') . ' (' . _('Laser') . ')</a></p>'; } - $Result = DB_Txn_Commit($db); - unset ($_SESSION['SPL']); + $Result = DB_Txn_Commit($db); + unset($_SESSION['SPL'.$identifier]); /*Clear the PO data to allow a newy to be input*/ echo '<br /><br /><a href="' . $rootpath . '/SpecialOrder.php">' . _('Enter A New Special Order') . '</a>'; exit; } /*end if there were no input errors trapped */ @@ -581,60 +590,60 @@ $sql = "SELECT loccode, locationname FROM locations"; $LocnResult = DB_query($sql,$db); -if (!isset($_SESSION['SPL']->StkLocation) OR $_SESSION['SPL']->StkLocation==''){ /*If this is the first time the form loaded set up defaults */ - $_SESSION['SPL']->StkLocation = $_SESSION['UserStockLocation']; +if (!isset($_SESSION['SPL'.$identifier]->StkLocation) or $_SESSION['SPL'.$identifier]->StkLocation==''){ /*If this is the first time the form loaded set up defaults */ + $_SESSION['SPL'.$identifier]->StkLocation = $_SESSION['UserStockLocation']; } while ($LocnRow=DB_fetch_array($LocnResult)){ - if ($_SESSION['SPL']->StkLocation == $LocnRow['loccode']){ - echo '<option selected="selected" value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; + if ($_SESSION['SPL'.$identifier]->StkLocation == $LocnRow['loccode']){ + echo '<option selected="True" value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; } else { - echo '<option value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; + echo '<option value="' . $LocnRow['loccode'] . '">' . $LocnRow['locationname'] . '</option>'; } } echo '</select></td>'; -echo '<td>' . _('Initiated By') . ': <input type="text" name="Initiator" size="11" maxlength="10" value="' . $_SESSION['SPL']->Initiator . '" /></td> - <td>' . _('Special Ref') . ': <input type="text" name="QuotationRef" size="16" maxlength="15" value="' . $_SESSION['SPL']->QuotationRef . '" /></td> - <td>' . _('Customer Ref') . ': <input type="text" name="CustRef" size="11" maxlength="10" value="' . $_SESSION['SPL']->CustRef . '" /></td> +echo '<td>' . _('Initiated By') . ': <input type="text" name="Initiator" size="11" maxlength="10" value="' . $_SESSION['SPL'.$identifier]->Initiator . '" /></td> + <td>' . _('Special Ref') . ': <input type="text" name="QuotationRef" size="16" maxlength="15" value="' . $_SESSION['SPL'.$identifier]->QuotationRef . '" /></td> + <td>' . _('Customer Ref') . ': <input type="text" name="CustRef" size="11" maxlength="10" value="' . $_SESSION['SPL'.$identifier]->CustRef . '" /></td> </tr> <tr> - <td valign="top" colspan="2">' . _('Comments') . ': <textarea name="Comments" cols="70" rows="2">' . $_SESSION['SPL']->Comments . '</textarea></td> + <td valign="top" colspan="2">' . _('Comments') . ': <textarea name="Comments" cols="70" rows="2">' . $_SESSION['SPL'.$identifier]->Comments . '</textarea></td> </tr> </table> <hr>'; /* Rule off the header */ /*Now show the order so far */ -if (count($_SESSION['SPL']->LineItems)>0){ +if (count($_SESSION['SPL'.$identifier]->LineItems)>0){ echo '<div class="centre"><b>' . _('Special Order Summary') . '</b></div>'; - echo '<table class="selection">'; + echo '<table class="selection" cellpadding="2" colspan="7" border="1">'; echo '<tr> <th>' . _('Item Description') . '</th> <th>' . _('Delivery') . '</th> <th>' . _('Quantity') . '</th> - <th>' . _('Purchase Cost') . '<br />' . $_SESSION['SPL']->SuppCurrCode . '</th> - <th>' . _('Sell Price') . '<br />' . $_SESSION['SPL']->CustCurrCode . '</th> - <th>' . _('Total Cost') . '<br />' . $_SESSION['SPL']->SuppCurrCode . '</th> - <th>' . _('Total Price') . '<br />' . $_SESSION['SPL']->CustCurrCode . '</th> + <th>' . _('Purchase Cost') . '<br />' . $_SESSION['SPL'.$identifier]->SuppCurrCode . '</th> + <th>' . _('Sell Price') . '<br />' . $_SESSION['SPL'.$identifier]->CustCurrCode . '</th> + <th>' . _('Total Cost') . '<br />' . $_SESSION['SPL'.$identifier]->SuppCurrCode . '</th> + <th>' . _('Total Price') . '<br />' . $_SESSION['SPL'.$identifier]->CustCurrCode . '</th> <th>' . _('Total Cost') . '<br />' . $_SESSION['CompanyRecord']['currencydefault'] . '</th> <th>' . _('Total Price') . '<br />' . $_SESSION['CompanyRecord']['currencydefault'] . '</th> </tr>'; - $_SESSION['SPL']->total = 0; + $_SESSION['SPL'.$identifier]->total = 0; $k = 0; //row colour counter - foreach ($_SESSION['SPL']->LineItems as $SPLLine) { + foreach ($_SESSION['SPL'.$identifier]->LineItems as $SPLLine) { $LineTotal = $SPLLine->Quantity * $SPLLine->Price; $LineCostTotal = $SPLLine->Quantity * $SPLLine->Cost; - $DisplayLineTotal = locale_number_format($LineTotal,$_SESSION['SPL']->CustCurrDecimalPlaces); - $DisplayLineCostTotal = locale_number_format($LineCostTotal,$_SESSION['SPL']->SuppCurrDecimalPlaces); - $DisplayLineTotalCurr = locale_number_format($LineTotal/$_SESSION['SPL']->CustCurrExRate,$_SESSION['CompanyRecord']['decimalplaces']); - $DisplayLineCostTotalCurr = locale_number_format($LineCostTotal/$_SESSION['SPL']->SuppCurrExRate,$_SESSION['CompanyRecord']['decimalplaces']); - $DisplayCost = locale_number_format($SPLLine->Cost,$_SESSION['SPL']->SuppCurrDecimalPlaces); - $DisplayPrice = locale_number_format($SPLLine->Price,$_SESSION['SPL']->CustCurrDecimalPlaces); + $DisplayLineTotal = locale_number_format($LineTotal,$_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces); + $DisplayLineCostTotal = locale_number_format($LineCostTotal,$_SESSION['SPL'.$identifier]->SuppCurrDecimalPlaces); + $DisplayLineTotalCurr = locale_number_format($LineTotal/$_SESSION['SPL'.$identifier]->CustCurrExRate,$_SESSION['CompanyRecord']['decimalplaces']); + $DisplayLineCostTotalCurr = locale_number_format($LineCostTotal/$_SESSION['SPL'.$identifier]->SuppCurrExRate,$_SESSION['CompanyRecord']['decimalplaces']); + $DisplayCost = locale_number_format($SPLLine->Cost,$_SESSION['SPL'.$identifier]->SuppCurrDecimalPlaces); + $DisplayPrice = locale_number_format($SPLLine->Price,$_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces); $DisplayQuantity = locale_number_format($SPLLine->Quantity,'Variable'); if ($k==1){ @@ -653,12 +662,13 @@ <td class="number">' . $DisplayLineTotal . '</td> <td class="number">' . $DisplayLineCostTotalCurr . '</td> <td class="number">' . $DisplayLineTotalCurr . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $SPLLine->LineNo . '">' . _('Delete') . '</a></td></tr>'; + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $SPLLine->LineNo . '">' . _('Delete') . '</a></td> + </tr>'; - $_SESSION['SPL']->total += ($LineTotal/$_SESSION['SPL']->CustCurrExRate); + $_SESSION['SPL'.$identifier]->total += ($LineTotal/$_SESSION['SPL'.$identifier]->CustCurrExRate); } - $DisplayTotal = locale_number_format($_SESSION['SPL']->total,$_SESSION['SPL']->CustCurrDecimalPlaces); + $DisplayTotal = locale_number_format($_SESSION['SPL'.$identifier]->total,$_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces); echo '<tr> <td colspan="8" class="number">' . _('TOTAL Excl Tax') . '</td> <td class="number"><b>' . $DisplayTotal . '</b></td> @@ -671,7 +681,7 @@ echo '<table>'; -echo '<input type="hidden" name="LineNo" value="' . ($_SESSION['SPL']->LinesOnOrder + 1) .'" />'; +echo '<input type="hidden" name="LineNo" value="' . ($_SESSION['SPL'.$identifier]->LinesOnOrder + 1) .'" />'; if (!isset($_POST['ItemDescription'])) { $_POST['ItemDescription']=''; @@ -681,7 +691,6 @@ <td><input type="text" name="ItemDescription" size="40" maxlength="40" value="' . $_POST['ItemDescription'] . '" /></td> </tr>'; - echo '<tr> <td>' . _('Category') . ':</td> <td><select name="StkCat">'; @@ -693,7 +702,7 @@ while ($myrow=DB_fetch_array($result)){ if (isset($_POST['StkCat']) and $myrow['categoryid']==$_POST['StkCat']){ - echo '<option selected="selected" value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; + echo '<option selected="True" value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } else { echo '<option value="' . $myrow['categoryid'] . '">' . $myrow['categorydescription'] . '</option>'; } @@ -701,7 +710,6 @@ echo '</select></td> </tr>'; - /*default the order quantity to 1 unit */ $_POST['Qty'] = 1; @@ -715,15 +723,15 @@ } echo '<tr> <td>' . _('Unit Cost') . ':</td> - <td><input type="text" class="number" size="15" maxlength="14" name="Cost" value="' . locale_number_format($_POST['Cost'],$_SESSION['SPL']->SuppCurrDecimalPlaces) . '" /></td> + <td><input type="text" class="number" size="15" maxlength="14" name="Cost" value="' . locale_number_format($_POST['Cost'],$_SESSION['SPL'.$identifier]->SuppCurrDecimalPlaces) . '" /></td> </tr>'; -if (!isset($_POST['Price'])) { +if (!isset($_POST['Price'])) { $_POST['Price']=0; } echo '<tr> <td>' . _('Unit Price') . ':</td> - <td><input type="text" class="number" size="15" maxlength="14" name="Price" value="' . locale_number_format($_POST['Price'],$_SESSION['SPL']->CustCurrDecimalPlaces) . '" /></td> + <td><input type="text" class="number" size="15" maxlength="14" name="Price" value="' . locale_number_format($_POST['Price'],$_SESSION['SPL'.$identifier]->CustCurrDecimalPlaces) . '" /></td> </tr>'; /*Default the required delivery date to tomorrow as a starting point */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-27 10:14:27
|
Revision: 4842 http://web-erp.svn.sourceforge.net/web-erp/?rev=4842&view=rev Author: daintree Date: 2012-01-27 10:14:17 +0000 (Fri, 27 Jan 2012) Log Message: ----------- fixed html display from StatusComments POST using htmlentities Modified Paths: -------------- trunk/PO_AuthoriseMyOrders.php Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2012-01-27 10:12:31 UTC (rev 4841) +++ trunk/PO_AuthoriseMyOrders.php 2012-01-27 10:14:17 UTC (rev 4842) @@ -20,7 +20,7 @@ if (mb_substr($key,0,6)=='status') { $OrderNo=mb_substr($key,6); $Status=$_POST['status'.$OrderNo]; - $Comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' <a href="mailto:' . $EmailRow['email'].'">'.$_SESSION['UserID'].'</a><br />' . $_POST['comment']; + $Comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' <a href="mailto:' . $EmailRow['email'].'">'.$_SESSION['UserID'].'</a><br />' . html_entity_decode($_POST['comment'],ENT_QUOTES,'UTF-8'); $sql="UPDATE purchorders SET status='".$Status."', stat_comment='".$Comment."', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-27 10:14:27
|
Revision: 4842 http://web-erp.svn.sourceforge.net/web-erp/?rev=4842&view=rev Author: daintree Date: 2012-01-27 10:14:17 +0000 (Fri, 27 Jan 2012) Log Message: ----------- fixed html display from StatusComments POST using htmlentities Modified Paths: -------------- trunk/PO_AuthoriseMyOrders.php Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2012-01-27 10:12:31 UTC (rev 4841) +++ trunk/PO_AuthoriseMyOrders.php 2012-01-27 10:14:17 UTC (rev 4842) @@ -20,7 +20,7 @@ if (mb_substr($key,0,6)=='status') { $OrderNo=mb_substr($key,6); $Status=$_POST['status'.$OrderNo]; - $Comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' <a href="mailto:' . $EmailRow['email'].'">'.$_SESSION['UserID'].'</a><br />' . $_POST['comment']; + $Comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' <a href="mailto:' . $EmailRow['email'].'">'.$_SESSION['UserID'].'</a><br />' . html_entity_decode($_POST['comment'],ENT_QUOTES,'UTF-8'); $sql="UPDATE purchorders SET status='".$Status."', stat_comment='".$Comment."', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-27 10:12:40
|
Revision: 4841 http://web-erp.svn.sourceforge.net/web-erp/?rev=4841&view=rev Author: daintree Date: 2012-01-27 10:12:31 +0000 (Fri, 27 Jan 2012) Log Message: ----------- fixed html display from StatusComments POST using htmlentities Modified Paths: -------------- trunk/GLJournal.php trunk/PO_AuthoriseMyOrders.php trunk/doc/Change.log Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2012-01-25 23:23:13 UTC (rev 4840) +++ trunk/GLJournal.php 2012-01-27 10:12:31 UTC (rev 4841) @@ -318,9 +318,7 @@ if (!isset($_POST['GLManualCode'])) { $_POST['GLManualCode']=''; } -echo '<td><input class="number" type="text" Name="GLManualCode" Maxlength="12" size="12" onChange="inArray(this.value, GLCode.options,'. - "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . - ' value="'. $_POST['GLManualCode'] .'" /></td>'; +echo '<td><input class="number" type="text" name="GLManualCode" maxlength="12" size="12" onChange="inArray(this.value, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" value="'. $_POST['GLManualCode'] .'" /></td>'; $sql="SELECT accountcode, accountname Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2012-01-25 23:23:13 UTC (rev 4840) +++ trunk/PO_AuthoriseMyOrders.php 2012-01-27 10:12:31 UTC (rev 4841) @@ -20,8 +20,7 @@ if (mb_substr($key,0,6)=='status') { $OrderNo=mb_substr($key,6); $Status=$_POST['status'.$OrderNo]; - $Comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' <a href="mailto:' . $EmailRow['email'].'">'.$_SESSION['UserID'].'</a> - <br />' . $_POST['comment']; + $Comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' <a href="mailto:' . $EmailRow['email'].'">'.$_SESSION['UserID'].'</a><br />' . $_POST['comment']; $sql="UPDATE purchorders SET status='".$Status."', stat_comment='".$Comment."', @@ -88,14 +87,14 @@ <td>'.ConvertSQLDate($myrow['orddate']).'</td> <td><a href="mailto:'.$myrow['email'].'">'.$myrow['realname'].'</td> <td>'.ConvertSQLDate($myrow['deliverydate']).'</td> - <td><select name=status'.$myrow['orderno'].'> + <td><select name="status'.$myrow['orderno'].'"> <option selected="selected" value="Pending">'._('Pending').'</option> <option value="Authorised">'._('Authorised').'</option> <option value="Rejected">'._('Rejected').'</option> <option value="Cancelled">'._('Cancelled').'</option> </select></td> </tr>'; - echo '<input type="hidden" name="comment" value="' . $myrow['stat_comment'] . '" />'; + echo '<input type="hidden" name="comment" value="' . htmlentities($myrow['stat_comment'], ENT_QUOTES,'UTF-8') . '" />'; $LineSQL="SELECT purchorderdetails.*, stockmaster.description, stockmaster.decimalplaces @@ -131,10 +130,16 @@ <td class="number">'.locale_number_format($LineRow['unitprice']*$LineRow['quantityord'],$myrow['currdecimalplaces']).'</td> </tr>'; } // end while order line detail - echo '</table></td></tr>'; + echo '</table> + </td> + </tr>'; } } //end while header loop echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></form>'; +echo '<br /> + <div class="centre"> + <input type="submit" name="UpdateAll" value="' . _('Update'). '" /> + </div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-25 23:23:13 UTC (rev 4840) +++ trunk/doc/Change.log 2012-01-27 10:12:31 UTC (rev 4841) @@ -1,5 +1,6 @@ webERP Change Log +27/1/12 Phil: PO_AuthoriseMyOrders.php fixed html in hidden $_POST['StatusComments'] by using htmlentities($_POST['StatusComments']) 25/1/12 Vitaly: Added quotes and missing closing tags in multiple files 24/1/12 Vitaly: Added quotes to attributes in multiple files and changed option selected to selected="selected". 23/1/12 Vitaly: Added quotes to attributes in multiple files. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2012-01-27 10:12:37
|
Revision: 4841 http://web-erp.svn.sourceforge.net/web-erp/?rev=4841&view=rev Author: daintree Date: 2012-01-27 10:12:31 +0000 (Fri, 27 Jan 2012) Log Message: ----------- fixed html display from StatusComments POST using htmlentities Modified Paths: -------------- trunk/GLJournal.php trunk/PO_AuthoriseMyOrders.php trunk/doc/Change.log Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2012-01-25 23:23:13 UTC (rev 4840) +++ trunk/GLJournal.php 2012-01-27 10:12:31 UTC (rev 4841) @@ -318,9 +318,7 @@ if (!isset($_POST['GLManualCode'])) { $_POST['GLManualCode']=''; } -echo '<td><input class="number" type="text" Name="GLManualCode" Maxlength="12" size="12" onChange="inArray(this.value, GLCode.options,'. - "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . - ' value="'. $_POST['GLManualCode'] .'" /></td>'; +echo '<td><input class="number" type="text" name="GLManualCode" maxlength="12" size="12" onChange="inArray(this.value, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" value="'. $_POST['GLManualCode'] .'" /></td>'; $sql="SELECT accountcode, accountname Modified: trunk/PO_AuthoriseMyOrders.php =================================================================== --- trunk/PO_AuthoriseMyOrders.php 2012-01-25 23:23:13 UTC (rev 4840) +++ trunk/PO_AuthoriseMyOrders.php 2012-01-27 10:12:31 UTC (rev 4841) @@ -20,8 +20,7 @@ if (mb_substr($key,0,6)=='status') { $OrderNo=mb_substr($key,6); $Status=$_POST['status'.$OrderNo]; - $Comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' <a href="mailto:' . $EmailRow['email'].'">'.$_SESSION['UserID'].'</a> - <br />' . $_POST['comment']; + $Comment=date($_SESSION['DefaultDateFormat']).' - '._('Authorised by').' <a href="mailto:' . $EmailRow['email'].'">'.$_SESSION['UserID'].'</a><br />' . $_POST['comment']; $sql="UPDATE purchorders SET status='".$Status."', stat_comment='".$Comment."', @@ -88,14 +87,14 @@ <td>'.ConvertSQLDate($myrow['orddate']).'</td> <td><a href="mailto:'.$myrow['email'].'">'.$myrow['realname'].'</td> <td>'.ConvertSQLDate($myrow['deliverydate']).'</td> - <td><select name=status'.$myrow['orderno'].'> + <td><select name="status'.$myrow['orderno'].'"> <option selected="selected" value="Pending">'._('Pending').'</option> <option value="Authorised">'._('Authorised').'</option> <option value="Rejected">'._('Rejected').'</option> <option value="Cancelled">'._('Cancelled').'</option> </select></td> </tr>'; - echo '<input type="hidden" name="comment" value="' . $myrow['stat_comment'] . '" />'; + echo '<input type="hidden" name="comment" value="' . htmlentities($myrow['stat_comment'], ENT_QUOTES,'UTF-8') . '" />'; $LineSQL="SELECT purchorderdetails.*, stockmaster.description, stockmaster.decimalplaces @@ -131,10 +130,16 @@ <td class="number">'.locale_number_format($LineRow['unitprice']*$LineRow['quantityord'],$myrow['currdecimalplaces']).'</td> </tr>'; } // end while order line detail - echo '</table></td></tr>'; + echo '</table> + </td> + </tr>'; } } //end while header loop echo '</table>'; -echo '<br /><div class="centre"><input type="submit" name="UpdateAll" value="' . _('Update'). '" /></form>'; +echo '<br /> + <div class="centre"> + <input type="submit" name="UpdateAll" value="' . _('Update'). '" /> + </div> + </form>'; include('includes/footer.inc'); ?> \ No newline at end of file Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-25 23:23:13 UTC (rev 4840) +++ trunk/doc/Change.log 2012-01-27 10:12:31 UTC (rev 4841) @@ -1,5 +1,6 @@ webERP Change Log +27/1/12 Phil: PO_AuthoriseMyOrders.php fixed html in hidden $_POST['StatusComments'] by using htmlentities($_POST['StatusComments']) 25/1/12 Vitaly: Added quotes and missing closing tags in multiple files 24/1/12 Vitaly: Added quotes to attributes in multiple files and changed option selected to selected="selected". 23/1/12 Vitaly: Added quotes to attributes in multiple files. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-01-25 23:23:20
|
Revision: 4840 http://web-erp.svn.sourceforge.net/web-erp/?rev=4840&view=rev Author: vvs2012 Date: 2012-01-25 23:23:13 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/BOMs.php trunk/CustomerReceipt.php trunk/DeliveryDetails.php trunk/FormDesigner.php trunk/GeocodeSetup.php trunk/PDFPeriodStockTransListing.php trunk/PO_Header.php trunk/PO_SelectOSPurchOrder.php trunk/PrintCustTrans.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectProduct.php trunk/SelectSalesOrder.php trunk/StockTransferControlled.php Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/BOMs.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -829,7 +829,7 @@ if (!isset($SelectedParent)) { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">' . '<div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to maintain the bill of material for using the options below') . '<br /><font size="1">' . _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . ', ' . _('kits or assemblies to be available for construction of a bill of material') .'</div>'. '</font> <br /> Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/CustomerReceipt.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -950,7 +950,7 @@ AND isset($_SESSION['ReceiptBatch'])){ /*a customer is selected */ - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . locale_number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . locale_number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; if ($_SESSION['CustomerRecord']['dissallowinvoices']!=0){ echo '<br /> Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/DeliveryDetails.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -571,16 +571,16 @@ echo '<br /><table class="selection"> <tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td> <td>' . ' ' . '<a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo .'">'. _('Confirm Dispatch and Produce Invoice') .'</a></td> </tr>'; @@ -596,14 +596,14 @@ </table>'; echo '<br /><table class="selection"> <tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt="" /></td> <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> </tr> </table>'; } echo '<br /><table class="selection"> <tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td> <td>' . ' ' . '<a href="'. $rootpath .'/SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes">'. _('Add Another Sales Order') .'</a></td> </tr> </table>'; @@ -778,18 +778,18 @@ echo '<br /> <table class="selection"> <tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> <td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td> <td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td> <td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td> </tr> </table>'; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/FormDesigner.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -153,7 +153,7 @@ if (empty($_POST['preview'])) { $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); } -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Form Design') . '" alt="">' . ' ' . _('Form Design').'<br />'. $FormDesign['name'] . ''; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Form Design') . '" alt="" />' . ' ' . _('Form Design').'<br />'. $FormDesign['name'] . ''; echo '<div class="page_help_text">' . _('Enter the changes that you want in the form layout below.') .'<br /> '. _('All measurements are in millimetres') . '.</div><br />'; $Papers=array('A4_Landscape', 'A4_Portrait', 'A5_Landscape', 'A5_Portrait', 'A3_Landscape', 'A3_Portrait', 'letter_Portrait', 'letter_Landscape', 'legal_Portrait', 'legal_Landscape'); // Possible paper sizes/orientations echo '<form method="post" id="Form" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID . '">'; Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/GeocodeSetup.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -226,7 +226,7 @@ echo '<input type="hidden" name="SelectedParam" value="' . $SelectedParam . '" />'; echo '<input type="hidden" name="GeoCodeID" value="' . $_POST['GeoCodeID'] . '" />'; - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="">'. _('Setup configuration for Geocoding of Customers and Suppliers') .'</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="" />'. _('Setup configuration for Geocoding of Customers and Suppliers') .'</p>'; echo '<table> <tr><td>'. _('Geocode Code') .':</td> <td>' . $_POST['GeoCodeID'] . '</td></tr>'; Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/PDFPeriodStockTransListing.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -17,7 +17,7 @@ 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> + <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){ Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/PO_Header.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -600,7 +600,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt=""> + <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt="" /> ' . $_SESSION['PO'.$identifier]->SupplierName . ' - ' . _('All amounts stated in') . ' ' . $_SESSION['PO'.$identifier]->CurrCode . '<br />'; Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/PO_SelectOSPurchOrder.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -136,7 +136,7 @@ } else { echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; } - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; echo '<table class="selection"> <tr> <td>'._('Order Number') . ': <input type="text" name="OrderNumber" maxlength="8" size="9" /> ' . _('Into Stock Location') . ': Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/PrintCustTrans.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -504,7 +504,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</div>'; + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</div>'; echo '<table class="table1"> <tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name=InvOrCredit>'; if ($InvOrCredit=='Invoice' OR !isset($InvOrCredit)) { Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/SelectCreditItems.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -1006,7 +1006,7 @@ 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>', + <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'], Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/SelectCustomer.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -639,7 +639,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="" /><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; } } // Customer Notes @@ -649,7 +649,7 @@ ORDER BY date DESC"; $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br />'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="" />' . ' ' . _('Customer Notes') . '</div><br />'; echo '<table width="45%">'; echo '<tr> <th>' . _('date') . '</th> @@ -680,7 +680,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="" /><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; } } // Custome Type Notes @@ -690,7 +690,7 @@ ORDER BY date DESC"; $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br />'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="" />' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br />'; echo '<table width="45%">'; echo '<tr> <th>' . _('date') . '</th> @@ -721,7 +721,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != '') { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorType=' . $CustomerType . '">' . ' ' . _('Add New Group Note') . '</a></div><br />'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt="" /><a href="AddCustomerTypeNotes.php?DebtorType=' . $CustomerType . '">' . ' ' . _('Add New Group Note') . '</a></div><br />'; } } } Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/SelectProduct.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -428,7 +428,7 @@ echo '<a href="' . $rootpath . '/StockTransfers.php?StockID=' . $StockID . '">' . _('Location Transfers') . '</a><br />'; //show the item image if it has been uploaded if( isset($StockID) AND file_exists($_SESSION['part_pics_dir'] . '/' .$StockID.'.jpg') ) { - echo '<div class="centre"><img src="' . $rootpath . '/GetStockImage.php?automake=1&textcolor=FFFFF0&bgcolor=007F00&StockID=' . $StockID . '&text=' . $StockID . '&width=120&height=120">'; + echo '<div class="centre"><img src="' . $rootpath . '/GetStockImage.php?automake=1&textcolor=FFFFF0&bgcolor=007F00&StockID=' . $StockID . '&text=' . $StockID . '&width=120&height=120" />'; } if (($myrow['mbflag'] == 'B') AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens'])) Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/SelectSalesOrder.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -899,7 +899,7 @@ if ($AuthRow['cancreate']==0 AND $myrow['poplaced']==0){ //cancreate==0 if the user can create POs and not already placed printf('<td><a href="%s">%s</a></td> <td><a href="%s">' . _('Invoice') . '</a></td> - <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '"></a></td> + <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -926,7 +926,7 @@ } else { /*User is not authorised to create POs so don't even show the option */ printf('<td><a href="%s">%s</a></td> <td><a href="%s">' . _('Invoice') . '</a></td> - <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath . '/css/' . $theme .'/images/pdf.png" title="' . _('Click for PDF') . '"></a></td> + <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath . '/css/' . $theme .'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> <td>%s</td> <td>%s</td> <td>%s</td> Modified: trunk/StockTransferControlled.php =================================================================== --- trunk/StockTransferControlled.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/StockTransferControlled.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -11,7 +11,7 @@ include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt=""><b>' . $title . '</b></p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . $title . '</b></p>'; if (!isset($_SESSION['Transfer'])) { /* This page can only be called when a stock Transfer is pending */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-01-25 23:23:20
|
Revision: 4840 http://web-erp.svn.sourceforge.net/web-erp/?rev=4840&view=rev Author: vvs2012 Date: 2012-01-25 23:23:13 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Modified Paths: -------------- trunk/BOMs.php trunk/CustomerReceipt.php trunk/DeliveryDetails.php trunk/FormDesigner.php trunk/GeocodeSetup.php trunk/PDFPeriodStockTransListing.php trunk/PO_Header.php trunk/PO_SelectOSPurchOrder.php trunk/PrintCustTrans.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectProduct.php trunk/SelectSalesOrder.php trunk/StockTransferControlled.php Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/BOMs.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -829,7 +829,7 @@ if (!isset($SelectedParent)) { - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title . '</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title . '</p>'; echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">' . '<div class="page_help_text">'. _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to maintain the bill of material for using the options below') . '<br /><font size="1">' . _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . ', ' . _('kits or assemblies to be available for construction of a bill of material') .'</div>'. '</font> <br /> Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/CustomerReceipt.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -950,7 +950,7 @@ AND isset($_SESSION['ReceiptBatch'])){ /*a customer is selected */ - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="">' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . locale_number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . $_SESSION['CustomerRecord']['name'] . ' - (' . _('All amounts stated in') . ' ' . $_SESSION['CustomerRecord']['currency'] . ')' . _('Terms') . ': ' . $_SESSION['CustomerRecord']['terms'] . '<br/>' . _('Credit Limit') . ': ' . locale_number_format($_SESSION['CustomerRecord']['creditlimit'],0) . ' ' . _('Credit Status') . ': ' . $_SESSION['CustomerRecord']['reasondescription']; if ($_SESSION['CustomerRecord']['dissallowinvoices']!=0){ echo '<br /> Modified: trunk/DeliveryDetails.php =================================================================== --- trunk/DeliveryDetails.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/DeliveryDetails.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -571,16 +571,16 @@ echo '<br /><table class="selection"> <tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Preprinted stationery') . ')' .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> <td>' . ' ' . '<a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $OrderNo . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td> <td>' . ' ' . '<a href="' . $rootpath . '/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $OrderNo .'">'. _('Confirm Dispatch and Produce Invoice') .'</a></td> </tr>'; @@ -596,14 +596,14 @@ </table>'; echo '<br /><table class="selection"> <tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Order') . '" alt="" /></td> <td>' . ' ' . '<a href="' . $rootpath . '/PDFQuotationPortrait.php?identifier='.$identifier . '&QuotationNo=' . $OrderNo . '">'. _('Print Quotation (Portrait)') .'</a></td> </tr> </table>'; } echo '<br /><table class="selection"> <tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td> <td>' . ' ' . '<a href="'. $rootpath .'/SelectOrderItems.php?identifier='.$identifier . '&NewOrder=Yes">'. _('Add Another Sales Order') .'</a></td> </tr> </table>'; @@ -778,18 +778,18 @@ echo '<br /> <table class="selection"> <tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td><td><a href="' . $rootpath . '/PrintCustOrder.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip - pre-printed stationery') .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" /></td> <td><a target="_blank" href="' . $rootpath . '/PrintCustOrder_generic.php?identifier='.$identifier . '&TransNo=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Print packing slip') . ' (' . _('Laser') . ')' .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Invoice') . '" alt="" /></td> <td><a href="' . $rootpath .'/ConfirmDispatch_Invoice.php?identifier='.$identifier . '&OrderNumber=' . $_SESSION['ExistingOrder'.$identifier] . '">'. _('Confirm Order Delivery Quantities and Produce Invoice') .'</a></td> </tr>'; echo '<tr> - <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt=""></td> + <td><img src="'.$rootpath.'/css/'.$theme.'/images/sales.png" title="' . _('Order') . '" alt="" /></td> <td><a href="' . $rootpath .'/SelectSalesOrder.php?identifier='.$identifier . '">'. _('Select A Different Order') .'</a></td> </tr> </table>'; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/FormDesigner.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -153,7 +153,7 @@ if (empty($_POST['preview'])) { $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$_POST['FormName']); } -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Form Design') . '" alt="">' . ' ' . _('Form Design').'<br />'. $FormDesign['name'] . ''; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/reports.png" title="' . _('Form Design') . '" alt="" />' . ' ' . _('Form Design').'<br />'. $FormDesign['name'] . ''; echo '<div class="page_help_text">' . _('Enter the changes that you want in the form layout below.') .'<br /> '. _('All measurements are in millimetres') . '.</div><br />'; $Papers=array('A4_Landscape', 'A4_Portrait', 'A5_Landscape', 'A5_Portrait', 'A3_Landscape', 'A3_Portrait', 'letter_Portrait', 'letter_Landscape', 'legal_Portrait', 'legal_Landscape'); // Possible paper sizes/orientations echo '<form method="post" id="Form" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID . '">'; Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/GeocodeSetup.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -226,7 +226,7 @@ echo '<input type="hidden" name="SelectedParam" value="' . $SelectedParam . '" />'; echo '<input type="hidden" name="GeoCodeID" value="' . $_POST['GeoCodeID'] . '" />'; - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="">'. _('Setup configuration for Geocoding of Customers and Suppliers') .'</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/maintenance.png" title="' . _('Geocode Setup') . '" alt="" />'. _('Setup configuration for Geocoding of Customers and Suppliers') .'</p>'; echo '<table> <tr><td>'. _('Geocode Code') .':</td> <td>' . $_POST['GeoCodeID'] . '</td></tr>'; Modified: trunk/PDFPeriodStockTransListing.php =================================================================== --- trunk/PDFPeriodStockTransListing.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/PDFPeriodStockTransListing.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -17,7 +17,7 @@ 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> + <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){ Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/PO_Header.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -600,7 +600,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p class="page_title_text"> - <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt=""> + <img src="'.$rootpath.'/css/'.$theme.'/images/supplier.png" title="' . _('Purchase Order') . '" alt="" /> ' . $_SESSION['PO'.$identifier]->SupplierName . ' - ' . _('All amounts stated in') . ' ' . $_SESSION['PO'.$identifier]->CurrCode . '<br />'; Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/PO_SelectOSPurchOrder.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -136,7 +136,7 @@ } else { echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; } - echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'</p>'; + echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $title.'</p>'; echo '<table class="selection"> <tr> <td>'._('Order Number') . ': <input type="text" name="OrderNumber" maxlength="8" size="9" /> ' . _('Into Stock Location') . ': Modified: trunk/PrintCustTrans.php =================================================================== --- trunk/PrintCustTrans.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/PrintCustTrans.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -504,7 +504,7 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="">' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</div>'; + echo '<div class="centre"><p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . _('Print Invoices or Credit Notes (Landscape Mode)') . '</div>'; echo '<table class="table1"> <tr><td>' . _('Print Invoices or Credit Notes') . '</td><td><select name=InvOrCredit>'; if ($InvOrCredit=='Invoice' OR !isset($InvOrCredit)) { Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/SelectCreditItems.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -1006,7 +1006,7 @@ 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>', + <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'], Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/SelectCustomer.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -639,7 +639,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="" /><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; } } // Customer Notes @@ -649,7 +649,7 @@ ORDER BY date DESC"; $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br />'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="" />' . ' ' . _('Customer Notes') . '</div><br />'; echo '<table width="45%">'; echo '<tr> <th>' . _('date') . '</th> @@ -680,7 +680,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="" /><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; } } // Custome Type Notes @@ -690,7 +690,7 @@ ORDER BY date DESC"; $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br />'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="" />' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br />'; echo '<table width="45%">'; echo '<tr> <th>' . _('date') . '</th> @@ -721,7 +721,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != '') { - echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorType=' . $CustomerType . '">' . ' ' . _('Add New Group Note') . '</a></div><br />'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt="" /><a href="AddCustomerTypeNotes.php?DebtorType=' . $CustomerType . '">' . ' ' . _('Add New Group Note') . '</a></div><br />'; } } } Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/SelectProduct.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -428,7 +428,7 @@ echo '<a href="' . $rootpath . '/StockTransfers.php?StockID=' . $StockID . '">' . _('Location Transfers') . '</a><br />'; //show the item image if it has been uploaded if( isset($StockID) AND file_exists($_SESSION['part_pics_dir'] . '/' .$StockID.'.jpg') ) { - echo '<div class="centre"><img src="' . $rootpath . '/GetStockImage.php?automake=1&textcolor=FFFFF0&bgcolor=007F00&StockID=' . $StockID . '&text=' . $StockID . '&width=120&height=120">'; + echo '<div class="centre"><img src="' . $rootpath . '/GetStockImage.php?automake=1&textcolor=FFFFF0&bgcolor=007F00&StockID=' . $StockID . '&text=' . $StockID . '&width=120&height=120" />'; } if (($myrow['mbflag'] == 'B') AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens'])) Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/SelectSalesOrder.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -899,7 +899,7 @@ if ($AuthRow['cancreate']==0 AND $myrow['poplaced']==0){ //cancreate==0 if the user can create POs and not already placed printf('<td><a href="%s">%s</a></td> <td><a href="%s">' . _('Invoice') . '</a></td> - <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '"></a></td> + <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath.'/css/'.$theme.'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> <td>%s</td> <td>%s</td> <td>%s</td> @@ -926,7 +926,7 @@ } else { /*User is not authorised to create POs so don't even show the option */ printf('<td><a href="%s">%s</a></td> <td><a href="%s">' . _('Invoice') . '</a></td> - <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath . '/css/' . $theme .'/images/pdf.png" title="' . _('Click for PDF') . '"></a></td> + <td><a target="_blank" href="%s">' . $PrintText . ' <img src="' .$rootpath . '/css/' . $theme .'/images/pdf.png" title="' . _('Click for PDF') . '" /></a></td> <td>%s</td> <td>%s</td> <td>%s</td> Modified: trunk/StockTransferControlled.php =================================================================== --- trunk/StockTransferControlled.php 2012-01-25 23:03:03 UTC (rev 4839) +++ trunk/StockTransferControlled.php 2012-01-25 23:23:13 UTC (rev 4840) @@ -11,7 +11,7 @@ include('includes/header.inc'); -echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt=""><b>' . $title . '</b></p>'; +echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Inventory') . '" alt="" /><b>' . $title . '</b></p>'; if (!isset($_SESSION['Transfer'])) { /* This page can only be called when a stock Transfer is pending */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vv...@us...> - 2012-01-25 23:03:14
|
Revision: 4839 http://web-erp.svn.sourceforge.net/web-erp/?rev=4839&view=rev Author: vvs2012 Date: 2012-01-25 23:03:03 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Added quotes and missing closing tags in multiple files Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/CustEDISetup.php trunk/CustomerAllocations.php trunk/FixedAssetItems.php trunk/FormDesigner.php trunk/GLBudgets.php trunk/GeocodeSetup.php trunk/MRP.php trunk/MRPReport.php trunk/PDFDIFOT.php trunk/PDFOrdersInvoiced.php trunk/PO_Items.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PurchData.php trunk/ReorderLevelLocation.php trunk/SalesCategories.php trunk/SalesGraph.php trunk/SelectAsset.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSupplier.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCostUpdate.php trunk/StockLocTransferReceive.php trunk/StockTransfers.php trunk/Stocks.php trunk/SuppCreditGRNs.php trunk/SuppInvGRNs.php trunk/SuppShiptChgs.php trunk/SupplierAllocations.php trunk/SupplierCredit.php trunk/SupplierTenderCreate.php trunk/Suppliers.php trunk/Tax.php trunk/TaxAuthorities.php trunk/TopItems.php trunk/UnitsOfMeasure.php trunk/UserSettings.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/Z_ReApplyCostToSA.php trunk/Z_UpdateChartDetailsBFwd.php trunk/doc/Change.log trunk/install/index.php Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/ConfirmDispatch_Invoice.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -476,14 +476,14 @@ OR $_POST['ChargeFreightCost']==0)) { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td> - <td><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0" /></td>'; + <td><input tabindex="'.$j.'" type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0" /></td>'; $_SESSION['Items'.$identifier]->FreightCost=0; } else { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td>'; if (isset($_POST['ProcessInvoice'])) { echo '<td class="number">' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; + echo '<td class="number"><input tabindex="'.$j.'" type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; } $_POST['ChargeFreightCost'] = locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); } @@ -1635,17 +1635,17 @@ echo '<table class="selection"> <tr> <td>' ._('Date On Invoice'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="10" size="15" name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" alt="'.$_SESSION['DefaultDateFormat'].'" class="date" /></td> + <td><input tabindex="'.$j.'" type="text" maxlength="10" size="15" name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" alt="'.$_SESSION['DefaultDateFormat'].'" class="date" /></td> </tr>'; $j++; echo '<tr> <td>' . _('Consignment Note Ref'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '" /></td> + <td><input tabindex="'.$j.'" type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '" /></td> </tr>'; $j++; echo '<tr> <td>'._('Action For Balance'). ':</td> - <td><select tabindex='.$j.' name="BOPolicy"><option selected="selected" value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> + <td><select tabindex="'.$j.'" name="BOPolicy"><option selected="selected" value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> </tr>'; $j++; echo '<tr> Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/CounterSales.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -2137,7 +2137,7 @@ #end of page full new headings if } #end of while loop for Frequently Ordered Items - echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex='.strval($j+8).' type="submit" value="'._('Add to Sale').'" /></td>'; + echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td>'; echo '</table>'; } //end of if Frequently Ordered Items > 0 if (isset($msg)){ Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/CreditStatus.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -240,7 +240,7 @@ echo '<tr> <td>'. _('Description') .':</td> <td><input ' . (in_array('ReasonDescription',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=2 type="text" name="ReasonDescription" value="'. $_POST['ReasonDescription'] .'" size="28" maxlength="30" /></td> + ' tabindex="2" type="text" name="ReasonDescription" value="'. $_POST['ReasonDescription'] .'" size="28" maxlength="30" /></td> </tr> <tr> <td>'. _('Disallow Invoices') . '</td>'; Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/Credit_Invoice.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -315,19 +315,19 @@ if ($LnItm->Controlled==1){ - echo '<td><input type="hidden" name="Quantity_' . $LnItm->LineNumber .'" value="' . $LnItm->QtyDispatched . '"><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LnItm->LineNumber . '&CreditInvoice=Yes">' . $LnItm->QtyDispatched . '</a></td>'; + echo '<td><input type="hidden" name="Quantity_' . $LnItm->LineNumber .'" value="' . $LnItm->QtyDispatched . '" /><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LnItm->LineNumber . '&CreditInvoice=Yes">' . $LnItm->QtyDispatched . '</a></td>'; } else { - echo '<td><input tabindex=' . $j . ' type="text" class="number" name="Quantity_' . $LnItm->LineNumber .'" maxlength="6" size="6" value="' . $LnItm->QtyDispatched . '"></td>'; + echo '<td><input tabindex="' . $j . '" type="text" class="number" name="Quantity_' . $LnItm->LineNumber .'" maxlength="6" size="6" value="' . $LnItm->QtyDispatched . '" /></td>'; } $DisplayLineTotal = locale_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 */ @@ -355,7 +355,7 @@ } if (!isset($_POST['ProcessCredit'])) { echo '<input type="text" class="number" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder . - '_TaxRate" maxlength="4" size="4" value="' . $Tax->TaxRate*100 . '">'; + '_TaxRate" maxlength="4" size="4" value="' . $Tax->TaxRate*100 . '" />'; } $i++; if ($Tax->TaxOnTax ==1){ @@ -380,7 +380,7 @@ <td class="number">' . $DisplayGrossLineTotal . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $LnItm->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the credit?') . '\');">' . _('Delete') . '</a></td></tr>'; - echo '<tr' . $RowStarter . '><td colspan="12"><textarea tabindex=' . $j .' name="Narrative_' . $LnItm->LineNumber . '" cols="100%" rows="1">' . $LnItm->Narrative . '</textarea><br /><hr></td></tr>'; + echo '<tr' . $RowStarter . '><td colspan="12"><textarea tabindex="' . $j .'" name="Narrative_' . $LnItm->LineNumber . '" cols="100%" rows="1">' . $LnItm->Narrative . '</textarea><br /><hr></td></tr>'; $j++; } } /*end foreach loop displaying the invoice lines to credit */ @@ -395,7 +395,7 @@ <td class="number">' . locale_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>'; @@ -1440,7 +1440,7 @@ echo '<br /><table class="selection">'; echo '<tr><td>' . _('Credit Note Type') . '</td> - <td><select tabindex=' . $j .' name="CreditType">'; + <td><select tabindex="' . $j .'" name="CreditType">'; if (!isset($_POST['CreditType']) OR $_POST['CreditType']=='Return'){ echo '<option selected="selected" value="Return">' . _('Goods returned to store') . '</option>'; @@ -1462,7 +1462,7 @@ /*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 tabindex='.$j.' name=Location>'; + echo '<tr><td>' . _('Goods returned to location') . '</td><td><select tabindex="'.$j.'" name="Location">'; $SQL="SELECT loccode, locationname FROM locations"; $Result = DB_query($SQL,$db); @@ -1483,7 +1483,7 @@ } elseif($_POST['CreditType']=='WriteOff') { /* the goods are to be written off to somewhere */ - echo '<tr><td>' . _('Write off the cost of the goods to') . '</td><td><select tabindex=' . $j .' name="WriteOffGLCode">'; + echo '<tr><td>' . _('Write off the cost of the goods to') . '</td><td><select tabindex="' . $j .'" name="WriteOffGLCode">'; $SQL="SELECT accountcode, accountname @@ -1508,10 +1508,10 @@ $_POST['CreditText'] = ''; } $j++; - echo '<tr><td>' . _('Credit note text') . '</td><td><textarea tabindex=' . $j . ' name="CreditText" cols="31" rows="5">' . $_POST['CreditText'] . '</textarea></td></tr>'; - echo '</table><br /><div class="centre"><input tabindex=' . $j . ' type="submit" name="Update" value="' . _('Update') . '" /><br />'; + echo '<tr><td>' . _('Credit note text') . '</td><td><textarea tabindex="' . $j . '" name="CreditText" cols="31" rows="5">' . $_POST['CreditText'] . '</textarea></td></tr>'; + echo '</table><br /><div class="centre"><input tabindex="' . $j . '" type="submit" name="Update" value="' . _('Update') . '" /><br />'; $j++; - echo '<input type="submit" tabindex='.$j++.' name="ProcessCredit" Value="' . _('Process Credit') .'" /></div>'; + echo '<input type="submit" tabindex="'.$j++.'" name="ProcessCredit" Value="' . _('Process Credit') .'" /></div>'; } echo '</form>'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/CustEDISetup.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -128,7 +128,7 @@ echo '<tr><td>'._('Customer EDI Reference') . ':</td> <td><input ' . (in_array('EDIReference',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=3 type="text" name="EDIReference" size="20" maxlength="20" value="' . $myrow['edireference'] . '" /></td></tr>'; + ' tabindex="3" type="text" name="EDIReference" size="20" maxlength="20" value="' . $myrow['edireference'] . '" /></td></tr>'; echo '<tr><td>'._('EDI Communication Method') . ':</td> <td><select tabindex="4" name="EDITransport" >'; @@ -145,7 +145,7 @@ echo '<tr><td>'._('FTP Server or Email Address') . ':</td> <td><input ' . (in_array('EDIAddress',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=5 type="text" name="EDIAddress" size="42" maxlength="40" value="' . $myrow['ediaddress'] . '" /></td></tr>'; + ' tabindex="5" type="text" name="EDIAddress" size="42" maxlength="40" value="' . $myrow['ediaddress'] . '" /></td></tr>'; if ($myrow['editransport']=='ftp'){ Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/CustomerAllocations.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -401,7 +401,7 @@ echo '<td class="number"><input tabindex="' . $j .'" type="checkbox" name="All' . $Counter . '"'; if (ABS($AllocnItem->AllocAmt-$YetToAlloc) < 0.01) { - echo ' value="' . True . '" />'; + echo ' checked="checked" />'; } else { echo ' />'; } @@ -421,7 +421,7 @@ <td class="number"><b><u>' . locale_number_format($TotalAllocated,$_SESSION['Alloc']->CurrDecimalPlaces) . '</u></b></td>'; $j++; echo '<td colspan="2"> - <input tabindex='.$j.' type="submit" name="RefreshAllocTotal" value="' . _('Recalculate Total To Allocate') . '" /></td> + <input tabindex="'.$j.'" type="submit" name="RefreshAllocTotal" value="' . _('Recalculate Total To Allocate') . '" /></td> <tr> <td colspan="5" class="number"><b>'._('Left to allocate').'</b></td> <td class="number"><b>' . locale_number_format(-$_SESSION['Alloc']->TransAmt-$TotalAllocated,$_SESSION['Alloc']->CurrDecimalPlaces).'</b></td> Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/FixedAssetItems.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -477,7 +477,7 @@ '&text='. '&width=64'. '&height=64'. - '" >'; + '" />'; } else { if( isset($AssetID) and file_exists($_SESSION['part_pics_dir'] . '/ASSET_' .$AssetID.'.jpg') ) { $AssetImgLink = '<img src="' . $_SESSION['part_pics_dir'] . '/ASSET_' .$AssetID.'.jpg" />'; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/FormDesigner.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -23,9 +23,9 @@ } echo '</select></td>'; /* Display the X co-ordinate (mm from the left hand side of page) */ - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; /* Display the Y co-ordinate (mm from the top of the page) */ - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; } function MultiTextLine($key) { /* Displays a table row containing the attributes for a @@ -43,11 +43,11 @@ } echo '</select></td>'; /* Display the length of the field in mm */ - echo '<td class="number">'._('Length').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'Length" size="4" maxlength="4" value="'.$key->Length.'"></td></tr><tr>'; + echo '<td class="number">'._('Length').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'Length" size="4" maxlength="4" value="'.$key->Length.'" /></td></tr><tr>'; /* Display the X co-ordinate (mm from the left hand side of page) */ - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; /* Display the Y co-ordinate (mm from the top of the page) */ - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; } function DataTextLine($key) { /* Displays a table row containing the attributes for a @@ -65,9 +65,9 @@ } echo '</select></td>'; /* Display the length of the field in mm */ - echo '<td class="number">'._('Length').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'Length" size="4" maxlength="4" value="'.$key->Length.'"></td>'; + echo '<td class="number">'._('Length').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'Length" size="4" maxlength="4" value="'.$key->Length.'" /></td>'; /* Display the X co-ordinate (mm from the left hand side of page) */ - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; } /* If the user has chosen to either preview the form, or * save it then we first have to get the POST values into a @@ -183,10 +183,10 @@ switch ($key['type']) { case 'image': echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="8">'.$key['name'].'</th></tr>'; - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td>'; - echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'"></td>'; - echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; + echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'" /></td>'; + echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'" /></td>'; echo '</table></td>'; $counter=$counter+1; break; @@ -221,7 +221,7 @@ echo '<td>'.$subkey['name'].'</td>'; DataTextLine($subkey); } elseif ($subkey['type']=='StartLine') { - echo '<td colspan="3">'.$subkey['name'].' = '.'</td><td><input type="text" class="number" name="StartLine" size="4" maxlength="4" value="'.$key->y.'"></td>'; + echo '<td colspan="3">'.$subkey['name'].' = '.'</td><td><input type="text" class="number" name="StartLine" size="4" maxlength="4" value="'.$key->y.'" /></td>'; } echo '</tr>'; } @@ -231,29 +231,29 @@ break; case 'CurvedRectangle': echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'; - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td>'; - echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'"></td></tr><tr>'; - echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'"></td>'; - echo '<td class="number">'._('Radius').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'radius" size="3" maxlength="3" value="'.$key->radius.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; + echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'" /></td></tr><tr>'; + echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'" /></td>'; + echo '<td class="number">'._('Radius').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'radius" size="3" maxlength="3" value="'.$key->radius.'" /></td>'; echo '</table></td>'; $counter=$counter+1; break; case 'Rectangle': echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'; - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td></tr><tr>'; - echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'"></td>'; - echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td></tr><tr>'; + echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'" /></td>'; + echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'" /></td>'; echo '</table></td>'; $counter=$counter+1; break; case 'Line': echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'; - echo '<td class="number">'._('Start x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'startx" size="4" maxlength="4" value="'.$key->startx.'"></td>'; - echo '<td class="number">'._('Start y co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'starty" size="4" maxlength="4" value="'.$key->starty.'"></td></tr><tr>'; - echo '<td class="number">'._('End x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'endx" size="4" maxlength="4" value="'.$key->endx.'"></td>'; - echo '<td class="number">'._('End y co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'endy" size="4" maxlength="4" value="'.$key->endy.'"></td>'; + echo '<td class="number">'._('Start x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'startx" size="4" maxlength="4" value="'.$key->startx.'" /></td>'; + echo '<td class="number">'._('Start y co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'starty" size="4" maxlength="4" value="'.$key->starty.'" /></td></tr><tr>'; + echo '<td class="number">'._('End x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'endx" size="4" maxlength="4" value="'.$key->endx.'" /></td>'; + echo '<td class="number">'._('End y co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'endy" size="4" maxlength="4" value="'.$key->endy.'" /></td>'; echo '</table></td>'; $counter=$counter+1; break; Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/GLBudgets.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -188,7 +188,7 @@ echo '<td><input type="text" class="number" size="14" name="'.$i.'last" value="'.locale_number_format($Budget[$CurrentYearEndPeriod-(24-$i)],$_SESSION['CompanyRecord']['decimalplaces']) .'" /></td>'; echo '<th>'. $PeriodEnd[$CurrentYearEndPeriod-(12-$i)] .'</th>'; echo '<td bgcolor="d2e5e8" class="number">'.locale_number_format($Actual[$CurrentYearEndPeriod-(12-$i)],$_SESSION['CompanyRecord']['decimalplaces']).'</td>'; - echo '<td><input type="text" class="number" size="14" name="'.$i.'this" value="'. locale_number_format($Budget[$CurrentYearEndPeriod-(12-$i)],$_SESSION['CompanyRecord']['decimalplaces']) .'"></td>'; + echo '<td><input type="text" class="number" size="14" name="'.$i.'this" value="'. locale_number_format($Budget[$CurrentYearEndPeriod-(12-$i)],$_SESSION['CompanyRecord']['decimalplaces']) .'" /></td>'; echo '<th>'. $PeriodEnd[$CurrentYearEndPeriod+($i)] .'</th>'; echo '<td bgcolor="d2e5e8" class="number">'.locale_number_format($Actual[$CurrentYearEndPeriod+$i],$_SESSION['CompanyRecord']['decimalplaces']).'</td>'; echo '<td><input type="text" class="number" size="14" name="'.$i.'next" value="'. locale_number_format($Budget[$CurrentYearEndPeriod+$i],$_SESSION['CompanyRecord']['decimalplaces']) .'" /></td>'; Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/GeocodeSetup.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -239,7 +239,7 @@ // <tr> // <td>'. _('Geocode Code') .":</td> // <td><input " . (in_array('GeoCodeID',$Errors) ? 'class="inputerror"' : '' ) . -// " tabindex=1 type='Text' name='GeoCodeID' value='". $_POST['GeoCodeID'] ."' size="3" maxlength="2"></td> +// " tabindex="1" type='Text' name='GeoCodeID' value='". $_POST['GeoCodeID'] ."' size="3" maxlength="2"></td> // </tr>"; } @@ -249,7 +249,7 @@ echo '<br /><tr> <td>'. _('Geocode Key') .':</td> <td><input ' . (in_array('GeoCode_Key',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=2 type="text" name="GeoCode_Key" value="'. $_POST['GeoCode_Key'] .'" size="28" maxlength="300" /> + ' tabindex="2" type="text" name="GeoCode_Key" value="'. $_POST['GeoCode_Key'] .'" size="28" maxlength="300" /> </td></tr> <tr><td>'. _('Geocode Center Long') . '</td> Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/MRP.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -582,7 +582,7 @@ <tr> <td>' . _('Location') . '</td> <td><select name="location[]" multiple> - <option value="All" selected>' . _('All') . '</option>'; + <option value="All" selected="selected">' . _('All') . '</option>'; $sql = "SELECT loccode, locationname FROM locations"; Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/MRPReport.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -726,7 +726,7 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value="' . $ListPage . '" selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PDFDIFOT.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -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> Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PDFOrdersInvoiced.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -38,7 +38,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><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td></tr>'; Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PO_Items.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -697,12 +697,12 @@ <td class="number">' . locale_number_format($POLine->Quantity,$POLine->DecimalPlaces) . '</td> <td>' . $POLine->Units . '</td> <td class="number">' . $DisplayPrice . '</td> - <td><input type="text" class="number" name="ConversionFactor' . $POLine->LineNo .'" size="8" value="' . $POLine->ConversionFactor . '"></td> - <td><input type="text" class="number" name="SuppQty' . $POLine->LineNo .'" size="10" value="' . locale_number_format(round($POLine->Quantity/$POLine->ConversionFactor,$POLine->DecimalPlaces),$POLine->DecimalPlaces) . '"></td> + <td><input type="text" class="number" name="ConversionFactor' . $POLine->LineNo .'" size="8" value="' . $POLine->ConversionFactor . '" /></td> + <td><input type="text" class="number" name="SuppQty' . $POLine->LineNo .'" size="10" value="' . locale_number_format(round($POLine->Quantity/$POLine->ConversionFactor,$POLine->DecimalPlaces),$POLine->DecimalPlaces) . '" /></td> <td>' . $POLine->SuppliersUnit . '</td> - <td><input type="text" class="number" name="SuppPrice' . $POLine->LineNo . '" size="10" value="' . locale_number_format(round(($POLine->Price *$POLine->ConversionFactor),$_SESSION['PO'.$identifier]->CurrDecimalPlaces),$_SESSION['PO'.$identifier]->CurrDecimalPlaces) .'"></td> + <td><input type="text" class="number" name="SuppPrice' . $POLine->LineNo . '" size="10" value="' . locale_number_format(round(($POLine->Price *$POLine->ConversionFactor),$_SESSION['PO'.$identifier]->CurrDecimalPlaces),$_SESSION['PO'.$identifier]->CurrDecimalPlaces) .'" /></td> <td class="number">' . $DisplayLineTotal . '</td> - <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="10" value="' .$POLine->ReqDelDate .'"></td>'; + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="10" value="' .$POLine->ReqDelDate .'" /></td>'; if ($POLine->QtyReceived !=0 AND $POLine->Completed!=1){ echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier .'&Complete=' . $POLine->LineNo . '">' . _('Complete') . '</a></td>'; } elseif ($POLine->QtyReceived ==0) { Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PricesByCost.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -162,11 +162,11 @@ $k = 0; //row colour counter echo '<form action="' .htmlspecialchars($_SERVER['PHP_SELF']) .'" method="POST" name="update">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo'<input type="hidden" value=' . $_POST['StockCat'] . ' name="StockCat" /> - <input type="hidden" value=' . $_POST['Margin'] . ' name="Margin" /> - <input type="hidden" value=' . $_POST['CurrCode'] . ' name="CurrCode" /> - <input type="hidden" value=' . $_POST['Comparator'] . ' name="Comparator" /> - <input type="hidden" value=' . $_POST['SalesType'] . ' name="SalesType" />'; + echo'<input type="hidden" value="' . $_POST['StockCat'] . '" name="StockCat" /> + <input type="hidden" value="' . $_POST['Margin'] . '" name="Margin" /> + <input type="hidden" value="' . $_POST['CurrCode'] . '" name="CurrCode" /> + <input type="hidden" value="' . $_POST['Comparator'] . '" name="Comparator" /> + <input type="hidden" value="' . $_POST['SalesType'] . '" name="SalesType" />'; $PriceCounter =0; while ($myrow = DB_fetch_array($result)) { @@ -186,11 +186,11 @@ } /*end of else Cost */ //variables for update - echo '<input type="hidden" value=' . $myrow['stockid'] . ' name="StockID_' . $PriceCounter .'" /> - <input type="hidden" value=' . $myrow['debtorno'] . ' name="DebtorNo_' . $PriceCounter .'" /> - <input type="hidden" value=' . $myrow['branchcode'] . ' name="BranchCode_' . $PriceCounter .'" /> - <input type="hidden" value=' . $myrow['startdate'] . ' name="StartDate_' . $PriceCounter .'" /> - <input type="hidden" value=' . $myrow['enddate'] . ' name="EndDate_' . $PriceCounter .'" />'; + echo '<input type="hidden" value="' . $myrow['stockid'] . '" name="StockID_' . $PriceCounter .'" /> + <input type="hidden" value="' . $myrow['debtorno'] . '" name="DebtorNo_' . $PriceCounter .'" /> + <input type="hidden" value="' . $myrow['branchcode'] . '" name="BranchCode_' . $PriceCounter .'" /> + <input type="hidden" value="' . $myrow['startdate'] . '" name="StartDate_' . $PriceCounter .'" /> + <input type="hidden" value="' . $myrow['enddate'] . '" name="EndDate_' . $PriceCounter .'" />'; //variable for current margin if ($myrow['price'] != 0){ $CurrentGP = (($myrow['price']/$myrow['rate'])-$Cost)*100 / ($myrow['price']/$myrow['rate']); @@ -218,7 +218,7 @@ $PriceCounter++; } //end of looping echo '<tr> - <td style="text-align:right" colspan="4"><input type="submit" name="submit" value=' . _('Update') . ' onclick="return confirm(\'' . _('If the prices above do not have a commencement date as today, this will create new prices with commencement date of today at the entered figures and update the existing prices with historical start dates to have an end date of yesterday. Are You Sure?') . '\');" /></td> + <td style="text-align:right" colspan="4"><input type="submit" name="submit" value="' . _('Update') . '" onclick="return confirm(\'' . _('If the prices above do not have a commencement date as today, this will create new prices with commencement date of today at the entered figures and update the existing prices with historical start dates to have an end date of yesterday. Are You Sure?') . '\');" /></td> <td style="text-align:left" colspan="3"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '"><input type="submit" value="' . _('Back') . '" /></a></td> </tr></form>'; } else { @@ -257,7 +257,7 @@ if (!isset($_POST['Margin'])){ $_POST['Margin']=1; } - echo '<td><input type="text" class="number" name="Margin" maxlength="8" size="8" value=' .$_POST['Margin'] . ' /></td></tr>'; + echo '<td><input type="text" class="number" name="Margin" maxlength="8" size="8" value="' .$_POST['Margin'] . '" /></td></tr>'; $result = DB_query("SELECT typeabbrev, sales_type FROM salestypes", $db); echo '<tr><td>' . _('Sales Type') . '/' . _('Price List') . ':</td> <td><select name="SalesType">'; @@ -275,9 +275,9 @@ <td><select name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['CurrCode']) and $_POST['CurrCode'] == $myrow['currabrev']) { - echo '<option selected="selected" value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; + echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } } //end while loop DB_data_seek($result, 0); Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/Prices_Customer.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -331,9 +331,9 @@ while ($myrow=DB_fetch_array($result)) { if ($myrow['branchcode']==$_POST['branch']) { - echo '<option selected="selected" value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; + echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; } else { - echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; + echo '<option value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; } } echo '</select></td></tr>'; Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PurchData.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -481,7 +481,7 @@ echo '<tr><td>' . _('Currency') . ':</td> <td><input type="hidden" name="CurrCode" . value="' . $CurrCode . '" />' . $CurrCode . '</td></tr>'; echo '<tr><td>' . _('Price') . ' (' . _('in Supplier Currency') . '):</td> - <td><input type="text" class="number" name="Price" maxlength="12" size="12" value=' . $_POST['Price'] . ' /></td></tr>'; + <td><input type="text" class="number" name="Price" maxlength="12" size="12" value="' . $_POST['Price'] . '" /></td></tr>'; echo '<tr><td>' . _('Date Updated') . ':</td> <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveFrom" maxlength="10" size="11" value="' . $_POST['EffectiveFrom'] . '" /></td></tr>'; echo '<tr><td>' . _('Our Unit of Measure') . ':</td>'; Modified: trunk/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/ReorderLevelLocation.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -88,7 +88,7 @@ //variable for update data - echo'<input type="hidden" value=' . $_POST['order'] . ' name='. _('order').' /> + echo'<input type="hidden" value="' . $_POST['order'] . '" name='. _('order').' /> <input type="hidden" value="' . $_POST['StockLocation'] . '" name="StockLocation" /> <input type="hidden" value="' . $_POST['StockCat'] . '" name="StockCat" /> <input type="hidden" value="' . locale_number_format($_POST['NumberOfDays'],0) . '" name="NumberOfDays" />'; @@ -145,7 +145,7 @@ $i++; } //end of looping echo'<tr> - <td style="text-align:center" colspan="7"><input type="submit" name="submit" value=' . _('Update') . ' /></td> + <td style="text-align:center" colspan="7"><input type="submit" name="submit" value="' . _('Update') . '" /></td> </tr> </form>'; Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SalesCategories.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -240,7 +240,7 @@ '&text='. '&width=32'. '&height=32'. - '" >'; + '" />'; } else { if( file_exists($_SESSION['part_pics_dir'] . '/' .'cat_'.$myrow['salescatid'].'.jpg') ) { $CatImgLink = '<img src="'.$rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SalesGraph.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -179,8 +179,8 @@ <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>' . _('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 /> Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectAsset.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -233,9 +233,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectCreditItems.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -261,7 +261,7 @@ } else { echo '<td></td>'; } - echo '<td><input tabindex='.($j+5).' type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '" /></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> @@ -953,9 +953,9 @@ echo '<option selected="selected" value="All">' . _('All') . '</option>'; while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $_POST['StockCat']==$myrow1['categoryid']){ - echo '<option selected="selected" value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option selected="selected" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectCustomer.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -396,9 +396,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } @@ -480,9 +480,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } Modified: trunk/SelectGLAccount.php =================================================================== --- trunk/SelectGLAccount.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectGLAccount.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -100,7 +100,7 @@ <br />'; echo '<div class="centre"> - <input type="submit" name="Search" value=' . _('Search Now') . '" /> + <input type="submit" name="Search" value="' . _('Search Now') . '" /> <input type="submit" action=reset value="' . _('Reset') .'" /> </div>'; Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectOrderItems.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -1405,7 +1405,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="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier=' . $identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td></tr>'; @@ -1579,7 +1579,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex='. strval($j+7).' type="textbox" size="6" name="OrderQty' . $i . '" value="0" /> + <td><font size="1"><input class="number" tabindex="'. strval($j+7).'" type="textbox" size="6" name="OrderQty' . $i . '" value="0" /> <input type="hidden" name="StockID' . $i . '" value="' . $myrow['stockid'] . '" /> </td> </tr>', @@ -1598,7 +1598,7 @@ #end of page full new headings if } #end of while loop for Frequently Ordered Items - echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex='.strval($j+8).' type="submit" value="'._('Add to Sales Order').'" /></td>'; + echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; echo '</table>'; } //end of if Frequently Ordered Items > 0 echo '<p><div class="centre"><b><p>' . $msg . '</b></p>'; @@ -1622,9 +1622,9 @@ $result1 = DB_query($SQL,$db); while ($myrow1 = DB_fetch_array($result1)) { if ($_POST['StockCat']==$myrow1['categoryid']){ - echo '<option selected="selected" value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option selected="selected" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option value='. $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } @@ -1664,7 +1664,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; echo '<tr><td colspan="1"><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+8).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; - echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex='.strval($j+9).' type="submit" value="'._('Add to Sales Order').'" /></td>'; + echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+9).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; echo '<td colspan="1"><input type="hidden" name="nextlist" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+10).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; $TableHeader = '<tr> <th>' . _('Code') . '</th> @@ -1764,7 +1764,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex='.strval($j+7).' type="textbox" size="6" name="OrderQty'. $i . '" value="0" /> + <td><font size="1"><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty'. $i . '" value="0" /> <input type="hidden" name="StockID'. $i . '" value="' . $myrow['stockid']. '" /> </td> </tr>', @@ -1783,7 +1783,7 @@ #end of page full new headings if } #end of while loop - echo '<tr><td><input type="hidden" name="previous" value='. strval($Offset-1).'><input tabindex='. strval($j+7).' type="submit" name="Prev" value="'._('Prev').'" /></td>'; + echo '<tr><td><input type="hidden" name="previous" value="'. strval($Offset-1).'"><input tabindex="'. strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'. strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; echo '<td><input type="hidden" name="nextlist" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; echo '</table></form>'; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectProduct.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -715,9 +715,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectSupplier.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -237,9 +237,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } @@ -299,9 +299,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/StockAdjustments.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -443,9 +443,9 @@ echo '<option value="0">0 - ' . _('None') . '</option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_SESSION['Adjustment']->tag) AND $_SESSION['Adjustment']->tag==$myrow['tagref']){ - echo '<option selected="selected" value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { - echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']. '</option>'; + echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription']. '</option>'; } } echo '</select></td>'; Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/StockCategories.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -392,11 +392,11 @@ while ($myrow = DB_fetch_array($Result)){ if (isset($_POST['StockAct']) and $myrow['accountcode']==$_POST['StockAct']) { - echo '<option selected="selected" value='; + echo '<option selected="selected" value="'; } else { - echo '<option value='; + echo '<option value="'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; + echo $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } //end while loop DB_data_seek($PnLAccountsResult,0); DB_data_seek($BSAccountsResult,0); @@ -407,11 +407,11 @@ while ($myrow = DB_fetch_array($BSAccountsResult)) { if (isset($_POST['WIPAct']) and $myrow['accountcode']==$_POST['WIPAct']) { - echo '<option selected="selected" value='; + echo '<option selected="selected" value="'; } else { - echo '<option value='; + echo '<option value="'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; + echo $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } //end while loop echo '</select></td></tr>'; @@ -423,11 +423,11 @@ while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['AdjGLAct']) and $myrow['accountcode']==$_POST['AdjGLAct']) { - echo '<option selected="selected" value='; + echo '<option selected="selected" value="'; } else { - echo '<option value='; + echo '<option value="'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; + echo $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } //end while loop DB_data_seek($PnLAccountsResult,0); @@ -438,11 +438,11 @@ while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['PurchPriceVarAct']) and $myrow['accountcode']==$_POST['PurchPriceVarAct']) { - echo '<option selected="selected" value='; + echo '<option selected="selected" value="'; } else { - echo '<option value='; + echo '<option value="'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; + echo $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } //end while loop DB_data_seek($PnLAccountsResult,0); Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/StockCostUpdate.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -158,7 +158,7 @@ } else { if ($myrow['mbflag']=='M'){ - echo '<input type="hidden" name="MaterialCost" value=' . $myrow['materialcost'] . ' />'; + echo '<input type="hidden" name="MaterialCost" value="' . $myrow['materialcost'] . '" />'; echo '<tr><td>' . _('Standard Material Cost Per Unit') .':</td> <td class="number">' . locale_number_format($myrow['materialcost'],4) . '</td> </tr>'; Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/StockLocTransferReceive.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -466,7 +466,7 @@ echo '<td class="number">' . locale_number_format($TrfLine->PrevRecvQty, $TrfLine->DecimalPlaces) . '</td>'; if ($TrfLine->Controlled==1){ - echo '<td class="number"><input type="hidden" name="Qty' . $i . '" value="' . locale_number_format($Qty,$TrfLine->DecimalPlaces) . '" /><a href="' . $rootpath .'/StockTransferControlled.php?TransferItem=' . $i . '">' . $Qty . '</a></td>'; + echo '<td class="number"><input type="hidden" name="Qty' . $i . '" value="' . locale_number_format($Qty,$TrfLine->DecimalPlaces) . '" /><a href="' . $rootpath .'/StockTransferControlled.php?TransferItem=' . $i . '" />' . $Qty . '</a></td>'; } else { echo '<td><input type="text" class="number" name="Qty' . $i . '" maxlength="10" class="number" size="auto" value="' . locale_number_format($Qty,$TrfLine->DecimalPlaces) . '" /></td>'; } Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2012-01-2... [truncated message content] |
From: <vv...@us...> - 2012-01-25 23:03:13
|
Revision: 4839 http://web-erp.svn.sourceforge.net/web-erp/?rev=4839&view=rev Author: vvs2012 Date: 2012-01-25 23:03:03 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Added quotes and missing closing tags in multiple files Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/CreditStatus.php trunk/Credit_Invoice.php trunk/CustEDISetup.php trunk/CustomerAllocations.php trunk/FixedAssetItems.php trunk/FormDesigner.php trunk/GLBudgets.php trunk/GeocodeSetup.php trunk/MRP.php trunk/MRPReport.php trunk/PDFDIFOT.php trunk/PDFOrdersInvoiced.php trunk/PO_Items.php trunk/PricesByCost.php trunk/Prices_Customer.php trunk/PurchData.php trunk/ReorderLevelLocation.php trunk/SalesCategories.php trunk/SalesGraph.php trunk/SelectAsset.php trunk/SelectCreditItems.php trunk/SelectCustomer.php trunk/SelectGLAccount.php trunk/SelectOrderItems.php trunk/SelectProduct.php trunk/SelectSupplier.php trunk/StockAdjustments.php trunk/StockCategories.php trunk/StockCostUpdate.php trunk/StockLocTransferReceive.php trunk/StockTransfers.php trunk/Stocks.php trunk/SuppCreditGRNs.php trunk/SuppInvGRNs.php trunk/SuppShiptChgs.php trunk/SupplierAllocations.php trunk/SupplierCredit.php trunk/SupplierTenderCreate.php trunk/Suppliers.php trunk/Tax.php trunk/TaxAuthorities.php trunk/TopItems.php trunk/UnitsOfMeasure.php trunk/UserSettings.php trunk/WWW_Users.php trunk/WorkCentres.php trunk/WorkOrderEntry.php trunk/WorkOrderIssue.php trunk/Z_ReApplyCostToSA.php trunk/Z_UpdateChartDetailsBFwd.php trunk/doc/Change.log trunk/install/index.php Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/ConfirmDispatch_Invoice.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -476,14 +476,14 @@ OR $_POST['ChargeFreightCost']==0)) { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td> - <td><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0" /></td>'; + <td><input tabindex="'.$j.'" type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0" /></td>'; $_SESSION['Items'.$identifier]->FreightCost=0; } else { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td>'; if (isset($_POST['ProcessInvoice'])) { echo '<td class="number">' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; + echo '<td class="number"><input tabindex="'.$j.'" type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; } $_POST['ChargeFreightCost'] = locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); } @@ -1635,17 +1635,17 @@ echo '<table class="selection"> <tr> <td>' ._('Date On Invoice'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="10" size="15" name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" alt="'.$_SESSION['DefaultDateFormat'].'" class="date" /></td> + <td><input tabindex="'.$j.'" type="text" maxlength="10" size="15" name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" alt="'.$_SESSION['DefaultDateFormat'].'" class="date" /></td> </tr>'; $j++; echo '<tr> <td>' . _('Consignment Note Ref'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '" /></td> + <td><input tabindex="'.$j.'" type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '" /></td> </tr>'; $j++; echo '<tr> <td>'._('Action For Balance'). ':</td> - <td><select tabindex='.$j.' name="BOPolicy"><option selected="selected" value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> + <td><select tabindex="'.$j.'" name="BOPolicy"><option selected="selected" value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> </tr>'; $j++; echo '<tr> Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/CounterSales.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -2137,7 +2137,7 @@ #end of page full new headings if } #end of while loop for Frequently Ordered Items - echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex='.strval($j+8).' type="submit" value="'._('Add to Sale').'" /></td>'; + echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td>'; echo '</table>'; } //end of if Frequently Ordered Items > 0 if (isset($msg)){ Modified: trunk/CreditStatus.php =================================================================== --- trunk/CreditStatus.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/CreditStatus.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -240,7 +240,7 @@ echo '<tr> <td>'. _('Description') .':</td> <td><input ' . (in_array('ReasonDescription',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=2 type="text" name="ReasonDescription" value="'. $_POST['ReasonDescription'] .'" size="28" maxlength="30" /></td> + ' tabindex="2" type="text" name="ReasonDescription" value="'. $_POST['ReasonDescription'] .'" size="28" maxlength="30" /></td> </tr> <tr> <td>'. _('Disallow Invoices') . '</td>'; Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/Credit_Invoice.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -315,19 +315,19 @@ if ($LnItm->Controlled==1){ - echo '<td><input type="hidden" name="Quantity_' . $LnItm->LineNumber .'" value="' . $LnItm->QtyDispatched . '"><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LnItm->LineNumber . '&CreditInvoice=Yes">' . $LnItm->QtyDispatched . '</a></td>'; + echo '<td><input type="hidden" name="Quantity_' . $LnItm->LineNumber .'" value="' . $LnItm->QtyDispatched . '" /><a href="' . $rootpath . '/CreditItemsControlled.php?LineNo=' . $LnItm->LineNumber . '&CreditInvoice=Yes">' . $LnItm->QtyDispatched . '</a></td>'; } else { - echo '<td><input tabindex=' . $j . ' type="text" class="number" name="Quantity_' . $LnItm->LineNumber .'" maxlength="6" size="6" value="' . $LnItm->QtyDispatched . '"></td>'; + echo '<td><input tabindex="' . $j . '" type="text" class="number" name="Quantity_' . $LnItm->LineNumber .'" maxlength="6" size="6" value="' . $LnItm->QtyDispatched . '" /></td>'; } $DisplayLineTotal = locale_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 */ @@ -355,7 +355,7 @@ } if (!isset($_POST['ProcessCredit'])) { echo '<input type="text" class="number" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder . - '_TaxRate" maxlength="4" size="4" value="' . $Tax->TaxRate*100 . '">'; + '_TaxRate" maxlength="4" size="4" value="' . $Tax->TaxRate*100 . '" />'; } $i++; if ($Tax->TaxOnTax ==1){ @@ -380,7 +380,7 @@ <td class="number">' . $DisplayGrossLineTotal . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $LnItm->LineNumber . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this item from the credit?') . '\');">' . _('Delete') . '</a></td></tr>'; - echo '<tr' . $RowStarter . '><td colspan="12"><textarea tabindex=' . $j .' name="Narrative_' . $LnItm->LineNumber . '" cols="100%" rows="1">' . $LnItm->Narrative . '</textarea><br /><hr></td></tr>'; + echo '<tr' . $RowStarter . '><td colspan="12"><textarea tabindex="' . $j .'" name="Narrative_' . $LnItm->LineNumber . '" cols="100%" rows="1">' . $LnItm->Narrative . '</textarea><br /><hr></td></tr>'; $j++; } } /*end foreach loop displaying the invoice lines to credit */ @@ -395,7 +395,7 @@ <td class="number">' . locale_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>'; @@ -1440,7 +1440,7 @@ echo '<br /><table class="selection">'; echo '<tr><td>' . _('Credit Note Type') . '</td> - <td><select tabindex=' . $j .' name="CreditType">'; + <td><select tabindex="' . $j .'" name="CreditType">'; if (!isset($_POST['CreditType']) OR $_POST['CreditType']=='Return'){ echo '<option selected="selected" value="Return">' . _('Goods returned to store') . '</option>'; @@ -1462,7 +1462,7 @@ /*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 tabindex='.$j.' name=Location>'; + echo '<tr><td>' . _('Goods returned to location') . '</td><td><select tabindex="'.$j.'" name="Location">'; $SQL="SELECT loccode, locationname FROM locations"; $Result = DB_query($SQL,$db); @@ -1483,7 +1483,7 @@ } elseif($_POST['CreditType']=='WriteOff') { /* the goods are to be written off to somewhere */ - echo '<tr><td>' . _('Write off the cost of the goods to') . '</td><td><select tabindex=' . $j .' name="WriteOffGLCode">'; + echo '<tr><td>' . _('Write off the cost of the goods to') . '</td><td><select tabindex="' . $j .'" name="WriteOffGLCode">'; $SQL="SELECT accountcode, accountname @@ -1508,10 +1508,10 @@ $_POST['CreditText'] = ''; } $j++; - echo '<tr><td>' . _('Credit note text') . '</td><td><textarea tabindex=' . $j . ' name="CreditText" cols="31" rows="5">' . $_POST['CreditText'] . '</textarea></td></tr>'; - echo '</table><br /><div class="centre"><input tabindex=' . $j . ' type="submit" name="Update" value="' . _('Update') . '" /><br />'; + echo '<tr><td>' . _('Credit note text') . '</td><td><textarea tabindex="' . $j . '" name="CreditText" cols="31" rows="5">' . $_POST['CreditText'] . '</textarea></td></tr>'; + echo '</table><br /><div class="centre"><input tabindex="' . $j . '" type="submit" name="Update" value="' . _('Update') . '" /><br />'; $j++; - echo '<input type="submit" tabindex='.$j++.' name="ProcessCredit" Value="' . _('Process Credit') .'" /></div>'; + echo '<input type="submit" tabindex="'.$j++.'" name="ProcessCredit" Value="' . _('Process Credit') .'" /></div>'; } echo '</form>'; Modified: trunk/CustEDISetup.php =================================================================== --- trunk/CustEDISetup.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/CustEDISetup.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -128,7 +128,7 @@ echo '<tr><td>'._('Customer EDI Reference') . ':</td> <td><input ' . (in_array('EDIReference',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=3 type="text" name="EDIReference" size="20" maxlength="20" value="' . $myrow['edireference'] . '" /></td></tr>'; + ' tabindex="3" type="text" name="EDIReference" size="20" maxlength="20" value="' . $myrow['edireference'] . '" /></td></tr>'; echo '<tr><td>'._('EDI Communication Method') . ':</td> <td><select tabindex="4" name="EDITransport" >'; @@ -145,7 +145,7 @@ echo '<tr><td>'._('FTP Server or Email Address') . ':</td> <td><input ' . (in_array('EDIAddress',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=5 type="text" name="EDIAddress" size="42" maxlength="40" value="' . $myrow['ediaddress'] . '" /></td></tr>'; + ' tabindex="5" type="text" name="EDIAddress" size="42" maxlength="40" value="' . $myrow['ediaddress'] . '" /></td></tr>'; if ($myrow['editransport']=='ftp'){ Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/CustomerAllocations.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -401,7 +401,7 @@ echo '<td class="number"><input tabindex="' . $j .'" type="checkbox" name="All' . $Counter . '"'; if (ABS($AllocnItem->AllocAmt-$YetToAlloc) < 0.01) { - echo ' value="' . True . '" />'; + echo ' checked="checked" />'; } else { echo ' />'; } @@ -421,7 +421,7 @@ <td class="number"><b><u>' . locale_number_format($TotalAllocated,$_SESSION['Alloc']->CurrDecimalPlaces) . '</u></b></td>'; $j++; echo '<td colspan="2"> - <input tabindex='.$j.' type="submit" name="RefreshAllocTotal" value="' . _('Recalculate Total To Allocate') . '" /></td> + <input tabindex="'.$j.'" type="submit" name="RefreshAllocTotal" value="' . _('Recalculate Total To Allocate') . '" /></td> <tr> <td colspan="5" class="number"><b>'._('Left to allocate').'</b></td> <td class="number"><b>' . locale_number_format(-$_SESSION['Alloc']->TransAmt-$TotalAllocated,$_SESSION['Alloc']->CurrDecimalPlaces).'</b></td> Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/FixedAssetItems.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -477,7 +477,7 @@ '&text='. '&width=64'. '&height=64'. - '" >'; + '" />'; } else { if( isset($AssetID) and file_exists($_SESSION['part_pics_dir'] . '/ASSET_' .$AssetID.'.jpg') ) { $AssetImgLink = '<img src="' . $_SESSION['part_pics_dir'] . '/ASSET_' .$AssetID.'.jpg" />'; Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/FormDesigner.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -23,9 +23,9 @@ } echo '</select></td>'; /* Display the X co-ordinate (mm from the left hand side of page) */ - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; /* Display the Y co-ordinate (mm from the top of the page) */ - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; } function MultiTextLine($key) { /* Displays a table row containing the attributes for a @@ -43,11 +43,11 @@ } echo '</select></td>'; /* Display the length of the field in mm */ - echo '<td class="number">'._('Length').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'Length" size="4" maxlength="4" value="'.$key->Length.'"></td></tr><tr>'; + echo '<td class="number">'._('Length').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'Length" size="4" maxlength="4" value="'.$key->Length.'" /></td></tr><tr>'; /* Display the X co-ordinate (mm from the left hand side of page) */ - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; /* Display the Y co-ordinate (mm from the top of the page) */ - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; } function DataTextLine($key) { /* Displays a table row containing the attributes for a @@ -65,9 +65,9 @@ } echo '</select></td>'; /* Display the length of the field in mm */ - echo '<td class="number">'._('Length').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'Length" size="4" maxlength="4" value="'.$key->Length.'"></td>'; + echo '<td class="number">'._('Length').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'Length" size="4" maxlength="4" value="'.$key->Length.'" /></td>'; /* Display the X co-ordinate (mm from the left hand side of page) */ - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; } /* If the user has chosen to either preview the form, or * save it then we first have to get the POST values into a @@ -183,10 +183,10 @@ switch ($key['type']) { case 'image': echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="8">'.$key['name'].'</th></tr>'; - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td>'; - echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'"></td>'; - echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; + echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'" /></td>'; + echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'" /></td>'; echo '</table></td>'; $counter=$counter+1; break; @@ -221,7 +221,7 @@ echo '<td>'.$subkey['name'].'</td>'; DataTextLine($subkey); } elseif ($subkey['type']=='StartLine') { - echo '<td colspan="3">'.$subkey['name'].' = '.'</td><td><input type="text" class="number" name="StartLine" size="4" maxlength="4" value="'.$key->y.'"></td>'; + echo '<td colspan="3">'.$subkey['name'].' = '.'</td><td><input type="text" class="number" name="StartLine" size="4" maxlength="4" value="'.$key->y.'" /></td>'; } echo '</tr>'; } @@ -231,29 +231,29 @@ break; case 'CurvedRectangle': echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'; - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td>'; - echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'"></td></tr><tr>'; - echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'"></td>'; - echo '<td class="number">'._('Radius').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'radius" size="3" maxlength="3" value="'.$key->radius.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td>'; + echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'" /></td></tr><tr>'; + echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'" /></td>'; + echo '<td class="number">'._('Radius').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'radius" size="3" maxlength="3" value="'.$key->radius.'" /></td>'; echo '</table></td>'; $counter=$counter+1; break; case 'Rectangle': echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'; - echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'"></td>'; - echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'"></td></tr><tr>'; - echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'"></td>'; - echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'"></td>'; + echo '<td class="number">'._('x').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'x" size="4" maxlength="4" value="'.$key->x.'" /></td>'; + echo '<td class="number">'._('y').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'y" size="4" maxlength="4" value="'.$key->y.'" /></td></tr><tr>'; + echo '<td class="number">'._('Width').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'width" size="4" maxlength="4" value="'.$key->width.'" /></td>'; + echo '<td class="number">'._('Height').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'height" size="4" maxlength="4" value="'.$key->height.'" /></td>'; echo '</table></td>'; $counter=$counter+1; break; case 'Line': echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">'.$key['name'].'</th></tr>'; - echo '<td class="number">'._('Start x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'startx" size="4" maxlength="4" value="'.$key->startx.'"></td>'; - echo '<td class="number">'._('Start y co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'starty" size="4" maxlength="4" value="'.$key->starty.'"></td></tr><tr>'; - echo '<td class="number">'._('End x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'endx" size="4" maxlength="4" value="'.$key->endx.'"></td>'; - echo '<td class="number">'._('End y co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'endy" size="4" maxlength="4" value="'.$key->endy.'"></td>'; + echo '<td class="number">'._('Start x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'startx" size="4" maxlength="4" value="'.$key->startx.'" /></td>'; + echo '<td class="number">'._('Start y co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'starty" size="4" maxlength="4" value="'.$key->starty.'" /></td></tr><tr>'; + echo '<td class="number">'._('End x co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'endx" size="4" maxlength="4" value="'.$key->endx.'" /></td>'; + echo '<td class="number">'._('End y co-ordinate').' = '.'</td><td><input type="text" class="number" name="'.$key['id'].'endy" size="4" maxlength="4" value="'.$key->endy.'" /></td>'; echo '</table></td>'; $counter=$counter+1; break; Modified: trunk/GLBudgets.php =================================================================== --- trunk/GLBudgets.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/GLBudgets.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -188,7 +188,7 @@ echo '<td><input type="text" class="number" size="14" name="'.$i.'last" value="'.locale_number_format($Budget[$CurrentYearEndPeriod-(24-$i)],$_SESSION['CompanyRecord']['decimalplaces']) .'" /></td>'; echo '<th>'. $PeriodEnd[$CurrentYearEndPeriod-(12-$i)] .'</th>'; echo '<td bgcolor="d2e5e8" class="number">'.locale_number_format($Actual[$CurrentYearEndPeriod-(12-$i)],$_SESSION['CompanyRecord']['decimalplaces']).'</td>'; - echo '<td><input type="text" class="number" size="14" name="'.$i.'this" value="'. locale_number_format($Budget[$CurrentYearEndPeriod-(12-$i)],$_SESSION['CompanyRecord']['decimalplaces']) .'"></td>'; + echo '<td><input type="text" class="number" size="14" name="'.$i.'this" value="'. locale_number_format($Budget[$CurrentYearEndPeriod-(12-$i)],$_SESSION['CompanyRecord']['decimalplaces']) .'" /></td>'; echo '<th>'. $PeriodEnd[$CurrentYearEndPeriod+($i)] .'</th>'; echo '<td bgcolor="d2e5e8" class="number">'.locale_number_format($Actual[$CurrentYearEndPeriod+$i],$_SESSION['CompanyRecord']['decimalplaces']).'</td>'; echo '<td><input type="text" class="number" size="14" name="'.$i.'next" value="'. locale_number_format($Budget[$CurrentYearEndPeriod+$i],$_SESSION['CompanyRecord']['decimalplaces']) .'" /></td>'; Modified: trunk/GeocodeSetup.php =================================================================== --- trunk/GeocodeSetup.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/GeocodeSetup.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -239,7 +239,7 @@ // <tr> // <td>'. _('Geocode Code') .":</td> // <td><input " . (in_array('GeoCodeID',$Errors) ? 'class="inputerror"' : '' ) . -// " tabindex=1 type='Text' name='GeoCodeID' value='". $_POST['GeoCodeID'] ."' size="3" maxlength="2"></td> +// " tabindex="1" type='Text' name='GeoCodeID' value='". $_POST['GeoCodeID'] ."' size="3" maxlength="2"></td> // </tr>"; } @@ -249,7 +249,7 @@ echo '<br /><tr> <td>'. _('Geocode Key') .':</td> <td><input ' . (in_array('GeoCode_Key',$Errors) ? 'class="inputerror"' : '' ) . - ' tabindex=2 type="text" name="GeoCode_Key" value="'. $_POST['GeoCode_Key'] .'" size="28" maxlength="300" /> + ' tabindex="2" type="text" name="GeoCode_Key" value="'. $_POST['GeoCode_Key'] .'" size="28" maxlength="300" /> </td></tr> <tr><td>'. _('Geocode Center Long') . '</td> Modified: trunk/MRP.php =================================================================== --- trunk/MRP.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/MRP.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -582,7 +582,7 @@ <tr> <td>' . _('Location') . '</td> <td><select name="location[]" multiple> - <option value="All" selected>' . _('All') . '</option>'; + <option value="All" selected="selected">' . _('All') . '</option>'; $sql = "SELECT loccode, locationname FROM locations"; Modified: trunk/MRPReport.php =================================================================== --- trunk/MRPReport.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/MRPReport.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -726,7 +726,7 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value="' . $ListPage . '" selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } Modified: trunk/PDFDIFOT.php =================================================================== --- trunk/PDFDIFOT.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PDFDIFOT.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -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> Modified: trunk/PDFOrdersInvoiced.php =================================================================== --- trunk/PDFOrdersInvoiced.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PDFOrdersInvoiced.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -38,7 +38,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><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" name="ToDate" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td></tr>'; Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PO_Items.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -697,12 +697,12 @@ <td class="number">' . locale_number_format($POLine->Quantity,$POLine->DecimalPlaces) . '</td> <td>' . $POLine->Units . '</td> <td class="number">' . $DisplayPrice . '</td> - <td><input type="text" class="number" name="ConversionFactor' . $POLine->LineNo .'" size="8" value="' . $POLine->ConversionFactor . '"></td> - <td><input type="text" class="number" name="SuppQty' . $POLine->LineNo .'" size="10" value="' . locale_number_format(round($POLine->Quantity/$POLine->ConversionFactor,$POLine->DecimalPlaces),$POLine->DecimalPlaces) . '"></td> + <td><input type="text" class="number" name="ConversionFactor' . $POLine->LineNo .'" size="8" value="' . $POLine->ConversionFactor . '" /></td> + <td><input type="text" class="number" name="SuppQty' . $POLine->LineNo .'" size="10" value="' . locale_number_format(round($POLine->Quantity/$POLine->ConversionFactor,$POLine->DecimalPlaces),$POLine->DecimalPlaces) . '" /></td> <td>' . $POLine->SuppliersUnit . '</td> - <td><input type="text" class="number" name="SuppPrice' . $POLine->LineNo . '" size="10" value="' . locale_number_format(round(($POLine->Price *$POLine->ConversionFactor),$_SESSION['PO'.$identifier]->CurrDecimalPlaces),$_SESSION['PO'.$identifier]->CurrDecimalPlaces) .'"></td> + <td><input type="text" class="number" name="SuppPrice' . $POLine->LineNo . '" size="10" value="' . locale_number_format(round(($POLine->Price *$POLine->ConversionFactor),$_SESSION['PO'.$identifier]->CurrDecimalPlaces),$_SESSION['PO'.$identifier]->CurrDecimalPlaces) .'" /></td> <td class="number">' . $DisplayLineTotal . '</td> - <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="10" value="' .$POLine->ReqDelDate .'"></td>'; + <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat'].'" name="ReqDelDate' . $POLine->LineNo.'" size="10" value="' .$POLine->ReqDelDate .'" /></td>'; if ($POLine->QtyReceived !=0 AND $POLine->Completed!=1){ echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier .'&Complete=' . $POLine->LineNo . '">' . _('Complete') . '</a></td>'; } elseif ($POLine->QtyReceived ==0) { Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PricesByCost.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -162,11 +162,11 @@ $k = 0; //row colour counter echo '<form action="' .htmlspecialchars($_SERVER['PHP_SELF']) .'" method="POST" name="update">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo'<input type="hidden" value=' . $_POST['StockCat'] . ' name="StockCat" /> - <input type="hidden" value=' . $_POST['Margin'] . ' name="Margin" /> - <input type="hidden" value=' . $_POST['CurrCode'] . ' name="CurrCode" /> - <input type="hidden" value=' . $_POST['Comparator'] . ' name="Comparator" /> - <input type="hidden" value=' . $_POST['SalesType'] . ' name="SalesType" />'; + echo'<input type="hidden" value="' . $_POST['StockCat'] . '" name="StockCat" /> + <input type="hidden" value="' . $_POST['Margin'] . '" name="Margin" /> + <input type="hidden" value="' . $_POST['CurrCode'] . '" name="CurrCode" /> + <input type="hidden" value="' . $_POST['Comparator'] . '" name="Comparator" /> + <input type="hidden" value="' . $_POST['SalesType'] . '" name="SalesType" />'; $PriceCounter =0; while ($myrow = DB_fetch_array($result)) { @@ -186,11 +186,11 @@ } /*end of else Cost */ //variables for update - echo '<input type="hidden" value=' . $myrow['stockid'] . ' name="StockID_' . $PriceCounter .'" /> - <input type="hidden" value=' . $myrow['debtorno'] . ' name="DebtorNo_' . $PriceCounter .'" /> - <input type="hidden" value=' . $myrow['branchcode'] . ' name="BranchCode_' . $PriceCounter .'" /> - <input type="hidden" value=' . $myrow['startdate'] . ' name="StartDate_' . $PriceCounter .'" /> - <input type="hidden" value=' . $myrow['enddate'] . ' name="EndDate_' . $PriceCounter .'" />'; + echo '<input type="hidden" value="' . $myrow['stockid'] . '" name="StockID_' . $PriceCounter .'" /> + <input type="hidden" value="' . $myrow['debtorno'] . '" name="DebtorNo_' . $PriceCounter .'" /> + <input type="hidden" value="' . $myrow['branchcode'] . '" name="BranchCode_' . $PriceCounter .'" /> + <input type="hidden" value="' . $myrow['startdate'] . '" name="StartDate_' . $PriceCounter .'" /> + <input type="hidden" value="' . $myrow['enddate'] . '" name="EndDate_' . $PriceCounter .'" />'; //variable for current margin if ($myrow['price'] != 0){ $CurrentGP = (($myrow['price']/$myrow['rate'])-$Cost)*100 / ($myrow['price']/$myrow['rate']); @@ -218,7 +218,7 @@ $PriceCounter++; } //end of looping echo '<tr> - <td style="text-align:right" colspan="4"><input type="submit" name="submit" value=' . _('Update') . ' onclick="return confirm(\'' . _('If the prices above do not have a commencement date as today, this will create new prices with commencement date of today at the entered figures and update the existing prices with historical start dates to have an end date of yesterday. Are You Sure?') . '\');" /></td> + <td style="text-align:right" colspan="4"><input type="submit" name="submit" value="' . _('Update') . '" onclick="return confirm(\'' . _('If the prices above do not have a commencement date as today, this will create new prices with commencement date of today at the entered figures and update the existing prices with historical start dates to have an end date of yesterday. Are You Sure?') . '\');" /></td> <td style="text-align:left" colspan="3"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '"><input type="submit" value="' . _('Back') . '" /></a></td> </tr></form>'; } else { @@ -257,7 +257,7 @@ if (!isset($_POST['Margin'])){ $_POST['Margin']=1; } - echo '<td><input type="text" class="number" name="Margin" maxlength="8" size="8" value=' .$_POST['Margin'] . ' /></td></tr>'; + echo '<td><input type="text" class="number" name="Margin" maxlength="8" size="8" value="' .$_POST['Margin'] . '" /></td></tr>'; $result = DB_query("SELECT typeabbrev, sales_type FROM salestypes", $db); echo '<tr><td>' . _('Sales Type') . '/' . _('Price List') . ':</td> <td><select name="SalesType">'; @@ -275,9 +275,9 @@ <td><select name="CurrCode">'; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['CurrCode']) and $_POST['CurrCode'] == $myrow['currabrev']) { - echo '<option selected="selected" value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; + echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['currency'] . '</option>'; } } //end while loop DB_data_seek($result, 0); Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/Prices_Customer.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -331,9 +331,9 @@ while ($myrow=DB_fetch_array($result)) { if ($myrow['branchcode']==$_POST['branch']) { - echo '<option selected="selected" value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; + echo '<option selected="selected" value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; } else { - echo '<option value='.$myrow['branchcode'].'>'.$myrow['brname'].'</option>'; + echo '<option value="'.$myrow['branchcode'].'">'.$myrow['brname'].'</option>'; } } echo '</select></td></tr>'; Modified: trunk/PurchData.php =================================================================== --- trunk/PurchData.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/PurchData.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -481,7 +481,7 @@ echo '<tr><td>' . _('Currency') . ':</td> <td><input type="hidden" name="CurrCode" . value="' . $CurrCode . '" />' . $CurrCode . '</td></tr>'; echo '<tr><td>' . _('Price') . ' (' . _('in Supplier Currency') . '):</td> - <td><input type="text" class="number" name="Price" maxlength="12" size="12" value=' . $_POST['Price'] . ' /></td></tr>'; + <td><input type="text" class="number" name="Price" maxlength="12" size="12" value="' . $_POST['Price'] . '" /></td></tr>'; echo '<tr><td>' . _('Date Updated') . ':</td> <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="EffectiveFrom" maxlength="10" size="11" value="' . $_POST['EffectiveFrom'] . '" /></td></tr>'; echo '<tr><td>' . _('Our Unit of Measure') . ':</td>'; Modified: trunk/ReorderLevelLocation.php =================================================================== --- trunk/ReorderLevelLocation.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/ReorderLevelLocation.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -88,7 +88,7 @@ //variable for update data - echo'<input type="hidden" value=' . $_POST['order'] . ' name='. _('order').' /> + echo'<input type="hidden" value="' . $_POST['order'] . '" name='. _('order').' /> <input type="hidden" value="' . $_POST['StockLocation'] . '" name="StockLocation" /> <input type="hidden" value="' . $_POST['StockCat'] . '" name="StockCat" /> <input type="hidden" value="' . locale_number_format($_POST['NumberOfDays'],0) . '" name="NumberOfDays" />'; @@ -145,7 +145,7 @@ $i++; } //end of looping echo'<tr> - <td style="text-align:center" colspan="7"><input type="submit" name="submit" value=' . _('Update') . ' /></td> + <td style="text-align:center" colspan="7"><input type="submit" name="submit" value="' . _('Update') . '" /></td> </tr> </form>'; Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SalesCategories.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -240,7 +240,7 @@ '&text='. '&width=32'. '&height=32'. - '" >'; + '" />'; } else { if( file_exists($_SESSION['part_pics_dir'] . '/' .'cat_'.$myrow['salescatid'].'.jpg') ) { $CatImgLink = '<img src="'.$rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SalesGraph.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -179,8 +179,8 @@ <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>' . _('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 /> Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectAsset.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -233,9 +233,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectCreditItems.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -261,7 +261,7 @@ } else { echo '<td></td>'; } - echo '<td><input tabindex='.($j+5).' type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '" /></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> @@ -953,9 +953,9 @@ echo '<option selected="selected" value="All">' . _('All') . '</option>'; while ($myrow1 = DB_fetch_array($result1)) { if (isset($_POST['StockCat']) and $_POST['StockCat']==$myrow1['categoryid']){ - echo '<option selected="selected" value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option selected="selected" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectCustomer.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -396,9 +396,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } @@ -480,9 +480,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } Modified: trunk/SelectGLAccount.php =================================================================== --- trunk/SelectGLAccount.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectGLAccount.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -100,7 +100,7 @@ <br />'; echo '<div class="centre"> - <input type="submit" name="Search" value=' . _('Search Now') . '" /> + <input type="submit" name="Search" value="' . _('Search Now') . '" /> <input type="submit" action=reset value="' . _('Reset') .'" /> </div>'; Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectOrderItems.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -1405,7 +1405,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="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier=' . $identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . $RemTxt . '</a></td></tr>'; @@ -1579,7 +1579,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex='. strval($j+7).' type="textbox" size="6" name="OrderQty' . $i . '" value="0" /> + <td><font size="1"><input class="number" tabindex="'. strval($j+7).'" type="textbox" size="6" name="OrderQty' . $i . '" value="0" /> <input type="hidden" name="StockID' . $i . '" value="' . $myrow['stockid'] . '" /> </td> </tr>', @@ -1598,7 +1598,7 @@ #end of page full new headings if } #end of while loop for Frequently Ordered Items - echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex='.strval($j+8).' type="submit" value="'._('Add to Sales Order').'" /></td>'; + echo '<td style="text-align:center" colspan="8"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; echo '</table>'; } //end of if Frequently Ordered Items > 0 echo '<p><div class="centre"><b><p>' . $msg . '</b></p>'; @@ -1622,9 +1622,9 @@ $result1 = DB_query($SQL,$db); while ($myrow1 = DB_fetch_array($result1)) { if ($_POST['StockCat']==$myrow1['categoryid']){ - echo '<option selected="selected" value=' . $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option selected="selected" value="' . $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } else { - echo '<option value='. $myrow1['categoryid'] . '>' . $myrow1['categorydescription'] . '</option>'; + echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; } } @@ -1664,7 +1664,7 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; echo '<tr><td colspan="1"><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+8).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; - echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex='.strval($j+9).' type="submit" value="'._('Add to Sales Order').'" /></td>'; + echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+9).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; echo '<td colspan="1"><input type="hidden" name="nextlist" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+10).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; $TableHeader = '<tr> <th>' . _('Code') . '</th> @@ -1764,7 +1764,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex='.strval($j+7).' type="textbox" size="6" name="OrderQty'. $i . '" value="0" /> + <td><font size="1"><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty'. $i . '" value="0" /> <input type="hidden" name="StockID'. $i . '" value="' . $myrow['stockid']. '" /> </td> </tr>', @@ -1783,7 +1783,7 @@ #end of page full new headings if } #end of while loop - echo '<tr><td><input type="hidden" name="previous" value='. strval($Offset-1).'><input tabindex='. strval($j+7).' type="submit" name="Prev" value="'._('Prev').'" /></td>'; + echo '<tr><td><input type="hidden" name="previous" value="'. strval($Offset-1).'"><input tabindex="'. strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'. strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; echo '<td><input type="hidden" name="nextlist" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; echo '</table></form>'; Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectProduct.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -715,9 +715,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/SelectSupplier.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -237,9 +237,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } @@ -299,9 +299,9 @@ $ListPage = 1; while ($ListPage <= $ListPageMax) { if ($ListPage == $_POST['PageOffset']) { - echo '<option value=' . $ListPage . ' selected>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '" selected="selected">' . $ListPage . '</option>'; } else { - echo '<option value=' . $ListPage . '>' . $ListPage . '</option>'; + echo '<option value="' . $ListPage . '">' . $ListPage . '</option>'; } $ListPage++; } Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/StockAdjustments.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -443,9 +443,9 @@ echo '<option value="0">0 - ' . _('None') . '</option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_SESSION['Adjustment']->tag) AND $_SESSION['Adjustment']->tag==$myrow['tagref']){ - echo '<option selected="selected" value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { - echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']. '</option>'; + echo '<option value="' . $myrow['tagref'] . '">' . $myrow['tagref'].' - ' .$myrow['tagdescription']. '</option>'; } } echo '</select></td>'; Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/StockCategories.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -392,11 +392,11 @@ while ($myrow = DB_fetch_array($Result)){ if (isset($_POST['StockAct']) and $myrow['accountcode']==$_POST['StockAct']) { - echo '<option selected="selected" value='; + echo '<option selected="selected" value="'; } else { - echo '<option value='; + echo '<option value="'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; + echo $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } //end while loop DB_data_seek($PnLAccountsResult,0); DB_data_seek($BSAccountsResult,0); @@ -407,11 +407,11 @@ while ($myrow = DB_fetch_array($BSAccountsResult)) { if (isset($_POST['WIPAct']) and $myrow['accountcode']==$_POST['WIPAct']) { - echo '<option selected="selected" value='; + echo '<option selected="selected" value="'; } else { - echo '<option value='; + echo '<option value="'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; + echo $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } //end while loop echo '</select></td></tr>'; @@ -423,11 +423,11 @@ while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['AdjGLAct']) and $myrow['accountcode']==$_POST['AdjGLAct']) { - echo '<option selected="selected" value='; + echo '<option selected="selected" value="'; } else { - echo '<option value='; + echo '<option value="'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; + echo $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } //end while loop DB_data_seek($PnLAccountsResult,0); @@ -438,11 +438,11 @@ while ($myrow = DB_fetch_array($PnLAccountsResult)) { if (isset($_POST['PurchPriceVarAct']) and $myrow['accountcode']==$_POST['PurchPriceVarAct']) { - echo '<option selected="selected" value='; + echo '<option selected="selected" value="'; } else { - echo '<option value='; + echo '<option value="'; } - echo $myrow['accountcode'] . '>' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; + echo $myrow['accountcode'] . '">' . $myrow['accountname'] . ' ('.$myrow['accountcode'].')</option>'; } //end while loop DB_data_seek($PnLAccountsResult,0); Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/StockCostUpdate.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -158,7 +158,7 @@ } else { if ($myrow['mbflag']=='M'){ - echo '<input type="hidden" name="MaterialCost" value=' . $myrow['materialcost'] . ' />'; + echo '<input type="hidden" name="MaterialCost" value="' . $myrow['materialcost'] . '" />'; echo '<tr><td>' . _('Standard Material Cost Per Unit') .':</td> <td class="number">' . locale_number_format($myrow['materialcost'],4) . '</td> </tr>'; Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2012-01-25 18:39:35 UTC (rev 4838) +++ trunk/StockLocTransferReceive.php 2012-01-25 23:03:03 UTC (rev 4839) @@ -466,7 +466,7 @@ echo '<td class="number">' . locale_number_format($TrfLine->PrevRecvQty, $TrfLine->DecimalPlaces) . '</td>'; if ($TrfLine->Controlled==1){ - echo '<td class="number"><input type="hidden" name="Qty' . $i . '" value="' . locale_number_format($Qty,$TrfLine->DecimalPlaces) . '" /><a href="' . $rootpath .'/StockTransferControlled.php?TransferItem=' . $i . '">' . $Qty . '</a></td>'; + echo '<td class="number"><input type="hidden" name="Qty' . $i . '" value="' . locale_number_format($Qty,$TrfLine->DecimalPlaces) . '" /><a href="' . $rootpath .'/StockTransferControlled.php?TransferItem=' . $i . '" />' . $Qty . '</a></td>'; } else { echo '<td><input type="text" class="number" name="Qty' . $i . '" maxlength="10" class="number" size="auto" value="' . locale_number_format($Qty,$TrfLine->DecimalPlaces) . '" /></td>'; } Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2012-01-2... [truncated message content] |
From: <dai...@us...> - 2012-01-25 18:40:13
|
Revision: 4838 http://web-erp.svn.sourceforge.net/web-erp/?rev=4838&view=rev Author: daintree Date: 2012-01-25 18:39:35 +0000 (Wed, 25 Jan 2012) Log Message: ----------- updated French Translation by James Dupin Modified Paths: -------------- trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2012-01-24 23:41:46 UTC (rev 4837) +++ trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po 2012-01-25 18:39:35 UTC (rev 4838) @@ -3,41172 +3,34752 @@ # This file is distributed under the same license as the webERP package. # FIRST AUTHOR <EMAIL@ADDRESS>, 2005. # +# James Dupin <jam...@gm...>, 2012. +# msgid "" msgstr "" "Project-Id-Version: weberp 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2012-01-07 14:17+1300\n" -"PO-Revision-Date: 2011-01-28 14:54+0000\n" -"Last-Translator: Pierre Slamich <pie...@gm...>\n" -"Language-Team: Beno� FAUVEL <Fa...@eu...> Sandrine Palmier " -"<pal...@fr...>\n" +"PO-Revision-Date: 2012-01-25 13:39+0100\n" +"Last-Translator: James Dupin <jam...@gm...>\n" +"Language-Team: french <none>\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2011-03-31 06:25+0000\n" "X-Generator: Launchpad (build 12696)\n" "Language: \n" +"Plural-Forms: s\n" +"X-Poedit-Language: French\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: utf-8\n" -#: AccountGroups.php:7 index.php:1298 -msgid "Account Groups" -msgstr "Postes de Comptes" +#: InventoryPlanning.php:336 +msgid " " +msgstr " " -#: AccountGroups.php:17 -msgid "" -"An error occurred in retrieving the account groups of the parent account " -"group during the check for recursion" -msgstr "" -"Une erreur s'est produite dans la récupération des groupes de comptes du " -"groupe compte parent lors de la vérification de la récursivité" +#: BOMIndented.php:328 +msgid " 12345678901234567890" +msgstr " 12345678901234567890" -#: AccountGroups.php:18 -msgid "" -"The SQL that was used to retrieve the account groups of the parent account " -"group and that failed in the process was" -msgstr "" -"Le SQL qui a été utilisé pour récupérer les groupes de comptes du groupe " -"compte parent et qui a échoué dans le processus a été" +#: CustomerTypes.php:83 +#: SupplierTypes.php:81 +msgid " already exist." +msgstr " existe déjà." -#: AccountGroups.php:57 AccountGroups.php:102 AccountGroups.php:174 -#: AccountGroups.php:184 -msgid "The SQL that was used to retrieve the information was" -msgstr "Le SQL qui a été employé pour rechercher l'information était" +#: PcTabs.php:116 +msgid " already exists" +msgstr " existe déjà." -#: AccountGroups.php:58 -msgid "Could not check whether the group exists because" -msgstr "Ne peut pas vérifier si le groupe existe parce que" +#: PcExpenses.php:109 +msgid " already exists." +msgstr " existe déjà." -#: AccountGroups.php:65 -msgid "The account group name already exists in the database" -msgstr "Le nom du groupe compte existe déjà dans la base de données" +#: PaymentAllocations.php:31 +msgid " and" +msgstr " et" -#: AccountGroups.php:71 -msgid "The account group name cannot contain the character" -msgstr "Le nom de poste du comptes ne doit contenir le symbole" +#: GLTrialBalance.php:440 +msgid " and for the " +msgstr " et pour le " -#: AccountGroups.php:71 TaxCategories.php:31 -msgid "or the character" -msgstr "ou le caractère" +#: Z_SalesIntegrityCheck.php:67 +msgid " could not be found" +msgstr " n'a pu être trouvée" -#: AccountGroups.php:77 -#, fuzzy -msgid "" -"The sequence that the account group is listed in the trial balance is " -"expected to be numeric" -msgstr "La quantité entrée pour les transferts devrait être numérique" +#: ReorderLevelLocation.php:63 +msgid " Days " +msgstr " Jours " -#: AccountGroups.php:85 -msgid "The account group name must be at least one character long" -msgstr "Le nom du groupe compte doit être au moins un caractère à long" +#: PO_Items.php:717 +msgid " excluding Tax" +msgstr " HT" -#: AccountGroups.php:92 -msgid "" -"The parent account group selected appears to result in a recursive account " -"structure - select an alternative parent account group or make this group a " -"top level account group" -msgstr "" -"Le groupe compte parent sélectionné apparaît à la suite dans une structure " -"récursive compte - sélectionner un groupe de parents de remplacement de " -"compte ou faire de ce groupe un groupe de haut niveau compte" +#: Z_ImportStocks.php:87 +msgid " fields required, " +msgstr " les champs obligatoires, " -#: AccountGroups.php:103 -msgid "Could not check whether the group is recursive because" -msgstr "Ne peut pas vérifier si le groupe est récursif parce que" +#: FixedAssetRegister.php:299 +msgid " From Date" +msgstr " De " -#: AccountGroups.php:111 -msgid "" -"Since this account group is a child group, the sequence in the trial " -"balance, the section in the accounts and whether or not the account group " -"appears in the balance sheet or profit and loss account are all properties " -"inherited from the parent account group. Any changes made to these fields " -"will have no effect." -msgstr "" +#: CustLoginSetup.php:32 +msgid " has been selected" +msgstr " a été sélectionné" -#: AccountGroups.php:116 -msgid "The section in accounts must be an integer" -msgstr "L'identifiant de rubrique doit �re un Entier" +#: PO_Header.php:608 +msgid " Modify Purchase Order Number" +msgstr " Modifier le numéro de commande" -#: AccountGroups.php:133 -msgid "An error occurred in updating the account group" -msgstr "Une erreur s'est produite dans la mise à jour le groupe compte" +#: GLTrialBalance.php:440 +#: includes/PDFTagProfitAndLossPageHeader.inc:21 +#: includes/PDFTrialBalancePageHeader.inc:23 +msgid " months to " +msgstr " mois à" -#: AccountGroups.php:134 -msgid "The SQL that was used to update the account group was" -msgstr "Le SQL qui a été utilisé pour mettre à jour le groupe compte a été" +#: SelectOrderItems.php:1795 +msgid " of products to be ordered" +msgstr " des produits à commander" -#: AccountGroups.php:136 AccountSections.php:104 PaymentMethods.php:82 -msgid "Record Updated" -msgstr "Enregistrement Mis à jour" +#: PO_Items.php:655 +msgid " Order Summary" +msgstr " Résumé de la commande" -#: AccountGroups.php:154 -msgid "An error occurred in inserting the account group" -msgstr "Une erreur s'est produite dans l'insertion, le groupe compte" +#: Z_ImportChartOfAccounts.php:69 +#: Z_ImportGLAccountSections.php:66 +msgid " records failed to import" +msgstr " enregistrements ayant échoué à l'importation" -#: AccountGroups.php:155 -msgid "The SQL that was used to insert the account group was" -msgstr "Le SQL qui a été utilisé pour insérer le groupe compte a été" +#: Z_ImportChartOfAccounts.php:68 +#: Z_ImportGLAccountSections.php:65 +msgid " records successfully imported" +msgstr " Documents importés avec succès" -#: AccountGroups.php:156 AccountSections.php:116 PaymentMethods.php:103 -msgid "Record inserted" -msgstr "Enregistrement inséré" +#: StockCounts.php:77 +msgid " Stock Counts Entered" +msgstr " Stock comtes Entrée" -#: AccountGroups.php:173 -msgid "An error occurred in retrieving the group information from chartmaster" -msgstr "" -"Une erreur s'est produite dans la récupération des informations de groupe de " -"chartmaster" +#: Contracts.php:735 +msgid " their account is currently at or over their credit limit" +msgstr " leur compte a atteint ou dépassé leur limite de crédit" -#: AccountGroups.php:178 -msgid "" -"Cannot delete this account group because general ledger accounts have been " -"created using this group" -msgstr "" -"Le poste du compte ne peut pas �re effac�car un compte a ��cr� dans le grand " -"livre avec ce poste" +#: MRPPlannedPurchaseOrders.php:37 +msgid " Through " +msgstr " Grâce à " -#: AccountGroups.php:179 AccountGroups.php:189 AccountSections.php:137 -#: Areas.php:116 Areas.php:125 BankAccounts.php:158 CreditStatus.php:125 -#: Currencies.php:166 Currencies.php:174 Currencies.php:182 -#: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 -#: CustomerBranches.php:316 Customers.php:289 Customers.php:298 -#: Customers.php:306 Customers.php:314 CustomerTypes.php:147 -#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:133 -#: 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:146 PaymentTerms.php:153 -#: PcExpenses.php:158 SalesCategories.php:125 SalesCategories.php:132 -#: SalesPeople.php:150 SalesPeople.php:157 SalesPeople.php:163 -#: SalesTypes.php:140 SalesTypes.php:150 Shippers.php:81 Shippers.php:93 -#: StockCategories.php:181 Stocks.php:615 Stocks.php:624 Stocks.php:632 -#: Stocks.php:640 Stocks.php:648 Stocks.php:656 Suppliers.php:612 -#: Suppliers.php:621 Suppliers.php:629 SupplierTypes.php:145 -#: TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 -#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WorkCentres.php:89 -#: WorkCentres.php:95 WWW_Access.php:83 -msgid "There are" -msgstr "Il y'a" +#: POReport.php:1286 +msgid " To " +msgstr " Pour " -#: AccountGroups.php:179 -msgid "general ledger accounts that refer to this account group" -msgstr "Les comptes du Grand Livre li� �ce poste de compte" +#: includes/ConnectDB_postgres.inc:28 +msgid " Try logging in with an alternative company name." +msgstr " Essayez de vous connecter avec un nom de société alternative." -#: AccountGroups.php:183 -msgid "An error occurred in retrieving the parent group information" -msgstr "" -"Une erreur s'est produite dans la récupération des informations de groupe de " -"parent" +#: CounterSales.php:2148 +msgid ", Searches the database for items, you can narrow the results by selecting a stock category, or just enter a partial item description or partial item code" +msgstr ", Recherches la base de données des articles, vous pouvez affiner les résultats en sélectionnant une catégorie d'actions, ou tout simplement entrer le code une description partielle de l'objet ou partielle élément" -#: AccountGroups.php:188 -msgid "" -"Cannot delete this account group because it is a parent account group of " -"other account group(s)" -msgstr "" -"Impossible de supprimer ce groupe compte, car il s'agit d'un groupe de " -"comptes mère du groupe compte d'autres (s)" +#: CounterSales.php:2022 +msgid ", shows the most frequently ordered items in the last 6 months. You can choose from this list, or search further for other items" +msgstr ", Montre les éléments les plus fréquemment commandés au cours des 6 derniers mois. Vous pouvez choisir dans cette liste, ou encore de recherche pour d'autres articles" -#: AccountGroups.php:189 -msgid "account groups that have this group as its/there parent account group" -msgstr "" -"compte les groupes qui ont ce groupe comme son / il compte de groupe parent" +#: PcReportTab.php:134 +#: PcReportTab.php:145 +#: PcReportTab.php:161 +#: SuppPriceList.php:282 +msgid ": " +msgstr ": " -#: AccountGroups.php:192 -msgid "An error occurred in deleting the account group" -msgstr "Une erreur s'est produite lors de la suppression du groupe de comptes" +#: Z_ImportFixedAssets.php:58 +msgid ". Download a template and ensuer that fields are in the same sequence as the template." +msgstr ". Télécharger un modèle et assurez-vous que les champs sont dans le même ordre que le modèle." -#: AccountGroups.php:193 -msgid "The SQL that was used to delete the account group was" -msgstr "Le SQL qui a été utilisé pour supprimer le groupe compte a été" +#: api/api_xml-rpc.php:1013 +msgid "\"salesarea\" also is required, though again it appears to serve no useful purpose. " +msgstr "\"salesarea \" est également nécessaire, mais là encore, il semble d'aucune utilité. " -#: AccountGroups.php:195 -msgid "group has been deleted" -msgstr "Le poste a ��supprim" +#: Payments.php:886 +msgid "(if using pre-printed stationery)" +msgstr "(Si vous utilisez pré-imprimés)" -#: AccountGroups.php:220 -msgid "The sql that was used to retrieve the account group information was " -msgstr "" -"Le sql qui a été utilisé pour récupérer les informations de groupe compte a " -"été " +#: Payments.php:895 +msgid "(Max. length 80 characters)" +msgstr "(Longueur max 80 caractères)" -#: AccountGroups.php:221 -msgid "Could not get account groups because" -msgstr "Impossible d'acc�er aux postes de comptes car" +#: api/api_login.php:88 +msgid "** Error Code Not Defined **" +msgstr "** Code d'erreur Non défini ** " -#: AccountGroups.php:223 AccountSections.php:175 AddCustomerContacts.php:25 -#: AddCustomerContacts.php:28 AddCustomerNotes.php:103 -#: AddCustomerTypeNotes.php:97 AgedDebtors.php:450 AgedSuppliers.php:278 -#: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 -#: BOMExtendedQty.php:261 BOMIndented.php:246 BOMIndentedReverse.php:235 -#: BOMInquiry.php:187 BOMListing.php:109 BOMs.php:213 BOMs.php:832 -#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2020 -#: CounterSales.php:2146 Credit_Invoice.php:255 CreditStatus.php:21 -#: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:11 -#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 -#: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 -#: FixedAssetLocations.php:9 FixedAssetRegister.php:13 -#: FixedAssetRegister.php:243 FixedAssetTransfer.php:31 FormDesigner.php:129 -#: GLBalanceSheet.php:362 GLBudgets.php:29 GLJournal.php:246 -#: InventoryPlanning.php:374 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:187 PDFPickingList.php:28 -#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:16 -#: PO_AuthorisationLevels.php:10 POReport.php:60 POReport.php:64 -#: POReport.php:68 PO_SelectOSPurchOrder.php:139 PricesBasedOnMarkUp.php:8 -#: Prices_Customer.php:35 Prices.php:30 PurchData.php:137 PurchData.php:258 -#: PurchData.php:282 RecurringSalesOrders.php:309 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:215 -#: SelectCreditItems.php:286 SelectCustomer.php:260 SelectGLAccount.php:17 -#: SelectGLAccount.php:77 SelectOrderItems.php:577 SelectOrderItems.php:1480 -#: SelectOrderItems.php:1604 SelectProduct.php:496 SelectSalesOrder.php:533 -#: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 -#: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 -#: Shippers.php:122 Shippers.php:158 Shipt_Select.php:8 -#: StockLocMovements.php:13 StockLocStatus.php:27 Suppliers.php:302 -#: SupplierTenders.php:260 SupplierTenders.php:317 SupplierTransInquiry.php:10 -#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 -#: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:162 -#: WorkOrderCosting.php:13 WorkOrderEntry.php:11 WorkOrderIssue.php:22 -#: WorkOrderReceive.php:15 WorkOrderStatus.php:42 WWW_Access.php:11 -#: WWW_Users.php:31 Z_BottomUpCosts.php:56 -msgid "Search" -msgstr "Rechercher" +#: TopItems.php:176 +msgid "#" +msgstr "#" -#: AccountGroups.php:227 -msgid "Group Name" -msgstr "Nom du poste" +#: UserSettings.php:27 +msgid "0 will default to system setting" +msgstr "0 pour les paramètres système par défaut" -#: AccountGroups.php:228 EDIMessageFormat.php:129 EDIMessageFormat.php:208 -msgid "Section" -msgstr "Rubrique" +#: includes/InputSerialItemsFile.php:152 +msgid "1st 10 Lines of File" +msgstr "10 premières lignes du Fichier" -#: AccountGroups.php:229 AccountGroups.php:392 -msgid "Sequence In TB" -msgstr "Indexe dans balance" +#: InventoryPlanningPrefSupplier.php:75 +msgid "4 mths" +msgstr "4 mois" -#: AccountGroups.php:230 AccountGroups.php:376 GLProfit_Loss.php:6 -#: GLProfit_Loss.php:125 GLProfit_Loss.php:126 GLProfit_Loss.php:177 -#: SelectGLAccount.php:43 SelectGLAccount.php:57 -msgid "Profit and Loss" -msgstr "Pertes et profits" +#: api/api_xml-rpc.php:319 +msgid "A (partial) string to match in the above Field Name." +msgstr "Une chaîne de caractères (partiel) pour correspondre au nom ci-dessus sur le terrain." -#: AccountGroups.php:231 AccountGroups.php:338 -msgid "Parent Group" -msgstr "Parent Group" +#: CustomerReceipt.php:35 +msgid "A bank account must be selected for this receipt" +msgstr "Un compte bancaire doit être sélectionné pour cette recette" -#: AccountGroups.php:247 AccountGroups.php:250 AccountGroups.php:380 -#: AccountGroups.php:382 BOMs.php:122 BOMs.php:746 BOMs.php:748 -#: CompanyPreferences.php:476 CompanyPreferences.php:478 -#: CompanyPreferences.php:491 CompanyPreferences.php:493 -#: CompanyPreferences.php:506 CompanyPreferences.php:508 -#: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:593 -#: Customers.php:941 Customers.php:950 Customers.php:953 -#: DeliveryDetails.php:1071 DeliveryDetails.php:1114 DeliveryDetails.php:1117 -#: GLTransInquiry.php:69 MRPCalendar.php:224 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:244 PDFChequeListing.php:63 -#: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75 -#: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 -#: PO_Header.php:783 PO_PDFPurchOrder.php:384 PO_PDFPurchOrder.php:387 -#: PurchData.php:189 PurchData.php:514 PurchData.php:517 -#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 -#: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 -#: SalesAnalReptCols.php:422 SalesAnalRepts.php:415 SalesAnalRepts.php:418 -#: SalesAnalRepts.php:443 SalesAnalRepts.php:446 SalesAnalRepts.php:471 -#: SalesAnalRepts.php:474 SalesPeople.php:219 SalesPeople.php:355 -#: SalesPeople.php:357 SelectProduct.php:381 ShipmentCosting.php:667 -#: Stocks.php:1015 Stocks.php:1017 Stocks.php:1040 Stocks.php:1042 -#: SuppContractChgs.php:90 SystemParameters.php:389 SystemParameters.php:412 -#: SystemParameters.php:428 SystemParameters.php:491 SystemParameters.php:499 -#: SystemParameters.php:539 SystemParameters.php:612 SystemParameters.php:621 -#: SystemParameters.php:629 SystemParameters.php:647 SystemParameters.php:654 -#: SystemParameters.php:781 SystemParameters.php:916 SystemParameters.php:918 -#: SystemParameters.php:928 SystemParameters.php:930 SystemParameters.php:984 -#: SystemParameters.php:996 SystemParameters.php:998 TaxGroups.php:307 -#: TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:636 WWW_Users.php:638 -msgid "Yes" -msgstr "Oui" +#: Payments.php:34 +msgid "A bank account must be selected to make this payment from" +msgstr "Un compte bancaire doit être sélectionné pour effectuer ce paiement à partir" -#: AccountGroups.php:253 AccountGroups.php:385 AccountGroups.php:387 -#: BankAccounts.php:210 BankAccounts.php:371 BankAccounts.php:373 -#: BankAccounts.php:377 BankAccounts.php:385 BOMs.php:124 BOMs.php:745 -#: BOMs.php:749 CompanyPreferences.php:475 CompanyPreferences.php:479 -#: CompanyPreferences.php:490 CompanyPreferences.php:494 -#: CompanyPreferences.php:505 CompanyPreferences.php:509 -#: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:592 -#: Customers.php:936 Customers.php:949 Customers.php:952 -#: DeliveryDetails.php:1072 DeliveryDetails.php:1115 DeliveryDetails.php:1118 -#: GLTransInquiry.php:86 MRPCalendar.php:226 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:242 PDFChequeListing.php:62 -#: PDFDeliveryDifferences.php:74 PDFDIFOT.php:74 -#: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141 -#: PO_Header.php:782 PO_PDFPurchOrder.php:385 PO_PDFPurchOrder.php:388 -#: PurchData.php:192 PurchData.php:515 PurchData.php:518 -#: RecurringSalesOrders.php:481 RecurringSalesOrders.php:484 -#: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 -#: SalesAnalReptCols.php:423 SalesAnalRepts.php:414 SalesAnalRepts.php:417 -#: SalesAnalRepts.php:442 SalesAnalRepts.php:445 SalesAnalRepts.php:470 -#: SalesAnalRepts.php:473 SalesPeople.php:221 SalesPeople.php:360 -#: SalesPeople.php:362 SelectProduct.php:383 ShipmentCosting.php:668 -#: Stocks.php:1010 Stocks.php:1012 Stocks.php:1035 Stocks.php:1037 -#: SuppContractChgs.php:92 SystemParameters.php:390 SystemParameters.php:413 -#: SystemParameters.php:429 SystemParameters.php:492 SystemParameters.php:500 -#: SystemParameters.php:540 SystemParameters.php:613 SystemParameters.php:622 -#: SystemParameters.php:630 SystemParameters.php:648 SystemParameters.php:655 -#: SystemParameters.php:782 SystemParameters.php:915 SystemParameters.php:919 -#: SystemParameters.php:927 SystemParameters.php:931 SystemParameters.php:985 -#: SystemParameters.php:995 SystemParameters.php:999 TaxGroups.php:308 -#: TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:635 WWW_Users.php:639 -#: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 -msgid "No" -msgstr "Non" +#: SpecialOrder.php:196 +msgid "a blank initiator is not allowed" +msgstr "un initiateur de blanc n'est pas autorisé" -#: AccountGroups.php:262 AccountSections.php:196 AddCustomerContacts.php:149 -#: AddCustomerNotes.php:141 AddCustomerTypeNotes.php:128 Areas.php:164 -#: BankAccounts.php:223 BOMs.php:149 COGSGLPostings.php:108 -#: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 -#: CustomerBranches.php:414 Customers.php:1027 Customers.php:1061 -#: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:329 -#: FixedAssetCategories.php:186 FixedAssetLocations.php:107 -#: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:91 -#: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:120 -#: PaymentMethods.php:200 PaymentTerms.php:205 PcAssignCashToTab.php:259 -#: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:234 -#: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:278 -#: Prices.php:251 PurchData.php:204 SalesCategories.php:256 -#: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232 -#: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:612 -#: SelectCustomer.php:630 SelectCustomer.php:654 SelectCustomer.php:671 -#: SelectCustomer.php:695 SelectCustomer.php:712 Shippers.php:143 -#: StockCategories.php:242 SupplierContacts.php:163 SupplierTypes.php:189 -#: SuppTransGLAnalysis.php:120 TaxAuthorities.php:174 TaxCategories.php:182 -#: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185 -#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:318 -#: includes/InputSerialItems.php:88 includes/OutputSerialItems.php:20 -#, php-format -msgid "Edit" -msgstr "Modifier" +#: Locations.php:33 +msgid "A cash sale customer and branch are necessary to fully setup the counter sales functionality" +msgstr "Un client vente direct ainsi qu'une agence sont nécessaires pour activer toutes les fonctionnalités de la vente au comptoir" -#: AccountGroups.php:263 -#, fuzzy -msgid "Are you sure you wish to delete this account group?" -msgstr "Etes-vous sûr de vouloir supprimer cette branche?" +#: DiscountCategories.php:244 +msgid "a complete stock category" +msgstr "une catégorie stock complet" -#: AccountGroups.php:263 AccountSections.php:200 AddCustomerContacts.php:150 -#: AddCustomerNotes.php:142 AddCustomerTypeNotes.php:129 Areas.php:165 -#: BankAccounts.php:224 BOMs.php:151 COGSGLPostings.php:109 -#: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 -#: CounterSales.php:822 Credit_Invoice.php:381 CreditStatus.php:175 -#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1062 -#: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:182 -#: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 -#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 -#: Labels.php:411 Locations.php:383 MRPDemands.php:307 MRPDemandTypes.php:121 -#: PaymentMethods.php:201 Payments.php:1069 PaymentTerms.php:206 -#: PcAssignCashToTab.php:263 PcClaimExpensesFromTab.php:253 PcExpenses.php:224 -#: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 -#: PO_AuthorisationLevels.php:153 PO_Items.php:709 Prices_Customer.php:279 -#: Prices.php:252 PurchData.php:205 SalesAnalReptCols.php:299 -#: SalesAnalRepts.php:303 SalesCategories.php:257 SalesGLPostings.php:133 -#: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207 -#: SecurityTokens.php:129 SelectCreditItems.php:765 SelectCustomer.php:613 -#: SelectCustomer.php:631 SelectCustomer.php:655 SelectCustomer.php:672 -#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1399 -#: Shipments.php:439 Shippers.php:144 SpecialOrder.php:656 -#: StockCategories.php:243 StockCategories.php:557 StockLocTransfer.php:302 -#: SuppContractChgs.php:99 SuppCreditGRNs.php:102 SuppFixedAssetChgs.php:87 -#: SuppInvGRNs.php:147 SupplierContacts.php:164 SupplierTypes.php:191 -#: SuppShiptChgs.php:90 SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 -#: TaxCategories.php:183 TaxGroups.php:189 TaxProvinces.php:181 -#: UnitsOfMeasure.php:186 WorkCentres.php:142 WOSerialNos.php:320 -#: WWW_Access.php:124 WWW_Users.php:319 includes/InputSerialItemsKeyed.php:58 -#: includes/OutputSerialItems.php:99 -#, php-format -msgid "Delete" -msgstr "Supprimer" +#: Credit_Invoice.php:67 +msgid "A credit cannot be produced for the selected invoice" +msgstr "Un crédit ne peut être produit pour la facture sélectionnée" -#: AccountGroups.php:271 -msgid "Review Account Groups" -msgstr "R�iser les Postes de Comptes" +#: api/api_xml-rpc.php:382 +msgid "A currency abbreviation as returned by the GetCurrencyList function." +msgstr "Une abréviation de change tel que retourné par la fonction GetCurrencyList." -#: AccountGroups.php:291 -msgid "An error occurred in retrieving the account group information" -msgstr "" -"Une erreur s'est produite dans la récupération des informations du groupe de " -"comptes" +#: Prices_Customer.php:27 +msgid "A customer must be selected from the customer selection screen" +msgstr "Un client doit être choisi parmi l'écran de sélection des clients" -#: AccountGroups.php:292 -msgid "" -"The SQL that was used to retrieve the account group and that failed in the " -"process was" -msgstr "" -"Le SQL qui a été utilisé pour récupérer le groupe compte et qui a échoué " -"dans le processus a été" +#: CustLoginSetup.php:15 +msgid "A customer must first be selected before logins can be defined for it" +msgstr "Un client doit être sélectionné avant avant de pouvoir modifier ses paramètres" -#: AccountGroups.php:295 -msgid "The account group name does not exist in the database" -msgstr "Le nom du groupe compte n'existe pas dans la base de données" +#: api/api_xml-rpc.php:1758 +msgid "A customer type ID as returned by the GetCustomerTypeList function." +msgstr "Un ID type de client, tel que retourné par la fonction GetCustomerTypeList." -#: AccountGroups.php:311 GLAccounts.php:243 GLAccounts.php:292 -#: Z_ImportGLAccountGroups.php:26 -msgid "Account Group" -msgstr "Poste de Comptes" +#: Stocks.php:95 +msgid "a description is required" +msgstr "une description est requise" -#: AccountGroups.php:335 -msgid "Account Group Name" -msgstr "Nom du groupe compte" +#: SpecialOrder.php:560 +msgid "A freight charge may also be applicable" +msgstr "Un frais de transport peut également être applicable" -#: AccountGroups.php:344 AccountGroups.php:346 -msgid "Top Level Group" -msgstr "Groupe de Haut Niveau" +#: api/api_xml-rpc.php:2011 +msgid "A general ledger account code as returned by the GetGLAccountList function." +msgstr "Un code du grand livre général compte que retournée par la fonction GetGLAccountList." -#: AccountGroups.php:360 -msgid "Section In Accounts" -msgstr "Num�o de Rubrique" +#: PcExpenses.php:83 +msgid "A general ledger code must be selected for this expense" +msgstr "Sélectionnez un compte GL pour ces frais" -#: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 -#: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 -#: BankAccounts.php:391 BOMs.php:759 COGSGLPostings.php:354 -#: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 -#: DiscountMatrix.php:141 EDIMessageFormat.php:248 -#: FixedAssetCategories.php:344 FixedAssetLocations.php:156 -#: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 -#: Locations.php:597 MRPDemands.php:419 MRPDemandTypes.php:187 -#: OffersReceived.php:56 OffersReceived.php:143 PaymentMethods.php:282 -#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:356 -#: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 -#: SalesPeople.php:369 Shippers.php:199 StockCategories.php:584 -#: SupplierContacts.php:281 SuppLoginSetup.php:293 TaxAuthorities.php:327 -#: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WorkCentres.php:279 WWW_Users.php:678 -msgid "Enter Information" -msgstr "Valider" +#: GoodsReceived.php:457 +msgid "A GRN record could not be inserted" +msgstr "Un record GRN ne pouvait pas être inséré" -#: AccountSections.php:7 index.php:1303 -msgid "Account Sections" -msgstr "Sections compte" +#: SalesAnalRepts.php:85 +msgid "A group by item must be specified for the report to have any output" +msgstr "Un groupe par point doit être précisé pour le rapport d'avoir une sortie" -#: AccountSections.php:66 -msgid "The account section already exists in the database" -msgstr "La section compte existe déjà dans la base de données" +#: api/api_xml-rpc.php:538 +msgid "A hold reason abbreviation as returned by the GetHoldReasonList function." +msgstr "Une abréviation raison tenir, tel que retourné par la fonction GetHoldReasonList." -#: AccountSections.php:73 -#, fuzzy -msgid "The account section name cannot contain any of the illegal characters" -msgstr "Le nom de la section compte ne peut pas contenir le caractère" +#: GLAccountInquiry.php:313 +msgid "A log of the account differences for the periods report shows below" +msgstr "Un compte-rendu des différences sur le compte pour les périodes traitées est disponible ci-dessous" -#: AccountSections.php:79 -msgid "The account section name must contain at least one character" -msgstr "Le nom de la section de compte doit contenir au moins un caractère" +#: Stocks.php:101 +msgid "a long description is required" +msgstr "une description longue est requise" -#: AccountSections.php:85 AccountSections.php:91 -msgid "The section number must be an integer" -msgstr "Le numéro de l'article doit être un entier" +#: Credit_Invoice.php:125 +msgid "A manual credit note will need to be prepared" +msgstr "Un avoir manuel devra être préparé" -#: AccountSections.php:136 -msgid "" -"Cannot delete this account section because general ledger accounts groups " -"have been created using this section" -msgstr "" -"Impossible de supprimer cette section compte parce comptes du grand livre " -"général groupes ont été créés à l'aide du présent article" +#: BOMs.php:30 +msgid "A maximum of 15 levels of bill of materials only can be displayed" +msgstr "Un maximum de 15 niveaux de nomenclatures ne peut être affichée" -#: AccountSections.php:137 -msgid "general ledger accounts groups that refer to this account section" -msgstr "" -"comptes du grand livre général les groupes qui se réfèrent à cette section " -"compte" +#: BOMs.php:336 +msgid "A new component part" +msgstr "Un nouveau composant" -#: AccountSections.php:148 -msgid "section has been deleted" -msgstr "l'article a été supprimé" +#: COGSGLPostings.php:52 +msgid "A new cost of sales posting code has been inserted" +msgstr "Un nouveau prix de revient a été créé" -#: AccountSections.php:173 -msgid "Could not get account group sections because" -msgstr "Impossible d'obtenir sections groupe compte car" +#: CreditStatus.php:103 +msgid "A new credit status record has been inserted" +msgstr "Un nouveau code solvabilité a été ajouté" -#: AccountSections.php:180 AccountSections.php:238 AccountSections.php:256 -msgid "Section Number" -msgstr "Numéro de la section" +#: CustLoginSetup.php:118 +msgid "A new customer login has been created" +msgstr "Un nouvel identifiant client a été crée" -#: AccountSections.php:181 AccountSections.php:260 -msgid "Section Description" -msgstr "Description Section" +#: Factors.php:85 +msgid "A new factoring company for" +msgstr "Une société d'affacturage pour les nouveaux" -#: AccountSections.php:198 -msgid "Restricted" -msgstr "Restreint" +#: FixedAssetCategories.php:111 +msgid "A new fixed asset category record has been added for" +msgstr "Un nouveau record fixe catégorie d'actifs a été ajoutée pour" -#: AccountSections.php:209 -msgid "Review Account Sections" -msgstr "Les articles de revue de comptes" +#: GeocodeSetup.php:98 +msgid "A new geocode status record has been inserted" +msgstr "Un record géocoder nouveau statut a été inséré" -#: AccountSections.php:227 -msgid "Could not retrieve the requested section please try again." -msgstr "" -"Impossible de récupérer la section demandée s'il vous plaît essayer à " -"nouveau." +#: MRPDemands.php:210 +msgid "A new MRP demand record has been added to the database for" +msgstr "Un record nouvelle demande MRP a été ajouté à la base de données" -#: AddCustomerContacts.php:6 AddCustomerContacts.php:61 SelectCustomer.php:605 -#: SelectCustomer.php:637 -msgid "Customer Contacts" -msgstr "Contacts client" +#: RecurringSalesOrdersProcess.php:147 +msgid "A new order has been created from a recurring order template for customer" +msgstr "Un nouvel ordre a été créé à partir d'un modèle de commande récurrente pour le client" -#: AddCustomerContacts.php:20 CustEDISetup.php:9 CustLoginSetup.php:21 -#: Z_CheckDebtorsControl.php:20 -msgid "Back to Customers" -msgstr "Retour aux clients" +#: RecurringSalesOrders.php:156 +msgid "A new recurring order can only be created if an order template has already been created from the normal order entry screen" +msgstr "Un nouvel ordre récurrents ne peuvent être créés si un modèle de commande a déjà été créé à partir de l'écran de saisie ordre normal" -#: AddCustomerContacts.php:26 -#, fuzzy -msgid "Contacts for Customer:" -msgstr "Contacts pour le client:" +#: SalesCategories.php:103 +msgid "A new Sales category record has been added" +msgstr "Un record de vente nouvelle catégorie a été ajoutée" -#: AddCustomerContacts.php:29 -#, fuzzy -msgid "Edit contact for" -msgstr "Modifier contact pour" +#: SalesPeople.php:120 +msgid "A new salesperson record has been added for" +msgstr "Un nouveau vendeur a été ajouté pour" -#: AddCustomerContacts.php:41 -#, fuzzy -msgid "The Contact ID must be an integer." -msgstr "Le contact doit être un nombre entier." +#: StockCategories.php:157 +msgid "A new stock category record has been added for" +msgstr "Un record de nouvelles actions catégorie a été ajoutée pour" -#: AddCustomerContacts.php:44 -#, fuzzy -msgid "The contact name must be forty characters or less long" -msgstr "Le nom du contact doit être quarante caractères ou moins long" +#: Suppliers.php:567 +msgid "A new supplier for" +msgstr "Un nouveau fournisseur pour" -#: AddCustomerContacts.php:47 -#, fuzzy -msgid "The contact name may not be empty" -msgstr "Le nom de contact peut ne pas être vide" +#: SuppLoginSetup.php:105 +msgid "A new supplier login has been created" +msgstr "Un nouvel identifiant de fournisseur vient d'être créé." -#: AddCustomerContacts.php:50 -#, fuzzy -msgid "The contact email address is not a valid email address" -msgstr "" -"L'adresse email ne semble pas être une adresse email valide. La transaction " -"n'a pas été envoyé par courriel" +#: TaxGroups.php:45 +msgid "A new tax group could not be added because a tax group already exists for" +msgstr "Un groupe de nouvel impôt ne peut être ajouté, car un groupe de taxe existe déjà pour" -#: AddCustomerContacts.php:61 AddCustomerNotes.php:52 -#: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 -#: DeliveryDetails.php:776 Factors.php:105 FixedAssetItems.php:246 -#: MRPCalendar.php:176 PcAssignCashToTab.php:88 PcClaimExpensesFromTab.php:79 -#: PcExpenses.php:95 PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:371 -#: SalesAnalReptCols.php:129 SalesPeople.php:97 SalesTypes.php:66 -#: Stocks.php:497 Suppliers.php:513 SupplierTypes.php:67 -msgid "has been updated" -msgstr "a ��mis �jour" +#: WWW_Users.php:196 +msgid "A new user record has been inserted" +msgstr "Un nouvel utilisateur a été créé" -#: AddCustomerContacts.php:76 -msgid "The contact record has been added" -msgstr "L'enregistrement de contact a été ajouté" +#: CounterSales.php:1191 +msgid "A new work order has been created for" +msgstr "Un nouvel ordre du travail a été créé pour" -#: AddCustomerContacts.php:105 -msgid "The contact record has been deleted" -msgstr "L'enregistrement de contact a été supprimé" +#: Stocks.php:1155 +msgid "A number between" +msgstr "Un nombre entre" -#: AddCustomerContacts.php:128 CompanyPreferences.php:223 -#: CustomerBranches.php:368 Customers.php:1014 Customers.php:1022 -#: SalesPeople.php:200 SelectCustomer.php:607 StockDispatch.php:187 -#: StockDispatch.php:199 SupplierContacts.php:150 SuppTransGLAnalysis.php:105 -#: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 -#: includes/PDFTaxPageHeader.inc:37 -msgid "Name" -msgstr "Nom" +#: SalesAnalReptCols.php:395 +msgid "A number between 1 and 10 is expected" +msgstr "Un nombre entre 1 et 10 devrait" -#: AddCustomerContacts.php:129 AddCustomerContacts.php:223 Customers.php:1015 -#: Customers.php:1023 SelectCustomer.php:608 WWW_Access.php:107 -#: WWW_Access.php:169 -msgid "Role" -msgstr "Rôle" +#: PaymentTerms.php:65 +msgid "A number between 1 and 30 is expected" +msgstr "Veuillez entrer un nombre entre 1 et 30" -#: AddCustomerContacts.php:130 -msgid "Phone no" -msgstr "N° de téléphone" +#: PurchData.php:60 +msgid "a number is expected" +msgstr "un nombre est attendu" -#: AddCustomerContacts.php:131 AddCustomerContacts.php:240 -#: CustomerBranches.php:374 CustomerBranches.php:774 CustomerInquiry.php:253 -#: Customers.php:1017 Customers.php:1025 EmailCustTrans.php:15 -#: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:563 -#: OrderDetails.php:109 PDFRemittanceAdvice.php:243 PO_PDFPurchOrder.php:371 -#: PO_PDFPurchOrder.php:374 PrintCustTrans.php:714 PrintCustTrans.php:945 -#: PrintCustTrans.php:994 PrintCustTransPortrait.php:753 -#: PrintCustTransPortrait.php:999 PrintCustTransPortrait.php:1056 -#: SelectCustomer.php:610 SupplierContacts.php:154 SupplierContacts.php:274 -#: UserSettings.php:184 WWW_Users.php:274 includes/PDFPickingListHeader.inc:25 -#: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:82 -#: includes/PDFTransPageHeaderPortrait.inc:109 -#: includes/PO_PDFOrderPageHeader.inc:29 -msgid "Email" -msgstr "Email" +#: SuppPaymentRun.php:244 +msgid "a numeric exchange rate applicable for purchasing the currency to make the payment with must be entered" +msgstr "un taux de change applicable pour l'achat numérique de la monnaie pour effectuer le paiement doit être conclu avec" -#: AddCustomerContacts.php:132 AddCustomerContacts.php:249 Customers.php:1018 -#: Customers.php:1026 PcAssignCashToTab.php:224 PcAssignCashToTab.php:353 -#: PcAuthorizeExpenses.php:92 PcClaimExpensesFromTab.php:214 -#: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:611 -#: SystemParameters.php:328 WOSerialNos.php:291 WOSerialNos.php:297 -msgid "Notes" -msgstr "Notes" +#: api/api_xml-rpc.php:829 +msgid "A numeric field containing the reorder level for this stockid/location combination." +msgstr "Un champ numérique contenant le niveau de réapprovisionnement pour cet stockid combinaison emplacement." -#: AddCustomerContacts.php:150 SupplierContacts.php:164 -#, php-format -msgid "Are you sure you wish to delete this contact?" -msgstr "Etes-vous sûr de vouloir supprimer ce contact?" +#: CustomerBranches.php:81 +msgid "A package can be delivered by seafreight anywhere in the world normally in less than 60 days" +msgstr "Un package peut être livré par voie maritime partout dans le monde normalement en moins de 60 jours" -#: AddCustomerContacts.php:169 -msgid "Review all contacts for this Customer" -msgstr "Passer en revue tous les contacts pour ce client" +#: PrintCustOrder_generic.php:240 +msgid "A packing slip cannot be printed" +msgstr "Un bordereau d'emballage ne peut pas être imprimé" -#: AddCustomerContacts.php:206 -msgid "Contact Code" -msgstr "Code de contact" +#: api/api_xml-rpc.php:597 +msgid "A payment terms abbreviation as returned by the GetPaymentTermsList function." +msgstr "Une abréviation conditions de paiement, tel que retourné par la fonction GetPaymentTermsList." -#: AddCustomerContacts.php:214 Factors.php:233 SupplierContacts.php:236 -msgid "Contact Name" -msgstr "Nom du contact" +#: GLAccountCSV.php:90 +msgid "A period or range of periods must be selected from the list box" +msgstr "Une période ou la gamme de périodes doivent être choisis parmi la liste" -#: AddCustomerContacts.php:231 Contracts.php:775 PDFRemittanceAdvice.php:239 -#: PO_Header.php:992 PO_Header.php:1073 SelectCreditItems.php:241 -#: SelectCustomer.php:417 SelectOrderItems.php:606 -#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:81 -#: includes/PDFTransPageHeaderPortrait.inc:105 -msgid "Phone" -msgstr "T��hone" +#: GLProfit_Loss.php:137 +#: GLTagProfit_Loss.php:475 +msgid "A period up to 12 months in duration can be specified" +msgstr "Une période maximale de 12 mois la durée peut être spécifiée" -#: AddCustomerNotes.php:6 AddCustomerNotes.php:52 SelectCustomer.php:647 -#: SelectCustomer.php:678 -msgid "Customer Notes" -msgstr "Notes client" +#: SystemParameters.php:426 +msgid "A picking note must be produced before an order can be delivered" +msgstr "Un bon de préparation doit être traduite devant une commande peut être livrée" -#: AddCustomerNotes.php:21 AddCustomerTypeNotes.php:19 -msgid "Back to Select Customer" -msgstr "Retour choix des clients" +#: SupplierAllocations.php:60 +msgid "A positive allocation amount is expected" +msgstr "Un montant de l'allocation positive est attendue" -#: AddCustomerNotes.php:34 -msgid "The contact priority must be an integer." -msgstr "La priorité du contact doit être un nombre entier." +#: Z_DeleteCreditNote.php:70 +msgid "A problem was encountered attempting to reverse the update the sales order detail record" +msgstr "Un problème a été rencontré tente d'inverser la mise à jour la fiche de vente en détail afin" -#: AddCustomerNotes.php:37 AddCustomerTypeNotes.php:34 -msgid "The contact's notes must be two hundred characters or less long" -msgstr "note Le contact doit être deux cents caractères ou moins long" +#: Z_DeleteCreditNote.php:59 +msgid "A problem was encountered trying to delete the Debtor transaction record" +msgstr "Un problème a été rencontré essayer de supprimer l'enregistrement des transactions du débiteur" -#: AddCustomerNotes.php:40 AddCustomerTypeNotes.php:37 -msgid "The contact's notes may not be empty" -msgstr "Les notes de contact ne peut pas être vide" +#: SupplierCredit.php:1051 +#: SupplierInvoice.php:1026 +msgid "a rate of" +msgstr "un taux de" -#: AddCustomerNotes.php:65 -msgid "The contact notes record has been added" -msgstr "L'enregistrement de contact note a été ajoutée" +#: DeliveryDetails.php:73 +msgid "A recurring order cannot be made from a quotation" +msgstr "Une commande récurrente ne peut être faite à partir d'une citation" -#: AddCustomerNotes.php:93 -msgid "The contact note record has been deleted" -msgstr "Le record note de contact a été supprimé" +#: SpecialOrder.php:193 +msgid "a reference more than 3 characters is required before the order can be added" +msgstr "une référence plus de 3 caractères est requis avant que l'ordonnance peut être ajouté" -#: AddCustomerNotes.php:104 -msgid "Notes for Customer" -msgstr "Notes pour le client" +#: Shipments.php:186 +msgid "A reference to the vessel of more than 2 characters is expected" +msgstr "Une référence au navire de plus de 2 caractères devrait" -#: AddCustomerNotes.php:121 AddCustomerNotes.php:225 -#: AddCustomerTypeNotes.php:108 AddCustomerTypeNotes.php:200 -#: BankMatching.php:263 BankReconciliation.php:209 BankReconciliation.php:284 -#: ContractCosting.php:173 CustomerAllocations.php:330 -#: CustomerAllocations.php:363 CustomerInquiry.php:196 -#: CustomerTransInquiry.php:100 GLAccountInquiry.php:152 -#: GLAccountReport.php:338 GLTransInquiry.php:42 MRPCalendar.php:219 -#: PaymentAllocations.php:66 PcAssignCashToTab.php:220 -#: PcAuthorizeExpenses.php:88 PDFRemittanceAdvice.php:300 -#: PrintCustTrans.php:822 PrintCustTransPortrait.php:867 ReverseGRN.php:386 -#: ShipmentCosting.php:538 ShipmentCosting.php:615 Shipments.php:490 -#: StockDispatch.php:189 StockDispatch.php:201 StockLocMovements.php:90 -#: StockMovements.php:94 StockSerialItemResearch.php:81 -#: SupplierAllocations.php:455 SupplierAllocations.php:568 -#: SupplierAllocations.php:643 SupplierInquiry.php:209 -#: SupplierTransInquiry.php:103 includes/PDFQuotationPageHeader.inc:92 -#: includes/PDFQuotationPortraitPageHeader.inc:90 -#: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 -#: includes/PDFTransPageHeader.inc:48 -#: includes/PDFTransPageHeaderPortrait.inc:58 -msgid "Date" -msgstr "Date" +#: Shipments.php:189 +msgid "A reference to the voyage (or HAWB in the case of air-freight) of more than 2 characters is expected" +msgstr "Une référence au voyage (ou HAWB dans le cas du fret aérien) de plus de 2 caractères devrait" -#: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1019 UpgradeDatabase.php:184 UpgradeDatabase.php:187 -#: UpgradeDatabase.php:190 UpgradeDatabase.php:193 UpgradeDatabase.php:196 -#: UpgradeDatabase.php:199 UpgradeDatabase.php:202 UpgradeDatabase.php:205 -#: UpgradeDatabase.php:208 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 Z_Upgrade_3.11-4.00.php:66 -#: Z_Upgrade_3.11-4.00.php:70 Z_Upgrade_3.11-4.00.php:74 -#: Z_Upgrade_3.11-4.00.php:78 -msgid "Note" -msgstr "Note" +#: api/api_xml-rpc.php:1455 +msgid "A sales area code as returned by the GetSalesAreasList function." +msgstr "Un code de surface de vente, tel que retourné par la fonction GetSalesAreasList." -#: AddCustomerNotes.php:123 AddCustomerNotes.php:216 -msgid "WWW" -msgstr "WWW" +#: api/api_xml-rpc.php:1486 +msgid "A sales area description of the sales area of interest." +msgstr "Une description surface de vente de la surface de vente d'intérêt." -#: AddCustomerNotes.php:124 AddCustomerNotes.php:234 -#: AddCustomerTypeNotes.php:111 AddCustomerTypeNotes.php:204 -msgid "Priority" -msgstr "Priorité" +#: SalesGLPostings.php:63 +msgid "A sales gl posting account already exists for the selected area, stock category, salestype" +msgstr "Une vente gl annonce compte existe déjà pour la zone sélectionnée, la catégorie stock, salestype" -#: AddCustomerNotes.php:142 -#, fuzzy, php-format -msgid "Are you sure you wish to delete this customer note?" -msgstr "Etes-vous sûr de vouloir supprimer ce type de client?" +#: api/api_xml-rpc.php:443 +msgid "A sales type abbreviation as returned by the GetSalesTypeList function." +msgstr "Une abréviation du type de vente, tel que retourné par la fonction GetSalesTypeList." -#: AddCustomerNotes.php:161 -msgid "Review all notes for this Customer" -msgstr "Passer en revue toutes les notes pour ce client" +#: api/api_xml-rpc.php:1577 +msgid "A salesman code as returned by the GetSalesmanList function." +msgstr "Un code vendeur, tel que retourné par la fonction GetSalesmanList." -#: AddCustomerNotes.php:199 AddCustomerTypeNotes.php:178 -msgid "Note ID" -msgstr "Note ID" +#: PurchData.php:453 +msgid "A search facility is available below if necessary" +msgstr "Une recherche est disponible ci-dessous si nécessaire" -#: AddCustomerNotes.php:207 -msgid "Contact Note" -msgstr "Contact Note" +#: PrintCustTrans.php:555 +msgid "A sequential range can be printed using the same method as for invoices above" +msgstr "Une gamme séquentiel peut être imprimé en utilisant la même méthode que pour les factures ci-dessus" -#: AddCustomerTypeNotes.php:5 SelectCustomer.php:688 -msgid "Customer Type (Group) Notes" -msgstr "Type de client (en groupe) Notes" +#: api/api_xml-rpc.php:63 +#: api/api_xml-rpc.php:173 +#: api/api_xml-rpc.php:1112 +#: api/api_xml-rpc.php:1181 +#: api/api_xml-rpc.php:2113 +#: api/api_xml-rpc.php:2423 +msgid "A set of key/value pairs where the key must be identical to the name of the field to be updated. " +msgstr "Un ensemble de paires clé / valeur, où la clé doit être identique au nom du champ à mettre à jour. " -#: AddCustomerTypeNotes.php:31 -msgid "The Contact priority must be an integer." -msgstr "La priorité de contact doit être un nombre entier." +#: PrintCustTrans.php:555 +msgid "A single credit note can be printed by only entering a start transaction number" +msgstr "Un seul avoir peut être imprimé saisissant un numéro de début de transaction" -#: AddCustomerTypeNotes.php:49 SelectCustomer.php:719 -msgid "Customer Group Notes" -msgstr "Notes groupe de clients" +#: DiscountCategories.php:243 +msgid "a single stock item" +msgstr "un élément de stock unique" -#: AddCustomerTypeNotes.php:62 -msgid "The contact group notes record has been added" -msgstr "Le groupe de contact notes enregistrement a été ajouté" +#: StockAdjustments.php:312 +msgid "A stock adjustment for" +msgstr "Un ajustement des stocks pour" -#: AddCustomerTypeNotes.php:86 -msgid "The contact group note record has been deleted" -msgstr "Le record note du groupe de contact a été supprimé" +#: api/api_xml-rpc.php:1880 +msgid "A Stock Category ID as returned by the *WHAT* function." +msgstr "Un stock Catégorie ID retourné par la fonction *QU'EST-CE*" -#: AddCustomerTypeNotes.php:98 -msgid "Notes for Customer Type" -msgstr "Notes pour le type de clientèle" +#: api/api_xml-rpc.php:1337 +msgid "A stock location code as returned by the GetLocationList function." +msgstr "Un code de localisation des stocks, tel que retourné par la fonction GetLocationList." -#: AddCustomerTypeNotes.php:110 -msgid "href" -msgstr "href" +#: api/api_xml-rpc.php:1396 +msgid "A stock shipper ID as returned by the GetShippersList function." +msgstr "Un ID expéditeur stock retourné par la fonction GetShippersList." -#: AddCustomerTypeNotes.php:129 -#, fuzzy, php-format -msgid "Are you sure you wish to delete this customer type note?" -msgstr "Etes-vous sûr de vouloir supprimer ce type de client?" +#: StockLocTransferReceive.php:306 +msgid "A stock transfer for item code" +msgstr "Un transfert de stock pour le code article" -#: AddCustomerTypeNotes.php:148 -msgid "Review all notes for this Customer Type" -msgstr "Passer en revue toutes les notes pour ce type de client" +#: api/api_xml-rpc.php:827 +#: api/api_xml-rpc.php:2303 +msgid "A string field containing a valid location code that must already be setup in the locations table. The api will check this before making the enquiry." +msgstr "Un champ de chaîne de caractères contenant un code d'emplacement valide qui doit déjà être installé dans le tableau endroits. L'API vérifier avant de faire l'enquête." -#: AddCustomerTypeNotes.php:192 -msgid "Contact Group Note" -msgstr "Note Groupe de contact" +#: api/api_xml-rpc.php:763 +#: api/api_xml-rpc.php:2219 +#: api/api_xml-rpc.php:2301 +msgid "A string field containing a valid stockid that must already be setup in the stockmaster table. The api will check this before making the enquiry." +msgstr "Un champ de type chaîne contenant un stockid valide qui doit déjà être installé dans le tableau Stockmaster. L'API vérifier avant de faire l'enquête." -#: AddCustomerTypeNotes.php:196 -msgid "Web site" -msgstr "site Web" +#: api/api_xml-rpc.php:2299 +msgid "A string field containing a valid work order number that has already been created. The api will check this before making the enquiry." +msgstr "Un champ de chaîne de caractères contenant un certain nombre de travail valide pour qui a déjà été créé. L'API vérifier avant de faire l'enquête." -#: AgedDebtors.php:14 -msgid "Aged Customer Balance Listing" -msgstr "Liste des comptes clients en �heance" +#: SuppLoginSetup.php:15 +msgid "A supplier must first be selected before logins can be defined for it" +msgstr "Sélectionnez un fournisseur pour paramétrer son identifiant" -#: AgedDebtors.php:15 -msgid "Aged Customer Balances" -msgstr "Bilan de comptes clients en �heance" +#: api/api_xml-rpc.php:1699 +msgid "A tax group ID as returned by the GetTaxgroupList function." +msgstr "Un ID groupe fiscal, tel que retourné par la fonction GetTaxgroupList." -#: AgedDebtors.php:269 AgedDebtors.php:368 AgedDebtors.php:433 -msgid "Aged Customer Account Analysis" -msgstr "Analyse de compte clients en �heance" +#: SecurityTokens.php:55 +msgid "A token description must be entered" +msgstr "une description du jeton doit être fournie" -#: AgedDebtors.php:269 AgedDebtors.php:368 AgedDebtors.php:433 -#: AgedSuppliers.php:111 BOMExtendedQty.php:149 BOMIndented.php:150 -#: BOMIndentedReverse.php:140 BOMListing.php:41 BOMListing.php:52 -#: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:100 -#: GLBalanceSheet.php:139 GLProfit_Loss.php:177 GLTagProfit_Loss.php:191 -#: GLTrialBalance.php:159 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:53 OutstandingGRNs.php:65 -#: PDFCustomerList.php:18 PDFCustomerList.php:230 PDFCustomerList.php:242 -#: PDFLowGP.php:20 PDFStockCheckComparison.php:33 -#: PDFStockCheckComparison.php:59 PDFStockCheckComparison.php:264 -#: ReorderLevel.php:60 SelectAsset.php:37 SelectProduct.php:39 -#: StockCheck.php:66 StockCheck.php:140 SupplierTenders.php:326 -#: SuppPriceList.php:130 includes/PDFPaymentRun_PymtFooter.php:152 -msgid "Problem Report" -msgstr "Rapport de probl�e" +#: Z_ChangeBranchCode.php:37 +msgid "a unique branch code must be entered for the new code" +msgstr "un code d'agence unique doit être saisie pour le nouveau code" -#: AgedDebtors.php:271 CustomerInquiry.php:85 CustomerInquiry.php:109 -#: DebtorsAtPeriodEnd.php:59 -msgid "The customer details could not be retrieved by the SQL because" -msgstr "" -"Impossible de r�up�er l'information detaill� du client par la requ�e SQL car" +#: Z_ChangeCustomerCode.php:28 +msgid "a unique customer code must be entered for the new code" +msgstr "un code client unique doit être saisie pour le nouveau code" -#: AgedDebtors.php:272 AgedDebtors.php:371 AgedDebtors.php:436 -#: AgedSuppliers.php:114 AgedSuppliers.php:199 BOMExtendedQty.php:152 -#: BOMExtendedQty.php:248 BOMIndented.php:153 BOMIndented.php:234 -#: BOMIndentedReverse.php:144 BOMIndentedReverse.php:221 BOMListing.php:44 -#: Credit_Invoice.php:184 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 -#: FTP_RadioBeacon.php:187 GetStockImage.php:150 GLBalanceSheet.php:104 -#: GLBalanceSheet.php:142 GLBalanceSheet.php:305 GLProfit_Loss.php:180 -#: GLProfit_Loss.php:192 GLTagProfit_Loss.php:195 GLTagProfit_Loss.php:208 -#: GLTrialBalance.php:162 GLTrialBalance.php:174 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:308 MRPReport.php:39 -#: MRPReport.php:50 MRPReport.php:150 MRPReschedules.php:48 -#: MRPReschedules.php:60 MRPShortages.php:158 MRPShortages.php:170 -#: OutstandingGRNs.php:56 OutstandingGRNs.php:68 PDFCustomerList.php:233 -#: PDFCustomerList.php:245 PDFGrn.php:123 PDFLowGP.php:59 PDFLowGP.php:71 -#: PDFPriceList.php:128 PDFQuotation.php:270 PDFQuotationPortrait.php:268 -#: PDFRemittanceAdvice.php:83 PDFStockCheckComparison.php:37 -#: PDFStockCheckComparison.php:63 PDFStockCheckComparison.php:268 -#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:154 -#: PrintCustOrder_generic.php:243 PrintCustOrder.php:220 ReorderLevel.php:63 -#: ReorderLevel.php:152 SalesAnalysis_UserDefined.php:28 -#: SelectCreditItems.php:30 StockCheck.php:47 StockCheck.php:69 -#: StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 StockCheck.php:195 -#: StockDispatch.php:93 StockDispatch.php:106 SupplierBalsAtPeriodEnd.php:54 -#: SupplierBalsAtPeriodEnd.php:65 SuppPaymentRun.php:112 -#: SuppPaymentRun.php:122 SuppPaymentRun.php:186 SuppPaymentRun.php:217 -#: SuppPriceList.php:134 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:59 -#: includes/PDFPaymentRun_PymtFooter.php:89 -#: includes/PDFPaymentRun_PymtFooter.php:119 -#: includes/PDFPaymentRun_PymtFooter.php:156 -#: includes/PDFPaymentRun_PymtFooter.php:187 -#: includes/PDFPaymentRun_PymtFooter.php:218 -#: includes/ConstructSQLForUserDefinedSalesReport.inc:180 -#: includes/ConstructSQLForUserDefinedSalesReport.inc:188 -#: includes/ConstructSQLForUserDefinedSalesReport.inc:340 -msgid "Back to the menu" -msgstr "Retour au menu" +#: Z_ChangeStockCategory.php:39 +msgid "a unique stock category must be entered for the new stock category" +msgstr "une catégorie unique d'actions doivent être inscrits pour la catégorie d'actions nouvelles" -#: AgedDebtors.php:370 -msgid "The details of outstanding transactions for customer" -msgstr "Details sur des transactions clients en �heance" +#: Z_ChangeStockCode.php:40 +msgid "a unique stock code must be entered for the new code" +msgstr "un code de stock unique doit être saisie pour le nouveau code" -#: AgedDebtors.php:370 AgedSuppliers.php:198 GLAccountCSV.php:168 -#: GLAccountInquiry.php:143 GLAccountReport.php:94 PO_Items.php:433 -#: PO_Items.php:557 PO_Items.php:582 SalesAnalReptCols.php:365 -#: SpecialOrder.php:441 StockLocTransferReceive.php:370 -#: StockQuantityByDate.php:121 includes/SelectOrderItems_IntoCart.inc:54 -msgid "could not be retrieved because" -msgstr "ne peut pas �re retrouv�car" +#: SuppFixedAssetChgs.php:32 +msgid "A valid asset must be either selected from the list or entered" +msgstr "Un bien doit être sélectionner à partir de la liste ou saisi au clavier" -#: AgedDebtors.php:373 AgedSuppliers.php:201 Areas.php:95 -#: ConfirmDispatch_Invoice.php:160 ConfirmDispatch_Invoice.php:974 -#: ConfirmDispatch_Invoice.php:988 Contracts.php:580 CounterSales.php... [truncated message content] |