From: <ex...@us...> - 2015-10-30 12:12:55
|
Revision: 7373 http://sourceforge.net/p/web-erp/reponame/7373 Author: exsonqu Date: 2015-10-30 12:12:52 +0000 (Fri, 30 Oct 2015) Log Message: ----------- 30/10/15 Exson: Allow user input supplier's delivery note during goods receiving and make the inquiry script for it. So users can search corresponding GRN, PO and invoice with it. Modified Paths: -------------- trunk/GoodsReceived.php trunk/PDFGrn.php trunk/ReverseGRN.php trunk/SelectSupplier.php trunk/SuppInvGRNs.php trunk/SupplierInvoice.php trunk/companies/weberpdemo/FormDesigns/GoodsReceived.xml trunk/includes/DefineSuppTransClass.php trunk/includes/PDFGrnHeader.inc trunk/sql/mysql/upgrade4.12.3-4.13.sql Added Paths: ----------- trunk/SupplierGRNAndInvoiceInquiry.php Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/GoodsReceived.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -71,21 +71,40 @@ echo '<p class="page_title_text"> <img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Receive') . '" alt="" />' . ' ' . _('Receive Purchase Order') . ' : '. $_SESSION['PO'.$identifier]->OrderNo .' '. _('from'). ' ' . $_SESSION['PO'.$identifier]->SupplierName . '</p>'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier=' . $identifier . '" id="form1" method="post">'; echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; if (!isset($_POST['ProcessGoodsReceived'])) { - if (!isset($_POST['DefaultReceivedDate'])){ + if (!isset($_POST['DefaultReceivedDate']) AND !isset($_SESSION['PO' . $identifier]->DefaultReceivedDate)){ /* This is meant to be the date the goods are received - it does not make sense to set this to the date that we requested delivery in the purchase order - I have not applied your change here Tim for this reason - let me know if I have it wrong - Phil */ $_POST['DefaultReceivedDate'] = Date($_SESSION['DefaultDateFormat']); + $_SESSION['PO' . $identifier]->DefaultReceivedDate = $_POST['DefaultReceivedDate']; + } else { + if (isset($_POST['DefaultReceivedDate']) AND is_date($_POST['DefaultReceivedDate'])) { + $_SESSION['PO' . $identifier]->DefaultReceivedDate = $_POST['DefaultReceivedDate']; + } elseif(isset($_POST['DefaultReceivedDate']) AND !is_date($_POST['DefaultReceivedDate'])) { + prnMsg(_('The default received date is not a date format'),'error'); + $_POST['DefaultReceivedDate'] = Date($_SESSION['DefaultDateFormat']); + } } + if (!isset($_POST['SupplierReference'])) { + $_POST['SupplierReference'] = ''; + } else { + if (isset($_POST['SupplierReference']) AND mb_strlen(trim($_POST['SupplierReference']))>30) { + prnMsg(_('The supplier\'s delivery note no should not be more than 30 characters'),'error'); + } else { + $_SESSION['PO' . $identifier]->SupplierReference = $_POST['SupplierReference']; + } + } echo '<table class="selection"> <tr> <td>' . _('Date Goods/Service Received'). ':</td> <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength="10" size="10" onchange="return isDate(this, this.value, '."'". - $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_POST['DefaultReceivedDate'] . '" /></td> + $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_SESSION['PO' . $identifier]->DefaultReceivedDate . '" /></td> + <td>' . _("Supplier's Reference") . ':</td> + <td><input type="text" name="SupplierReference" value="' . $_SESSION['PO' . $identifier]->SupplierReference. '" maxlength="30" size="20" onchange="ReloadForm(form1.Update)"/></td> </tr> </table> <br />'; @@ -228,6 +247,17 @@ $NegativesFound = false; $InputError = false; +if (isset($_POST['DefaultReceivedDate']) AND !is_date($_POST['DefaultReceivedDate'])) { + $InputError = true; + prnMsg(_('The goods received date is not a date format'),'error'); + +} else { +} + +if (isset($_POST['SupplierReference']) AND mb_strlen(trim($_POST['SupplierReference']))>30) { + $InputError = true; + prnMsg(_('The delivery note of suppliers should not be more than 30 characters'),'error'); +} if (count($_SESSION['PO'.$identifier]->LineItems)>0){ foreach ($_SESSION['PO'.$identifier]->LineItems as $OrderLine) { @@ -474,7 +504,8 @@ deliverydate, qtyrecd, supplierid, - stdcostunit) + stdcostunit, + supplierref) VALUES ('" . $GRN . "', '" . $OrderLine->PODetailRec . "', '" . $OrderLine->StockID . "', @@ -482,7 +513,8 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $OrderLine->ReceiveQty . "', '" . $_SESSION['PO'.$identifier]->SupplierID . "', - '" . $CurrentStandardCost . "')"; + '" . $CurrentStandardCost . "', + '" . trim($_POST['SupplierReference']) ."')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('A GRN record could not be inserted') . '. ' . _('This receipt of goods has not been processed because'); $DbgMsg = _('The following SQL to insert the GRN record was used'); Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/PDFGrn.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -46,6 +46,7 @@ grns.itemdescription, grns.qtyrecd, grns.supplierid, + grns.supplierref, purchorderdetails.suppliersunit, purchorderdetails.conversionfactor, stockmaster.units, @@ -77,6 +78,9 @@ } } // get data to print if ($NoOfGRNs >0){ + $SupplierRef = DB_fetch_array($GRNResult); + $SupplierRef = $SupplierRef['supplierref']; + DB_data_seek($GRNResult,0); include ('includes/PDFGrnHeader.inc'); //head up the page $FooterPrintedInPage= 0; Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/ReverseGRN.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -39,6 +39,7 @@ grns.itemcode, grns.itemdescription, grns.deliverydate, + grns.supplierref, purchorderdetails.glcode, purchorderdetails.assetid, grns.qtyrecd, @@ -370,6 +371,7 @@ grns.itemcode, grns.itemdescription, grns.deliverydate, + grns.supplierref, qtyrecd, quantityinv, qtyrecd-quantityinv AS qtytoreverse @@ -393,6 +395,7 @@ $TableHeader = '<tr> <th>' . _('GRN') . ' #</th> <th>' . _('GRN Batch') . '</th> + <th>' . _('Supplier\' Ref') . '</th> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Date') . '<br />' . _('Received') . '</th> @@ -426,6 +429,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> @@ -433,6 +437,7 @@ </tr>', $myrow['grnno'], $myrow['grnbatch'], + $myrow['supplierref'], $myrow['itemcode'], $myrow['itemdescription'], $DisplayDateDel, Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/SelectSupplier.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -170,6 +170,8 @@ echo '<tr><td valign="top" class="select">'; /* Inquiry Options */ echo '<a href="' . $RootPath . '/SupplierInquiry.php?SupplierID=' . $_SESSION['SupplierID'] . '">' . _('Supplier Account Inquiry') . '</a> <br /> + <a href="' . $RootPath . '/SupplierGRNAndInvoiceInquiry.php?SelectedSupplier=' . $_SESSION['SupplierID'] . '&SupplierName='.urlencode($SupplierName).'">' . _('Supplier Delivery Note AND GRN inquiry') . '</a> + <br /> <br />'; echo '<br /><a href="' . $RootPath . '/PO_SelectOSPurchOrder.php?SelectedSupplier=' . $_SESSION['SupplierID'] . '">' . _('Add / Receive / View Outstanding Purchase Orders') . '</a>'; Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/SuppInvGRNs.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -95,7 +95,8 @@ $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->ShiptRef, $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->JobRef, $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->GLCode, - $Hold); + $Hold, + $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->SupplierRef); } } } @@ -116,6 +117,7 @@ </tr> <tr> <th>' . _('Sequence') . ' #</th> + <th>' . _("Supplier's Ref") . '</th> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Quantity Yet To Inv') . '</th> @@ -137,6 +139,7 @@ echo '<tr> <td>' . $EnteredGRN->GRNNo . '</td> + <td>' . $EnteredGRN->SupplierRef . '</td> <td>' . $EnteredGRN->ItemCode . '</td> <td>' . $EnteredGRN->ItemDescription . '</td> <td class="number">' . locale_number_format($EnteredGRN->QtyRecd - $EnteredGRN->Prev_QuantityInv,'Variable') . '</td> @@ -177,6 +180,7 @@ grns.qtyrecd, grns.quantityinv, grns.stdcostunit, + grns.supplierref, purchorderdetails.glcode, purchorderdetails.shiptref, purchorderdetails.jobref, @@ -235,7 +239,8 @@ $myrow['assetid'], 0, $myrow['decimalplaces'], - $myrow['grnbatch']); + $myrow['grnbatch'], + $myrow['supplierref']); } } } @@ -253,6 +258,7 @@ <th class="ascending">' . _('Select') . '</th> <th class="ascending">' . _('Sequence') . ' #</th> <th class="ascending">' . _('GRN Number') . '</th> + <th class="ascending">' . _('Supplier\'s Ref') . '</th> <th class="ascending">' . _('Order') . '</th> <th class="ascending">' . _('Item Code') . '</th> <th class="ascending">' . _('Description') . '</th> @@ -285,6 +291,7 @@ } echo '<td>' . $GRNTmp->GRNNo . '</td> <td>' . $GRNTmp->GRNBatchNo . '</td> + <td>' . $GRNTmp->SupplierRef . '</td> <td>' . $GRNTmp->PONo . '</td> <td>' . $GRNTmp->ItemCode . '</td> <td>' . $GRNTmp->ItemDescription . '</td> Added: trunk/SupplierGRNAndInvoiceInquiry.php =================================================================== --- trunk/SupplierGRNAndInvoiceInquiry.php (rev 0) +++ trunk/SupplierGRNAndInvoiceInquiry.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -0,0 +1,97 @@ +<?php +include('includes/session.inc'); +$Title = _('Supplier Invoice and GRN inquiry'); +include('includes/header.inc'); +if (isset($_GET['SelectedSupplier'])) { + $SupplierID= $_GET['SelectedSupplier']; +} elseif (isset($_POST['SelectedSupplier'])){ + $SupplierID = $_POST['SelectedSupplier']; +} else { + prnMsg(_('The page must be called from suppliers selected interface, please click following link to select the supplier'),'error'); + echo '<a href="' . $RootPath . '/SelectSupplier.php">'. _('Select Supplier') . '</a>'; + include('includes/footer.inc'); + exit; +} +if (isset($_GET['SupplierName'])) { + $SupplierName = $_GET['SupplierName']; +} +if (!isset($_POST['SupplierRef']) OR trim($_POST['SupplierRef'])=='') { + $_POST['SupplierRef'] = ''; + if (empty($_POST['GRNBatchNo']) AND empty($_POST['InvoiceNo'])) { + $_POST['GRNBatchNo'] = ''; + $_POST['InvoiceNo'] = ''; + } elseif (!empty($_POST['GRNBatchNo']) AND !empty($_POST['InvoiceNo'])) { + $_POST['InvoiceNo'] = ''; + } +} elseif (isset($_POST['GRNBatchNo']) OR isset($_POST['InvoiceNo'])) { + $_POST['GRNBatchNo'] = ''; + $_POST['InvoiceNo'] = ''; +} +echo '<p class="page_title_text">' . _('Supplier Invoice and Delivery Note Inquiry') . '<img src="' . $RootPath . '/css/' . $Theme . '/images/transactions.png" alt="" />' . _('Supplier') . ': ' . $SupplierName . '</p>'; +echo '<div class="page_help_text">' . _('The supplier\'s delivery note is prefer to GRN No, and GRN No is prefered to Invoice No').'</div>'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="SelectedSupplier" value="' . $SupplierID . '" />'; + +echo '<table class="selection"> + <tr> + <td class="label">' . _('Part of Supplier\'s Delivery Note') . ':</td><td><input type="text" name="SupplierRef" value="' . $_POST['SupplierRef'] . '" size="20" maxlength="30" ></td> + <td class="label">' . _('GRN No') . ':</td><td><input type="text" name="GRNBatchNo" value="' . $_POST['GRNBatchNo'] . '" size="6" maxlength="6" /></td> + <td class="label">' . _('Invoice No') . ':</td><td><input type="text" name="InvoiceNo" value="' . $_POST['InvoiceNo'] . '" size="11" maxlength="11" /></td> + + </tr> + </table>'; +echo '<div class="center"> + <input type="submit" name="Submit" value="' . _('Submit') . '" /> + </div>'; +if (isset($_POST['Submit'])) { + $Where = ''; + if (isset($_POST['SupplierRef']) AND trim($_POST['SupplierRef']) != '') { + $SupplierRef = trim($_POST['SupplierRef']); + $WhereSupplierRef = " AND grns.supplierref LIKE '%" . $SupplierRef . "%'"; + $Where .= $WhereSupplierRef; + } elseif (isset($_POST['GRNBatchNo']) AND trim($_POST['GRNBatchNo']) != '') { + $GRNBatchNo = trim($_POST['GRNBatchNo']); + $WhereGRN = " AND grnbatch LIKE '%" . $GRNBatchNo . "%'"; + $Where .= $WhereGRN; + } elseif (isset($_POST['InvoiceNo']) AND (trim($_POST['InvoiceNo']) != '')) { + $InvoiceNo = trim($_POST['InvoiceNo']); + $WhereInvoiceNo = " AND suppinv LIKE '%" . $InvoiceNo . "%'"; + $Where .= $WhereInvoiceNo; + } + $sql = "SELECT grnbatch, grns.supplierref, suppinv,purchorderdetails.orderno + FROM grns INNER JOIN purchorderdetails ON grns.podetailitem=purchorderdetails.podetailitem + LEFT JOIN suppinvstogrn ON grns.grnno=suppinvstogrn.grnno + WHERE supplierid='" . $SupplierID . "'" . $Where; + $ErrMsg = _('Failed to retrieve supplier invoice and grn data'); + $result = DB_query($sql,$ErrMsg); + if (DB_num_rows($result)>0) { + echo '<table class="selection"> + <tr> + <th>' . _('Supplier Delivery Note') . '</th> + <th>' . _('GRN Batch No') . '</th> + <th>' . _('PO No') . '</th> + <th>' . _('Invoice No') . '</th> + </tr>'; + $k = 0; + while ($myrow = DB_fetch_array($result)){ + if ($k == 0) { + echo '<tr class="EvenTableRows">'; + $k = 1; + } else{ + echo '<tr class="OddTableRows">'; + $k = 0; + } + echo '<td class="ascending">' . $myrow['supplierref'] . '</td> + <td class="ascending"><a href="' . $RootPath .'/PDFGrn.php?GRNNo=' . $myrow['grnbatch'] . '&PONo=' . $myrow['orderno'] . '">' . $myrow['grnbatch']. '</td> + <td class="ascending">' . $myrow['orderno'] . '</td> + <td class="ascending">' . $myrow['suppinv'] . '</td></tr>'; + + } + echo '</table><br/>'; + + } + +} +include('includes/footer.inc'); +?> Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/SupplierInvoice.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -662,6 +662,8 @@ </tr>'; $tableheader = '<tr style="background-color:#800000"> <th>' . _('Seq') . ' #</th> + <th>' . _('GRN Batch') . '</th> + <th>' . _('Supplier Ref') . '</th> <th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Quantity Charged') . '</th> @@ -674,6 +676,8 @@ echo '<tr> <td>' . $EnteredGRN->GRNNo . '</td> + <td>' . $EnteredGRN->GRNBatchNo . '</td> + <td>' . $EnteredGRN->SupplierRef . '</td> <td>' . $EnteredGRN->ItemCode . '</td> <td>' . $EnteredGRN->ItemDescription . '</td> <td class="number">' . locale_number_format($EnteredGRN->This_QuantityInv,$EnteredGRN->DecimalPlaces) . '</td> @@ -1547,7 +1551,8 @@ $Result = DB_query($SQL, $ErrMsg, $DbgMsg, True); $SQL = "INSERT INTO suppinvstogrn VALUES ('" . $InvoiceNo . "', - '" .$EnteredGRN->GRNNo . "')"; + '" . $EnteredGRN->GRNNo . "', + '" . $EnteredGRN->SupplierRef . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The invoice could not be mapped to the goods received record because'); $DbgMsg = _('The following SQL to map the invoice to the GRN was used'); Modified: trunk/companies/weberpdemo/FormDesigns/GoodsReceived.xml =================================================================== --- trunk/companies/weberpdemo/FormDesigns/GoodsReceived.xml 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/companies/weberpdemo/FormDesigns/GoodsReceived.xml 2015-10-30 12:12:52 UTC (rev 7373) @@ -53,10 +53,15 @@ <x>625</x> <y>48</y> </GRNNumber> + <SupplierRef type="SimpleText" name="Supplier's Ref" id="SupplierRef"> + <FontSize>10</FontSize> + <x>625</x> + <y>60</y> + </SupplierRef> <OrderNumber type="SimpleText" name="Order Number" id="OrderNumber"> <FontSize>10</FontSize> <x>625</x> - <y>66</y> + <y>72</y> </OrderNumber> <PrintDate type="SimpleText" name="Date Printed" id="PrintDate"> <FontSize>10</FontSize> Modified: trunk/includes/DefineSuppTransClass.php =================================================================== --- trunk/includes/DefineSuppTransClass.php 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/includes/DefineSuppTransClass.php 2015-10-30 12:12:52 UTC (rev 7373) @@ -36,6 +36,7 @@ var $TaxGroupDescription; var $Taxes; var $Hold; + var $SupplierRef=''; function SuppTrans(){ /*Constructor function initialises a new Supplier Transaction object */ @@ -102,7 +103,8 @@ $AssetID=0, $Hold=0, $DecimalPlaces=2, - $GRNBatchNo){ + $GRNBatchNo, + $SupplierRef){ if ($This_QuantityInv!=0 AND isset($This_QuantityInv)){ $this->GRNs[$GRNNo] = new GRNs($GRNNo, @@ -123,7 +125,8 @@ $AssetID, $Hold, $DecimalPlaces, - $GRNBatchNo); + $GRNBatchNo, + $SupplierRef); Return 1; } Return 0; @@ -143,7 +146,8 @@ $ShiptRef, $JobRef, $GLCode, - $Hold){ + $Hold, + $SupplierRef){ if ($This_QuantityInv!=0 AND isset($This_QuantityInv)){ $this->GRNs[$GRNNo]->Modify($PODetailItem, @@ -159,7 +163,8 @@ $ShiptRef, $JobRef, $GLCode, - $Hold ); + $Hold, + $SupplierRef); Return 1; } Return 0; @@ -186,7 +191,8 @@ $GRNSrc->AssetID, $GRNSrc->Hold, $GRNSrc->DecimalPlaces, - $GRNSrc->GRNBatchNo); + $GRNSrc->GRNBatchNo, + $GRNSrc->SupplierRef); Return 1; } Return 0; @@ -325,6 +331,7 @@ var $AssetID; var $DecimalPlaces; var $GRNBatchNo; + var $SupplierRef; function GRNs ($GRNNo, $PODetailItem, @@ -344,7 +351,8 @@ $AssetID, $Hold=0, $DecimalPlaces=2, - $GRNBatchNo){ + $GRNBatchNo, + $SupplierRef=''){ @@ -368,6 +376,7 @@ $this->Hold = $Hold; $this->DecimalPlaces = $DecimalPlaces; $this->GRNBatchNo = $GRNBatchNo; + $this->SupplierRef = $SupplierRef; } function Modify ($PODetailItem, @@ -383,7 +392,8 @@ $ShiptRef, $JobRef, $GLCode, - $Hold){ + $Hold, + $SupplierRef){ /* Modify function to edit a GRNs object with passed params */ $this->PODetailItem = $PODetailItem; @@ -400,6 +410,7 @@ $this->JobRef = $JobRef; $this->Hold = $Hold; $this->GLCode = $GLCode; + $this->SupplierRef = $SupplierRef; } } Modified: trunk/includes/PDFGrnHeader.inc =================================================================== --- trunk/includes/PDFGrnHeader.inc 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/includes/PDFGrnHeader.inc 2015-10-30 12:12:52 UTC (rev 7373) @@ -18,6 +18,7 @@ $LeftOvers = $pdf->addText($FormDesign->CompanyName->x,$Page_Height-$FormDesign->CompanyName->y,$FormDesign->CompanyName->FontSize,$_SESSION['CompanyRecord']['coyname']); $LeftOvers = $pdf->addText($FormDesign->GRNNumber->x,$Page_Height-$FormDesign->GRNNumber->y,$FormDesign->GRNNumber->FontSize, _('GRN number ').' ' . $GRNNo ); +$LeftOvers = $pdf->addText($FormDesign->SupplierRef->x,$Page_Height-$FormDesign->SupplierRef->y,$FormDesign->SupplierRef->FontSize,_("Supplier's Ref") . ' ' . $SupplierRef); $LeftOvers = $pdf->addText($FormDesign->OrderNumber->x,$Page_Height-$FormDesign->OrderNumber->y,$FormDesign->OrderNumber->FontSize, _('PO number ').' ' . $_GET['PONo'] ); $LeftOvers = $pdf->addText($FormDesign->PrintDate->x,$Page_Height-$FormDesign->PrintDate->y,$FormDesign->PrintDate->FontSize, _('Printed').': ' . Date($_SESSION['DefaultDateFormat']) . ' '. _('Page'). ' ' . $PageNumber); @@ -45,4 +46,4 @@ $pdf->Line($FormDesign->Column5->startx, $Page_Height - $FormDesign->Column5->starty, $FormDesign->Column5->endx,$Page_Height - $FormDesign->Column5->endy); $PageNumber++; -?> \ No newline at end of file +?> Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-29 13:04:36 UTC (rev 7372) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-30 12:12:52 UTC (rev 7373) @@ -15,6 +15,7 @@ CREATE TABLE `suppinvstogrn` ( `suppinv` int(11) NOT NULL, `grnno` int(11) NOT NULL, + `supplierref` varchar(30) NOT NULL DEFAULT '', PRIMARY KEY (`suppinv`,`grnno`), KEY `suppinvstogrn_ibfk_2` (`grnno`), CONSTRAINT `suppinvstogrn_ibfk_1` FOREIGN KEY (`suppinv`) REFERENCES @@ -23,5 +24,8 @@ `grns` (`grnno`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO scripts VALUES('EmailCustStatements.php','3','Email customer statement to customer'); +INSERT INTO scripts VALUES('SupplierGRNAndInvoiceInquiry.php',5,'Supplier\'s delivery note and grn relationship inquiry'); +ALTER table grns ADD supplierref varchar(30) NOT NULL DEFAULT ''; + -- Update version number: UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |
From: <ex...@us...> - 2015-10-31 06:37:49
|
Revision: 7375 http://sourceforge.net/p/web-erp/reponame/7375 Author: exsonqu Date: 2015-10-31 06:37:46 +0000 (Sat, 31 Oct 2015) Log Message: ----------- 31/10/15 Exson: Tidy code up with Tim's suggestion in GoodsReceived.php and SupplierGRNAndInvoiceInquiry.php and SupplierInvoice.php. Modified Paths: -------------- trunk/GoodsReceived.php trunk/SupplierGRNAndInvoiceInquiry.php trunk/SupplierInvoice.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2015-10-30 12:13:50 UTC (rev 7374) +++ trunk/GoodsReceived.php 2015-10-31 06:37:46 UTC (rev 7375) @@ -97,6 +97,7 @@ $_SESSION['PO' . $identifier]->SupplierReference = $_POST['SupplierReference']; } } + $SupplierReference = isset($_SESSION['PO' . $identifier]->SupplierReference)? $_SESSION['PO' . $identifier]->SupplierReference: $_POST['SupplierReference']; echo '<table class="selection"> <tr> @@ -104,7 +105,7 @@ <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength="10" size="10" onchange="return isDate(this, this.value, '."'". $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_SESSION['PO' . $identifier]->DefaultReceivedDate . '" /></td> <td>' . _("Supplier's Reference") . ':</td> - <td><input type="text" name="SupplierReference" value="' . $_SESSION['PO' . $identifier]->SupplierReference. '" maxlength="30" size="20" onchange="ReloadForm(form1.Update)"/></td> + <td><input type="text" name="SupplierReference" value="' . $SupplierReference. '" maxlength="30" size="20" onchange="ReloadForm(form1.Update)"/></td> </tr> </table> <br />'; @@ -251,7 +252,6 @@ $InputError = true; prnMsg(_('The goods received date is not a date format'),'error'); -} else { } if (isset($_POST['SupplierReference']) AND mb_strlen(trim($_POST['SupplierReference']))>30) { Modified: trunk/SupplierGRNAndInvoiceInquiry.php =================================================================== --- trunk/SupplierGRNAndInvoiceInquiry.php 2015-10-30 12:13:50 UTC (rev 7374) +++ trunk/SupplierGRNAndInvoiceInquiry.php 2015-10-31 06:37:46 UTC (rev 7375) @@ -35,15 +35,16 @@ echo '<table class="selection"> <tr> - <td class="label">' . _('Part of Supplier\'s Delivery Note') . ':</td><td><input type="text" name="SupplierRef" value="' . $_POST['SupplierRef'] . '" size="20" maxlength="30" ></td> - <td class="label">' . _('GRN No') . ':</td><td><input type="text" name="GRNBatchNo" value="' . $_POST['GRNBatchNo'] . '" size="6" maxlength="6" /></td> - <td class="label">' . _('Invoice No') . ':</td><td><input type="text" name="InvoiceNo" value="' . $_POST['InvoiceNo'] . '" size="11" maxlength="11" /></td> + <td class="label">' . _('Part of Supplier\'s Delivery Note') . ':</td> + <td><input type="text" name="SupplierRef" value="' . $_POST['SupplierRef'] . '" size="20" maxlength="30" ></td> + <td class="label">' . _('GRN No') . ':</td><td><input type="text" name="GRNBatchNo" value="' . $_POST['GRNBatchNo'] . '" size="6" maxlength="6" /></td> + <td class="label">' . _('Invoice No') . ':</td><td><input type="text" name="InvoiceNo" value="' . $_POST['InvoiceNo'] . '" size="11" maxlength="11" /></td> </tr> </table>'; echo '<div class="center"> <input type="submit" name="Submit" value="' . _('Submit') . '" /> - </div>'; + </div>'; if (isset($_POST['Submit'])) { $Where = ''; if (isset($_POST['SupplierRef']) AND trim($_POST['SupplierRef']) != '') { @@ -82,10 +83,11 @@ echo '<tr class="OddTableRows">'; $k = 0; } - echo '<td class="ascending">' . $myrow['supplierref'] . '</td> - <td class="ascending"><a href="' . $RootPath .'/PDFGrn.php?GRNNo=' . $myrow['grnbatch'] . '&PONo=' . $myrow['orderno'] . '">' . $myrow['grnbatch']. '</td> - <td class="ascending">' . $myrow['orderno'] . '</td> - <td class="ascending">' . $myrow['suppinv'] . '</td></tr>'; + echo '<td class="ascending">' . $myrow['supplierref'] . '</td> + <td class="ascending"><a href="' . $RootPath .'/PDFGrn.php?GRNNo=' . $myrow['grnbatch'] . '&PONo=' . $myrow['orderno'] . '">' . $myrow['grnbatch']. '</td> + <td class="ascending">' . $myrow['orderno'] . '</td> + <td class="ascending">' . $myrow['suppinv'] . '</td> + </tr>'; } echo '</table><br/>'; Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2015-10-30 12:13:50 UTC (rev 7374) +++ trunk/SupplierInvoice.php 2015-10-31 06:37:46 UTC (rev 7375) @@ -1551,8 +1551,7 @@ $Result = DB_query($SQL, $ErrMsg, $DbgMsg, True); $SQL = "INSERT INTO suppinvstogrn VALUES ('" . $InvoiceNo . "', - '" . $EnteredGRN->GRNNo . "', - '" . $EnteredGRN->SupplierRef . "')"; + '" . $EnteredGRN->GRNNo . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The invoice could not be mapped to the goods received record because'); $DbgMsg = _('The following SQL to map the invoice to the GRN was used'); Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-30 12:13:50 UTC (rev 7374) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-10-31 06:37:46 UTC (rev 7375) @@ -15,7 +15,6 @@ CREATE TABLE `suppinvstogrn` ( `suppinv` int(11) NOT NULL, `grnno` int(11) NOT NULL, - `supplierref` varchar(30) NOT NULL DEFAULT '', PRIMARY KEY (`suppinv`,`grnno`), KEY `suppinvstogrn_ibfk_2` (`grnno`), CONSTRAINT `suppinvstogrn_ibfk_1` FOREIGN KEY (`suppinv`) REFERENCES |
From: <rc...@us...> - 2015-11-03 15:30:13
|
Revision: 7380 http://sourceforge.net/p/web-erp/reponame/7380 Author: rchacon Date: 2015-11-03 15:30:05 +0000 (Tue, 03 Nov 2015) Log Message: ----------- In GLAccountInquiry.php, add ViewTopic and BookMark, fix some colspan, and add thead and column classes. Modified Paths: -------------- trunk/GLAccountInquiry.php trunk/doc/Change.log Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2015-11-03 11:13:33 UTC (rev 7379) +++ trunk/GLAccountInquiry.php 2015-11-03 15:30:05 UTC (rev 7380) @@ -3,6 +3,8 @@ include ('includes/session.inc'); $Title = _('General Ledger Account Inquiry'); +$ViewTopic = 'GeneralLedger'; +$BookMark = 'GLAccountInquiry'; include('includes/header.inc'); include('includes/GLPostings.inc'); @@ -163,26 +165,25 @@ echo '<br /> <table class="selection"> - <tr> - <th colspan="8"><b>' ._('Transactions for account').' '.$SelectedAccount. ' - '. $SelectedAccountName . '</b></th> - </tr>'; + <thead> + <tr> + <th colspan="11"><b>', _('Transactions for account'), ' ', $SelectedAccount, ' - ', $SelectedAccountName, '</b></th> + </tr> + <tr> + <th class="text">', _('Type'), '</th> + <th class="number">', _('Number'), '</th> + <th class="centre">', ('Date'), '</th> + <th class="number">', _('Debit'), '</th> + <th class="number">', _('Credit'), '</th> + <th class="text">', _('Org Currency'), '</th> + <th class="number">', _('Amount in Org Currency'), '</th> + <th class="text">', _('Bank Reference'), '</th> + <th class="text">', _('Narrative'), '</th> + <th class="number">', _('Balance'), '</th> + <th class="text">', _('Tag'), '</th> + </tr> + </thead><tbody>'; - $TableHeader = '<tr> - <th>' . _('Type') . '</th> - <th>' . _('Number') . '</th> - <th>' . _('Date') . '</th> - <th>' . _('Debit') . '</th> - <th>' . _('Credit') . '</th> - <th>' . _('Org Currency') . '</th> - <th>' . _('Amount in Org Currency') . '</th> - <th>' . _('Bank Ref') .'</th> - <th>' . _('Narrative') . '</th> - <th>' . _('Balance') . '</th> - <th>' . _('Tag') . '</th> - </tr>'; - - echo $TableHeader; - if ($PandLAccount==True) { $RunningTotal = 0; } else { @@ -198,19 +199,18 @@ $ChartDetailsResult = DB_query($sql,$ErrMsg); $ChartDetailRow = DB_fetch_array($ChartDetailsResult); - $RunningTotal =$ChartDetailRow['bfwd']; + $RunningTotal = $ChartDetailRow['bfwd']; echo '<tr> - <td colspan="3"><b>' . _('Brought Forward Balance') . '</b></td>'; - if ($RunningTotal < 0 ){ //its a credit balance b/fwd - echo ' - <td></td> - <td class="number"><b>' . locale_number_format(-$RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="3"> </td> + <td colspan="3"><b>', _('Brought Forward Balance'), '</b></td> + '; + if($RunningTotal < 0 ) {// It is a credit balance b/fwd + echo ' <td> </td> + <td class="number"><b>', locale_number_format(-$RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="6"> </td> </tr>'; - } else { //its a debit balance b/fwd - echo ' - <td class="number"><b>' . locale_number_format($RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="4"> </td> + } else {// It is a debit balance b/fwd + echo ' <td class="number"><b>', locale_number_format($RunningTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="7"> </td> </tr>'; } } @@ -238,21 +238,21 @@ echo '<tr> <td colspan="3"><b>' . _('Total for period') . ' ' . $PeriodNo . '</b></td>'; - if ($PeriodTotal < 0 ){ //its a credit balance b/fwd + if($PeriodTotal < 0 ) {// It is a credit balance b/fwd if ($PandLAccount==True) { $RunningTotal = 0; } - echo '<td></td> - <td class="number"><b>' . locale_number_format(-$PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="3"> </td> - </tr>'; - } else { //its a debit balance b/fwd - if ($PandLAccount==True) { + echo ' <td> </td> + <td class="number"><b>', locale_number_format(-$PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="6"> </td> + </tr>'; + } else {// It is a debit balance b/fwd + if($PandLAccount==True) { $RunningTotal = 0; } - echo '<td class="number"><b>' . locale_number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="4"> </td> - </tr>'; + echo ' <td class="number"><b>', locale_number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="7"> </td> + </tr>'; } $IntegrityReport .= '<br />' . _('Period') . ': ' . $PeriodNo . _('Account movement per transaction') . ': ' . locale_number_format($PeriodTotal,$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('Movement per ChartDetails record') . ': ' . locale_number_format($ChartDetailRow['actual'],$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('Period difference') . ': ' . locale_number_format($PeriodTotal -$ChartDetailRow['actual'],3); @@ -301,17 +301,17 @@ $FormatedTranDate = ConvertSQLDate($myrow['trandate']); $URL_to_TransDetail = $RootPath . '/GLTransInquiry.php?TypeID=' . $myrow['type'] . '&TransNo=' . $myrow['typeno']; - printf('<td>%s</td> + printf('<td class="text">%s</td> <td class="number"><a href="%s">%s</a></td> - <td>%s</td> + <td class="centre">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td>%s</td> + <td class="text">%s</td> <td class="number"><b>%s</b></td> - <td>%s</td> - <td>%s</td> + <td class="text">%s</td> + <td class="text">%s</td> <td class="number">%s</td> - <td>%s</td> + <td class="text">%s</td> </tr>', _($myrow['typename']), $URL_to_TransDetail, @@ -338,16 +338,17 @@ } echo '</b></td>'; - if ($RunningTotal >0){ - echo '<td class="number"><b>' . locale_number_format(($RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> - <td colspan="2"></td> + if($RunningTotal < 0) {// It is a debit Total Period Movement or Balance C/Fwd + echo ' <td> </td> + <td class="number"><b>', locale_number_format((-$RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="6"></td> </tr>'; - }else { - echo '<td></td> - <td class="number"><b>' . locale_number_format((-$RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td><td colspan="2"></td> + } else {// It is a credit Total Period Movement or Balance C/Fwd + echo ' <td class="number"><b>', locale_number_format(($RunningTotal),$_SESSION['CompanyRecord']['decimalplaces']), '</b></td> + <td colspan="7"></td> </tr>'; } - echo '</table>'; + echo '</tbody></table>'; } /* end of if Show button hit */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-11-03 11:13:33 UTC (rev 7379) +++ trunk/doc/Change.log 2015-11-03 15:30:05 UTC (rev 7380) @@ -1,5 +1,6 @@ webERP Change Log +3/11/15 RChacon: In GLAccountInquiry.php, add ViewTopic and BookMark, fix some colspan, and add thead and column classes. 3/11/15 Exson: Tidy code up in StockClone.php. 3/11/15 Exson: Fixed typo in PriceMatrix.php. 30/10/15 Exson: Allow user input supplier's delivery note during goods receiving and make the inquiry script for it. So users can search corresponding GRN, PO and invoice with it. |
From: <rc...@us...> - 2015-11-09 18:25:47
|
Revision: 7384 http://sourceforge.net/p/web-erp/reponame/7384 Author: rchacon Date: 2015-11-09 18:25:45 +0000 (Mon, 09 Nov 2015) Log Message: ----------- In CustomerReceipt.php, minor changes (completes table columns, adds classes, etc.). Modified Paths: -------------- trunk/CustomerReceipt.php trunk/doc/Change.log Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2015-11-09 07:02:05 UTC (rev 7383) +++ trunk/CustomerReceipt.php 2015-11-09 18:25:45 UTC (rev 7384) @@ -264,18 +264,24 @@ $CustomerReceiptCounter=1; //Count lines of customer receipts in this batch echo '<br /> - <p class="page_title_text"> - <img src="'.$RootPath.'/css/'.$Theme.'/images/money_add.png" title="' . _('Allocate') . '" alt="" />' . ' ' . _('Summary of Receipt Batch').' - </p> - <br /> + <p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/money_add.png" title="',// Icon image. + _('Summary of Receipt Batch'), '" /> ',// Icon title. + _('Summary of Receipt Batch'), '</p>',// Page title. + '<br /> <table class="selection"> + <thead> <tr> - <th>' . _('Batch Number') . '</th> - <th>' . _('Date Banked') . '</th> - <th>' . _('Customer Name') . '</th> - <th>' . _('GL Code') . '</th> - <th>' . _('Amount of Receipt') . '</th> - </tr>'; + <th>', _('Batch Number'), '</th> + <th>', _('Date Banked'), '</th> + <th>', _('Customer Name'), '</th> + <th class="text">', _('GL Code'), '</th> + <th class="number">', _('Amount of Receipt'), '</th>'; + if($ReceiptItem->GLCode =='') { + echo '<th class="noprint"> </th>'; + } + echo '</tr> + </thead><tbody>'; foreach ($_SESSION['ReceiptBatch']->Items as $ReceiptItem) { @@ -291,14 +297,14 @@ $Result=DB_query($SQL); $myrow=DB_fetch_array($Result); - echo '<td>' . $_SESSION['ReceiptBatch']->BatchNo . '</td> - <td>' . $_SESSION['ReceiptBatch']->DateBanked . '</td> - <td>' . $ReceiptItem->CustomerName . '</td> - <td>' . $ReceiptItem->GLCode.' - '.$myrow['accountname'] . '</td> - <td class="number">' . locale_number_format($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate,$_SESSION['ReceiptBatch']->CurrDecimalPlaces) . '</td>'; + echo '<td>', $_SESSION['ReceiptBatch']->BatchNo, '</td> + <td>', $_SESSION['ReceiptBatch']->DateBanked, '</td> + <td>', $ReceiptItem->CustomerName, '</td> + <td class="text">', $ReceiptItem->GLCode, ' - ', $myrow['accountname'], '</td> + <td class="number">', locale_number_format($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate,$_SESSION['ReceiptBatch']->CurrDecimalPlaces), '</td>'; if ($ReceiptItem->GLCode ==''){ - echo '<td><a target="_blank" href="' . $RootPath . '/PDFReceipt.php?BatchNumber=' . $_SESSION['ReceiptBatch']->BatchNo. '&ReceiptNumber='.$CustomerReceiptCounter.'">' . _('Print a Customer Receipt') . '</a></td></tr>'; + echo '<td class="noprint"><a target="_blank" href="', $RootPath, '/PDFReceipt.php?BatchNumber=', $_SESSION['ReceiptBatch']->BatchNo, '&ReceiptNumber=', $CustomerReceiptCounter, '">', _('Print a Customer Receipt'), '</a></td></tr>'; $CustomerReceiptCounter += 1; } @@ -463,7 +469,7 @@ $BatchReceiptsTotal += ($ReceiptItem->Amount/$_SESSION['ReceiptBatch']->ExRate/$_SESSION['ReceiptBatch']->FunctionalExRate); } /*end foreach $ReceiptItem */ - echo '</table>'; + echo '</tbody></table>'; /*now enter the BankTrans entry */ @@ -576,10 +582,11 @@ echo '<br />'; prnMsg( _('Receipt batch') . ' ' . $_SESSION['ReceiptBatch']->BatchNo . ' ' . _('has been successfully entered into the database'),'success'); - echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a href="' . $RootPath . '/PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo . '">' . _('Print PDF Batch Summary') . '</a></p>'; + echo '<div class="centre noprint">', + '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . '<a href="' . $RootPath . '/PDFBankingSummary.php?BatchNo=' . $_SESSION['ReceiptBatch']->BatchNo . '">' . _('Print PDF Batch Summary') . '</a></p>'; echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/allocation.png" title="' . _('Allocate') . '" alt="" />' . ' ' . '<a href="' . $RootPath . '/CustomerAllocations.php">' . _('Allocate Receipts') . '</a></p>'; - echo '<p class="page_title_text"><a href="' . $RootPath . '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer">' . _('Enter Receipts') . '</a> - </p>'; + echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, '/images/transactions.png" title="', _('Enter Receipts'), '" /> ', '<a href="', $RootPath, '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer">', _('Enter Receipts'), '</a></p>', + '</div>'; unset($_SESSION['ReceiptBatch']); include('includes/footer.inc'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-11-09 07:02:05 UTC (rev 7383) +++ trunk/doc/Change.log 2015-11-09 18:25:45 UTC (rev 7384) @@ -1,5 +1,6 @@ webERP Change Log +09/11/15 RChacon: In CustomerReceipt.php, minor changes (completes table columns, adds classes, etc.). 05/11/15 Exson: Tidy code up following Tim's suggestion. 3/11/15 RChacon: In GLAccountInquiry.php, add ViewTopic and BookMark, fix some colspan, and add thead and column classes. 3/11/15 Exson: Tidy code up in StockClone.php. |
From: <te...@us...> - 2015-11-11 08:03:24
|
Revision: 7385 http://sourceforge.net/p/web-erp/reponame/7385 Author: tehonu Date: 2015-11-11 08:03:20 +0000 (Wed, 11 Nov 2015) Log Message: ----------- New feature GL accounts - users authority Modified Paths: -------------- trunk/AnalysisHorizontalIncome.php trunk/AnalysisHorizontalPosition.php trunk/CustomerReceipt.php trunk/GLAccountCSV.php trunk/GLAccountInquiry.php trunk/GLAccountReport.php trunk/GLBalanceSheet.php trunk/GLJournal.php trunk/GLJournalInquiry.php trunk/GLProfit_Loss.php trunk/GLTagProfit_Loss.php trunk/GLTransInquiry.php trunk/GLTrialBalance.php trunk/PDFChequeListing.php trunk/Payments.php trunk/SelectGLAccount.php trunk/WWW_Users.php trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Added Paths: ----------- trunk/GLAccountUsers.php trunk/UserGLAccounts.php Modified: trunk/AnalysisHorizontalIncome.php =================================================================== --- trunk/AnalysisHorizontalIncome.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/AnalysisHorizontalIncome.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -183,9 +183,10 @@ SUM(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwd, SUM(CASE WHEN chartdetails.period='" . ($_POST['FromPeriod'] - 12) . "' THEN chartdetails.bfwd ELSE 0 END) AS firstprdbfwdly, SUM(CASE WHEN chartdetails.period='" . ($_POST['ToPeriod']-12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwdly - FROM chartmaster INNER JOIN accountgroups - ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails - ON chartmaster.accountcode= chartdetails.accountcode + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 WHERE accountgroups.pandl=1 GROUP BY accountgroups.sectioninaccounts, accountgroups.parentgroupname, Modified: trunk/AnalysisHorizontalPosition.php =================================================================== --- trunk/AnalysisHorizontalPosition.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/AnalysisHorizontalPosition.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -156,9 +156,10 @@ chartmaster.accountname, Sum(CASE WHEN chartdetails.period='" . $_POST['BalancePeriodEnd'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS balancecfwd, Sum(CASE WHEN chartdetails.period='" . ($_POST['BalancePeriodEnd'] - 12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS balancecfwdly - FROM chartmaster INNER JOIN accountgroups - ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails - ON chartmaster.accountcode= chartdetails.accountcode + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 WHERE accountgroups.pandl=0 GROUP BY accountgroups.groupname, chartdetails.accountcode, Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/CustomerReceipt.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -1100,7 +1100,11 @@ <td>' . _('GL Account') . ':</td> <td><select tabindex="8" name="GLCode">'; - $SQL = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; + $SQL = "SELECT chartmaster.accountcode, + chartmaster.accountname + FROM chartmaster + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canupd=1 + ORDER BY chartmaster.accountcode"; $result=DB_query($SQL); if (DB_num_rows($result)==0){ echo '</select>' . _('No General ledger accounts have been set up yet') . ' - ' . _('receipts cannot be entered against GL accounts until the GL accounts are set up') . '</td> Modified: trunk/GLAccountCSV.php =================================================================== --- trunk/GLAccountCSV.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLAccountCSV.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -34,7 +34,11 @@ <tr> <td>' . _('Selected Accounts') . ':</td> <td><select name="Account[]" size="12" multiple="multiple">'; -$sql = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; +$sql = "SELECT chartmaster.accountcode, + chartmaster.accountname + FROM chartmaster + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 + ORDER BY chartmaster.accountcode"; $AccountsResult = DB_query($sql); $i=0; while ($myrow=DB_fetch_array($AccountsResult,$db)){ Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLAccountInquiry.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -49,7 +49,11 @@ <td>' . _('Account').':</td> <td><select name="Account">'; -$sql = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; +$sql = "SELECT chartmaster.accountcode, + chartmaster.accountname + FROM chartmaster + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 + ORDER BY chartmaster.accountcode"; $Account = DB_query($sql); while ($myrow=DB_fetch_array($Account,$db)){ if($myrow['accountcode'] == $SelectedAccount){ Modified: trunk/GLAccountReport.php =================================================================== --- trunk/GLAccountReport.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLAccountReport.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -235,7 +235,11 @@ <tr> <td>' . _('Selected Accounts') . ':</td> <td><select name="Account[]" multiple="multiple">'; - $sql = "SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode"; + $sql = "SELECT chartmaster.accountcode, + chartmaster.accountname + FROM chartmaster + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 + ORDER BY chartmaster.accountcode"; $AccountsResult = DB_query($sql); $i=0; while ($myrow=DB_fetch_array($AccountsResult)){ Added: trunk/GLAccountUsers.php =================================================================== --- trunk/GLAccountUsers.php (rev 0) +++ trunk/GLAccountUsers.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -0,0 +1,261 @@ +<?php +/* $Id: glaccountusers.php 6806 2013-09-28 05:10:46Z daintree $*/ + +include('includes/session.inc'); +$Title = _('GL Account Authorised Users Maintenance'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/money_add.png" title="' . _('GL Account Authorised Users') . '" alt="" />' . ' ' . $Title . '</p>'; + +if (isset($_POST['SelectedUser'])) { + $SelectedUser = mb_strtoupper($_POST['SelectedUser']); +} elseif (isset($_GET['SelectedUser'])) { + $SelectedUser = mb_strtoupper($_GET['SelectedUser']); +} else { + $SelectedUser = ''; +} + +if (isset($_POST['SelectedGLAccount'])) { + $SelectedGLAccount = mb_strtoupper($_POST['SelectedGLAccount']); +} elseif (isset($_GET['SelectedGLAccount'])) { + $SelectedGLAccount = mb_strtoupper($_GET['SelectedGLAccount']); +} + +if (isset($_POST['Cancel'])) { + unset($SelectedGLAccount); + unset($SelectedUser); +} + +if (isset($_POST['Process'])) { + if ($_POST['SelectedGLAccount'] == '') { + prnMsg(_('You have not selected any GL Account'), 'error'); + echo '<br />'; + unset($SelectedGLAccount); + unset($_POST['SelectedGLAccount']); + } +} + +if (isset($_POST['submit'])) { + + $InputError = 0; + + if ($_POST['SelectedUser'] == '') { + $InputError = 1; + prnMsg(_('You have not selected an user to be authorised to use this GL Account'), 'error'); + echo '<br />'; + unset($SelectedGLAccount); + } + + if ($InputError != 1) { + + // First check the user is not being duplicated + + $CheckSql = "SELECT count(*) + FROM glaccountusers + WHERE accountcode= '" . $_POST['SelectedGLAccount'] . "' + AND userid = '" . $_POST['SelectedUser'] . "'"; + + $CheckResult = DB_query($CheckSql); + $CheckRow = DB_fetch_row($CheckResult); + + if ($CheckRow[0] > 0) { + $InputError = 1; + prnMsg(_('The user') . ' ' . $_POST['SelectedUser'] . ' ' . _('is already authorised to use this GL Account'), 'error'); + } else { + // Add new record on submit + $SQL = "INSERT INTO glaccountusers (accountcode, + userid, + canview, + canupd) + VALUES ('" . $_POST['SelectedGLAccount'] . "', + '" . $_POST['SelectedUser'] . "', + '1', + '1')"; + + $msg = _('User') . ': ' . $_POST['SelectedUser'] . ' ' . _('authority to use the') . ' ' . $_POST['SelectedGLAccount'] . ' ' . _('GL Account has been changed'); + $Result = DB_query($SQL); + prnMsg($msg, 'success'); + unset($_POST['SelectedUser']); + } + } +} elseif (isset($_GET['delete'])) { + $SQL = "DELETE FROM glaccountusers + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + + $ErrMsg = _('The GL Account user record could not be deleted because'); + $Result = DB_query($SQL, $ErrMsg); + prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to use the') . ' ' . $SelectedGLAccount . ' ' . _('GL Account removed'), 'success'); + unset($_GET['delete']); +} elseif (isset($_GET['ToggleUpdate'])) { + $SQL = "UPDATE glaccountusers + SET canupd='" . $_GET['ToggleUpdate'] . "' + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + + $ErrMsg = _('The GL Account user record could not be deleted because'); + $Result = DB_query($SQL, $ErrMsg); + prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to update') . ' ' . $SelectedGLAccount . ' ' . _('GL Account removed'), 'success'); + unset($_GET['ToggleUpdate']); +} + +if (!isset($SelectedGLAccount)) { + + /* It could still be the second time the page has been run and a record has been selected for modification - SelectedUser will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters + then none of the above are true. These will call the same page again and allow update/input or deletion of the records*/ + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Select GL Account') . ':</td> + <td><select name="SelectedGLAccount">'; + + $Result = DB_query("SELECT accountcode, + accountname + FROM chartmaster + ORDER BY accountcode"); + + echo '<option value="">' . _('Not Yet Selected') . '</option>'; + while ($MyRow = DB_fetch_array($Result)) { + if (isset($SelectedGLAccount) and $MyRow['accountcode'] == $SelectedGLAccount) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $MyRow['accountcode'] . '">' . $MyRow['accountcode'] . ' - ' . $MyRow['accountname'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + echo '</table>'; // close main table + DB_free_result($Result); + + echo '<div class="centre"> + <input type="submit" name="Process" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div>'; + + echo '</form>'; + +} + +//end of ifs and buts! +if (isset($_POST['process']) or isset($SelectedGLAccount)) { + $SQLName = "SELECT accountname + FROM chartmaster + WHERE accountcode='" . $SelectedGLAccount . "'"; + $Result = DB_query($SQLName); + $MyRow = DB_fetch_array($Result); + $SelectedGLAccountName = $MyRow['accountname']; + + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Authorised users for') . ' ' . $SelectedGLAccountName . ' ' . _('GL Account') . '</a></div> + <form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="SelectedGLAccount" value="' . $SelectedGLAccount . '" />'; + + $SQL = "SELECT glaccountusers.userid, + canview, + canupd, + www_users.realname + FROM glaccountusers INNER JOIN www_users + ON glaccountusers.userid=www_users.userid + WHERE glaccountusers.accountcode='" . $SelectedGLAccount . "' + ORDER BY glaccountusers.userid ASC"; + + $Result = DB_query($SQL); + + echo '<table class="selection">'; + echo '<tr> + <th colspan="6"><h3>' . _('Authorised users for GL Acccount') . ': ' . $SelectedGLAccountName . '</h3></th> + </tr>'; + echo '<tr> + <th>' . _('User Code') . '</th> + <th>' . _('User Name') . '</th> + <th>' . _('View') . '</th> + <th>' . _('Update') . '</th> + </tr>'; + + $k = 0; //row colour counter + + while ($MyRow = DB_fetch_array($Result)) { + if ($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k = 1; + } + + if ($MyRow['canupd'] == 1) { + $ToggleText = '<td><a href="%s?SelectedUser=%s&ToggleUpdate=0&SelectedGLAccount=' . $SelectedGLAccount . '" onclick="return confirm(\'' . _('Are you sure you wish to remove Update for this user?') . '\');">' . _('Remove Update') . '</a></td>'; + } else { + $ToggleText = '<td><a href="%s?SelectedUser=%s&ToggleUpdate=1&SelectedGLAccount=' . $SelectedGLAccount . '" onclick="return confirm(\'' . _('Are you sure you wish to add Update for this user?') . '\');">' . _('Add Update') . '</a></td>'; + } + + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td>' . + $ToggleText . ' + <td><a href="%s?SelectedUser=%s&delete=yes&SelectedGLAccount=' . $SelectedGLAccount . '" onclick="return confirm(\'' . _('Are you sure you wish to un-authorise this user?') . '\');">' . _('Un-authorise') . '</a></td> + </tr>', + $MyRow['userid'], + $MyRow['realname'], + $MyRow['canview'], + $MyRow['canupd'], + htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), + $MyRow['userid'], + htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), + $MyRow['userid']); + } + //END WHILE LIST LOOP + echo '</table>'; + + if (!isset($_GET['delete'])) { + + + echo '<table class="selection">'; //Main table + + echo '<tr> + <td>' . _('Select User') . ':</td> + <td><select name="SelectedUser">'; + + $Result = DB_query("SELECT userid, + realname + FROM www_users + WHERE NOT EXISTS (SELECT glaccountusers.userid + FROM glaccountusers + WHERE glaccountusers.accountcode='" . $SelectedGLAccount . "' + AND glaccountusers.userid=www_users.userid)"); + + if (!isset($_POST['SelectedUser'])) { + echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>'; + } + while ($MyRow = DB_fetch_array($Result)) { + if (isset($_POST['SelectedUser']) and $MyRow['userid'] == $_POST['SelectedUser']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>'; + + } //end while loop + + echo '</select> + </td> + </tr> + </table>'; // close main table + DB_free_result($Result); + + echo '<div class="centre"> + <input type="submit" name="submit" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div> + </form>'; + + } // end if user wish to delete +} + +include('includes/footer.inc'); +?> Modified: trunk/GLBalanceSheet.php =================================================================== --- trunk/GLBalanceSheet.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLBalanceSheet.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -130,9 +130,10 @@ chartmaster.accountname, Sum(CASE WHEN chartdetails.period='" . $_POST['BalancePeriodEnd'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS balancecfwd, Sum(CASE WHEN chartdetails.period='" . ($_POST['BalancePeriodEnd'] - 12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lybalancecfwd - FROM chartmaster INNER JOIN accountgroups - ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails - ON chartmaster.accountcode= chartdetails.accountcode + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 WHERE accountgroups.pandl=0 GROUP BY accountgroups.groupname, chartdetails.accountcode, @@ -372,9 +373,10 @@ chartmaster.accountname, Sum(CASE WHEN chartdetails.period='" . $_POST['BalancePeriodEnd'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS balancecfwd, Sum(CASE WHEN chartdetails.period='" . ($_POST['BalancePeriodEnd'] - 12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lybalancecfwd - FROM chartmaster INNER JOIN accountgroups - ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails - ON chartmaster.accountcode= chartdetails.accountcode + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 WHERE accountgroups.pandl=0 GROUP BY accountgroups.groupname, chartdetails.accountcode, Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLJournal.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -324,10 +324,11 @@ } echo '<td><input type="text" autofocus="autofocus" name="GLManualCode" maxlength="12" size="12" onchange="inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')" value="'. $_POST['GLManualCode'] .'" /></td>'; -$sql="SELECT accountcode, - accountname +$sql="SELECT chartmaster.accountcode, + chartmaster.accountname FROM chartmaster - ORDER BY accountcode"; + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canupd=1 + ORDER BY chartmaster.accountcode"; $result=DB_query($sql); echo '<td> Modified: trunk/GLJournalInquiry.php =================================================================== --- trunk/GLJournalInquiry.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLJournalInquiry.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -102,10 +102,26 @@ } else { echo '<tr><td colspan="2"></td>'; } + + // if user is allowed to see the account we show it, other wise we show "OTHERS ACCOUNTS" + $CheckSql = "SELECT count(*) + FROM glaccountusers + WHERE accountcode= '" . $myrow['account'] . "' + AND userid = '" . $_SESSION['UserID'] . "' + AND canview = '1'"; + $CheckResult = DB_query($CheckSql); + $CheckRow = DB_fetch_row($CheckResult); - echo '<td>' . $myrow['account'] . '</td> - <td>' . $myrow['accountname'] . '</td> - <td>' . $myrow['narrative'] . '</td> + if ($CheckRow[0] > 0) { + echo '<td>' . $myrow['account'] . '</td> + <td>' . $myrow['accountname'] . '</td>'; + }else{ + echo '<td>' . _('Others') . '</td> + <td>' . _('Other GL Accounts') . '</td>'; + } + + + echo '<td>' . $myrow['narrative'] . '</td> <td class="number">' . locale_number_format($myrow['amount'],$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . $myrow['tag'] . ' - ' . $myrow['tagdescription'] . '</td>'; Modified: trunk/GLProfit_Loss.php =================================================================== --- trunk/GLProfit_Loss.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLProfit_Loss.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -166,9 +166,10 @@ Sum(CASE WHEN chartdetails.period='" . ($_POST['FromPeriod'] - 12) . "' THEN chartdetails.bfwd ELSE 0 END) AS lyfirstprdbfwd, Sum(CASE WHEN chartdetails.period='" . ($_POST['ToPeriod']-12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lylastprdcfwd, Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwdbudget + chartdetails.budget ELSE 0 END) AS lastprdbudgetcfwd - FROM chartmaster INNER JOIN accountgroups - ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails - ON chartmaster.accountcode= chartdetails.accountcode + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 WHERE accountgroups.pandl=1 GROUP BY accountgroups.sectioninaccounts, accountgroups.groupname, @@ -594,9 +595,10 @@ SUM(CASE WHEN chartdetails.period='" . ($_POST['FromPeriod'] - 12) . "' THEN chartdetails.bfwd ELSE 0 END) AS lyfirstprdbfwd, SUM(CASE WHEN chartdetails.period='" . ($_POST['ToPeriod']-12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lylastprdcfwd, SUM(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwdbudget + chartdetails.budget ELSE 0 END) AS lastprdbudgetcfwd - FROM chartmaster INNER JOIN accountgroups - ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails - ON chartmaster.accountcode= chartdetails.accountcode + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 WHERE accountgroups.pandl=1 GROUP BY accountgroups.sectioninaccounts, accountgroups.parentgroupname, Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLTagProfit_Loss.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -172,9 +172,10 @@ chartmaster.accountname, Sum(CASE WHEN (gltrans.periodno>='" . $_POST['FromPeriod'] . "' and gltrans.periodno<='" . $_POST['ToPeriod'] . "') THEN gltrans.amount ELSE 0 END) AS TotalAllPeriods, Sum(CASE WHEN (gltrans.periodno='" . $_POST['ToPeriod'] . "') THEN gltrans.amount ELSE 0 END) AS TotalThisPeriod - FROM chartmaster INNER JOIN accountgroups - ON chartmaster.group_ = accountgroups.groupname INNER JOIN gltrans - ON chartmaster.accountcode= gltrans.account + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + INNER JOIN gltrans ON chartmaster.accountcode= gltrans.account + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 WHERE accountgroups.pandl=1 AND gltrans.tag='" . $_POST['tag'] . "' GROUP BY accountgroups.sectioninaccounts, Modified: trunk/GLTransInquiry.php =================================================================== --- trunk/GLTransInquiry.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLTransInquiry.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -124,8 +124,23 @@ $DetailResult = DB_query($DetailSQL); } else { - $URL = $RootPath . '/GLAccountInquiry.php?Account=' . $TransRow['account']; + // if user is allowed to see the account we show it, other wise we show "OTHERS ACCOUNTS" + $CheckSql = "SELECT count(*) + FROM glaccountusers + WHERE accountcode= '" . $TransRow['account'] . "' + AND userid = '" . $_SESSION['UserID'] . "' + AND canview = '1'"; + $CheckResult = DB_query($CheckSql); + $CheckRow = DB_fetch_row($CheckResult); + if ($CheckRow[0] > 0) { + $AccountName = $TransRow['accountname']; + $URL = $RootPath . '/GLAccountInquiry.php?Account=' . $TransRow['account']; + }else{ + $AccountName = _('Other GL Accounts'); + $URL = ""; + } + if( mb_strlen($TransRow['narrative'])==0 ) { $TransRow['narrative'] = ' '; } @@ -137,11 +152,20 @@ echo '<tr class="EvenTableRows">'; $j++; } + echo ' <td>' . MonthAndYearFromSQLDate($TransRow['lastdate_in_period']) . '</td> - <td>' . $TranDate . '</td> - <td><a href="' . $URL . '">' . $TransRow['accountname'] . '</a></td> - <td>' . $TransRow['narrative'] . '</td> - <td class="number">' . $DebitAmount . '</td> + <td>' . $TranDate . '</td>'; + + if ($URL == ""){ + // User is not allowed to see this GL account, don't show the details + echo ' <td>' . $AccountName . '</td> + <td>' . $AccountName . '</td>'; + }else{ + echo ' <td><a href="' . $URL . '">' . $AccountName . '</a></td> + <td>' . $TransRow['narrative'] . '</td>'; + } + + echo ' <td class="number">' . $DebitAmount . '</td> <td class="number">' . $CreditAmount . '</td> <td>' . $Posted . '</td> </tr>'; Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/GLTrialBalance.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -147,8 +147,10 @@ Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.actual ELSE 0 END) AS monthactual, Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.budget ELSE 0 END) AS monthbudget, Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwdbudget + chartdetails.budget ELSE 0 END) AS lastprdbudgetcfwd - FROM chartmaster INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 GROUP BY accountgroups.groupname, accountgroups.parentgroupname, accountgroups.pandl, @@ -417,8 +419,10 @@ Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.actual ELSE 0 END) AS monthactual, Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.budget ELSE 0 END) AS monthbudget, Sum(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwdbudget + chartdetails.budget ELSE 0 END) AS lastprdbudgetcfwd - FROM chartmaster INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 GROUP BY accountgroups.groupname, accountgroups.pandl, accountgroups.sequenceintb, Modified: trunk/PDFChequeListing.php =================================================================== --- trunk/PDFChequeListing.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/PDFChequeListing.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -137,6 +137,7 @@ $LeftOvers = $pdf->addTextWrap($Left_Margin+65,$YPos,90,$FontSize,$myrow['ref'], 'left'); $sql = "SELECT accountname, + accountcode, amount, narrative FROM gltrans INNER JOIN chartmaster @@ -156,7 +157,21 @@ exit; } while ($GLRow=DB_fetch_array($GLTransResult)){ - $LeftOvers = $pdf->addTextWrap($Left_Margin+150,$YPos,90,$FontSize,$GLRow['accountname'], 'left'); + // if user is allowed to see the account we show it, other wise we show "OTHERS ACCOUNTS" + $CheckSql = "SELECT count(*) + FROM glaccountusers + WHERE accountcode= '" . $GLRow['accountcode'] . "' + AND userid = '" . $_SESSION['UserID'] . "' + AND canview = '1'"; + $CheckResult = DB_query($CheckSql); + $CheckRow = DB_fetch_row($CheckResult); + + if ($CheckRow[0] > 0) { + $AccountName = $GLRow['accountname']; + }else{ + $AccountName = _('Other GL Accounts'); + } + $LeftOvers = $pdf->addTextWrap($Left_Margin+150,$YPos,90,$FontSize,$AccountName, 'left'); $LeftOvers = $pdf->addTextWrap($Left_Margin+245,$YPos,60,$FontSize,locale_number_format($GLRow['amount'],$_SESSION['CompanyRecord']['decimalplaces']), 'right'); $LeftOvers = $pdf->addTextWrap($Left_Margin+310,$YPos,120,$FontSize,$GLRow['narrative'], 'left'); $YPos -= ($line_height); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/Payments.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -1013,16 +1013,18 @@ } if (isset($_POST['GLGroup']) AND $_POST['GLGroup']!='') { - $SQL = "SELECT accountcode, - accountname + $SQL = "SELECT chartmaster.accountcode, + chartmaster.accountname FROM chartmaster - WHERE group_='".$_POST['GLGroup']."' - ORDER BY accountcode"; + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canupd=1 + WHERE chartmaster.group_='".$_POST['GLGroup']."' + ORDER BY chartmaster.accountcode"; } else { - $SQL = "SELECT accountcode, - accountname + $SQL = "SELECT chartmaster.accountcode, + chartmaster.accountname FROM chartmaster - ORDER BY accountcode"; + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canupd=1 + ORDER BY chartmaster.accountcode"; } Modified: trunk/SelectGLAccount.php =================================================================== --- trunk/SelectGLAccount.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/SelectGLAccount.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -22,8 +22,12 @@ chartmaster.group_, CASE WHEN accountgroups.pandl!=0 THEN '" . _('Profit and Loss') . "' ELSE '" . _('Balance Sheet') ."' END AS pl FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname + accountgroups, + glaccountusers + WHERE glaccountusers.accountcode = chartmaster.accountcode + AND glaccountusers.userid='" . $_SESSION['UserID'] . "' + AND glaccountusers.canview=1 + AND chartmaster.group_=accountgroups.groupname ORDER BY chartmaster.accountcode"; } elseif (mb_strlen($_POST['Keywords'])>0) { @@ -37,9 +41,13 @@ THEN '" . _('Profit and Loss') . "' ELSE '" . _('Balance Sheet') . "' END AS pl FROM chartmaster, - accountgroups - WHERE chartmaster.group_ = accountgroups.groupname - AND accountname " . LIKE . " '$SearchString' + accountgroups, + glaccountusers + WHERE glaccountusers.accountcode = chartmaster.accountcode + AND glaccountusers.userid='" . $_SESSION['UserID'] . "' + AND glaccountusers.canview=1 + AND chartmaster.group_ = accountgroups.groupname + AND accountname " . LIKE . "'". $SearchString ."' ORDER BY accountgroups.sequenceintb, chartmaster.accountcode"; @@ -50,8 +58,12 @@ chartmaster.group_, CASE WHEN accountgroups.pandl!=0 THEN '" . _('Profit and Loss') . "' ELSE '" . _('Balance Sheet') ."' END AS pl FROM chartmaster, - accountgroups - WHERE chartmaster.group_=accountgroups.groupname + accountgroups, + glaccountusers + WHERE glaccountusers.accountcode = chartmaster.accountcode + AND glaccountusers.userid='" . $_SESSION['UserID'] . "' + AND glaccountusers.canview=1 + AND chartmaster.group_=accountgroups.groupname AND chartmaster.accountcode >= '" . $_POST['GLCode'] . "' ORDER BY chartmaster.accountcode"; } @@ -78,10 +90,11 @@ <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> <td><b>' . _('OR') . '</b></td>'; - $SQLAccountSelect="SELECT accountcode, - accountname + $SQLAccountSelect="SELECT chartmaster.accountcode, + chartmaster.accountname FROM chartmaster - ORDER BY accountcode"; + INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 + ORDER BY chartmaster.accountcode"; $ResultSelection=DB_query($SQLAccountSelect); echo '<td><select name="GLCode">'; Added: trunk/UserGLAccounts.php =================================================================== --- trunk/UserGLAccounts.php (rev 0) +++ trunk/UserGLAccounts.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -0,0 +1,262 @@ +<?php +/* $Id: glaccountusers.php 6806 2013-09-28 05:10:46Z daintree $*/ + +include('includes/session.inc'); +$Title = _('User Authorised GL Accounts Maintenance'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/money_add.png" title="' . _('User Authorised GL Accounts') . '" alt="" />' . ' ' . $Title . '</p>'; + +if (isset($_POST['SelectedGLAccount'])) { + $SelectedGLAccount = mb_strtoupper($_POST['SelectedGLAccount']); +} elseif (isset($_GET['SelectedGLAccount'])) { + $SelectedGLAccount = mb_strtoupper($_GET['SelectedGLAccount']); +} else { + $SelectedGLAccount = ''; +} + +if (isset($_POST['SelectedUser'])) { + $SelectedUser = mb_strtoupper($_POST['SelectedUser']); +} elseif (isset($_GET['SelectedUser'])) { + $SelectedUser = mb_strtoupper($_GET['SelectedUser']); +} + +if (isset($_POST['Cancel'])) { + unset($SelectedUser); + unset($SelectedGLAccount); +} + +if (isset($_POST['Process'])) { + if ($_POST['SelectedUser'] == '') { + prnMsg(_('You have not selected any User'), 'error'); + echo '<br />'; + unset($SelectedUser); + unset($_POST['SelectedUser']); + } +} + +if (isset($_POST['submit'])) { + + $InputError = 0; + + if ($_POST['SelectedGLAccount'] == '') { + $InputError = 1; + prnMsg(_('You have not selected an GL Account to be authorised for this user'), 'error'); + echo '<br />'; + unset($SelectedUser); + } + + if ($InputError != 1) { + + // First check the user is not being duplicated + + $CheckSql = "SELECT count(*) + FROM glaccountusers + WHERE accountcode= '" . $_POST['SelectedGLAccount'] . "' + AND userid = '" . $_POST['SelectedUser'] . "'"; + + $CheckResult = DB_query($CheckSql); + $CheckRow = DB_fetch_row($CheckResult); + + if ($CheckRow[0] > 0) { + $InputError = 1; + prnMsg(_('The GL Account') . ' ' . $_POST['SelectedGLAccount'] . ' ' . _('is already authorised for this user'), 'error'); + } else { + // Add new record on submit + $SQL = "INSERT INTO glaccountusers (accountcode, + userid, + canview, + canupd) + VALUES ('" . $_POST['SelectedGLAccount'] . "', + '" . $_POST['SelectedUser'] . "', + '1', + '1')"; + + $msg = _('User') . ': ' . $_POST['SelectedUser'] . ' ' . _('authority to use the') . ' ' . $_POST['SelectedGLAccount'] . ' ' . _('GL Account has been changed'); + $Result = DB_query($SQL); + prnMsg($msg, 'success'); + unset($_POST['SelectedGLAccount']); + } + } +} elseif (isset($_GET['delete'])) { + $SQL = "DELETE FROM glaccountusers + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + + $ErrMsg = _('The GL Account user record could not be deleted because'); + $Result = DB_query($SQL, $ErrMsg); + prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to use the') . ' ' . $SelectedGLAccount . ' ' . _('GL Account removed'), 'success'); + unset($_GET['delete']); +} elseif (isset($_GET['ToggleUpdate'])) { + $SQL = "UPDATE glaccountusers + SET canupd='" . $_GET['ToggleUpdate'] . "' + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + + $ErrMsg = _('The GL Account user record could not be deleted because'); + $Result = DB_query($SQL, $ErrMsg); + prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to update') . ' ' . $SelectedGLAccount . ' ' . _('GL Account removed'), 'success'); + unset($_GET['ToggleUpdate']); +} + +if (!isset($SelectedUser)) { + + /* It could still be the second time the page has been run and a record has been selected for modification - SelectedGLAccount will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters + then none of the above are true. These will call the same page again and allow update/input or deletion of the records*/ + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Select User') . ':</td> + <td><select name="SelectedUser">'; + + $Result = DB_query("SELECT userid, + realname + FROM www_users + ORDER BY userid"); + + echo '<option value="">' . _('Not Yet Selected') . '</option>'; + while ($MyRow = DB_fetch_array($Result)) { + if (isset($SelectedUser) and $MyRow['userid'] == $SelectedUser) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + echo '</table>'; // close main table + DB_free_result($Result); + + echo '<div class="centre"> + <input type="submit" name="Process" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div>'; + + echo '</form>'; + +} + +//end of ifs and buts! +if (isset($_POST['process']) or isset($SelectedUser)) { + $SQLName = "SELECT realname + FROM www_users + WHERE userid='" . $SelectedUser . "'"; + $Result = DB_query($SQLName); + $MyRow = DB_fetch_array($Result); + $SelectedUserName = $MyRow['realname']; + + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Authorised GL Accounts for') . ' ' . $SelectedUserName . '</a></div> + <form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />'; + + $SQL = "SELECT glaccountusers.accountcode, + canview, + canupd, + chartmaster.accountname + FROM glaccountusers INNER JOIN chartmaster + ON glaccountusers.accountcode=chartmaster.accountcode + WHERE glaccountusers.userid='" . $SelectedUser . "' + ORDER BY chartmaster.accountcode ASC"; + + $Result = DB_query($SQL); + + echo '<table class="selection">'; + echo '<tr> + <th colspan="6"><h3>' . _('Authorised GL Accounts for User') . ': ' . $SelectedUserName . '</h3></th> + </tr>'; + echo '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Name') . '</th> + <th>' . _('View') . '</th> + <th>' . _('Update') . '</th> + </tr>'; + + $k = 0; //row colour counter + + while ($MyRow = DB_fetch_array($Result)) { + if ($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k = 1; + } + + if ($MyRow['canupd'] == 1) { + $ToggleText = '<td><a href="%s?SelectedGLAccount=%s&ToggleUpdate=0&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to remove Update for this GL Account?') . '\');">' . _('Remove Update') . '</a></td>'; + } else { + $ToggleText = '<td><a href="%s?SelectedGLAccount=%s&ToggleUpdate=1&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to add Update for this GL Account?') . '\');">' . _('Add Update') . '</a></td>'; + } + + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td>' . + $ToggleText . ' + <td><a href="%s?SelectedGLAccount=%s&delete=yes&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to un-authorise this GL Account?') . '\');">' . _('Un-authorise') . '</a></td> + </tr>', + $MyRow['accountcode'], + $MyRow['accountname'], + $MyRow['canview'], + $MyRow['canupd'], + htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), + $MyRow['accountcode'], + htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), + $MyRow['accountcode']); + } + //END WHILE LIST LOOP + echo '</table>'; + + if (!isset($_GET['delete'])) { + + + echo '<table class="selection">'; //Main table + + echo '<tr> + <td>' . _('Select GL Account') . ':</td> + <td><select name="SelectedGLAccount">'; + + $Result = DB_query("SELECT accountcode, + accountname + FROM chartmaster + WHERE NOT EXISTS (SELECT glaccountusers.accountcode + FROM glaccountusers + WHERE glaccountusers.userid='" . $SelectedUser . "' + AND glaccountusers.accountcode=chartmaster.accountcode) + ORDER BY accountcode"); + + if (!isset($_POST['SelectedGLAccount'])) { + echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>'; + } + while ($MyRow = DB_fetch_array($Result)) { + if (isset($_POST['SelectedGLAccount']) and $MyRow['accountcode'] == $_POST['SelectedGLAccount']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $MyRow['accountcode'] . '">' . $MyRow['accountcode'] .' - '. $MyRow['accountname'] . '</option>'; + + } //end while loop + + echo '</select> + </td> + </tr> + </table>'; // close main table + DB_free_result($Result); + + echo '<div class="centre"> + <input type="submit" name="submit" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div> + </form>'; + + } // end if user wish to delete +} + +include('includes/footer.inc'); +?> Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/WWW_Users.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -166,20 +166,6 @@ prnMsg( _('The selected user record has been updated'), 'success' ); } elseif ($InputError !=1) { - $LocationSql = "INSERT INTO locationusers (loccode, - userid, - canview, - canupd - ) VALUES ( - '" . $_POST['DefaultLocation'] . "', - '" . $_POST['UserID'] . "', - 1, - 1 - )"; - $ErrMsg = _('The default user locations could not be processed because'); - $DbgMsg = _('The SQL that was used to update the user locations and failed was'); - $Result = DB_query($LocationSql, $ErrMsg, $DbgMsg); - $sql = "INSERT INTO www_users (userid, realname, customerid, @@ -219,6 +205,30 @@ '" . $_POST['PDFLanguage'] . "', '" . $_POST['Department'] . "')"; prnMsg( _('A new user record has been inserted'), 'success' ); + + $LocationSql = "INSERT INTO locationusers (loccode, + userid, + canview, + canupd + ) VALUES ( + '" . $_POST['DefaultLocation'] . "', + '" . $_POST['UserID'] . "', + 1, + 1 + )"; + $ErrMsg = _('The default user locations could not be processed because'); + $DbgMsg = _('The SQL that was used to create the user locations and failed was'); + $Result = DB_query($LocationSql, $ErrMsg, $DbgMsg); + prnMsg( _('User has been authorized to use and update only his / her default location'), 'success' ); + + $GLAccountsSql = "INSERT INTO glaccountusers (userid, accountcode, canview, canupd) + SELECT '" . $_POST['UserID'] . "', chartmaster.accountcode,1,1 + FROM chartmaster; "; + + $ErrMsg = _('The default user GL Accounts could not be processed because'); + $DbgMsg = _('The SQL that was used to create the user GL Accounts and failed was'); + $Result = DB_query($GLAccountsSql, $ErrMsg, $DbgMsg); + prnMsg( _('User has been authorized to use and update all GL accounts'), 'success' ); } if ($InputError!=1){ Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2015-11-09 18:25:45 UTC (rev 7384) +++ trunk/includes/MainMenuLinksArray.php 2015-11-11 08:03:20 UTC (rev 7385) @@ -1,617 +1,621 @@ -<?php - -/* $Id: MainMenuLinksArray.php 6190 2013-08-12 02:12:02Z rchacon $*/ - -/* webERP menus with Captions and URLs. */ - -$ModuleLink = array('orders', 'AR', 'PO', 'AP', 'stock', 'manuf', 'GL', 'FA', 'PC', 'system', 'Utilities'); -$ReportList = array('orders'=>'ord', - 'AR'=>'ar', - 'PO'=>'prch', - 'AP'=>'ap', - 'stock'=>'inv', - 'manuf'=>'man', - 'GL'=>'gl', - 'FA'=>'fa', - 'PC'=>'pc', - 'system'=>'sys', - 'Utilities'=>'utils' - ); - -/*The headings showing on the tabs accross the main index used also in WWW_Users for defining what should be visible to the user */ -$ModuleList = array(_('Sales'), - _('Receivables'), - _('Purchases'), - _('Payables'), - _('Inventory'), - _('Manufacturing'), - _('General Ledger'), - _('Asset Manager'), - _('Petty Cash'), - _('Setup'), - _('Utilities')); - -$MenuItems['orders']['Transactions']['Caption'] = array(_('New Sales Order or Quotation'), - _('Enter Counter Sales'), - _('Enter Counter Returns'), - _('Print Picking Lists'), - _('Outstanding Sales Orders/Quotations'), - _('Special Order'), - _('Recurring Order Template'), - _('Process Recurring Orders')); - -$MenuItems['orders']['Transactions']['URL'] = array('/SelectOrderItems.php?NewOrder=Yes', - '/CounterSales.php', - '/CounterReturns.php', - '/PDFPickingList.php', - '/SelectSalesOrder.php', - '/SpecialOrder.php', - '/SelectRecurringSalesOrder.php', - '/RecurringSalesOrdersProcess.php'); - -$MenuItems['orders']['Reports']['Caption'] = array( _('Sales Order Inquiry'), - _('Print Price Lists'), - _('Order Status Report'), - _('Orders Invoiced Reports'), - _('Daily Sales Inquiry'), - _('Sales By Sales Type Inquiry'), - _('Sales By Category Inquiry'), - _('Sales By Category By Item Inquiry'), - _('Sales Analysis Reports'), - _('Sales Graphs'), - _('Top Sellers Inquiry'), - _('Order Delivery Differences Report'), - _('Delivery In Full On Time (DIFOT) Report'), - _('Sales Order Detail Or Summary Inquiries'), - _('Top Sales Items Inquiry'), - _('Top Customers Inquiry'), - _('Worst Sales Items Report'), - _('Sales With Low Gross Profit Report'), - _('Sell Through Support Claims Report')); - -$MenuItems['orders']['Reports']['URL'] = array( '/SelectCompletedOrder.php', - '/PDFPriceList.php', - '/PDFOrderStatus.php', - '/PDFOrdersInvoiced.php', - '/DailySalesInquiry.php', - '/SalesByTypePeriodInquiry.php', - '/SalesCategoryPeriodInquiry.php', - '/StockCategorySalesInquiry.php', - '/SalesAnalRepts.php', - '/SalesGraph.php', - '/SalesTopItemsInquiry.php', - '/PDFDeliveryDifferences.php', - '/PDFDIFOT.php', - '/SalesInquiry.php', - '/TopItems.php', - '/SalesTopCustomersInquiry.php', - '/NoSalesItems.php', - '/PDFLowGP.php', - '/PDFSellThroughSupportClaim.php'); - -$MenuItems['orders']['Maintenance']['Caption'] = array( _('Create Contract'), - _('Select Contract'), - _('Sell Through Support Deals')); - -$MenuItems['orders']['Maintenance']['URL'] = array( '/Contracts.php', - '/SelectContract.php', - '/SellThroughSupport.php'); - -$MenuItems['AR']['Transactions']['Caption'] = array(_('Select Order to Invoice'), - _('Create A Credit Note'), - _('Enter Receipts'), - _('Allocate Receipts or Credit Notes')); -$MenuItems['AR']['Transactions']['URL'] = array('/SelectSalesOrder.php', - '/SelectCreditItems.php?NewCredit=Yes', - '/CustomerReceipt.php?NewReceipt=Yes&Type=Customer', - '/CustomerAllocations.php'); - -$MenuItems['AR']['Reports']['Caption'] = array( _('Where Allocated Inquiry'), - _('Print Invoices or Credit Notes'), - _('Print Statements'), - _('Aged Customer Balances/Overdues Report'), - _('Re-Print A Deposit Listing'), - _('Debtor Balances At A Prior Month End'), - _('Customer Listing By Area/Salesperson'), - _('List Daily Transactions'), - _('Customer Transaction Inquiries'), - _('Customer Activity and Balances')); - -if ($_SESSION['InvoicePortraitFormat']==0){ - $PrintInvoicesOrCreditNotesScript = '/PrintCustTrans.php'; -} else { - $PrintInvoicesOrCreditNotesScript = '/PrintCustTransPortrait.php'; -} - -$MenuItems['AR']['Reports']['URL'] = array( '/CustWhereAlloc.php', - $PrintInvoicesOrCreditNotesScript, - '/PrintCustStatements.php', - '/AgedDebtors.php', - '/PDFBankingSummary.php', - '/DebtorsAtPeriodEnd.php', - '/PDFCustomerList.php', - '/PDFCustTransListing.php', - '/CustomerTransInquiry.php', - '/CustomerBalancesMovement.php' ); - -$MenuItems['AR']['Maintenance']['Caption'] = array( _('Add Customer'), - _('Select Customer')); -$MenuItems['AR']['Maintenance']['URL'] = array( '/Customers.php', - '/SelectCustomer.php'); - -$MenuItems['AP']['Transactions']['Caption'] = array(_('Select Supplier'), - _('Supplier Allocations')); -$MenuItems['AP']['Transactions']['URL'] = array('/SelectSupplier.php', - '/SupplierAllocations.php'); - -$MenuItems['AP']['Reports']['Caption'] = array( _('Aged Supplier Report'), - _('Payment Run Report'), - _('Remittance Advices'), - _('Outstanding GRNs Report'), - _('Supplier Balances At A Prior Month End'), - _('List Daily Transactions'), - _('Supplier Transaction Inquiries')); - -$MenuItems['AP']['Reports']['URL'] = array( '/AgedSuppliers.php', - '/SuppPaymentRun.php', - '/PDFRemittanceAdvice.php', - '/OutstandingGRNs.php', - '/SupplierBalsAtPeriodEnd.php', - '/PDFSuppTransListing.php', - '/SupplierTransInquiry.php'); - -$MenuItems['AP']['Maintenance']['Caption'] = array( _('Add Supplier'), - _('Select Supplier'), - _('Maintain Factor Companies')); -$MenuItems['AP']['Maintenance']['URL'] = array( '/Suppliers.php', - '/SelectSupplier.php', - '/Factors.php'); - -$MenuItems['PO']['Transactions']['Caption'] = array(_('New Purchase Order'), - _('Purchase Orders'), - _('Purchase Order Grid Entry'), - _('Create a New Tender'), - _('Edit Existing Tenders'), - _('Process Tenders and Offers'), - _('Orders to Authorise'), - _('Shipment Entry'), - _('Select A Shipment')); -$MenuItems['PO']['Transactions']['URL'] = array( '/PO_Header.php?NewOrder=Yes', - '/PO_SelectOSPurchOrder.php', - '/PurchaseByPrefSupplier.php', - '/SupplierTenderCreate.php?New=Yes', - '/SupplierTenderCreate.php?Edit=Yes', - '/OffersReceived.php', - '/PO_AuthoriseMyOrders.php', - '/SelectSupplier.php', - '/Shipt_Select.php'); - -$MenuItems['PO']['Reports']['Caption'] = array( _('Purchase Order Inquiry'), - _('Purchase Order Detail Or Summary Inquiries'), - _('Supplier Price List')); - -$MenuItems['PO']['Reports']['URL'] = array( '/PO_SelectPurchOrder.php', - '/POReport.php', - '/SuppPriceList.php'); - -$MenuItems['PO']['Maintenance']['Caption'] = array(_('Maintain Supplier Price Lists')); - -$MenuItems['PO']['Maintenance']['URL'] = array('/SupplierPriceList.php'); - -$MenuItems['stock']['Transactions']['Caption'] = array( _('Receive Purchase Orders'), - _('Inventory Location Transfers'), //"Inventory Transfer - Item Dispatch" - _('Bulk Inventory Transfer') . ' - ' . _('Dispatch'), //"Inventory Transfer - Bulk Dispatch" - _('Bulk Inventory Transfer') . ' - ' . _('Receive'), //"Inventory Transfer - Receive" - _('Inventory Adjustments'), - _('Reverse Goods Received'), - _('Enter Stock Counts'), - _('Create a New Internal Stock Request'), - _('Authorise Internal Stock Requests'), - _('Fulfill Internal Stock Requests')); - -$MenuItems['stock']['Transactions']['URL'] = array( '/PO_SelectOSPurchOrder.php', - '/StockTransfers.php?New=Yes', - '/StockLocTransfer.php', - '/StockLocTransferReceive.php', - '/StockAdjustments.php?NewAdjustment=Yes', - '/ReverseGRN.php', - '/StockCounts.php', - '/InternalStockRequest.php?New=Yes', - '/InternalStockRequestAuthorisation.php', - '/InternalStockRequestFulfill.php'); - -$MenuItems['stock']['Reports']['Caption'] = array( _('Serial Item Research Tool'), - _('Print Price Labels'), - _('Reprint GRN'), - _('Inventory Item Movements'), - _('Inventory Item Status'), - _('Inventory Item Usage'), - _('Inventory Quantities'), - _('Reorder Level'), - _('Stock Dispatch'), - _('Inventory Valuation Report'), - _('Mail Inventory Valuation Report'), - _('Inventory Planning Report'), - _('Inventory Planning Based On Preferred Supplier Data'), - _('Inventory Stock Check Sheets'), - _('Make Inventory Quantities CSV'), - _('Compare Counts Vs Stock Check Data'), - _('All Inventory Movements By Location/Date'), - _('List Inventory Status By Location/Category'), - _('Historical Stock Quantity By Location/Category'), - _('List Negative Stocks'), - _('Period Stock Transaction Listing'), - _('Stock Transfer Note'), - _('Aged Controlled Stock Report')); - -$MenuItems['stock']['Reports']['URL'] = array( '/StockSerialItemResearch.php', - '/PDFPrintLabel.php', - '/ReprintGRN.php', - '/StockMovements.php', - '/StockStatus.php', - '/StockUsage.php', - '/InventoryQuantities.php', - '/ReorderLevel.php', - '/StockDispatch.php', - '/InventoryValuation.php', - '/MailInventoryValuation.php', - '/InventoryPlanning.php', - '/InventoryPlanningPrefSupplier.php', - '/StockCheck.php', - '/StockQties_csv.php', - '/PDFStockCheckComparison.php', - '/StockLocMovements.php', - '/StockLocStatus.php', - '/StockQuantityByDate.php', - '/PDFStockNegatives.php', - '/PDFPeriodStockTransListing.php', - '/PDFStockTransfer.php', - '/AgedControlledInventory.php'); - -$MenuItems['stock']['Maintenance']['Caption'] = array( _('Add A New Item'), - _('Select An Item'), - _('Review Translated Descriptions'), - _('Sales Category Maintenance'), - _('Brands Maintenance'), - _('Add or Update Prices Based On Costs'), - _('View or Update Prices Based On Costs'), - _('Reorder Level By Category/Location')); - -$MenuItems['stock']['Maintenance']['URL'] = array( '/Stocks.php', - '/SelectProduct.php', - '/RevisionTranslations.php', - '/SalesCategories.php', - '/Manufacturers.php', - '/PricesBasedOnMarkUp.php', - '/PricesByCost.php', - '/ReorderLevelLocation.php'); - -$MenuItems['manuf']['Transactions']['Caption'] = array( _('Work Order Entry'), - _('Select A Work Order'), - _('QA Samples and Test Results')); - -$MenuItems['manuf']['Transactions']['URL'] = array( '/WorkOrderEntry.php', - '/SelectWorkOrder.php', - '/SelectQASamples.php'); -$MenuItems['manuf']['Reports']['Caption'] = array( _('Select A Work Order'), - _('Costed Bill Of Material Inquiry'), - _('Where Used Inquiry'), - _('Bill Of Material Listing'), - _('Indented Bill Of Material Listing'), - _('List Components Required'), - _('List Materials Not Used Anywhere'), - _('Indented Where Used Listing'), - _('WO Items ready to produce'), - _('MRP'), - _('MRP Shortages'), - _('MRP Suggested Purchase Orders'), - _('MRP Suggested Work Orders'), - _('MRP Reschedules Required'), - _('Print Product Specification'), - _('Print Certificate of Analysis'), - _('Historical QA Test Results')); - -$MenuItems['manuf']['Reports']['URL'] = array( '/SelectWorkOrder.php', - '/BOMInquiry.php', - '/WhereUsedInquiry.php', - '/BOMListing.php', - '/BOMIndented.php', - '/BOMExtendedQty.php', - '/MaterialsNotUsed.php', - '/BOMIndentedReverse.php', - '/WOCanBeProducedNow.php', - '/MRPReport.php', - '/MRPShortages.php', - '/MRPPlannedPurchaseOrders.php', - '/MRPPlannedWorkOrders.php', - '/MRPReschedules.php', - '/PDFProdSpec.php', - '/PDFCOA.php', - '/HistoricalTestResults.php'); - -$MenuItems['manuf']['Maintenance']['Caption'] = array( _('Work Centre'), - _('Bills Of Material'), - _('Copy a Bill Of Materials Between Items'), - _('Master Schedule'), - _('Auto Create Master Schedule')... [truncated message content] |
From: <rc...@us...> - 2015-11-15 00:02:27
|
Revision: 7386 http://sourceforge.net/p/web-erp/reponame/7386 Author: rchacon Date: 2015-11-15 00:02:25 +0000 (Sun, 15 Nov 2015) Log Message: ----------- In css/default/default.css, add sections to use with a cascading style sheet for a small device width, reagroup style for centre, number and text in tables. Modified Paths: -------------- trunk/css/default/default.css trunk/doc/Change.log Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2015-11-11 08:03:20 UTC (rev 7385) +++ trunk/css/default/default.css 2015-11-15 00:02:25 UTC (rev 7386) @@ -50,10 +50,10 @@ table.selection{ padding-bottom:5px; } -th{ - font-weight:normal; +th { background-color:#B06161; color:white; + font-weight:normal; } th.ascending { cursor: s-resize; @@ -80,27 +80,9 @@ border-top: 4px solid #000; visibility: visible; } -th.number{ - background-color:#B06161; - color:white; - font-weight:normal; - text-align:right; -} -th.text{ - background-color:#B06161; - color:white; - font-weight:normal; - text-align:left; -} td { text-align:left; } -td.centre{ - text-align:center; -} -td.number{ - text-align:right; -} td.select{ background-color:#eee; } @@ -462,5 +444,29 @@ } .centre { text-align:center; - /* centre class (general). */ + /* Class selector to centre text horizontally in an element. */ } +.number { + text-align:right; + /* Class selector for horizontal alignment of a number (right) in an element. */ +} +.text { + text-align:left; + /* Class selector for horizontal alignment of a text (left) in an element. */ +} +/* END Style for all. ********************************************************/ + + +/* If you want to use a cascading style sheet for a small device width, uncomment line "<meta name="viewport" content="width=device-width, initial-scale=1" />" on includes/header.inc and use the following sections. */ + +@media only screen and (max-device-width:767px) { + /* Style for new browser in a device with a rendering width less than 768px. */ +} + +@media only screen and (min-device-width:768px) and (max-device-width:1023px) { + /* Style for new browser in a device with a rendering width between 768px and 1024px. */ +} + +@media only screen and (min-device-width:1024px) { + /* Style for new browser in a device with a rendering width greater than 1024px. */ +} Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-11-11 08:03:20 UTC (rev 7385) +++ trunk/doc/Change.log 2015-11-15 00:02:25 UTC (rev 7386) @@ -1,5 +1,7 @@ webERP Change Log +14/11/15 RChacon: In css/default/default.css, add sections to use with a cascading style sheet for a small device width, reagroup style for centre, number and text in tables. +11/11/15 Ricard: New feature GL accounts - users authority. 09/11/15 RChacon: In CustomerReceipt.php, minor changes (completes table columns, adds classes, etc.). 05/11/15 Exson: Tidy code up following Tim's suggestion. 3/11/15 RChacon: In GLAccountInquiry.php, add ViewTopic and BookMark, fix some colspan, and add thead and column classes. |
From: <te...@us...> - 2015-11-16 09:15:27
|
Revision: 7392 http://sourceforge.net/p/web-erp/reponame/7392 Author: tehonu Date: 2015-11-16 09:15:24 +0000 (Mon, 16 Nov 2015) Log Message: ----------- New script to copy the authority in GL account - Users from one user to another Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Added Paths: ----------- trunk/GLAccountUsersCopyAuthority.php Added: trunk/GLAccountUsersCopyAuthority.php =================================================================== --- trunk/GLAccountUsersCopyAuthority.php (rev 0) +++ trunk/GLAccountUsersCopyAuthority.php 2015-11-16 09:15:24 UTC (rev 7392) @@ -0,0 +1,88 @@ +<?php + +include ('includes/session.inc'); +$Title = _('GLAccount - Users Authority Copy Authority');// Screen identificator. +include('includes/header.inc'); +echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/maintenance.png" title="',// Icon image. + _('Copy Authority of GL Accounts from one user to another'), '" /> ',// Icon title. + _('Copy Authority of GL Accounts from one user to another'), '</p>';// Page title. + +include('includes/SQL_CommonFunctions.inc'); + +if(isset($_POST['ProcessCopyAuthority'])) { + + $InputError =0; + + if($_POST['FromUserID']==$_POST['ToUserID']) { + prnMsg(_('User FROM must be different from user TO'),'error'); + $InputError =1; + } + + if($InputError ==0) {// no input errors + $result = DB_Txn_Begin(); + + echo '<br />' . _('Deleting the current authority to view / update the GL Accounts of user') . ' ' . $_POST['ToUserID']; + $sql = "DELETE FROM glaccountusers WHERE userid = '" . $_POST['ToUserID'] . "'"; + $DbgMsg = _('The SQL statement that failed was'); + $ErrMsg =_('The SQL to delete the auhority in glaccountusers record failed'); + $result = DB_query($sql,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + + echo '<br />' . _('Copying the authority to view / update the GL Accounts from user') . ' ' . $_POST['FromUserID'] . ' ' . _('to') . ' ' . $_POST['ToUserID']; + $sql = "INSERT INTO glaccountusers (userid, accountcode, canview, canupd) + SELECT '" . $_POST['ToUserID'] . "', accountcode, canview, canupd + FROM glaccountusers + WHERE userid = '" . $_POST['FromUserID'] . "'"; + + $DbgMsg = _('The SQL statement that failed was'); + $ErrMsg =_('The SQL to insert the auhority in glaccountusers record failed'); + $result = DB_query($sql,$ErrMsg,$DbgMsg,true); + echo ' ... ' . _('completed'); + echo '<br />'; + $result = DB_Txn_Commit(); + + }//only do the stuff above if $InputError==0 +} + +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; +echo '<div class="centre">'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +echo '<table>'; +echo ' <tr> + <td>' . _('Select User to copy the Authority FROM') . ':</td> + <td><select name="FromUserID">'; +$Result = DB_query("SELECT userid, + realname + FROM www_users + ORDER BY userid"); + +echo '<option selected value="">' . _('Not Yet Selected') . '</option>'; +while ($MyRow = DB_fetch_array($Result)) { + echo '<option value="'; + echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>'; +} //end while loop +echo '</select></td></tr>'; + +echo ' <tr> + <td>' . _('Select User to copy the Authority TO') . ':</td> + <td><select name="ToUserID">'; +$Result = DB_query("SELECT userid, + realname + FROM www_users + ORDER BY userid"); + +echo '<option selected value="">' . _('Not Yet Selected') . '</option>'; +while ($MyRow = DB_fetch_array($Result)) { + echo '<option value="'; + echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>'; +} //end while loop +echo '</select></td></tr>'; +echo '</table>'; +echo '<input type="submit" name="ProcessCopyAuthority" value="' . _('Process Copy of Authority') . '" /> + </div> + </form>'; + +include('includes/footer.inc'); +?> \ No newline at end of file Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2015-11-16 08:14:27 UTC (rev 7391) +++ trunk/includes/MainMenuLinksArray.php 2015-11-16 09:15:24 UTC (rev 7392) @@ -398,6 +398,7 @@ _('GL Tags'), _('GL Accounts Authorised Users Maintenance'), _('User Authorised GL Accounts Maintenance'), + _('Copy Authority GL Accounts from user A to B'), _('Bank Accounts'), _('Bank Account Authorised Users')); @@ -408,6 +409,7 @@ '/GLTags.php', '/GLAccountUsers.php', '/UserGLAccounts.php', + '/GLAccountUsersCopyAuthority.php', '/BankAccounts.php', '/BankAccountUsers.php'); Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-11-16 08:14:27 UTC (rev 7391) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-11-16 09:15:24 UTC (rev 7392) @@ -23,7 +23,7 @@ `grns` (`grnno`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO scripts VALUES('EmailCustStatements.php','3','Email customer statement to customer'); -INSERT INTO scripts VALUES('SupplierGRNAndInvoiceInquiry.php',5,'Supplier\'s delivery note and grn relationship inquiry'); +INSERT INTO scripts VALUES('SupplierGRNAndInvoiceInquiry.php',5,'Suppliers delivery note and grn relationship inquiry'); ALTER table grns ADD supplierref varchar(30) NOT NULL DEFAULT ''; CREATE TABLE IF NOT EXISTS `glaccountusers` ( @@ -49,5 +49,8 @@ ('GLAccountUsers.php', '15', 'Maintenance of users allowed to a GL Account'), ('UserGLAccounts.php', '15', 'Maintenance of GL Accounts allowed for a user'); +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES +('GLAccountUsersCopyAuthority.php', '15', 'Copy the authority into GL Accounts from user A to user B'); + -- Update version number: UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |
From: <te...@us...> - 2015-11-17 00:38:08
|
Revision: 7393 http://sourceforge.net/p/web-erp/reponame/7393 Author: tehonu Date: 2015-11-17 00:38:05 +0000 (Tue, 17 Nov 2015) Log Message: ----------- Improve comparation of OldCost and NewCost to avoid useless GL transactions Modified Paths: -------------- trunk/StockCostUpdate.php trunk/Z_UpdateItemCosts.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2015-11-16 09:15:24 UTC (rev 7392) +++ trunk/StockCostUpdate.php 2015-11-17 00:38:05 UTC (rev 7393) @@ -62,7 +62,7 @@ $myrow = DB_fetch_row($result); if (DB_num_rows($result)==0) { prnMsg (_('The entered item code does not exist'),'error',_('Non-existent Item')); - } elseif ($OldCost != $NewCost){ + } elseif (abs($NewCost - $OldCost) > pow(1,-($_SESSION['StandardCostDecimalPlaces']+1))){ $Result = DB_Txn_Begin(); ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $_POST['QOH']); Modified: trunk/Z_UpdateItemCosts.php =================================================================== --- trunk/Z_UpdateItemCosts.php 2015-11-16 09:15:24 UTC (rev 7392) +++ trunk/Z_UpdateItemCosts.php 2015-11-17 00:38:05 UTC (rev 7393) @@ -75,7 +75,10 @@ $OldCost = $OldRow['materialcost'] + $OldRow['labourcost'] + $OldRow['overheadcost']; //dont update costs for assembly or kit-sets or ghost items!! - if ($OldCost != $NewCost AND $OldRow['mbflag']!='K' AND $OldRow['mbflag']!='A' AND $OldRow['mbflag']!='G'){ + if ((abs($NewCost - $OldCost) > pow(1,-($_SESSION['StandardCostDecimalPlaces']+1))) + AND $OldRow['mbflag']!='K' + AND $OldRow['mbflag']!='A' + AND $OldRow['mbflag']!='G'){ ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $QOH); Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2015-11-16 09:15:24 UTC (rev 7392) +++ trunk/includes/SQL_CommonFunctions.inc 2015-11-17 00:38:05 UTC (rev 7393) @@ -158,53 +158,54 @@ } function ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $QOH) { + if ($_SESSION['CompanyRecord']['gllink_stock']==1 + AND $QOH!=0 + AND (abs($NewCost - $OldCost) > pow(1,-($_SESSION['StandardCostDecimalPlaces']+1)))){ - if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $QOH!=0){ + $CostUpdateNo = GetNextTransNo(35, $db); + $PeriodNo = GetPeriod(date($_SESSION['DefaultDateFormat']), $db); + $StockGLCode = GetStockGLCode($StockID,$db); - $CostUpdateNo = GetNextTransNo(35, $db); - $PeriodNo = GetPeriod(date($_SESSION['DefaultDateFormat']), $db); - $StockGLCode = GetStockGLCode($StockID,$db); + $ValueOfChange = $QOH * ($NewCost - $OldCost); - $ValueOfChange = $QOH * ($NewCost - $OldCost); + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ('35', + '" . $CostUpdateNo . "', + '" . Date('Y-m-d') . "', + '" . $PeriodNo . "', + '" . $StockGLCode['adjglact'] . "', + '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') . ' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', + '" . -$ValueOfChange . "')"; - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ('35', - '" . $CostUpdateNo . "', - '" . Date('Y-m-d') . "', - '" . $PeriodNo . "', - '" . $StockGLCode['adjglact'] . "', - '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') . ' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . -$ValueOfChange . "')"; + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL credit for the stock cost adjustment posting could not be inserted because'); + $DbgMsg = _('The following SQL to insert the GLTrans record was used'); + $Result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL credit for the stock cost adjustment posting could not be inserted because'); - $DbgMsg = _('The following SQL to insert the GLTrans record was used'); - $Result = DB_query($SQL,$ErrMsg,$DbgMsg,true); + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES ('35', + '" . $CostUpdateNo . "', + '" . Date('Y-m-d') . "', + '" . $PeriodNo . "', + '" . $StockGLCode['stockact'] . "', + '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') .' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', + '" . $ValueOfChange . "')"; - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES ('35', - '" . $CostUpdateNo . "', - '" . Date('Y-m-d') . "', - '" . $PeriodNo . "', - '" . $StockGLCode['stockact'] . "', - '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') .' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . $ValueOfChange . "')"; - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL debit for stock cost adjustment posting could not be inserted because'); - $DbgMsg = _('The following SQL to insert the GLTrans record was used'); - $Result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - } + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL debit for stock cost adjustment posting could not be inserted because'); + $DbgMsg = _('The following SQL to insert the GLTrans record was used'); + $Result = DB_query($SQL,$ErrMsg,$DbgMsg,true); + } } /* Calculates the material cost of a bill of materials, given parent code*/ |
From: <dai...@us...> - 2015-11-21 09:43:01
|
Revision: 7397 http://sourceforge.net/p/web-erp/reponame/7397 Author: daintree Date: 2015-11-21 09:42:58 +0000 (Sat, 21 Nov 2015) Log Message: ----------- Gilberto Dos Santos Alves: Updated Portuguese Brazilian translation Modified Paths: -------------- trunk/doc/Change.log trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-11-18 02:59:12 UTC (rev 7396) +++ trunk/doc/Change.log 2015-11-21 09:42:58 UTC (rev 7397) @@ -1,20 +1,22 @@ webERP Change Log + +21/11/15 Gilberto Dos Santos Alves: Updated Portuguese Brazilian translation 18/11/15 AlexFigueiro: Remove the duplicate foreign key in stockrequest and stockrequestitem; 15/11/15 RChacon: Tidy css/*/default.css, reagrouping style for clases centre, number, page_title_text and text. -15/11/15 Hazem wehbi Add new arabic locale for Syria. +15/11/15 Hazem wehbi Add new arabic locale for Syria. 14/11/15 RChacon: In css/default/default.css, add sections to use with a cascading style sheet for a small device width, reagroup style for centre, number and text in tables. 11/11/15 Ricard: New feature GL accounts - users authority. 09/11/15 RChacon: In CustomerReceipt.php, minor changes (completes table columns, adds classes, etc.). -05/11/15 Exson: Tidy code up following Tim's suggestion. +05/11/15 Exson: Tidy code up following Tim's suggestion. 3/11/15 RChacon: In GLAccountInquiry.php, add ViewTopic and BookMark, fix some colspan, and add thead and column classes. 3/11/15 Exson: Tidy code up in StockClone.php. 3/11/15 Exson: Fixed typo in PriceMatrix.php. -30/10/15 Exson: Allow user input supplier's delivery note during goods receiving and make the inquiry script for it. So users can search corresponding GRN, PO and invoice with it. +30/10/15 Exson: Allow user input supplier's delivery note during goods receiving and make the inquiry script for it. So users can search corresponding GRN, PO and invoice with it. 29/10/15 Exson: Add gl narrative and account balance information to DailyBankTransactions.php. 28/10/15 Exson: Add bank default currency, original amount and check no data to GL account inquiry in GLAccountInquiry.php. 06/10/15 UK-Steven: Contribute email customer statements feature scripts. 06/10/15 Exson: Fixed the wrong unable to identify the selected customer warning at SelectOrderItems.php. -23/09/2015 Tim: ADD invoice to grns mapping data in SupplierInvoice.php. +23/09/2015 Tim: ADD invoice to grns mapping data in SupplierInvoice.php. 21/09/15 RChacon: In StockLocStatus.php, add current date and time, and format to use print.css. 21/09/15 Exson: Fix the wrong material cost updated in SupplierCredit.php. Reported by Akits. 19/9/15 Dongbak Cha:Korean translation via Google translate Modified: trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po 2015-11-18 02:59:12 UTC (rev 7396) +++ trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po 2015-11-21 09:42:58 UTC (rev 7397) @@ -5,10 +5,10 @@ # msgid "" msgstr "" -"Project-Id-Version: webERP 4.12.2\n" +"Project-Id-Version: webERP 4.12.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-09-14 09:07-0600\n" -"PO-Revision-Date: 2014-01-28 14:48-0300\n" +"PO-Revision-Date: 2015-11-16 01:13-0300\n" "Last-Translator: gilberto dos santos alves <gs...@gm...>\n" "Language-Team: pt-br <gs...@gm...>\n" "Language: pt_BR\n" @@ -16,7 +16,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: normal;\n" -"X-Generator: Poedit 1.6.1\n" +"X-Generator: gsavix editor 2015.11\n" "X-Poedit-SourceCharset: utf-8\n" #: AccountGroups.php:6 includes/MainMenuLinksArray.php:395 @@ -951,11 +951,11 @@ #: AgedControlledInventory.php:8 msgid "Aged Controlled Inventory" -msgstr "" +msgstr "Inventário Controlado Histórico" #: AgedControlledInventory.php:8 msgid "as-of" -msgstr "" +msgstr "pos. de" #: AgedControlledInventory.php:12 InventoryQuantities.php:155 #: InventoryValuation.php:217 Locations.php:12 MRP.php:542 MRPCalendar.php:21 @@ -973,7 +973,7 @@ #: AgedControlledInventory.php:32 msgid "The stock held could not be retrieved because" -msgstr "" +msgstr "Estoque alocado não pode ser recuperado porque" #: AgedControlledInventory.php:42 MRPReschedules.php:126 MRPShortages.php:261 #: StockClone.php:53 Stocks.php:63 @@ -1043,15 +1043,15 @@ #: AgedControlledInventory.php:45 msgid "Quantity Remaining" -msgstr "" +msgstr "Quantidade Restante" #: AgedControlledInventory.php:46 msgid "Inventory Value" -msgstr "" +msgstr "Valor Inventário" #: AgedControlledInventory.php:48 msgid "Days Old" -msgstr "" +msgstr "Dias Decorridos" #: AgedControlledInventory.php:91 ConfirmDispatch_Invoice.php:309 #: ConfirmDispatch_Invoice.php:313 CounterReturns.php:676 @@ -1416,7 +1416,7 @@ #: AnalysisHorizontalIncome.php:146 AnalysisHorizontalIncome.php:147 #: includes/MainMenuLinksArray.php:374 msgid "Horizontal Analysis of Statement of Comprehensive Income" -msgstr "" +msgstr "Análise Horizontal Abrangente de Receitas" #: AnalysisHorizontalIncome.php:22 GLProfit_Loss.php:14 #: GLTagProfit_Loss.php:14 Z_UpdateChartDetailsBFwd.php:14 @@ -1430,7 +1430,7 @@ #: AnalysisHorizontalIncome.php:30 msgid "Print Horizontal Analysis of Statement of Comprehensive Income" -msgstr "" +msgstr "Imprimir Análise Horizontal Abrang. de Receitas" #: AnalysisHorizontalIncome.php:34 AnalysisHorizontalPosition.php:31 msgid "" @@ -1439,6 +1439,9 @@ "financial statement items over a period of time. It is a useful tool to " "evaluate trend situations." msgstr "" +"Análise horizontal (também conhecida como trend analysis) é uma técnica " +"análise que exibe modificações nos valores dentro de um período " +"correspondente. Útil para analisar situações contábeis." #: AnalysisHorizontalIncome.php:35 AnalysisHorizontalPosition.php:32 msgid "" @@ -1447,6 +1450,10 @@ "compared with items on the statement of the base period. The changes are " "shown both in currency (actual change) and percentage (relative change)." msgstr "" +"A abrangência de dois períodos é usada para análise horizontal. O período " +"mais antigo é usado como base. Os itens mais recentes são comparados com os " +"itens do período base. Diferenças são exibidas em ambas moedas (atual e " +"relativa)." #: AnalysisHorizontalIncome.php:36 AnalysisHorizontalPosition.php:33 #: GLBalanceSheet.php:29 GLProfit_Loss.php:33 @@ -1462,15 +1469,15 @@ #: AnalysisHorizontalIncome.php:43 msgid "Select period from" -msgstr "" +msgstr "Selec. período inicial" #: AnalysisHorizontalIncome.php:79 msgid "Select period to" -msgstr "" +msgstr "Selecione perído final" #: AnalysisHorizontalIncome.php:105 AnalysisHorizontalPosition.php:72 msgid "Detail or summary" -msgstr "" +msgstr "Detalhe ou Resumo" #: AnalysisHorizontalIncome.php:106 AnalysisHorizontalPosition.php:73 #: GLBalanceSheet.php:60 @@ -1492,7 +1499,7 @@ #: AnalysisHorizontalIncome.php:112 AnalysisHorizontalPosition.php:79 msgid "Show all accounts including zero balances" -msgstr "" +msgstr "Exibir todas contas incluindo saldos zero" #: AnalysisHorizontalIncome.php:113 AnalysisHorizontalPosition.php:80 #: GLBalanceSheet.php:67 GLProfit_Loss.php:116 @@ -1512,7 +1519,7 @@ #: DailyBankTransactions.php:190 GLBalanceSheet.php:718 GLProfit_Loss.php:1315 #: GLTrialBalance.php:736 msgid "Return" -msgstr "" +msgstr "Retornar" #: AnalysisHorizontalIncome.php:131 GLProfit_Loss.php:147 #: GLProfit_Loss.php:576 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:479 @@ -1594,11 +1601,11 @@ #: AnalysisHorizontalIncome.php:162 AnalysisHorizontalPosition.php:125 msgid "Actual change" -msgstr "" +msgstr "Taxa Real" #: AnalysisHorizontalIncome.php:163 AnalysisHorizontalPosition.php:126 msgid "Relative change" -msgstr "" +msgstr "Taxa Relativa" #: AnalysisHorizontalIncome.php:170 msgid "" @@ -1606,6 +1613,8 @@ "the net profit; a negative number indicates a variation that decreases the " "net profit." msgstr "" +"Taxa real sinaliza: se positivo indica variação positiva no lucro líquido; " +"se negativa indica queda no lucro líquido." #: AnalysisHorizontalIncome.php:171 AnalysisHorizontalPosition.php:134 msgid "" @@ -1613,6 +1622,8 @@ "of that account; a negative number indicates a decrease in the amount of " "that account." msgstr "" +"Sinais Relativos Modificação: número positivo indica um incremento na conta " +"contábil; número negativo indica queda na quantia da conta." #: AnalysisHorizontalIncome.php:199 AnalysisHorizontalPosition.php:174 #: GLBalanceSheet.php:153 GLBalanceSheet.php:390 GLCodesInquiry.php:18 @@ -1646,17 +1657,17 @@ #: AnalysisHorizontalIncome.php:322 msgid "Earnings after" -msgstr "" +msgstr "Lucros após" #: AnalysisHorizontalIncome.php:500 msgid "Net Profit" -msgstr "" +msgstr "Lucro Líquido" #: AnalysisHorizontalIncome.php:517 AnalysisHorizontalPosition.php:366 #: DailyBankTransactions.php:184 GLBalanceSheet.php:714 GLProfit_Loss.php:1311 #: GLTrialBalance.php:732 msgid "Print This" -msgstr "" +msgstr "Imprimir" #: AnalysisHorizontalIncome.php:518 AnalysisHorizontalIncome.php:519 #: AnalysisHorizontalPosition.php:367 AnalysisHorizontalPosition.php:368 @@ -1671,11 +1682,11 @@ #: AnalysisHorizontalPosition.php:109 AnalysisHorizontalPosition.php:110 #: includes/MainMenuLinksArray.php:375 msgid "Horizontal Analysis of Statement of Financial Position" -msgstr "" +msgstr "Análise Horizontal de Posição Financeira" #: AnalysisHorizontalPosition.php:27 msgid "Print Horizontal Analysis of Statement of Financial Position" -msgstr "" +msgstr "Imprimir Análise Horizontal de Posição Financeira" #: AnalysisHorizontalPosition.php:40 GLBalanceSheet.php:36 msgid "Select the balance date" @@ -1692,6 +1703,8 @@ "Actual change signs: a positive number indicates a source of funds; a " "negative number indicates an application of funds." msgstr "" +"Sinais modificação real: número positivo indica fonte em fundos; número " +"negativo indica aplicação em fundos." #: AnalysisHorizontalPosition.php:148 GLBalanceSheet.php:114 #: GLBalanceSheet.php:364 @@ -1927,11 +1940,11 @@ #: AutomaticTranslationDescriptions.php:5 includes/MainMenuLinksArray.php:561 msgid "Translate Item Descriptions" -msgstr "" +msgstr "Traduzir Descrição Itens" #: AutomaticTranslationDescriptions.php:31 msgid "Description Automatic Translation for empty translations" -msgstr "" +msgstr "Descrição automática para traduções vazias" #: AutomaticTranslationDescriptions.php:35 MaterialsNotUsed.php:33 #: TopItems.php:168 @@ -1977,12 +1990,12 @@ #: AutomaticTranslationDescriptions.php:39 msgid "Translated" -msgstr "" +msgstr "Traduzido" #: AutomaticTranslationDescriptions.php:116 #: AutomaticTranslationDescriptions.php:117 msgid "No item description was automatically translated" -msgstr "" +msgstr "Nenhuma tradução de descrição de item foi feita automaticamente" #: BOMExtendedQty.php:12 BOMExtendedQty.php:13 BOMExtendedQty.php:154 #: BOMExtendedQty.php:254 @@ -2887,7 +2900,7 @@ #: BOMs.php:702 msgid "Sequence in BOM" -msgstr "" +msgstr "Sequência BOM" #: BOMs.php:736 msgid "Work Centre Added" @@ -2971,7 +2984,7 @@ #: BankAccountUsers.php:6 msgid "Bank Account Users" -msgstr "" +msgstr "Usuários Conta Bancária" #: BankAccountUsers.php:13 includes/MainMenuLinksArray.php:400 msgid "Bank Account Authorised Users" @@ -3204,7 +3217,7 @@ #: BankAccounts.php:203 msgid "Import Format" -msgstr "" +msgstr "Importar Formato" #: BankAccounts.php:204 Currencies.php:461 CustItem.php:299 CustItem.php:415 #: CustomerAllocations.php:351 CustomerReceipt.php:838 @@ -3254,19 +3267,19 @@ #: BankAccounts.php:367 msgid "Transaction Import File Format" -msgstr "" +msgstr "Form. Arq. de Transação para Importar" #: BankAccounts.php:370 msgid "MT940 - Siam Comercial Bank Thailand" -msgstr "" +msgstr "MT940 - Banco Comercial Siam Tailândia" #: BankAccounts.php:371 msgid "MT940 - ING Bank Netherlands" -msgstr "" +msgstr "MT940 - ING Banco Holanda" #: BankAccounts.php:372 msgid "GIFTS - Bank of New Zealand" -msgstr "" +msgstr "GIFTS - Banco Nova Zelandia" #: BankAccounts.php:377 msgid "Currency Of Account" @@ -4247,15 +4260,15 @@ #: ConfirmDispatch_Invoice.php:252 msgid "Dispathed Quantity should not be more than order balanced quantity" -msgstr "" +msgstr "Quantidade Despachada não pode ser maior que quantidade do pedido" #: ConfirmDispatch_Invoice.php:252 msgid "To dispatch quantity is" -msgstr "" +msgstr "Quantidade para despachar é" #: ConfirmDispatch_Invoice.php:252 msgid "And the order balance is " -msgstr "" +msgstr "Saldo do Pedido é" #: ConfirmDispatch_Invoice.php:279 msgid "Confirm Invoice" @@ -7630,10 +7643,12 @@ "invoiced and that it is possible that the credit note may not already have " "been done" msgstr "" +"Falha na recuperação detalhes pedido ao comparar se o pedido já foi enviado " +"e a nota de crédito não foi feita" #: Credit_Invoice.php:501 msgid "The credit quantity for the line for" -msgstr "" +msgstr "Quantidade Credora dessa linha para" #: Credit_Invoice.php:512 SelectCreditItems.php:952 msgid "" @@ -7809,7 +7824,7 @@ #: Currencies.php:33 msgid "Currencies" -msgstr "" +msgstr "Moeda" #: Currencies.php:56 msgid "The currency already exists in the database" @@ -7908,10 +7923,11 @@ "Cannot delete this currency because there are bank accounts that use this " "currency" msgstr "" +"Não pode remover essa moeda pois existem contas bancárias utilizando a mesma" #: Currencies.php:273 msgid "bank accounts that refer to this currency" -msgstr "" +msgstr "contas bancárias que usam essa moeda" #: Currencies.php:278 msgid "The currency definition record has been deleted" @@ -7944,7 +7960,7 @@ #: Currencies.php:310 Currencies.php:516 msgid "Show in webSHOP" -msgstr "" +msgstr "Exibir no webSHOP" #: Currencies.php:312 msgid "1 / Ex Rate" @@ -8102,7 +8118,7 @@ #: CustItem.php:6 msgid "Customer Item Data" -msgstr "" +msgstr "Dados Item do Cliente" #: CustItem.php:36 Prices.php:14 PurchData.php:51 RelatedItemsUpdate.php:26 #: StockClone.php:50 StockCostUpdate.php:18 StockReorderLevel.php:17 @@ -8140,12 +8156,12 @@ #: CustItem.php:56 msgid "The customer sells an item by the tonne and we hold stock by the kg" -msgstr "" +msgstr "Unidad de vendas para o cliente TON e nosso estoque em KG" #: CustItem.php:56 msgid "" "The debtorsmaster.price must be divided by 1000 to get to our cost per kg" -msgstr "" +msgstr "O preço de débito deve ser dividido por 100 para nosso custo por kg" #: CustItem.php:56 PurchData.php:84 msgid "The conversion factor to enter is 1000" @@ -8157,27 +8173,27 @@ #: CustItem.php:72 msgid "The customer Item details could not be added to the database because" -msgstr "" +msgstr "Detalhes do item do cliente não pode ser adicionado ao DB porque" #: CustItem.php:75 msgid "This customer data has been added to the database" -msgstr "" +msgstr "Dados desse cliente adicionado ao DB" #: CustItem.php:85 msgid "The customer details could not be updated because" -msgstr "" +msgstr "Detalhes do cliente não podem ser atualizados porque" #: CustItem.php:88 msgid "customer data has been updated" -msgstr "" +msgstr "dados do cliente atualizados" #: CustItem.php:109 msgid "The customer details could not be deleted because" -msgstr "" +msgstr "Detalhes do cliente não podem ser movidos porque" #: CustItem.php:111 msgid "This customer data record has been successfully deleted" -msgstr "" +msgstr "Dados desse cliente foram removidos com sucesso" #: CustItem.php:120 CustItem.php:210 CustItem.php:238 PurchData.php:241 #: PurchData.php:373 PurchData.php:401 SupplierPriceList.php:395 @@ -8188,14 +8204,15 @@ msgid "" "The customer details for the selected part could not be retrieved because" msgstr "" +"Detalhes do cliente para o item selecionado não podem ser recuperados porque" #: CustItem.php:138 msgid "There is no customer data set up for the part selected" -msgstr "" +msgstr "Não há dados do cliente para o item selecionado" #: CustItem.php:145 msgid "Customer Unit" -msgstr "" +msgstr "Unidade do cliente" #: CustItem.php:146 PurchData.php:274 SupplierPriceList.php:536 msgid "Conversion Factor" @@ -8203,21 +8220,23 @@ #: CustItem.php:147 SelectOrderItems.php:1640 msgid "Customer Item" -msgstr "" +msgstr "Item Cliente" #: CustItem.php:148 msgid "Customer Description" -msgstr "" +msgstr "Descrição Cliente" #: CustItem.php:167 #, php-format msgid "Are you sure you wish to delete this customer data?" -msgstr "" +msgstr "Confirma remoção dos dados desse cliente?" #: CustItem.php:196 msgid "" "The customer details for the selected customer could not be retrieved because" msgstr "" +"Detalhes do cliente para o cliente selecionado não podem ser recuperados " +"porque" #: CustItem.php:205 Z_ChangeCustomerCode.php:20 msgid "The customer code" @@ -8225,17 +8244,19 @@ #: CustItem.php:205 msgid "is not an existing customer in the database" -msgstr "" +msgstr "cliente não existente no DB" #: CustItem.php:205 msgid "" "You must enter an alternative customer code or select a customer using the " "search facility below" msgstr "" +"Favor informar um código cliente alternativo ou selecionar um cliente " +"usando a função pesquisar" #: CustItem.php:218 msgid "Text in the customer" -msgstr "" +msgstr "Texto no nome do Cliente" #: CustItem.php:218 PurchData.php:381 SellThroughSupport.php:200 #: SupplierPriceList.php:404 @@ -8244,7 +8265,7 @@ #: CustItem.php:221 msgid "Text in customer" -msgstr "" +msgstr "Texto no Nome do Cliente" #: CustItem.php:221 PurchData.php:384 SellThroughSupport.php:203 #: SupplierPriceList.php:407 @@ -8253,22 +8274,24 @@ #: CustItem.php:227 msgid "Find Customers Now" -msgstr "" +msgstr "Pesquisar Clientes agora" #: CustItem.php:243 msgid "" "Customer Name keywords have been used in preference to the customer Code " "extract entered" msgstr "" +"Palavras chave Nome de Cliente usada em detrimento do código do Cliente " +"informado" #: CustItem.php:273 msgid "" "The cuswtomer matching the criteria entered could not be retrieved because" -msgstr "" +msgstr "Critério de localizar cliente informado não pode ser recuperado porque" #: CustItem.php:274 msgid "The SQL to retrieve customer details that failed was" -msgstr "" +msgstr "Detalhes, do SQL que falhou, foi" #: CustItem.php:287 OffersReceived.php:107 PurchData.php:459 Stocks.php:589 #: includes/PDFPeriodStockTransListingPageHeader.inc:47 @@ -8302,6 +8325,8 @@ "The customer purchasing details for the selected customer and item could not " "be retrieved because" msgstr "" +"Detalhes de compra do cliente para o cliente selecionado não podem ser " +"recuperados porque" #: CustItem.php:394 PurchData.php:583 msgid "A search facility is available below if necessary" @@ -8313,7 +8338,7 @@ #: CustItem.php:425 msgid "Customer Unit of Measure" -msgstr "" +msgstr "Unidade de medida do cliente" #: CustItem.php:434 PurchData.php:639 msgid "Conversion Factor (to our UOM)" @@ -8321,11 +8346,11 @@ #: CustItem.php:438 msgid "Customer Stock Code" -msgstr "" +msgstr "Código estoque cliente" #: CustItem.php:442 msgid "Customer Stock Description" -msgstr "" +msgstr "Descrição Estoque do Cliente" #: CustItem.php:455 MailingGroupMaintenance.php:250 ProductSpecs.php:163 #: ProductSpecs.php:238 PurchData.php:763 SellThroughSupport.php:481 @@ -8625,29 +8650,31 @@ #: CustomerAccount.php:6 msgid "Customer Account" -msgstr "" +msgstr "Conta Cliente" #: CustomerAccount.php:14 msgid "" "To display the account a customer must first be selected from the customer " "selection screen" msgstr "" +"Para exibir a conta do cliente, primeiro selecionar na tela de seleção de " +"cliente" #: CustomerAccount.php:15 msgid "Select a Customer Account to Display" -msgstr "" +msgstr "Selecionar Conta Cliente para Exibir" #: CustomerAccount.php:28 CustomerInquiry.php:28 msgid "Failed to retrieve sales data" -msgstr "" +msgstr "Falha na recuperação dados de venda" #: CustomerAccount.php:37 msgid "There is no salesman data set for this customer" -msgstr "" +msgstr "Não há dados do vendedor para esse cliente" #: CustomerAccount.php:42 msgid "You have no authority to review this customer account" -msgstr "" +msgstr "Seu usuário/login não tem permissão para revisar conta desse cliente" #: CustomerAccount.php:56 PrintCustStatements.php:139 msgid "" @@ -8675,11 +8702,11 @@ #: CustomerAccount.php:216 CustomerInquiry.php:158 msgid "Back to Customer Screen" -msgstr "" +msgstr "voltar para Tela Clientes" #: CustomerAccount.php:220 msgid "Customer Statement For" -msgstr "" +msgstr "Dados Cliente para" #: CustomerAccount.php:231 CustomerInquiry.php:162 CustomerReceipt.php:1022 #: SelectOrderItems.php:698 SupplierCredit.php:264 SupplierInquiry.php:123 @@ -8742,11 +8769,11 @@ #: CustomerAccount.php:275 msgid "TRANSACTIONS SETTLED SINCE" -msgstr "" +msgstr "Transações lançadas desde" #: CustomerAccount.php:278 msgid "OUTSTANDING TRANSACTIONS" -msgstr "" +msgstr "Transações Pendentes de Conciliação" #: CustomerAccount.php:306 CustomerInquiry.php:311 CustomerInquiry.php:357 #: CustomerInquiry.php:396 CustomerInquiry.php:432 CustomerInquiry.php:478 @@ -9018,7 +9045,7 @@ #: CustomerBalancesMovement.php:7 CustomerBalancesMovement.php:14 #: includes/MainMenuLinksArray.php:118 msgid "Customer Activity and Balances" -msgstr "" +msgstr "Atividade Cliente e Saldos" #: CustomerBalancesMovement.php:40 CustomerBranches.php:787 #: SalesAnalRepts.php:20 SalesAnalRepts.php:22 SalesInquiry.php:776 @@ -9049,16 +9076,16 @@ #: CustomerBalancesMovement.php:68 msgid "Create CSV" -msgstr "" +msgstr "Criar CSV" #: CustomerBalancesMovement.php:75 msgid "Show Customer Balance Movements" -msgstr "" +msgstr "Exibir Saldo Movimento Cliente" #: CustomerBalancesMovement.php:118 CustomerBalancesMovement.php:124 #: CustomerBalancesMovement.php:197 includes/DatabaseTranslations.php:55 msgid "Opening Balance" -msgstr "" +msgstr "Saldo Abertura" #: CustomerBalancesMovement.php:119 CustomerBalancesMovement.php:124 #: CustomerBalancesMovement.php:198 GLTransInquiry.php:50 @@ -9067,7 +9094,7 @@ #: CustomerBalancesMovement.php:203 CustomerBalancesMovement.php:211 msgid "TOTALS" -msgstr "" +msgstr "TOTAIS" #: CustomerBranches.php:6 msgid "Customer Branches" @@ -9145,6 +9172,8 @@ "Warning - Geocode Integration is enabled, but no hosts are setup. Go to " "Geocode Setup" msgstr "" +"Atenção - integração Geocode habilitada, mas nenhum host configurado. Vá " +"para Config Geocode" #: CustomerBranches.php:134 msgid "Geocode Notice" @@ -9250,6 +9279,7 @@ "Cannot delete this branch because it is the only branch defined for this " "customer." msgstr "" +"Não pode remover essa sucursal pois é a única definida para esse cliente" #: CustomerBranches.php:355 msgid "The branch record could not be deleted" @@ -9558,23 +9588,23 @@ #: CustomerInquiry.php:37 msgid "There is no salesman data set for this debtor" -msgstr "" +msgstr "Não há dados de vendedor para esse Devedor" #: CustomerInquiry.php:42 msgid "You have no authority to review this data" -msgstr "" +msgstr "Seu login não tem autoridade para revisar esses dados" #: CustomerInquiry.php:57 msgid "The balance status should be all or zero balance or not zero balance" -msgstr "" +msgstr "Status do saldo deve ser tudo ou saldo zero" #: CustomerInquiry.php:194 CustomerInquiry.php:199 CustomerInquiry.php:203 msgid "Invoices not fully allocated" -msgstr "" +msgstr "Pedidos não alocados totalmente" #: CustomerInquiry.php:195 CustomerInquiry.php:200 CustomerInquiry.php:204 msgid "Invoices fully allocated" -msgstr "" +msgstr "Pedidos totalmente alocados" #: CustomerInquiry.php:236 SupplierInquiry.php:194 msgid "No transactions were returned by the SQL because" @@ -9597,12 +9627,12 @@ #: CustomerInquiry.php:328 CustomerInquiry.php:455 CustomerInquiry.php:530 #: CustomerInquiry.php:586 CustomerInquiry.php:636 SupplierInquiry.php:276 msgid "Click to view the GL entries" -msgstr "" +msgstr "Clique para ver lançamentos GL" #: CustomerInquiry.php:330 CustomerInquiry.php:457 CustomerInquiry.php:532 #: CustomerInquiry.php:588 CustomerInquiry.php:638 SupplierInquiry.php:277 msgid "GL Entries" -msgstr "" +msgstr "Entradas GL" #: CustomerPurchases.php:6 msgid "Customer Purchases" @@ -9707,6 +9737,10 @@ "accounts are automatically maintained. This setting can be disabled in " "System Configuration" msgstr "" +"Pagamentos envolvendo conta de controle de devedores não pode ser informada. " +"integração para devedores contábeis (AR) está habilidado, portanto as contas " +"são automaticamente mantidas. Essas configurações podem ser desabilitadas em " +"Config Sistema" #: CustomerReceipt.php:188 Payments.php:668 msgid "" @@ -9715,12 +9749,18 @@ "enabled so control accounts are automatically maintained. This setting can " "be disabled in System Configuration" msgstr "" +"Pagamentos envolvendo contas contábeis de controle de credores ou suspensão " +"dos recebimentos não podem ser informados. Integração contábil para módulo " +"(AP) podem ser automaticamente mantidas. Essa configuração pode ser feita em " +"Config Sistema" #: CustomerReceipt.php:192 Payments.php:672 msgid "" "Payments involving the retained earnings control account cannot be entered. " "This account is automtically maintained." msgstr "" +"Conta Contábil dos pagamentos envolvendo retençao de lucros não pode ser " +"informada. Essa conta é automaticamente mantida." #: CustomerReceipt.php:241 msgid "The company has not yet been set up properly" @@ -9951,7 +9991,7 @@ #: CustomerReceipt.php:1037 msgid "Customer Transaction Inquiry" -msgstr "" +msgstr "Consulta Transações Cliente" #: CustomerReceipt.php:1046 SelectGLAccount.php:116 SelectGLAccount.php:131 #, php-format @@ -10311,22 +10351,24 @@ #: Customers.php:323 msgid "Cannot delete this customer because users exist that refer to it" -msgstr "" +msgstr "Não pode remover esse cliente pois existem usuários que o utilizam." #: Customers.php:333 msgid "" "Cannot delete this customer because contracts have been created that refer " "to it" msgstr "" +"Não pode remover este cliente porque contratos foram criados referindo-se a " +"ele" #: Customers.php:334 msgid "contracts referring to this customer" -msgstr "" +msgstr "contratos que referem esse cliente" #: Customers.php:348 msgid "" "has been deleted - together with all the associated branches and contacts" -msgstr "" +msgstr "foi removido. junto com todas as sucursais e contatos associados" #: Customers.php:424 msgid "" @@ -10693,11 +10735,11 @@ #: Dashboard.php:6 Dashboard.php:10 msgid "Dashboard" -msgstr "" +msgstr "Painel Controle" #: Dashboard.php:15 Dashboard.php:42 msgid "The security for Aging Debtors cannot be retrieved because" -msgstr "" +msgstr "A securança para Saldo de Devedores não ode ser recuperada porque." #: Dashboard.php:16 Dashboard.php:25 Dashboard.php:34 Dashboard.php:43 #: ProductSpecs.php:78 ProductSpecs.php:282 ProductSpecs.php:317 @@ -10710,15 +10752,15 @@ #: Dashboard.php:24 msgid "The security for upcoming payments cannot be retrieved because" -msgstr "" +msgstr "A segurança para pagamentos não pode ser recuperada porque" #: Dashboard.php:33 msgid "The security for G/L Accounts cannot be retrieved because" -msgstr "" +msgstr "A segurança para conta GL não pode ser recuperada porque" #: Dashboard.php:49 msgid "Overdue Customer Balances" -msgstr "" +msgstr "Saldo do Cliente Excedido" #: Dashboard.php:55 includes/PDFCustTransListingPageHeader.inc:50 #: includes/PDFPeriodStockTransListingPageHeader.inc:49 @@ -10755,7 +10797,7 @@ #: Dashboard.php:367 msgid "Supplier Invoices Due within 1 Month" -msgstr "" +msgstr "Ordem Compra Acum em 1 Mês" #: Dashboard.php:372 PrintCustTrans.php:788 PrintCustTransPortrait.php:857 #: SalesInquiry.php:1088 SupplierInvoice.php:634 @@ -10764,7 +10806,7 @@ #: Dashboard.php:374 msgid "Amount Due" -msgstr "" +msgstr "Valor Acum." #: Dashboard.php:437 SuppPaymentRun.php:111 msgid "The details of supplier invoices due could not be retrieved because" @@ -10776,7 +10818,7 @@ #: Dashboard.php:526 msgid "Bank and Credit Card Balances" -msgstr "" +msgstr "Saldo Bancário e Cartão Crédito" #: Dashboard.php:601 Dashboard.php:620 GLAccountCSV.php:189 #: GLAccountCSV.php:218 GLAccountInquiry.php:194 GLAccountInquiry.php:232 @@ -10786,7 +10828,7 @@ #: Dashboard.php:653 msgid "Outstanding Orders" -msgstr "" +msgstr "Ordens Pendentes" #: Dashboard.php:656 ../webSHOP/includes/Functions.php:64 #: ../webSHOP/includes/header.php:226 @@ -12673,7 +12715,7 @@ #: FixedAssetCategories.php:316 msgid "Profit or Loss on Disposal GL Code" -msgstr "" +msgstr "Código GL Lucros e Perdas " #: FixedAssetCategories.php:317 msgid "" @@ -13984,7 +14026,7 @@ #: GLBalanceSheet.php:22 msgid "Print Statement of Financial Position" -msgstr "" +msgstr "Imprimir Posição Financeira ou Balancete" #: GLBalanceSheet.php:27 msgid "" @@ -14036,7 +14078,7 @@ #: GLBalanceSheet.php:397 msgid "Statement of Financial Position" -msgstr "" +msgstr "Posição Financeira Lançamentos" #: GLBalanceSheet.php:716 msgid "Select A Different Balance Date" @@ -14289,7 +14331,7 @@ #: GLProfit_Loss.php:25 msgid "Print Statement of Comprehensive Income" -msgstr "" +msgstr "Imprimir Lançamentos Entradas" #: GLProfit_Loss.php:26 msgid "Print Profit and Loss Report" @@ -14364,7 +14406,7 @@ #: GLProfit_Loss.php:618 msgid "Statement of Comprehensive Income" -msgstr "" +msgstr "Entradas de Lançamentos" #: GLProfit_Loss.php:619 includes/MainMenuLinksArray.php:372 msgid "Profit and Loss Statement" @@ -14504,7 +14546,7 @@ #: GLTrialBalance.php:34 msgid "Print Trial Balance" -msgstr "" +msgstr "Imprimir Balancete Analítico" #: GLTrialBalance.php:55 SalesGraph.php:43 msgid "Select Period From:" @@ -14539,7 +14581,7 @@ #: GLTrialBalance.php:440 msgid " AND for the " -msgstr "" +msgstr "e para " #: GLTrialBalance.php:450 includes/PDFTrialBalancePageHeader.inc:30 msgid "Month Actual" @@ -15023,7 +15065,7 @@ #: GoodsReceived.php:759 msgid "Print QA Labels for this Receipt" -msgstr "" +msgstr "Imprimir Etiq. QA desse Recebimento" #: GoodsReceived.php:774 msgid "Modify Order Items" @@ -15075,7 +15117,7 @@ #: HistoricalTestResults.php:5 msgid "Historical Test Results" -msgstr "" +msgstr "Resultados Testes Históricos" #: HistoricalTestResults.php:26 MRPCalendar.php:47 POReport.php:88 #: POReport.php:871 SalesInquiry.php:82 SelectQASamples.php:166 @@ -15091,17 +15133,17 @@ #: HistoricalTestResults.php:51 msgid "Show Test Results For" -msgstr "" +msgstr "Exibir Resultado Testes para" #: HistoricalTestResults.php:72 SelectQASamples.php:251 #: TestPlanResults.php:128 msgid "From Sample Date" -msgstr "" +msgstr "Data Inicial" #: HistoricalTestResults.php:76 SelectQASamples.php:251 #: TestPlanResults.php:128 msgid "To Sample Date" -msgstr "" +msgstr "Data Final" #: HistoricalTestResults.php:82 InternalStockRequest.php:301 #: MRPCreateDemands.php:282 MailingGroupMaintenance.php:145 PDFCOA.php:43 @@ -15112,23 +15154,23 @@ #: HistoricalTestResults.php:134 msgid "Historical Test Results for" -msgstr "" +msgstr "Testar resultados históricos para" #: HistoricalTestResults.php:136 msgid "Sample ID:" -msgstr "" +msgstr "ID Amostra:" #: HistoricalTestResults.php:136 PDFGrn.php:142 PDFStockTransfer.php:135 msgid "Lot/Serial:" -msgstr "" +msgstr "Lote Série:" #: HistoricalTestResults.php:136 msgid "Identifier:" -msgstr "" +msgstr "Identif:" #: HistoricalTestResults.php:136 msgid "Sample Date:" -msgstr "" +msgstr "Data Amostra:" #: ImportBankTrans.php:8 ImportBankTrans.php:14 ImportBankTrans.php:15 #: ImportBankTransAnalysis.php:20 ImportBankTransAnalysis.php:34 @@ -15142,14 +15184,16 @@ "bank statement transactions. First define the file format used by your bank " "for statement exports." msgstr "" +"Não há contas bancárias definidas para importar transações bancárias. " +"Definir o formato do arquivo exportado pelo seu banco." #: ImportBankTrans.php:38 msgid "Setup Import Format for Bank Accounts" -msgstr "" +msgstr "Config formato Importação Contas Bancárias" #: ImportBankTrans.php:46 msgid "Bank Account to Import Transaction For" -msgstr "" +msgstr "Conta Bancária para importar transações" #: ImportBankTrans.php:56 msgid "MT940 format Bank Statement File to import" @@ -15164,6 +15208,8 @@ "The file size is over the maximum allowed. The maximum size allowed is 1 " "megabyte. This file size is (bytes)" msgstr "" +"O tamanho excede o máximo permitido. O máximo é 1 megabyte. Esse arquivo tem " +"(bytes)" #: ImportBankTrans.php:71 includes/ImportBankTrans_MT940_SCB.php:30 msgid "The MT940 bank statement file cannot be imported and processed" @@ -15799,7 +15845,7 @@ #: InternalStockRequestAuthorisation.php:107 msgid "Cancel Line" -msgstr "" +msgstr "Cancela Linha" #: InternalStockRequestFulfill.php:7 InternalStockRequestFulfill.php:14 msgid "Fulfill Stock Requests" @@ -15952,11 +15998,11 @@ #: InventoryPlanning.php:419 InventoryValuation.php:197 msgid "Category ID" -msgstr "" +msgstr "ID Categoria" #: InventoryPlanning.php:430 msgid "The stock usage of this item could not be retrieved because" -msgstr "" +msgstr "Uso do estoque desse item não pode ser recuperado porque" #: InventoryPlanning.php:455 msgid "Inventory Planning Reporting" @@ -15965,7 +16011,7 @@ #: InventoryPlanning.php:467 InventoryValuation.php:226 PDFPriceList.php:293 #: StockCheck.php:262 msgid "Select Inventory Categories" -msgstr "" +msgstr "Selecionar Categoria Inventário" #: InventoryPlanning.php:485 InventoryPlanningPrefSupplier.php:393 #: InventoryValuation.php:244 StockCheck.php:280 @@ -15989,7 +16035,7 @@ #: InventoryPlanning.php:504 msgid "One Month and a half MAX" -msgstr "1 Mês e 50% MAX" +msgstr "1 Mês e meio MAX" #: InventoryPlanning.php:505 msgid "Two Months MAX" @@ -16033,7 +16079,7 @@ #: InventoryPlanning.php:522 msgid "Export 24 months to CSV" -msgstr "" +msgstr "Exportar 24 meses para CSV" #: InventoryPlanningPrefSupplier.php:49 msgid "Preferred Supplier Inventory Plan" @@ -16111,7 +16157,7 @@ #: InventoryPlanningPrefSupplier.php:350 msgid "Nil" -msgstr "***" +msgstr "Nenhum" #: InventoryPlanningPrefSupplier.php:383 msgid "Preferred Supplier Inventory Planning" @@ -16226,7 +16272,7 @@ #: InventoryValuation.php:274 msgid "Output to CSV" -msgstr "" +msgstr "Saída para CSV" #: Labels.php:6 msgid "Label Templates" @@ -16238,7 +16284,7 @@ #: Labels.php:117 msgid "all measurements in PDF points" -msgstr "" +msgstr "todas medidas PDF em pontos" #: Labels.php:121 PDFPrintLabel.php:272 msgid "" @@ -16246,6 +16292,9 @@ "installation is not capable currently. You will most likely experience " "problems with this script until the GD module is enabled." msgstr "" +"Módulo GD para PHP é requerido para imprimir código de barras. Sua " +"instalação não encontrou esse módulo. Verificar pois podem haver problemas " +"até o GD ser habilitado." #: Labels.php:141 msgid "" @@ -16387,49 +16436,49 @@ #: LocationUsers.php:5 includes/MainMenuLinksArray.php:532 msgid "Inventory Location Authorised Users Maintenance" -msgstr "" +msgstr "Manutenção Usuários Aut. Local Inventário" #: LocationUsers.php:10 msgid "Location Authorised Users" -msgstr "" +msgstr "Usuários Autorizados para Local" #: LocationUsers.php:33 msgid "You have not selected any Location" -msgstr "" +msgstr "Selecionar algum local" #: LocationUsers.php:46 msgid "You have not selected an user to be authorised to use this Location" -msgstr "" +msgstr "Favor escolher um usuário para ser autorizado para esse local" #: LocationUsers.php:65 msgid "is already authorised to use this location" -msgstr "" +msgstr "já está autorizado para esse local" #: LocationUsers.php:77 UserLocations.php:77 msgid "authority to use the" -msgstr "" +msgstr "autorizado para usar" #: LocationUsers.php:77 UserLocations.php:77 msgid "location has been changed" -msgstr "" +msgstr "local foi modificado" #: LocationUsers.php:88 LocationUsers.php:98 UserLocations.php:88 #: UserLocations.php:98 msgid "The Location user record could not be deleted because" -msgstr "" +msgstr "O registro de usuário não pode ser removido porque" #: LocationUsers.php:90 UserLocations.php:90 msgid "has had their authority to use the" -msgstr "" +msgstr "pois tem autorização para usar" #: LocationUsers.php:90 LocationUsers.php:100 UserLocations.php:90 #: UserLocations.php:100 msgid "location removed" -msgstr "" +msgstr "local removido" #: LocationUsers.php:100 UserLocations.php:100 msgid "has had their authority to update" -msgstr "" +msgstr "teve sua autoridade modificada" #: LocationUsers.php:112 NoSalesItems.php:19 TopItems.php:24 #: UserLocations.php:223 @@ -16438,23 +16487,23 @@ #: LocationUsers.php:171 msgid "Authorised users for Location" -msgstr "" +msgstr "Usuários autorizados para Local" #: LocationUsers.php:192 msgid "Are you sure you wish to remove Update for this user?" -msgstr "" +msgstr "Confirma remover usuário para o Local?" #: LocationUsers.php:192 UserLocations.php:193 msgid "Remove Update" -msgstr "" +msgstr "Remoção atualizada" #: LocationUsers.php:194 msgid "Are you sure you wish to add Update for this user?" -msgstr "" +msgstr "Confirma adição para esse usuário?" #: LocationUsers.php:194 UserLocations.php:195 msgid "Add Update" -msgstr "" +msgstr "Adic. Atualização" #: Locations.php:6 Locations.php:13 msgid "Location Maintenance" @@ -16529,11 +16578,11 @@ msgid "" "The users/locations that need user location records created cannot be " "retrieved because" -msgstr "" +msgstr "Registro Usuário / Local não pode ser recuperado porque" #: Locations.php:205 msgid "Existing users have been authorized for this location" -msgstr "" +msgstr "Usuários existentes foram autorizados para esse local" #: Locations.php:278 msgid "" @@ -16661,7 +16710,7 @@ #: Locations.php:414 Locations.php:701 msgid "Allow Invoicing" -msgstr "" +msgstr "Permitir Pedido" #: Locations.php:440 #, php-format @@ -16737,6 +16786,7 @@ #: Locations.php:638 msgid "The email address should be an email format such as ad...@we..." msgstr "" +"Endereço de email deve ser um email com formato válido us...@do..." #: Locations.php:659 msgid "Default Counter Sales Customer Code" @@ -16773,18 +16823,21 @@ #: Locations.php:682 msgid "Use for Work Order Productions?" -msgstr "" +msgstr "Usar Ordens de Produção?" #: Locations.php:696 msgid "" "Enter the GL account for this location, or leave it in blank if not needed" msgstr "" +"Informar contas GL para esse local ou deixar em branco se desnecessário" #: Locations.php:700 msgid "" "Use this parameter to indicate whether these inventory location allows or " "denies the invoicing of its items." msgstr "" +"Use esse parâmetro para indicar quando local de inventário permite ou nega " +"solicitação de itens." #: MRP.php:6 msgid "Run MRP Calculation" @@ -16896,7 +16949,7 @@ #: MRP.php:592 msgid "Use Reorder Level Demands" -msgstr "" +msgstr "Usar Ponto de Pedido" #: MRP.php:596 msgid "Use EOQ" @@ -16920,7 +16973,7 @@ #: MRP.php:642 msgid "Use Reorder Level Demands?" -msgstr "" +msgstr "Usar Nível de Pedido?" #: MRP.php:646 msgid "Use EOQ?" @@ -17247,7 +17300,7 @@ #: MRPPlannedPurchaseOrders.php:116 msgid "" "The MRP planned purchase orders could not be retrieved by the SQL because" -msgstr " " +msgstr "SQL Ordens de compra planejamento MRP não podem ser recuperadas porque" #: MRPPlannedPurchaseOrders.php:125 msgid "Print MRP Planned Purchase Orders Error" @@ -17474,7 +17527,7 @@ #: MRPReport.php:283 MRPReport.php:353 MRPReport.php:423 msgid "Planned Acc" -msgstr "" +msgstr "Conta Planej" #: MRPReport.php:438 msgid "Dem Type" @@ -18468,7 +18521,7 @@ #: PDFCOA.php:27 msgid "Select Certificate of Analysis To Print" -msgstr "" +msgstr "Selec. Certificado de Análise para Imprimir" #: PDFCOA.php:35 PO_Items.php:844 msgid "Enter Item" @@ -18476,68 +18529,68 @@ #: PDFCOA.php:37 msgid "Enter Lot" -msgstr "" +msgstr "Informar Lote" #: PDFCOA.php:51 msgid "Or Select Existing Lot" -msgstr "" +msgstr "Ou Selec. Lote Existente" #: PDFCOA.php:64 msgid "Lot/Serial" -msgstr "" +msgstr "Lote / Série" #: PDFCOA.php:81 msgid "There was a problem retrieving the Lot Information" -msgstr "" +msgstr "Há um problema na recuperação da informação do lote" #: PDFCOA.php:126 msgid "Print Certificate of Analysis Error" -msgstr "" +msgstr "Imprimir Certif. de Análise de Erro" #: PDFCOA.php:132 msgid "Unable to Locate Lot" -msgstr "" +msgstr "Não localizou o Lote" #: PDFCOA.php:139 PDFCOA.php:157 PDFCOA.php:158 includes/PDFCOAHeader.inc:28 msgid "Certificate of Analysis" -msgstr "" +msgstr "Certificado de Análise" #: PDFCOA.php:169 msgid "Physical Properties" -msgstr "" +msgstr "Propriedades Físicas" #: PDFCOA.php:169 PDFCOA.php:170 PDFProdSpec.php:130 PDFProdSpec.php:131 msgid "Physical Property" -msgstr "" +msgstr "Propriedade Física" #: PDFCOA.php:169 PDFCOA.php:170 PDFProdSpec.php:130 PDFProdSpec.php:131 #: TestPlanResults.php:804 msgid "Test Method" -msgstr "" +msgstr "Método de Teste" #: PDFCOA.php:170 PDFProdSpec.php:131 msgid "Header" -msgstr "" +msgstr "Cabeçalho" #: PDFCOA.php:170 PDFProdSpec.php:131 msgid "* Trailer" -msgstr "" +msgstr "* Rodapé" #: PDFCOA.php:171 PDFProdSpec.php:132 msgid "Injection Molding Processing Guidelines" -msgstr "" +msgstr "Guia Processamento Injeção Moldes" #: PDFCOA.php:171 PDFProdSpec.php:132 msgid "* Desicant type dryer required." -msgstr "" +msgstr "* Tipo de Secante Requerido." #: PDFCOA.php:171 PDFProdSpec.php:132 msgid "Setting" -msgstr "" +msgstr "Configuração" #: PDFCOA.php:172 PDFProdSpec.php:133 msgid "Regulatory Compliance" -msgstr "" +msgstr "Regulamento Acordo" #: PDFChequeListing.php:25 PDFChequeListing.php:106 PDFChequeListing.php:115 #: PDFChequeListing.php:149 PDFCustTransListing.php:82 @@ -18882,7 +18935,7 @@ #: PDFFGLabel.php:94 msgid "FG Label" -msgstr "" +msgstr "FG Rótulo" #: PDFFGLabel.php:146 PDFGrn.php:129 PDFQALabel.php:66 #: PDFStockTransfer.php:121 ReverseGRN.php:78 @@ -18896,7 +18949,7 @@ #: PDFFGLabel.php:182 PDFWOPrint.php:477 msgid "Please Process this Work order number" -msgstr "" +msgstr "Por favor processar essa Ordem Número" #: PDFFGLabel.php:183 PDFWOPrint.php:259 PDFWOPrint.php:478 #: SelectWorkOrder.php:44 api/api_xml-rpc.php:2573 api/api_xml-rpc.php:2769 @@ -18910,12 +18963,12 @@ #: PDFFGLabel.php:199 PDFFGLabel.php:205 PDFWOPrint.php:494 PDFWOPrint.php:500 msgid "Email a Work Order" -msgstr "" +msgstr "Email Ordem de Produção" #: PDFFGLabel.php:202 PDFWOPrint.php:258 PDFWOPrint.php:497 #: includes/DatabaseTranslations.php:49 msgid "Work Order" -msgstr "" +msgstr "Ordem Produção" #: PDFFGLabel.php:202 PDFWOPrint.php:497 PO_PDFPurchOrder.php:352 #: PrintCustTrans.php:505 PrintCustTransPortrait.php:539 @@ -18928,7 +18981,7 @@ #: PDFFGLabel.php:208 PDFWOPrint.php:503 msgid "Emailing Work order" -msgstr "" +msgstr "Email Ordem Produção" #: PDFFGLabel.php:208 PDFWOPrint.php:503 PO_PDFPurchOrder.php:358 #: Z_ChangeStockCode.php:169 @@ -18937,11 +18990,11 @@ #: PDFFGLabel.php:214 msgid "Label Error" -msgstr "" +msgstr "Erro Etiqueta" #: PDFFGLabel.php:216 msgid "There were no labels to print" -msgstr "" +msgstr "Não há etiqueta para imprimir" #: PDFGLJournal.php:28 msgid "General Ledger Journal" @@ -19271,7 +19324,7 @@ #: PDFPriceList.php:26 msgid "Price list by inventory category" -msgstr "" +msgstr "Lista de preço por categoria Inventário" #: PDFPriceList.php:38 PDFPriceList.php:340 PDFPriceList.php:389 msgid "Customer Special Prices Only" @@ -19338,7 +19391,7 @@ #: PDFPriceList.php:285 msgid "Print a price list by inventory category" -msgstr "" +msgstr "Imprimir lista preço por categoria" #: PDFPriceList.php:310 PDFPrintLabel.php:314 Z_DataExport.php:542 msgid "For Sales Type/Price List" @@ -19382,7 +19435,7 @@ #: PDFPriceList.php:441 msgid "Prices excluding tax" -msgstr "" +msgstr "Preço excluindo impostos" #: PDFPrintLabel.php:44 msgid "The Price Labels could not be retrieved by the SQL because" @@ -19431,53 +19484,55 @@ #: PDFProdSpec.php:17 msgid "Select Product Specification To Print" -msgstr "" +msgstr "Selecione Especificação do Produto para Imprimir" #: PDFProdSpec.php:25 ProductSpecs.php:94 msgid "Enter Specification Name" -msgstr "" +msgstr "Informar Nome da Especificação" #: PDFProdSpec.php:39 ProductSpecs.php:108 msgid "Or Select Existing Specification" -msgstr "" +msgstr "ou Selecionar Especificação Existente" #: PDFProdSpec.php:65 msgid "There was a problem retrieving the Product Specification" -msgstr "" +msgstr "Há um problema na recuperação especificação do produto" #: PDFProdSpec.php:91 msgid "Print Product Specification Error" -msgstr "" +msgstr "Erro na impressão Especif. do Produto" #: PDFProdSpec.php:97 msgid "Unable to Locate Specification" -msgstr "" +msgstr "Não foi possível localizar especificação" #: PDFProdSpec.php:104 includes/MainMenuLinksArray.php:339 msgid "Product Specifications" -msgstr "" +msgstr "Especificação Produto" #: PDFProdSpec.php:118 PDFProdSpec.php:119 ProductSpecs.php:349 msgid "Product Specification" -msgstr "" +msgstr "Especificação Produto" #: PDFProdSpec.php:130 msgid "Technical Data Sheet Properties" -msgstr "" +msgstr "Folha Dados e Propriedades Técnicas" #: PDFProdSpec.php:130 msgid "* Data herein is typical and not to be construed as specifications." -msgstr "" +msgstr "* Dados descritos são típicos e não são especificações" #: PDFProdSpec.php:266 msgid "" "The information provided on this datasheet should only be used as a " "guideline. Actual lot to lot values will vary." msgstr "" +"A informação registrada aqui nesse formulário deve ser apenas um guia. " +"Haverá variações em cada lote." #: PDFQALabel.php:20 msgid "QA Label" -msgstr "" +msgstr "Etiqueta QA" #: PDFQuotation.php:12 PDFQuotationPortrait.php:12 msgid "Select Quotation To Print" @@ -19638,15 +19693,15 @@ #: PDFSalesBySalesperson.php:15 PDFWeeklyOrders.php:15 msgid "Weekly Orders" -msgstr "" +msgstr "Pedidos Semanais" #: PDFSalesBySalesperson.php:17 PDFWeeklyOrders.php:17 msgid "There are no members of the Weekly Orders Recipients email group" -msgstr "" +msgstr "Não há membros no grupo de email Pedidos Semanais" #: PDFSalesBySalesperson.php:64 PDFWeeklyOrders.php:60 PDFWeeklyOrders.php:197 msgid "Weekly Orders Report" -msgstr "" +msgstr "Relatório Pedidos Semanais" #: PDFSalesBySalesperson.php:88 PDFWeeklyOrders.php:84 ReverseGRN.php:31 #: SalesByTypePeriodInquiry.php:356 SalesTopCustomersInquiry.php:218 @@ -19657,27 +19712,27 @@ #: PDFSalesBySalesperson.php:106 PDFWeeklyOrders.php:103 msgid "Partial" -msgstr "" +msgstr "Parcial" #: PDFSalesBySalesperson.php:146 msgid "Please find the Sales By Salesperson report" -msgstr "" +msgstr "Por favor localizar relatório Por Vendedor" #: PDFSalesBySalesperson.php:147 msgid "Sales By Salesperson Report" -msgstr "" +msgstr "Relatório por Vendedor" #: PDFSalesBySalesperson.php:157 PDFWeeklyOrders.php:206 msgid "Print Weekly Orders" -msgstr "" +msgstr "Imprimir Ordens Semanais" #: PDFSalesBySalesperson.php:159 PDFWeeklyOrders.php:208 msgid "The Weekly Orders report has been mailed" -msgstr "" +msgstr "Relatório Pedidos Semanais foi enviado por email" #: PDFSalesBySalesperson.php:165 PDFWeeklyOrders.php:214 msgid "Print Weekly Orders Error" -msgstr "" +msgstr "Erro ao Imprimir Pedidos Semanais" #: PDFSellThroughSupportClaim.php:6 PDFSellThroughSupportClaim.php:164 #: includes/MainMenuLinksArray.php:70 @@ -19780,7 +19835,7 @@ #: PDFStockCheckComparison.php:282 msgid "Bin:" -msgstr "" +msgstr "Baia:" #: PDFStockCheckComparison.php:291 msgid "No counts entered" @@ -19831,11 +19886,11 @@ #: PDFStockLocTransfer.php:40 PDFStockTransfer.php:45 msgid "Transfer docket to reprint Shipping Labels" -msgstr "" +msgstr "Transf. para reimpressão Etiquetas Envio" #: PDFStockLocTransfer.php:46 PDFStockTransfer.php:51 msgid "Print Shipping Labels" -msgstr "" +msgstr "Imprimir Etiquetas Envio" #: PDFStockLocTransfer.php:55 PDFStockLocTransfer.php:56 msgid "Inventory Location Transfer BOL" @@ -19938,23 +19993,23 @@ #: PDFWOPrint.php:89 msgid "Select a Work Order" -msgstr "" +msgstr "Selec. Ordem Produção" #: PDFWOPrint.php:92 msgid "Select a Work Order Number to Print before calling this page" -msgstr "" +msgstr "Selecionar Número Ordem Produção para imprimir antes dessa página." #: PDFWOPrint.php:98 PDFWOPrint.php:187 msgid "Select Work Order" -msgstr "" +msgstr "Selecionar Ordem de Produção" #: PDFWOPrint.php:108 msgid "This page must be called with a Work order number to print" -msgstr "" +msgstr "Essa página deve ser chamada com um número de Ordem" #: PDFWOPrint.php:118 msgid "Print Work Order Number" -msgstr "" +msgstr "Imprimir Número Ordem Produção" #: PDFWOPrint.php:122 PO_PDFPurchOrder.php:45 msgid "" @@ -19966,18 +20021,19 @@ msgid "" "There was a problem retrieving the Work order header details for Order Number" msgstr "" +"Há problema na recuperação do cabeçalho / detalhes de ordem de produção " #: PDFWOPrint.php:178 msgid "Print Work Order Error" -msgstr "" +msgstr "Erro na impressão Ordem Produção" #: PDFWOPrint.php:181 msgid "Unable to Locate Work Order Number" -msgstr "" +msgstr "Não localizou Ordem de Produção" #: PDFWOPrint.php:449 msgid "Signed for: " -msgstr "" +msgstr "Assinado por:" #: PDFWOPrint.php:579 PDFWOPrint.php:662 PO_PDFPurchOrder.php:388 msgid "Print or Email the Order" @@ -19985,7 +20041,7 @@ #: PDFWOPrint.php:610 msgid "There was a problem retrieving the contact details for the location" -msgstr "" +msgstr "Há um problema na recuperação dos detalhes do contato para o local" #: PDFWOPrint.php:623 PDFWOPrint.php:692 PO_PDFPurchOrder.php:429 msgid "Email to" @@ -19993,47 +20049,47 @@ #: PDFWOPrint.php:637 SelectWorkOrder.php:332 msgid "Paperwork" -msgstr "" +msgstr "Ordem Produção" #: PDFWOPrint.php:654 msgid "Label Item" -msgstr "" +msgstr "Etiq. Item" #: PDFWOPrint.php:656 msgid "Label Lot" -msgstr "" +msgstr "Etiq. Lote " #: PDFWOPrint.php:657 msgid "No of Full Packages" -msgstr "" +msgstr "Número Pacotes" #: PDFWOPrint.php:658 msgid "Labels/Package" -msgstr "" +msgstr "Etiquetas Pacotes" #: PDFWOPrint.php:659 msgid "Weight/Package" -msgstr "" +msgstr "Peso Pacotes" #: PDFWOPrint.php:660 msgid "LeftOver Qty" -msgstr "" +msgstr "Quant. Total" #: PDFWOPrint.php:705 msgid "Labels" -msgstr "" +msgstr "Etiquetas" #: PDFWeeklyOrders.php:138 msgid "Total Order Amounts" -msgstr "" +msgstr "Total Pedido" #: PDFWeeklyOrders.php:184 msgid "Monthly Invoiced Total" -msgstr "" +msgstr "Total Pedidos Mês" #: PDFWeeklyOrders.php:196 msgid "Please find the weekly order report" -msgstr "" +msgstr "Por favor localizar relatório pedido semanal" #: POReport.php:11 POReport.php:514 POReport.php:1296 msgid "Purchase Order Report" @@ -21020,11 +21076,11 @@ #: PO_Items.php:1062 msgid "Failed to retrieve result count" -msgstr "" +msgstr "Falhou em recuperar contagem resultado" #: PO_Items.php:1063 msgid "The SQL failed is " -msgstr "" +msgstr "SQL que falhou foi" #: PO_Items.php:1124 msgid "Item Category" @@ -21140,7 +21196,7 @@ #: PO_OrderDetails.php:160 msgid "Status Coments" -msgstr "" +msgstr "Comentário Status" #: PO_OrderDetails.php:169 msgid "The line items of the purchase order could not be retrieved" @@ -21337,7 +21393,7 @@ #: PO_SelectOSPurchOrder.php:174 msgid "Failed to retrieve location data" -msgstr "" +msgstr "Falhou na recuperação dados do local" #: PO_SelectOSPurchOrder.php:226 PO_SelectPurchOrder.php:134 msgid "Order Status:" @@ -21349,7 +21405,7 @@ #: PO_SelectOSPurchOrder.php:255 msgid "Orders Between" -msgstr "" +msgstr "Pedidos entre" #: PO_SelectOSPurchOrder.php:259 PO_SelectPurchOrder.php:5 #: PO_SelectPurchOrder.php:165 @@ -22005,23 +22061,23 @@ #: PcAnalysis.php:179 msgid "Excel file for petty Cash Expenses Analysis" -msgstr "" +msgstr "Arquivo excel para Análise Despesas Pequeno Caixa" #: PcAnalysis.php:192 PcAnalysis.php:202 msgid "Excel file for Petty Cash Expenses Analysis" -msgstr "" +msgstr "Arquivo Excel para Análise Despesas Pequeno Caixa" #: PcAnalysis.php:207 msgid "For Petty Cash Tabs" -msgstr "" +msgstr "Abas para Pequeno Caixa" #: PcAnalysis.php:215 msgid "All Tabs" -msgstr "" +msgstr "Todas abas" #: PcAnalysis.php:228 msgid "Create Petty Cash Expenses Excel File" -msgstr "" +msgstr "Criar arquivo despesas pequeno caixa" #: PcAssignCashToTab.php:5 msgid "Assignment of Cash to Petty Cash Tab" @@ -22117,7 +22173,7 @@ #: PcAuthorizeExpenses.php:46 PcAuthorizeExpenses.php:49 msgid "Authorisation Of Petty Cash Expenses" -msgstr "" +msgstr "Autorização Despesas Pequeno Caixa" #: PcAuthorizeExpenses.php:64 msgid "Detail Of Movement For Last " @@ -22636,15 +22692,15 @@ #: PriceMatrix.php:6 msgid "Price break matrix Maintenance" -msgstr "" +msgstr "Manutenção Matrix Preços" #: PriceMatrix.php:31 msgid "at which the price will apply is 0 or less than 0" -msgstr "" +msgstr "na qual o preço aplicado é zero ou menor que" #: PriceMatrix.php:35 msgid "The price must be entered as a positive number" -msgstr "" +msgstr "O preço deve ser informado como um número positivo" #: PriceMatrix.php:40 Prices.php:74 PricesBasedOnMarkUp.php:191 #: Prices_Customer.php:90 @@ -22677,23 +22733,23 @@ #: PriceMatrix.php:115 msgid "Failed to insert price data" -msgstr "" +msgstr "Falhou ao inserir dados do preço" #: PriceMatrix.php:117 msgid "The price matrix record has been added" -msgstr "" +msgstr "Registro adicionado na matrix de preço" #: PriceMatrix.php:139 msgid "Failed to delete price data" -msgstr "" +msgstr "Falha ao remover dados do preço" #: PriceMatrix.php:141 msgid "The price matrix record has been deleted" -msgstr "" +msgstr "Registro da Matrix de preços foi removido" #: PriceMatrix.php:202 msgid "You must select a stock item first before set a price maxtrix" -msgstr "" +msgstr "Selecionar item estoque antes de configurar a matrix de preço" #: PriceMatrix.php:213 PriceMatrix.php:260 Prices.php:329 msgid "Price Effective From Date" @@ -22720,6 +22776,7 @@ "The price to apply to orders where the quantity exceeds the specified " "quantity" msgstr "" +"Preço para aplicar nos pedidos onde a quantidade excede quant. especificada" #: PriceMatrix.php:263 SpecialOrder.php:630 includes/PDFLowGPPageHeader.inc:47 #: includes/PDFSellThroughSupportClaimPageHeader.inc:26 @@ -23475,11 +23532,11 @@ #: PrintCustStatements.php:421 msgid "Please make payments to our account:" -msgstr "" +msgstr "Favor efetuar pagamentos em nossa conta" #: PrintCustStatements.php:422 msgid "Quoting your account reference" -msgstr "" +msgstr "Sua Quotação Referência" #: PrintCustStatements.php:442 msgid "No Statements Found" @@ -23746,59 +23803,59 @@ #: PrintWOItemSlip.php:38 msgid "The SQL to find the details of the item to produce failed" -msgstr "" +msgstr "SQL que falhou em encontrar detalhes do item " #: PrintWOItemSlip.php:44 PrintWOItemSlip.php:45 msgid "WO Production Slip" -msgstr "" +msgstr "Ficha Ordem Produção" #: PrintWOItemSlip.php:105 msgid "Incidences / Production Notes" -msgstr "" +msgstr "Anotações Produção / Incidentes" #: PrintWOItemSlip.php:108 msgid "Components Ready By" -msgstr "" +msgstr "Componentes Disponíveis em" #: PrintWOItemSlip.php:108 msgid "Item Produced By" -msgstr "" +msgstr "Item Produzidos por" #: PrintWOItemSlip.php:108 msgid "Quality Control By" -msgstr "" +msgstr "Controle Qualidade por" #: PrintWOItemSlip.php:118 msgid "WO Item production Slip" -msgstr "" +msgstr "Ficha Item da Ordem de Produção" #: PrintWOItemSlip.php:120 msgid "There were no items with ready to produce" -msgstr "" +msgstr "Não há itens disponíveis para produzir" #: PrintWOItemSlip.php:146 msgid "Work Order Item Production Slip" -msgstr "" +msgstr "Ficha Item Ordem de Produção" #: PrintWOItemSlip.php:149 WOCanBeProducedNow.php:42 msgid "WO" -msgstr "" +msgstr "OP" #: PrintWOItemSlip.php:167 msgid "Component Code" -msgstr "" +msgstr "Código Componente" #: PrintWOItemSlip.php:168 msgid "Qty BOM" -msgstr "" +msgstr "Qtd BOM" #: PrintWOItemSlip.php:170 msgid "Qty Needed" -msgstr "" +msgstr "Qtd Neces" #: PrintWOItemSlip.php:172 WOCanBeProducedNow.php:51 msgid "Shrinkage" -msgstr "" +msgstr "Arredond" #: PrintWOItemSlip.php:188 PrintWOItemSlip.php:199 PrintWOItemSlip.php:210 #: StockDispatch.php:279 StockDispatch.php:290 StockDispatch.php:301 @@ -23812,11 +23869,12 @@ #: ProductSpecs.php:5 msgid "Product Specifications Maintenance" -msgstr "" +msgstr "Especificações Manutenção Produto" #: ProductSpecs.php:45 msgid "Enter The Item, Fixed Asset or Template to Copy this Specification to" msgstr "" +"Informe Item, Ativo Fixo ou Modelo para onde copiar essas especificações" #: ProductSpecs.php:48 PurchData.php:313 TestPlanResults.php:331 #: reportwriter/languages/en_US/reports.php:137 @@ -23826,40 +23884,40 @@ #: ProductSpecs.php:76 msgid "A Product Specification has been copied to" -msgstr "" +msgstr "Especificação Produto copiada para " #: ProductSpecs.php:77 ProductSpecs.php:281 msgid "The insert of the Product Specification failed because" -msgstr "" +msgstr "Inserção das Especificações do Produto falhou porque" #: ProductSpecs.php:140 msgid "Product Specification for" -msgstr "" +msgstr "Especificação do Produto para" #: ProductSpecs.php:165 ProductSpecs.php:386 QATests.php:244 QATests.php:392 #: TestPlanResults.php:509 msgid "Method" -msgstr "" +msgstr "Método" #: ProductSpecs.php:167 ProductSpecs.php:389 ProductSpecs.php:585 #: QATests.php:285 QATests.php:396 TestPlanResults.php:511 msgid "Possible Values" -msgstr "" +msgstr "Valores Possíveis" #: ProductSpecs.php:168 ProductSpecs.php:390 ProductSpecs.php:590 #: TestPlanResults.php:512 TestPlanResults.php:806 msgid "Target Value" -msgstr "" +msgstr "Valor Meta" #: ProductSpecs.php:169 ProductSpecs.php:391 ProductSpecs.php:596 #: TestPlanResults.php:513 msgid "Range Min" -msgstr "" +msgstr "Intervervalo Min" #: ProductSpecs.php:170 ProductSpecs.php:392 ProductSpecs.php:600 #: TestPlanResults.php:514 msgid "Range Max" -msgstr "" +msgstr "Intervalo Max" #: ProductSpecs.php:196 QATests.php:260 QATests.php:262 #: StockCategories.php:589 StockCategories.php:591 StockCategories.php:635 @@ -23884,29 +23942,31 @@ #: ProductSpecs.php:209 QATests.php:280 QATests.php:282 #: TestPlanResults.php:805 reportwriter/languages/en_US/reports.php:89 msgid "Range" -msgstr "" +msgstr "Intervalo" #: ProductSpecs.php:280 msgid "A Product Specification record has been added for Test ID" -msgstr "" +msgstr "Registro de Especificação Produto adicionado para o Teste ID" #: ProductSpecs.php:315 msgid "Product Specification record for" -msgstr "" +msgstr "Registro Especificação produto para" #: ProductSpecs.php:316 msgid "The update of the Product Specification failed because" -msgstr "" +msgstr "Atualização de especificação do produto falhou porque" #: ProductSpecs.php:342 msgid "" "Cannot delete this Product Specification because there are test results tied " "to it" msgstr "" +"Não pode remover essa Especificação de produto porque há resultados testes " +"vinculados" #: ProductSpecs.php:346 msgid "The Product Specification could not be deleted because" -msgstr "" +msgstr "Especificação de Produto não pode ser removida porque" #: ProductSpecs.php:349 QATests.php:144 SalesP... [truncated message content] |
From: <te...@us...> - 2015-11-24 08:50:30
|
Revision: 7398 http://sourceforge.net/p/web-erp/reponame/7398 Author: tehonu Date: 2015-11-24 08:50:28 +0000 (Tue, 24 Nov 2015) Log Message: ----------- Added script to maintain bank accounts authorized for a given user Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Added Paths: ----------- trunk/UserBankAccounts.php Added: trunk/UserBankAccounts.php =================================================================== --- trunk/UserBankAccounts.php (rev 0) +++ trunk/UserBankAccounts.php 2015-11-24 08:50:28 UTC (rev 7398) @@ -0,0 +1,235 @@ +<?php + +include('includes/session.inc'); +$Title = _('Bank Account Users');;// Screen identificator. +$ViewTopic = 'GeneralLedger';// Filename's id in ManualContents.php's TOC. +/* To do this section in the manual. +$BookMark = 'UserBankAccounts';// Anchor's id in the manual's html document.*/ +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/money_add.png" title="' . _('User Authorised Bank Accounts') . '" alt="" />' . ' ' . $Title . '</p>'; + +if (isset($_POST['SelectedBankAccount'])) { + $SelectedBankAccount = mb_strtoupper($_POST['SelectedBankAccount']); +} elseif (isset($_GET['SelectedBankAccount'])) { + $SelectedBankAccount = mb_strtoupper($_GET['SelectedBankAccount']); +} else { + $SelectedBankAccount = ''; +} + +if (isset($_POST['SelectedUser'])) { + $SelectedUser = $_POST['SelectedUser']; +} elseif (isset($_GET['SelectedUser'])) { + $SelectedUser = $_GET['SelectedUser']; +} + +if (isset($_POST['Cancel'])) { + unset($SelectedUser); + unset($SelectedBankAccount); +} + +if (isset($_POST['Process'])) { + if ($_POST['SelectedUser'] == '') { + prnMsg(_('You have not selected any User'), 'error'); + echo '<br />'; + unset($SelectedUser); + unset($_POST['SelectedUser']); + } +} + +if (isset($_POST['submit'])) { + + $InputError = 0; + + if ($_POST['SelectedBankAccount'] == '') { + $InputError = 1; + prnMsg(_('You have not selected a bank account to be authorised for this user'), 'error'); + echo '<br />'; + unset($SelectedUser); + } + + if ($InputError != 1) { + + // First check the user is not being duplicated + + $CheckSql = "SELECT count(*) + FROM bankaccountusers + WHERE accountcode= '" . $_POST['SelectedBankAccount'] . "' + AND userid = '" . $_POST['SelectedUser'] . "'"; + + $CheckResult = DB_query($CheckSql); + $CheckRow = DB_fetch_row($CheckResult); + + if ($CheckRow[0] > 0) { + $InputError = 1; + prnMsg(_('The Bank Account') . ' ' . $_POST['SelectedBankAccount'] . ' ' . _('is already authorised for this user'), 'error'); + } else { + // Add new record on submit + $SQL = "INSERT INTO bankaccountusers (accountcode, + userid) + VALUES ('" . $_POST['SelectedBankAccount'] . "', + '" . $_POST['SelectedUser'] . "')"; + + $msg = _('User') . ': ' . $_POST['SelectedUser'] . ' ' . _('authority to use the') . ' ' . $_POST['SelectedBankAccount'] . ' ' . _('bank account has been changed'); + $Result = DB_query($SQL); + prnMsg($msg, 'success'); + unset($_POST['SelectedBankAccount']); + } + } +} elseif (isset($_GET['delete'])) { + $SQL = "DELETE FROM bankaccountusers + WHERE accountcode='" . $SelectedBankAccount . "' + AND userid='" . $SelectedUser . "'"; + + $ErrMsg = _('The Bank account user record could not be deleted because'); + $Result = DB_query($SQL, $ErrMsg); + prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to use the') . ' ' . $SelectedBankAccount . ' ' . _('bank account removed'), 'success'); + unset($_GET['delete']); +} + +if (!isset($SelectedUser)) { + + /* It could still be the second time the page has been run and a record has been selected for modification - SelectedBankAccount will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters + then none of the above are true. These will call the same page again and allow update/input or deletion of the records*/ + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Select User') . ':</td> + <td><select name="SelectedUser">'; + + $Result = DB_query("SELECT userid, + realname + FROM www_users + ORDER BY userid"); + + echo '<option value="">' . _('Not Yet Selected') . '</option>'; + while ($MyRow = DB_fetch_array($Result)) { + if (isset($SelectedUser) and $MyRow['userid'] == $SelectedUser) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>'; + + } //end while loop + + echo '</select></td></tr>'; + + echo '</table>'; // close main table + DB_free_result($Result); + + echo '<div class="centre"> + <input type="submit" name="Process" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div>'; + + echo '</form>'; + +} + +//end of ifs and buts! +if (isset($_POST['process']) or isset($SelectedUser)) { + $SQLName = "SELECT realname + FROM www_users + WHERE userid='" . $SelectedUser . "'"; + $Result = DB_query($SQLName); + $MyRow = DB_fetch_array($Result); + $SelectedUserName = $MyRow['realname']; + + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Authorised bank accounts for') . ' ' . $SelectedUserName . '</a></div> + <form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />'; + + $SQL = "SELECT bankaccountusers.accountcode, + bankaccounts.bankaccountname + FROM bankaccountusers INNER JOIN bankaccounts + ON bankaccountusers.accountcode=bankaccounts.accountcode + WHERE bankaccountusers.userid='" . $SelectedUser . "' + ORDER BY bankaccounts.bankaccountname ASC"; + + $Result = DB_query($SQL); + + echo '<table class="selection">'; + echo '<tr> + <th colspan="6"><h3>' . _('Authorised bank accounts for User') . ': ' . $SelectedUserName . '</h3></th> + </tr>'; + echo '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Name') . '</th> + </tr>'; + + $k = 0; //row colour counter + + while ($MyRow = DB_fetch_array($Result)) { + if ($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k = 1; + } + + printf('<td>%s</td> + <td>%s</td> + <td><a href="%s?SelectedBankAccount=%s&delete=yes&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to un-authorise this bank account?') . '\');">' . _('Un-authorise') . '</a></td> + </tr>', + $MyRow['accountcode'], + $MyRow['bankaccountname'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), + $MyRow['accountcode'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), + $MyRow['accountcode']); + } + //END WHILE LIST LOOP + echo '</table>'; + + if (!isset($_GET['delete'])) { + + + echo '<table class="selection">'; //Main table + + echo '<tr> + <td>' . _('Select Bank Account') . ':</td> + <td><select name="SelectedBankAccount">'; + + $Result = DB_query("SELECT accountcode, + bankaccountname + FROM bankaccounts + WHERE NOT EXISTS (SELECT bankaccountusers.accountcode + FROM bankaccountusers + WHERE bankaccountusers.userid='" . $SelectedUser . "' + AND bankaccountusers.accountcode=bankaccounts.accountcode) + ORDER BY bankaccountname"); + + if (!isset($_POST['SelectedBankAccount'])) { + echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>'; + } + while ($MyRow = DB_fetch_array($Result)) { + if (isset($_POST['SelectedBankAccount']) and $MyRow['accountcode'] == $_POST['SelectedBankAccount']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $MyRow['accountcode'] . '">' . $MyRow['accountcode'] . ' - ' . $MyRow['bankaccountname'] . '</option>'; + + } //end while loop + + echo '</select> + </td> + </tr> + </table>'; // close main table + DB_free_result($Result); + + echo '<div class="centre"> + <input type="submit" name="submit" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> + </div> + </form>'; + + } // end if user wish to delete +} + +include('includes/footer.inc'); +?> Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2015-11-21 09:42:58 UTC (rev 7397) +++ trunk/includes/MainMenuLinksArray.php 2015-11-24 08:50:28 UTC (rev 7398) @@ -400,7 +400,8 @@ _('User Authorised GL Accounts Maintenance'), _('Copy Authority GL Accounts from user A to B'), _('Bank Accounts'), - _('Bank Account Authorised Users')); + _('Bank Account Authorized Users'), + _('User Authorized Bank Accounts')); $MenuItems['GL']['Maintenance']['URL'] = array( '/AccountSections.php', '/AccountGroups.php', @@ -411,7 +412,8 @@ '/UserGLAccounts.php', '/GLAccountUsersCopyAuthority.php', '/BankAccounts.php', - '/BankAccountUsers.php'); + '/BankAccountUsers.php', + '/UserBankAccounts.php'); $MenuItems['FA']['Transactions']['Caption'] = array(_('Add a new Asset'), _('Select an Asset'), Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-11-21 09:42:58 UTC (rev 7397) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-11-24 08:50:28 UTC (rev 7398) @@ -50,5 +50,8 @@ ('UserGLAccounts.php', '15', 'Maintenance of GL Accounts allowed for a user'); ALTER table stockrequest DROP FOREIGN KEY `stockrequest_ibfk_3`; ALTER table stockrequest DROP FOREIGN KEY `stockrequest_ibfk_4`; + +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('UserBankAccounts.php', '15', 'Maintains table bankaccountusers (Authorized users to work with a bank account in webERP)'); + -- Update version number: UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |
From: <ex...@us...> - 2015-12-10 09:34:37
|
Revision: 7409 http://sourceforge.net/p/web-erp/reponame/7409 Author: exsonqu Date: 2015-12-10 09:34:34 +0000 (Thu, 10 Dec 2015) Log Message: ----------- 10/12/15 Exson: Add multiple work orders total cost inquiry script. Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Added Paths: ----------- trunk/CollectiveWorkOrderCost.php Added: trunk/CollectiveWorkOrderCost.php =================================================================== --- trunk/CollectiveWorkOrderCost.php (rev 0) +++ trunk/CollectiveWorkOrderCost.php 2015-12-10 09:34:34 UTC (rev 7409) @@ -0,0 +1,519 @@ +<?php + +include('includes/session.inc'); +$Title = _('Search Work Orders'); +include('includes/header.inc'); + +echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +if (isset($_POST['Submit'])) {//users have selected the WO to calculate and submit it + $WOSelected = ''; + $i = 0; + foreach ($_POST as $Key=>$Value) { + if (substr($Key,0,3) == 'WO_'){ + if ($i>0) $WOSelected .=","; + if($Value == 'on'){ + $WOSelected .= substr($Key,3); + } + $i++; + } + } + if (empty($WOSelected)) { + prnMsg(_('There are no work orders selected'),'error'); + } else { + //lets do the workorder issued items retrieve + $sql = "SELECT stockmoves.stockid, + stockmaster.description, + stockmaster.decimalplaces, + trandate, + qty, + reference, + stockmoves.standardcost + FROM stockmoves INNER JOIN stockmaster + ON stockmoves.stockid=stockmaster.stockid + WHERE stockmoves.type=28 + AND reference IN (" . $WOSelected . ") + ORDER BY reference"; + $ErrMsg = _('Failed to retrieve wo cost data'); + $result = DB_query($sql,$ErrMsg); + if (DB_num_rows($result)>0) { + echo '<table class="selection"> + <tr><th class="ascending">' . _('Item') . '</th> + <th>' . _('Description') . '</th> + <th class="ascending">' . _('Date Issued') . '</th> + <th class="ascending">' . _('Issued Qty') . '</th> + <th class="ascending">' . _('Issued Cost') . '</th> + <th class="ascending">' . _('Work Order') . '</th> + </tr>'; + $i = 0; + $TotalCost = 0; + while ($myrow = DB_fetch_array($result)){ + if ($i==0) { + echo '<tr class="EvenTableRows">'; + $i = 1; + } else { + echo '<tr class="OddTableRows">'; + $i = 0; + } + $IssuedQty = - $myrow['qty']; + $IssuedCost = $IssuedQty * $myrow['standardcost']; + $TotalCost += $IssuedCost; + echo '<td>' . $myrow['stockid'] . '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['trandate'] . '</td> + <td class="number">' . locale_number_format($IssuedQty,$myrow['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($IssuedCost,2) . '</td> + <td>' . $myrow['reference'] . '</td> + </tr>'; + } + echo '<tr><td colspan="4"><b>' . _('Total Cost') . '</b></td> + <td colspan="2"><b>' .locale_number_format($TotalCost,2) . '</b></td> + </tr></table>'; + } else { + prnMsg(_('There are no data available'),'error'); + include('includes/footer.inc'); + exit; + } + }//end of the work orders are not empty + echo '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select Other Work Orders') . '</a>'; + include('includes/footer.inc'); + exit; + +} + + +if (isset($_GET['WO'])) { + $SelectedWO = $_GET['WO']; +} elseif (isset($_POST['WO'])){ + $SelectedWO = $_POST['WO']; +} else { + unset($SelectedWO); +} + +if (isset($_GET['SelectedStockItem'])) { + $SelectedStockItem = $_GET['SelectedStockItem']; +} elseif (isset($_POST['SelectedStockItem'])){ + $SelectedStockItem = $_POST['SelectedStockItem']; +} else { + unset($SelectedStockItem); +} + + +if (isset($_POST['ResetPart'])){ + unset($SelectedStockItem); +} + +if (isset($SelectedWO) AND $SelectedWO!='') { + $SelectedWO = trim($SelectedWO); + if (!is_numeric($SelectedWO)){ + prnMsg(_('The work order number entered MUST be numeric'),'warn'); + unset ($SelectedWO); + include('includes/footer.inc'); + exit; + } else { + echo _('Work Order Number') . ' - ' . $SelectedWO; + } +} + +if (isset($_POST['SearchParts'])){ + + if ($_POST['Keywords'] AND $_POST['StockCode']) { + echo _('Stock description keywords have been used in preference to the Stock code extract entered'); + } + if ($_POST['Keywords']) { + //insert wildcard characters in spaces + $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; + + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.decimalplaces, + SUM(locstock.quantity) AS qoh, + stockmaster.units + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat']. "' + AND stockmaster.mbflag='M' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmaster.units + ORDER BY stockmaster.stockid"; + + } elseif (isset($_POST['StockCode'])){ + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.decimalplaces, + sum(locstock.quantity) as qoh, + stockmaster.units + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + AND stockmaster.mbflag='M' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmaster.units + ORDER BY stockmaster.stockid"; + + } elseif (!isset($_POST['StockCode']) AND !isset($_POST['Keywords'])) { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.decimalplaces, + sum(locstock.quantity) as qoh, + stockmaster.units + FROM stockmaster, + locstock + WHERE stockmaster.stockid=locstock.stockid + AND stockmaster.categoryid='" . $_POST['StockCat'] ."' + AND stockmaster.mbflag='M' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.decimalplaces, + stockmaster.units + ORDER BY stockmaster.stockid"; + } + + $ErrMsg = _('No items were returned by the SQL because'); + $DbgMsg = _('The SQL used to retrieve the searched parts was'); + $StockItemsResult = DB_query($SQL,$db,$ErrMsg,$DbgMsg); +} + +if (isset($_POST['StockID'])){ + $StockID = trim(mb_strtoupper($_POST['StockID'])); +} elseif (isset($_GET['StockID'])){ + $StockID = trim(mb_strtoupper($_GET['StockID'])); +} + +if (!isset($StockID)) { + + /* Not appropriate really to restrict search by date since may miss older + ouststanding orders + $OrdersAfterDate = Date('d/m/Y',Mktime(0,0,0,Date('m')-2,Date('d'),Date('Y'))); + */ + + if (!isset($SelectedWO) or ($SelectedWO=='')){ + echo '<table class="selection"><tr><td>'; + if (isset($SelectedStockItem)) { + echo _('For the item') . ': ' . $SelectedStockItem . ' ' . _('and') . ' <input type="hidden" name="SelectedStockItem" value="' . $SelectedStockItem . '" />'; + } + echo _('Work Order number') . ': <input type="text" name="WO" autofocus="autofocus" maxlength="8" size="9" /> ' . _('Processing at') . ':<select name="StockLocation"> '; + + $sql = "SELECT locations.loccode, locationname FROM locations + INNER JOIN locationusers + ON locationusers.loccode=locations.loccode + AND locationusers.userid='" . $_SESSION['UserID'] . "' + AND locationusers.canview=1 + WHERE locations.usedforwo = 1"; + + $resultStkLocs = DB_query($sql,$db); + + while ($myrow=DB_fetch_array($resultStkLocs)){ + if (isset($_POST['StockLocation'])){ + if ($myrow['loccode'] == $_POST['StockLocation']){ + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } elseif ($myrow['loccode']==$_SESSION['UserStockLocation']){ + echo '<option selected="selected" value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } else { + echo '<option value="' . $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + } + } + + echo '</select> + <select name="ClosedOrOpen">'; + + if ($_GET['ClosedOrOpen']=='Closed_Only'){ + $_POST['ClosedOrOpen']='Closed_Only'; + } + + if ($_POST['ClosedOrOpen']=='Closed_Only'){ + echo '<option selected="selected" value="Closed_Only">' . _('Closed Work Orders Only') . '</option>'; + echo '<option value="Open_Only">' . _('Open Work Orders Only') . '</option>'; + echo '<option value="All">' . _('All') . '</option>'; + } elseif($_POST['ClosedOrOpen'] == 'Open_Only') { + echo '<option value="Closed_Only">' . _('Closed Work Orders Only') . '</option>'; + echo '<option selected="selected" value="Open_Only">' . _('Open Work Orders Only') . '</option>'; + echo '<option value="All">' . _('All') . '</option>'; + } elseif ($_POST['ClosedOrOpen'] == 'All') { + echo '<option value="Closed_Only">' . _('Closed Work Orders Only') . '</option>'; + echo '<option value="Open_Only">' . _('Open Work Orders Only') . '</option>'; + echo '<option selected="selected" value="All">' . _('All') . '</option>'; + } else { + echo '<option value="Closed_Only">' . _('Closed Work Orders Only') . '</option>'; + echo '<option value="Open_Only">' . _('Open Work Orders Only') . '</option>'; + echo '<option selected="selected" value="All">' . _('All') . '</option>'; + } + if (!isset($_POST['DateFrom'])) { + $_POST['DateFrom'] = ''; + } + if (!isset($_POST['DateTo'])) { + $_POST['DateTo'] = ''; + } + + echo '</select> + </td> + </tr> + <tr> + <td colspan="2">' . _('Start Date From') . ':<input type="text" name="DateFrom" value="' . $_POST['DateFrom'] . '" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" /> + + ' . _('Start Date To') . ':<input type="text" name="DateTo" value="' . $_POST['DateTo'] . '" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" /> + </td> + </tr> + </table>'; + echo '<div class="center"> + <input type="submit" name="SearchOrders" value="' . _('Search') . '" /> + <a href="' . $RootPath . '/WorkOrderEntry.php">' . _('New Work Order') . '</a> + </div> + <br />'; + } + + $SQL="SELECT categoryid, + categorydescription + FROM stockcategory + ORDER BY categorydescription"; + + $result1 = DB_query($SQL,$db); + + echo '<table class="selection"> + <tr> + <th colspan="6"><h3>' . _('To search for work orders for a specific item use the item selection facilities below') . '</h3></th> + </tr> + <tr> + <td>' . _('Select a stock category') . ': + <select name="StockCat">'; + + while ($myrow1 = DB_fetch_array($result1)) { + echo '<option value="'. $myrow1['categoryid'] . '">' . $myrow1['categorydescription'] . '</option>'; + } + + echo '</select></td> + <td>' . _('Enter text extract(s) in the description') . ':</td> + <td><input type="text" name="Keywords" size="20" maxlength="25" /></td> + </tr> + <tr> + <td></td> + <td><b>' . _('OR') . ' </b>' . _('Enter extract of the Stock Code') . ':</td> + <td><input type="text" name="StockCode" size="15" maxlength="18" /></td> + </tr> + </table><br />'; + echo '<div class="centre"><input type="submit" name="SearchParts" value="' . _('Search Items Now') . '" /> + <input type="submit" name="ResetPart" value="' . _('Show All') . '" /></div>'; + + if (isset($StockItemsResult)) { + + echo '<br /> + <table cellpadding="2" class="selection"> + <tr> + <th class="ascending">' . _('Code') . '</th> + <th class="ascending">' . _('Description') . '</th> + <th class="ascending">' . _('On Hand') . '</th> + <th>' . _('Units') . '</th> + </tr>'; + $k=0; //row colour counter + + while ($myrow=DB_fetch_array($StockItemsResult)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + printf('<td><input type="submit" name="SelectedStockItem" value="%s" /></td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>', + $myrow['stockid'], + $myrow['description'], + locale_number_format($myrow['qoh'],$myrow['decimalplaces']), + $myrow['units']); + + }//end of while loop + echo '</table>'; + } + //end if stock search results to show + else { + + if (!isset($_POST['StockLocation'])) { + $_POST['StockLocation'] = ''; + } + + //figure out the SQL required from the inputs available + if (isset($_POST['ClosedOrOpen']) and $_POST['ClosedOrOpen']=='Open_Only'){ + $ClosedOrOpen = ' AND workorders.closed=0'; + } elseif(isset($_POST['ClosedOrOpen']) AND $_POST['ClosedOrOpen'] == 'Closed_Only') { + $ClosedOrOpen = ' AND workorders.closed=1'; + } else { + $ClosedOrOpen = ''; + } + //start date and end date + if (!empty($_POST['DateFrom'])) { + $StartDateFrom = " AND workorders.startdate>='" . FormatDateForSQL($_POST['DateFrom']) . "'"; + } + if (!empty($_POST['DateTo'])) { + $StartDateTo = " AND workorders.startdate<='" . FormatDateForSQL($_POST['DateTo']) . "'"; + } + + if (isset($SelectedWO) AND $SelectedWO !='') { + $SQL = "SELECT workorders.wo, + woitems.stockid, + stockmaster.description, + stockmaster.decimalplaces, + woitems.qtyreqd, + woitems.qtyrecd, + workorders.requiredby, + workorders.startdate + FROM workorders + INNER JOIN woitems ON workorders.wo=woitems.wo + INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid + INNER JOIN locationusers ON locationusers.loccode=workorders.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1 + WHERE 1 " . $ClosedOrOpen . $StartDateFrom . $StartDateTo . " + AND workorders.wo='". $SelectedWO ."' + ORDER BY workorders.wo, + woitems.stockid"; + } else { + /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ + + if (isset($SelectedStockItem)) { + $SQL = "SELECT workorders.wo, + woitems.stockid, + stockmaster.description, + stockmaster.decimalplaces, + woitems.qtyreqd, + woitems.qtyrecd, + workorders.requiredby, + workorders.startdate + FROM workorders + INNER JOIN woitems ON workorders.wo=woitems.wo + INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid + INNER JOIN locationusers ON locationusers.loccode=workorders.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1 + WHERE 1 " . $ClosedOrOpen . $StartDateFrom . $StartDateTo . " + AND woitems.stockid='". $SelectedStockItem ."' + AND workorders.loccode='" . $_POST['StockLocation'] . "' + ORDER BY workorders.wo, + woitems.stockid"; + } else { + $SQL = "SELECT workorders.wo, + woitems.stockid, + stockmaster.description, + stockmaster.decimalplaces, + woitems.qtyreqd, + woitems.qtyrecd, + workorders.requiredby, + workorders.startdate + FROM workorders + INNER JOIN woitems ON workorders.wo=woitems.wo + INNER JOIN locationusers ON locationusers.loccode=workorders.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1 + INNER JOIN stockmaster ON woitems.stockid=stockmaster.stockid + WHERE 1 " . $ClosedOrOpen . $StartDateFrom . $StartDateTo ." + AND workorders.loccode='" . $_POST['StockLocation'] . "' + ORDER BY workorders.wo, + woitems.stockid"; + } + } //end not order number selected + + $ErrMsg = _('No works orders were returned by the SQL because'); + $WorkOrdersResult = DB_query($SQL,$db,$ErrMsg); + + /*show a table of the orders returned by the SQL */ + if (DB_num_rows($WorkOrdersResult)>0) { + echo '<br /> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post" id="wos"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table cellpadding="2" width="95%" class="selection"> + <tr> + <th>' . _('Select') . '</th> + <th>' . _('Modify') . '</th> + <th class="ascending">' . _('Status') . '</th> + <th>' . _('Issue To') . '</th> + <th>' . _('Receive') . '</th> + <th>' . _('Costing') . '</th> + <th>' . _('Paperwork') . '</th> + <th class="ascending">' . _('Item') . '</th> + <th class="ascending">' . _('Quantity Required') . '</th> + <th class="ascending">' . _('Quantity Received') . '</th> + <th class="ascending">' . _('Quantity Outstanding') . '</th> + <th class="ascending">' . _('Start Date') . '</th> + <th class="ascending">' . _('Required Date') . '</th> + </tr>'; + + $k=0; //row colour counter + while ($myrow=DB_fetch_array($WorkOrdersResult)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + $ModifyPage = $RootPath . '/WorkOrderEntry.php?WO=' . $myrow['wo']; + $Status_WO = $RootPath . '/WorkOrderStatus.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + $Receive_WO = $RootPath . '/WorkOrderReceive.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + $Issue_WO = $RootPath . '/WorkOrderIssue.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + $Costing_WO =$RootPath . '/WorkOrderCosting.php?WO=' .$myrow['wo']; + $Printing_WO =$RootPath . '/PDFWOPrint.php?WO=' .$myrow['wo'] . '&StockID=' . $myrow['stockid']; + + $FormatedRequiredByDate = ConvertSQLDate($myrow['requiredby']); + $FormatedStartDate = ConvertSQLDate($myrow['startdate']); + + + printf('<td><input type="checkbox" name="WO_%s" /></td> + <td><a href="%s">%s</a></td> + <td><a href="%s">' . _('Status') . '</a></td> + <td><a href="%s">' . _('Issue To') . '</a></td> + <td><a href="%s">' . _('Receive') . '</a></td> + <td><a href="%s">' . _('Costing') . '</a></td> + <td><a href="%s">' . _('Print W/O') . '</a></td> + <td>%s - %s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td>%s</td> + <td>%s</td> + </tr>', + $myrow['wo'], + $ModifyPage, + $myrow['wo'], + $Status_WO, + $Issue_WO, + $Receive_WO, + $Costing_WO, + $Printing_WO, + $myrow['stockid'], + $myrow['description'], + locale_number_format($myrow['qtyreqd'],$myrow['decimalplaces']), + locale_number_format($myrow['qtyrecd'],$myrow['decimalplaces']), + locale_number_format($myrow['qtyreqd']-$myrow['qtyrecd'],$myrow['decimalplaces']), + $FormatedStartDate, + $FormatedRequiredByDate); + //end of page full new headings if + } + //end of while loop + + echo '</table> + <div class="center"> + <input type="submit" value="' . _('Submit') . '" name="Submit" /> + </form>'; + } + } + + echo '</div> + </form>'; +} + +include('includes/footer.inc'); +?> Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2015-12-09 07:54:12 UTC (rev 7408) +++ trunk/includes/MainMenuLinksArray.php 2015-12-10 09:34:34 UTC (rev 7409) @@ -309,7 +309,8 @@ _('MRP Reschedules Required'), _('Print Product Specification'), _('Print Certificate of Analysis'), - _('Historical QA Test Results')); + _('Historical QA Test Results'), + _('Multiple Work Orders Total Cost Inquiry')); $MenuItems['manuf']['Reports']['URL'] = array( '/SelectWorkOrder.php', '/BOMInquiry.php', @@ -327,7 +328,8 @@ '/MRPReschedules.php', '/PDFProdSpec.php', '/PDFCOA.php', - '/HistoricalTestResults.php'); + '/HistoricalTestResults.php', + '/CollectiveWorkOrderCost.php'); $MenuItems['manuf']['Maintenance']['Caption'] = array( _('Work Centre'), _('Bills Of Material'), Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-12-09 07:54:12 UTC (rev 7408) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-12-10 09:34:34 UTC (rev 7409) @@ -48,6 +48,7 @@ ALTER table stockrequest DROP FOREIGN KEY `stockrequest_ibfk_3`; ALTER table stockrequest DROP FOREIGN KEY `stockrequest_ibfk_4`; +INSERT INTO scripts VALUES('CollectiveWorkOrderCost.php',2,'Multiple work orders cost review'); -- Update version number: |
From: <dai...@us...> - 2015-12-19 21:40:31
|
Revision: 7417 http://sourceforge.net/p/web-erp/reponame/7417 Author: daintree Date: 2015-12-19 21:40:28 +0000 (Sat, 19 Dec 2015) Log Message: ----------- Seach product by supplier item code Modified Paths: -------------- trunk/SelectProduct.php trunk/doc/Change.log trunk/locale/en_US.utf8/LC_MESSAGES/messages.po Modified: trunk/SelectProduct.php =================================================================== --- trunk/SelectProduct.php 2015-12-14 09:59:18 UTC (rev 7416) +++ trunk/SelectProduct.php 2015-12-19 21:40:28 UTC (rev 7417) @@ -167,26 +167,24 @@ echo '<tr> <th class="number">' . _('Price') . ':</th>'; if (DB_num_rows($PriceResult) == 0) { - echo '<td class="select" colspan="6">' . _('No Default Price Set in Home Currency') . '</td> - </tr>'; + echo '<td class="select" colspan="2">' . _('No Default Price Set') . '</td>'; $Price = 0; } else { $PriceRow = DB_fetch_row($PriceResult); $Price = $PriceRow[1]; - echo '<td class="select">' . $PriceRow[0] . '</td> - <td class="select">' . locale_number_format($Price, $_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <th class="number">' . _('Cost') . ':</th> - <td class="select">' . locale_number_format($Cost, $_SESSION['StandardCostDecimalPlaces']) . '</td> - <th class="number">' . _('Gross Profit') . ':</th> - <td class="select">'; - if ($Price > 0) { - echo locale_number_format(($Price - $Cost) * 100 / $Price, 1) . '%'; - } else { - echo _('N/A'); - } - echo '</td> - </tr>'; + echo '<td class="select" colspan="2" style="text-align:right">' . locale_number_format($Price, $_SESSION['CompanyRecord']['decimalplaces']) . '</td>'; } + echo '<th class="number">' . _('Cost') . ':</th> + <td class="select" style="text-align:right">' . locale_number_format($Cost, $_SESSION['StandardCostDecimalPlaces']) . '</td> + <th class="number">' . _('Gross Profit') . ':</th> + <td class="select" style="text-align:right">'; + if ($Price > 0) { + echo locale_number_format(($Price - $Cost) * 100 / $Price, 1) . '%'; + } else { + echo _('N/A'); + } + echo '</td> + </tr>'; } //end of if PricesSecuirty allows viewing of prices echo '</table>'; //end of first nested table // Item Category Property mod: display the item properties @@ -302,15 +300,15 @@ } echo '<tr> <th class="number" style="width:15%">' . _('Quantity On Hand') . ':</th> - <td style="width:17%" class="select">' . $QOH . '</td> - </tr>'; -echo '<tr> + <td style="width:17%; text-align:right" class="select">' . $QOH . '</td> + </tr> + <tr> <th class="number" style="width:15%">' . _('Quantity Demand') . ':</th> - <td style="width:17%" class="select">' . locale_number_format($Demand, $myrow['decimalplaces']) . '</td> - </tr>'; -echo '<tr> + <td style="width:17%; text-align:right" class="select">' . locale_number_format($Demand, $myrow['decimalplaces']) . '</td> + </tr> + <tr> <th class="number" style="width:15%">' . _('Quantity On Order') . ':</th> - <td style="width:17%" class="select">' . $QOO . '</td> + <td style="width:17%; text-align:right" class="select">' . $QOO . '</td> </tr> </table>'; //end of nested table echo '</td>'; //end cell of master table @@ -319,10 +317,10 @@ AND (in_array($SuppliersSecurity, $_SESSION['AllowedPageSecurityTokens']))){ echo '<td style="width:50%" valign="top"><table> - <tr><th style="width:50%">' . _('Supplier') . '</th> + <tr><th style="width:20%">' . _('Supplier') . '</th> + <th stlye="width:15%">' . _('Code') . '</th> <th style="width:15%">' . _('Cost') . '</th> <th style="width:5%">' . _('Curr') . '</th> - <th style="width:15%">' . _('Eff Date') . '</th> <th style="width:10%">' . _('Lead Time') . '</th> <th style="width:10%">' . _('Min Order Qty') . '</th> <th style="width:5%">' . _('Prefer') . '</th></tr>'; @@ -330,25 +328,38 @@ suppliers.currcode, suppliers.supplierid, purchdata.price, - purchdata.effectivefrom, + purchdata.suppliers_partno, purchdata.leadtime, purchdata.conversionfactor, purchdata.minorderqty, purchdata.preferred, - currencies.decimalplaces + currencies.decimalplaces, + MAX(purchdata.effectivefrom) FROM purchdata INNER JOIN suppliers ON purchdata.supplierno=suppliers.supplierid INNER JOIN currencies ON suppliers.currcode=currencies.currabrev WHERE purchdata.stockid = '" . $StockID . "' - ORDER BY purchdata.preferred DESC, purchdata.effectivefrom DESC"); + GROUP BY suppliers.suppname, + suppliers.currcode, + suppliers.supplierid, + purchdata.price, + purchdata.suppliers_partno, + purchdata.leadtime, + purchdata.conversionfactor, + purchdata.minorderqty, + purchdata.preferred, + currencies.decimalplaces + ORDER BY purchdata.preferred DESC"); + while ($SuppRow = DB_fetch_array($SuppResult)) { - echo '<tr><td class="select">' . $SuppRow['suppname'] . '</td> - <td class="select">' . locale_number_format($SuppRow['price'] / $SuppRow['conversionfactor'], $SuppRow['decimalplaces']) . '</td> - <td class="select">' . $SuppRow['currcode'] . '</td> - <td class="select">' . ConvertSQLDate($SuppRow['effectivefrom']) . '</td> - <td class="select">' . $SuppRow['leadtime'] . '</td> - <td class="select">' . $SuppRow['minorderqty'] . '</td>'; + echo '<tr> + <td class="select">' . $SuppRow['suppname'] . '</td> + <td class="select">' . $SuppRow['suppliers_partno'] . '</td> + <td class="select" style="text-align:right">' . locale_number_format($SuppRow['price'] / $SuppRow['conversionfactor'], $SuppRow['decimalplaces']) . '</td> + <td class="select">' . $SuppRow['currcode'] . '</td> + <td class="select" style="text-align:right">' . $SuppRow['leadtime'] . '</td> + <td class="select" style="text-align:right">' . $SuppRow['minorderqty'] . '</td>'; if ($SuppRow['preferred']==1) { //then this is the preferred supplier echo '<td class="select">' . _('Yes') . '</td>'; @@ -362,13 +373,18 @@ echo '</table>'; DB_data_seek($result, 0); } -echo '</td></tr></table><br />'; // end first item details table -echo '<table width="90%"><tr> - <th style="width:33%">' . _('Item Inquiries') . '</th> - <th style="width:33%">' . _('Item Transactions') . '</th> - <th style="width:33%">' . _('Item Maintenance') . '</th> - </tr>'; -echo '<tr><td valign="top" class="select">'; +echo '</td> + </tr> + </table> + <br />'; // end first item details table +echo '<table width="90%"> + <tr> + <th style="width:33%">' . _('Item Inquiries') . '</th> + <th style="width:33%">' . _('Item Transactions') . '</th> + <th style="width:33%">' . _('Item Maintenance') . '</th> + </tr> + <tr> + <td valign="top" class="select">'; /*Stock Inquiry Options */ echo '<a href="' . $RootPath . '/StockMovements.php?StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a><br />'; if ($Its_A_Kitset_Assembly_Or_Dummy == False) { @@ -525,14 +541,26 @@ } else { echo '<input type="text" autofocus="autofocus" name="Keywords" title="' . _('Enter text that you wish to search for in the item description') . '" size="20" maxlength="25" />'; } -echo '</td></tr><tr><td></td>'; -echo '<td><b>' . _('OR') . ' ' . '</b>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td>'; -echo '<td>'; +echo '</td> + </tr> + <tr> + <td></td> + <td><b>' . _('OR') . ' ' . '</b>' . _('Enter partial') . ' <b>' . _('Stock Code') . '</b>:</td> + <td>'; if (isset($_POST['StockCode'])) { echo '<input type="text" name="StockCode" value="' . $_POST['StockCode'] . '" title="' . _('Enter text that you wish to search for in the item code') . '" size="15" maxlength="18" />'; } else { echo '<input type="text" name="StockCode" title="' . _('Enter text that you wish to search for in the item code') . '" size="15" maxlength="18" />'; } +echo '<tr> + <td></td> + <td><b>' . _('OR') . ' ' . '</b>' . _('Enter partial') . ' <b>' . _('Supplier Code') . '</b>:</td> + <td>'; +if (isset($_POST['SupplierStockCode'])) { + echo '<input type="text" name="SupplierStockCode" value="' . $_POST['SupplierStockCode'] . '" title="' . _('Enter text that you wish to search for in the supplier\'s item code') . '" size="15" maxlength="18" />'; +} else { + echo '<input type="text" name="SupplierStockCode" title="' . _('Enter text that you wish to search for in the supplier\'s item code') . '" size="15" maxlength="18" />'; +} echo '</td></tr></table><br />'; echo '<div class="centre"><input type="submit" name="Search" value="' . _('Search Now') . '" /></div><br />'; echo '</div> @@ -549,7 +577,7 @@ if ($_POST['Keywords'] AND $_POST['StockCode']) { prnMsg (_('Stock description keywords have been used in preference to the Stock code extract entered'), 'info'); } - if ($_POST['Keywords']) { + if (isset($_POST['Keywords']) AND mb_strlen($_POST['Keywords'])>0) { //insert wildcard characters in spaces $_POST['Keywords'] = mb_strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; @@ -597,7 +625,7 @@ stockmaster.decimalplaces ORDER BY stockmaster.discontinued, stockmaster.stockid"; } - } elseif (isset($_POST['StockCode'])) { + } elseif (isset($_POST['StockCode']) AND mb_strlen($_POST['StockCode'])>0) { $_POST['StockCode'] = mb_strtoupper($_POST['StockCode']); if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, @@ -643,7 +671,7 @@ stockmaster.decimalplaces ORDER BY stockmaster.discontinued, stockmaster.stockid"; } - } elseif (!isset($_POST['StockCode']) AND !isset($_POST['Keywords'])) { + } elseif (isset($_POST['SupplierStockCode']) AND mb_strlen($_POST['SupplierStockCode'])>0) { if ($_POST['StockCat'] == 'All') { $SQL = "SELECT stockmaster.stockid, stockmaster.description, @@ -654,7 +682,57 @@ stockmaster.units, stockmaster.decimalplaces FROM stockmaster + INNER JOIN purchdata + ON stockmaster.stockid=purchdata.stockid + INNER JOIN locstock + ON stockmaster.stockid=locstock.stockid LEFT JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE purchdata.suppliers_partno " . LIKE . " '%" . $_POST['SupplierStockCode'] . "%' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.longdescription, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.discontinued, stockmaster.stockid"; + } else { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.longdescription, + stockmaster.mbflag, + stockmaster.discontinued, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN locstock + ON stockmaster.stockid=locstock.stockid + INNER JOIN purchdata + ON stockmaster.stockid=purchdata.stockid + WHERE categoryid='" . $_POST['StockCat'] . "' + AND purchdata.suppliers_partno " . LIKE . " '%" . $_POST['SupplierStockCode'] . "%' + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.longdescription, + stockmaster.units, + stockmaster.mbflag, + stockmaster.discontinued, + stockmaster.decimalplaces + ORDER BY stockmaster.discontinued, stockmaster.stockid"; + } + } else { + if ($_POST['StockCat'] == 'All') { + $SQL = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.longdescription, + stockmaster.mbflag, + stockmaster.discontinued, + SUM(locstock.quantity) AS qoh, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster + LEFT JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid, locstock WHERE stockmaster.stockid=locstock.stockid Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-12-14 09:59:18 UTC (rev 7416) +++ trunk/doc/Change.log 2015-12-19 21:40:28 UTC (rev 7417) @@ -1,6 +1,7 @@ webERP Change Log -14/12/15 Exson: Remove retrieving allocated data in Z_AutoCustomerAllocations.php. +20/12/15 Phil: SelectProduct.php now allows items to be searched based on the supplier's item code +14/12/15 Exson: Remove retrieving allocated data in Z_AutoCustomerAllocations.php. 11/12/15 Exson: Fixed the default Transaction Disable bug to enable for CustomerBranches.php. 10/12/15 Exson: Add invoice no while reprint GRN in ReprintGRN.php. 10/12/15 Exson: Add multiple work orders total cost inquiry script. Modified: trunk/locale/en_US.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/en_US.utf8/LC_MESSAGES/messages.po 2015-12-14 09:59:18 UTC (rev 7416) +++ trunk/locale/en_US.utf8/LC_MESSAGES/messages.po 2015-12-19 21:40:28 UTC (rev 7417) @@ -5537,7 +5537,7 @@ #: includes/PDFSuppTransListingPageHeader.inc:48 #: includes/PDFSupplierBalsPageHeader.inc:33 msgid "Supplier" -msgstr "" +msgstr "Vendor" #: ContractCosting.php:180 SuppContractChgs.php:81 msgid "Anticipated" @@ -11620,7 +11620,7 @@ #: EDIProcessOrders.php:437 msgid "This implies that the EDI message is for some other supplier" -msgstr "" +msgstr "This implies that the EDI message is for some other vendor" #: EDIProcessOrders.php:437 msgid "No further processing will be done" @@ -15560,7 +15560,7 @@ #: InventoryPlanningPrefSupplier.php:126 InventoryPlanningPrefSupplier.php:128 msgid "Inventory Planning Based On Lead Time Of Preferred Supplier" -msgstr "" +msgstr "Inventory Planning Based On Lead Time Of Preferred Vendor" #: InventoryPlanningPrefSupplier.php:350 msgid "Nil" @@ -19832,7 +19832,7 @@ #: PO_Header.php:534 msgid "Purchase Order: Select Supplier" -msgstr "" +msgstr "Purchase Order: Select Vendor" #: PO_Header.php:545 msgid "Enter text in the supplier name" |
From: <dai...@us...> - 2015-12-20 00:49:19
|
Revision: 7418 http://sourceforge.net/p/web-erp/reponame/7418 Author: daintree Date: 2015-12-20 00:49:16 +0000 (Sun, 20 Dec 2015) Log Message: ----------- Show supplier item code when receiving goods Modified Paths: -------------- trunk/GoodsReceived.php trunk/doc/Change.log Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2015-12-19 21:40:28 UTC (rev 7417) +++ trunk/GoodsReceived.php 2015-12-20 00:49:16 UTC (rev 7418) @@ -118,6 +118,7 @@ </tr> <tr> <th>' . _('Item Code') . '</th> + <th>' . _('Supplier') . '<br />'. _('Item') . '</th> <th>' . _('Description') . '</th> <th>' . _('Quantity') . '<br />' . _('Ordered') . '</th> <th>' . _('Units') . '</th> @@ -183,6 +184,7 @@ //Now Display LineItem echo '<td><a href="' . $RootPath . '/' . $_SESSION['part_pics_dir'] . '/' . $LnItm->StockID . '.jpg" target="_blank">' . $LnItm->StockID . '</a></td> + <td>' . $LnItm->Suppliers_PartNo . '</td> <td>' . $LnItm->ItemDescription . '</td> <td class="number">' . $DisplaySupplierQtyOrd . '</td> <td>' . $LnItm->SuppliersUnit . '</td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-12-19 21:40:28 UTC (rev 7417) +++ trunk/doc/Change.log 2015-12-20 00:49:16 UTC (rev 7418) @@ -1,5 +1,6 @@ webERP Change Log +20/12/15 Phil: GoodsReceived.php now shows the supplier's item code as well 20/12/15 Phil: SelectProduct.php now allows items to be searched based on the supplier's item code 14/12/15 Exson: Remove retrieving allocated data in Z_AutoCustomerAllocations.php. 11/12/15 Exson: Fixed the default Transaction Disable bug to enable for CustomerBranches.php. |
From: <rc...@us...> - 2015-12-27 19:59:12
|
Revision: 7427 http://sourceforge.net/p/web-erp/reponame/7427 Author: rchacon Date: 2015-12-27 19:59:10 +0000 (Sun, 27 Dec 2015) Log Message: ----------- On UserGLAccounts.php: Fix script name; add $ViewTopic and $BookMark; improve $SelectedUser validation; improve page_title_text; improve select user; regroup modify access permission code (improve logic); add classes to table elements; transalate database "0" and "1" to human "No" and "Yes"; simplify and tide code; modify prnMsg from multiple part sentence to one part sentence (better to trasnlate when language use a different gramar structrure fron English); add "Print This", "Select A Different User" and "Return" buttons. Add info to ManualGeneralLedger.html. Modified Paths: -------------- trunk/UserGLAccounts.php trunk/doc/Change.log trunk/doc/Manual/ManualGeneralLedger.html Modified: trunk/UserGLAccounts.php =================================================================== --- trunk/UserGLAccounts.php 2015-12-26 10:39:10 UTC (rev 7426) +++ trunk/UserGLAccounts.php 2015-12-27 19:59:10 UTC (rev 7427) @@ -1,262 +1,259 @@ <?php -/* $Id: glaccountusers.php 6806 2013-09-28 05:10:46Z daintree $*/ +/* $Id: UserGLAccounts.php 6806 2013-09-28 05:10:46Z daintree $*/ +/* Maintenance of GL Accounts allowed for a user. */ include('includes/session.inc'); -$Title = _('User Authorised GL Accounts Maintenance'); +$Title = _('User Authorised GL Accounts'); +$ViewTopic = 'GeneralLedger'; +$BookMark = 'UserGLAccounts'; include('includes/header.inc'); -echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/money_add.png" title="' . _('User Authorised GL Accounts') . '" alt="" />' . ' ' . $Title . '</p>'; +if(isset($_POST['SelectedUser']) and $_POST['SelectedUser']<>'') {//If POST not empty: + $SelectedUser = mb_strtoupper($_POST['SelectedUser']); +} elseif(isset($_GET['SelectedUser']) and $_GET['SelectedUser']<>'') {//If GET not empty: + $SelectedUser = mb_strtoupper($_GET['SelectedUser']); +} else {// Unset empty SelectedUser: + unset($_GET['SelectedUser']); + unset($_POST['SelectedUser']); + unset($SelectedUser); +} -if (isset($_POST['SelectedGLAccount'])) { +if(isset($_POST['SelectedGLAccount'])) { $SelectedGLAccount = mb_strtoupper($_POST['SelectedGLAccount']); -} elseif (isset($_GET['SelectedGLAccount'])) { +} elseif(isset($_GET['SelectedGLAccount'])) { $SelectedGLAccount = mb_strtoupper($_GET['SelectedGLAccount']); } else { $SelectedGLAccount = ''; +/* unset($SelectedGLAccount);*/ } -if (isset($_POST['SelectedUser'])) { - $SelectedUser = mb_strtoupper($_POST['SelectedUser']); -} elseif (isset($_GET['SelectedUser'])) { - $SelectedUser = mb_strtoupper($_GET['SelectedUser']); -} - -if (isset($_POST['Cancel'])) { +if(isset($_GET['Cancel']) or isset($_POST['Cancel'])) { unset($SelectedUser); unset($SelectedGLAccount); } -if (isset($_POST['Process'])) { - if ($_POST['SelectedUser'] == '') { - prnMsg(_('You have not selected any User'), 'error'); - echo '<br />'; - unset($SelectedUser); - unset($_POST['SelectedUser']); - } -} +if(!isset($SelectedUser)) {// If is NOT set a user for GL accounts. + echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" title="',// Icon image. + _('User Authorised GL Accounts'), '" /> ',// Icon title. + _('User Authorised GL Accounts'), '</p>';// Page title. -if (isset($_POST['submit'])) { + /* It could still be the second time the page has been run and a record has been selected for modification - SelectedGLAccount will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true. These will call the same page again and allow update/input or deletion of the records.*/ - $InputError = 0; - - if ($_POST['SelectedGLAccount'] == '') { - $InputError = 1; - prnMsg(_('You have not selected an GL Account to be authorised for this user'), 'error'); - echo '<br />'; - unset($SelectedUser); + if(isset($_POST['Process'])) { + prnMsg(_('You have not selected any user'), 'error'); } - - if ($InputError != 1) { - - // First check the user is not being duplicated - - $CheckSql = "SELECT count(*) - FROM glaccountusers - WHERE accountcode= '" . $_POST['SelectedGLAccount'] . "' - AND userid = '" . $_POST['SelectedUser'] . "'"; - - $CheckResult = DB_query($CheckSql); - $CheckRow = DB_fetch_row($CheckResult); - - if ($CheckRow[0] > 0) { - $InputError = 1; - prnMsg(_('The GL Account') . ' ' . $_POST['SelectedGLAccount'] . ' ' . _('is already authorised for this user'), 'error'); - } else { - // Add new record on submit - $SQL = "INSERT INTO glaccountusers (accountcode, - userid, - canview, - canupd) - VALUES ('" . $_POST['SelectedGLAccount'] . "', - '" . $_POST['SelectedUser'] . "', - '1', - '1')"; - - $msg = _('User') . ': ' . $_POST['SelectedUser'] . ' ' . _('authority to use the') . ' ' . $_POST['SelectedGLAccount'] . ' ' . _('GL Account has been changed'); - $Result = DB_query($SQL); - prnMsg($msg, 'success'); - unset($_POST['SelectedGLAccount']); - } - } -} elseif (isset($_GET['delete'])) { - $SQL = "DELETE FROM glaccountusers - WHERE accountcode='" . $SelectedGLAccount . "' - AND userid='" . $SelectedUser . "'"; - - $ErrMsg = _('The GL Account user record could not be deleted because'); - $Result = DB_query($SQL, $ErrMsg); - prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to use the') . ' ' . $SelectedGLAccount . ' ' . _('GL Account removed'), 'success'); - unset($_GET['delete']); -} elseif (isset($_GET['ToggleUpdate'])) { - $SQL = "UPDATE glaccountusers - SET canupd='" . $_GET['ToggleUpdate'] . "' - WHERE accountcode='" . $SelectedGLAccount . "' - AND userid='" . $SelectedUser . "'"; - - $ErrMsg = _('The GL Account user record could not be deleted because'); - $Result = DB_query($SQL, $ErrMsg); - prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to update') . ' ' . $SelectedGLAccount . ' ' . _('GL Account removed'), 'success'); - unset($_GET['ToggleUpdate']); -} - -if (!isset($SelectedUser)) { - - /* It could still be the second time the page has been run and a record has been selected for modification - SelectedGLAccount will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters - then none of the above are true. These will call the same page again and allow update/input or deletion of the records*/ - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <table class="selection"> + echo '<br />', + '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', + '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', + '<table class="selection"> <tr> - <td>' . _('Select User') . ':</td> - <td><select name="SelectedUser">'; - - $Result = DB_query("SELECT userid, - realname - FROM www_users - ORDER BY userid"); - - echo '<option value="">' . _('Not Yet Selected') . '</option>'; + <td>', _('Select User'), ':</td> + <td><select name="SelectedUser" onchange="this.form.submit()">',// Submit when the value of the select is changed. + '<option value="">', _('Not Yet Selected'), '</option>'; + $Result = DB_query(" + SELECT + userid, + realname + FROM www_users + ORDER BY userid"); while ($MyRow = DB_fetch_array($Result)) { - if (isset($SelectedUser) and $MyRow['userid'] == $SelectedUser) { - echo '<option selected="selected" value="'; - } else { - echo '<option value="'; + echo '<option '; + if(isset($SelectedUser) and $MyRow['userid'] == $SelectedUser) { + echo 'selected="selected" '; } - echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>'; + echo 'value="', $MyRow['userid'], '">', $MyRow['userid'], ' - ', $MyRow['realname'], '</option>'; + }// End while loop. + echo '</select></td> + </tr> + </table>';//Close Select_User table. - } //end while loop - - echo '</select></td></tr>'; - - echo '</table>'; // close main table DB_free_result($Result); - echo '<div class="centre"> - <input type="submit" name="Process" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> - </div>'; + echo '<div class="centre noprint">',// Form buttons: + '<button name="Process" type="submit" value="Accept"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/user.png" /> ', _('Accept'), '</button> '; // "Accept" button. - echo '</form>'; - -} - -//end of ifs and buts! -if (isset($_POST['process']) or isset($SelectedUser)) { - $SQLName = "SELECT realname - FROM www_users - WHERE userid='" . $SelectedUser . "'"; - $Result = DB_query($SQLName); +} else {// If is set a user for GL accounts ($SelectedUser). + $Result = DB_query(" + SELECT realname + FROM www_users + WHERE userid='" . $SelectedUser . "'"); $MyRow = DB_fetch_array($Result); $SelectedUserName = $MyRow['realname']; + echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" title="',// Icon image. + _('User Authorised GL Accounts'), '" /> ',// Icon title. + _('Authorised GL Accounts for'), ' ', $SelectedUserName, '</p>';// Page title. - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Authorised GL Accounts for') . ' ' . $SelectedUserName . '</a></div> - <form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />'; +// BEGIN: Needs $SelectedUser, $SelectedGLAccount: + if (isset($_POST['submit'])) { + $InputError = 0; + if ($_POST['SelectedGLAccount'] == '') { + $InputError = 1; + prnMsg(_('You have not selected an GL Account to be authorised for this user'), 'error'); + unset($SelectedGLAccount); + } + if ($InputError != 1) { + // First check the user is not being duplicated + $CheckResult = DB_query(" + SELECT count(*) + FROM glaccountusers + WHERE accountcode= '" . $_POST['SelectedGLAccount'] . "' + AND userid = '" . $SelectedUser . "'"); + $CheckRow = DB_fetch_row($CheckResult); + if ($CheckRow[0] > 0) { + $InputError = 1; + prnMsg(_('The GL Account') . ' ' . $SelectedGLAccount . ' ' . _('is already authorised for this user'), 'error'); + } else { + // Add new record on submit + $SQL = "INSERT INTO glaccountusers (accountcode, + userid, + canview, + canupd) + VALUES ('" . $SelectedGLAccount . "', + '" . $SelectedUser . "', + '1', + '1')"; + $Result = DB_query($SQL); + prnMsg(_('An access permission to a GL account was added') . '. ' . _('User') . ': ' . $SelectedUser . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '.', 'success'); + unset($_POST['SelectedGLAccount']); + } + } + } elseif(isset($_GET['delete']) or isset($_POST['delete'])) { + $SQL = "DELETE FROM glaccountusers + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + $ErrMsg = _('The GL Account user record could not be deleted because'); + $Result = DB_query($SQL, $ErrMsg); + prnMsg(_('An access permission to a GL account was removed') . '. ' . _('User') . ': ' . $SelectedUser . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '.', 'success'); + unset($_GET['delete']); + unset($_POST['delete']); + } elseif(isset($_GET['ToggleUpdate']) or isset($_POST['ToggleUpdate'])) {// Can update (write) GL accounts flag. + if(isset($_GET['ToggleUpdate']) and $_GET['ToggleUpdate']<>'') {//If GET not empty. + $ToggleUpdate = $_GET['ToggleUpdate']; + } elseif(isset($_POST['ToggleUpdate']) and $_POST['ToggleUpdate']<>'') {//If POST not empty. + $ToggleUpdate = $_POST['ToggleUpdate']; + } + $SQL = "UPDATE glaccountusers + SET canupd='" . $ToggleUpdate . "' + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + $ErrMsg = _('The GL Account user record could not be updated because'); + $Result = DB_query($SQL, $ErrMsg); + prnMsg(_('The access permission to update a GL account was modified') . '. ' . _('User') . ': ' . $SelectedUser . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '.', 'success'); + unset($_GET['ToggleUpdate']); + unset($_POST['ToggleUpdate']); + } +// END: Needs $SelectedUser, $SelectedGLAccount. - $SQL = "SELECT glaccountusers.accountcode, - canview, - canupd, - chartmaster.accountname - FROM glaccountusers INNER JOIN chartmaster - ON glaccountusers.accountcode=chartmaster.accountcode - WHERE glaccountusers.userid='" . $SelectedUser . "' - ORDER BY chartmaster.accountcode ASC"; + echo '<table class="selection"> + <thead> + <tr> + <th class="text">', _('Code'), '</th> + <th class="text">', _('Name'), '</th> + <th class="centre">', _('View'), '</th> + <th class="centre">', _('Update'), '</th> + <th class="noprint" colspan="2"> </th> + </tr> + </thead><tbody>'; + $Result = DB_query(" + SELECT + glaccountusers.accountcode, + canview, + canupd, + chartmaster.accountname + FROM glaccountusers INNER JOIN chartmaster + ON glaccountusers.accountcode=chartmaster.accountcode + WHERE glaccountusers.userid='" . $SelectedUser . "' + ORDER BY chartmaster.accountcode ASC"); - $Result = DB_query($SQL); - - echo '<table class="selection">'; - echo '<tr> - <th colspan="6"><h3>' . _('Authorised GL Accounts for User') . ': ' . $SelectedUserName . '</h3></th> - </tr>'; - echo '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Name') . '</th> - <th>' . _('View') . '</th> - <th>' . _('Update') . '</th> - </tr>'; - $k = 0; //row colour counter while ($MyRow = DB_fetch_array($Result)) { - if ($k == 1) { + if($k == 1) { echo '<tr class="EvenTableRows">'; $k = 0; } else { echo '<tr class="OddTableRows">'; $k = 1; } + echo '<td class="text">', $MyRow['accountcode'], '</td> + <td class="text">', $MyRow['accountname'], '</td> + <td class="centre">'; + if($MyRow['canview'] == 1) { + echo _('Yes'); + } else { + echo _('No'); + } + echo '</td> + <td class="centre">'; - if ($MyRow['canupd'] == 1) { - $ToggleText = '<td><a href="%s?SelectedGLAccount=%s&ToggleUpdate=0&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to remove Update for this GL Account?') . '\');">' . _('Remove Update') . '</a></td>'; + $ScriptName = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'); + if($MyRow['canupd'] == 1) { + echo _('Yes'), '</td> + <td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=0" onclick="return confirm(\'', _('Are you sure you wish to remove Update for this GL Account?'), '\');">', _('Remove Update'); } else { - $ToggleText = '<td><a href="%s?SelectedGLAccount=%s&ToggleUpdate=1&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to add Update for this GL Account?') . '\');">' . _('Add Update') . '</a></td>'; + echo _('No'), '</td> + <td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=1" onclick="return confirm(\'', _('Are you sure you wish to add Update for this GL Account?'), '\');">', _('Add Update'); } - - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td>' . - $ToggleText . ' - <td><a href="%s?SelectedGLAccount=%s&delete=yes&SelectedUser=' . $SelectedUser . '" onclick="return confirm(\'' . _('Are you sure you wish to un-authorise this GL Account?') . '\');">' . _('Un-authorise') . '</a></td> - </tr>', - $MyRow['accountcode'], - $MyRow['accountname'], - $MyRow['canview'], - $MyRow['canupd'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $MyRow['accountcode'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $MyRow['accountcode']); - } - //END WHILE LIST LOOP - echo '</table>'; - - if (!isset($_GET['delete'])) { - - - echo '<table class="selection">'; //Main table - - echo '<tr> - <td>' . _('Select GL Account') . ':</td> + echo '</a></td> + <td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&delete=yes" onclick="return confirm(\'', _('Are you sure you wish to un-authorise this GL Account?'), '\');">', _('Un-authorise'), '</a></td> + </tr>'; + }// End while list loop. + echo '</tbody></table>', + '<br />', + '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', + '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', + '<input name="SelectedUser" type="hidden" value="', $SelectedUser, '" />', + '<br /> + <table class="selection noprint"> + <tr> + <td>'; + $Result = DB_query(" + SELECT + accountcode, + accountname + FROM chartmaster + WHERE NOT EXISTS (SELECT glaccountusers.accountcode + FROM glaccountusers + WHERE glaccountusers.userid='" . $SelectedUser . "' + AND glaccountusers.accountcode=chartmaster.accountcode) + ORDER BY accountcode"); + if(DB_num_rows($Result)>0) {// If the user does not have access permissions to one or more GL accounts: + echo _('Add access permissions to a GL account'), ':</td> <td><select name="SelectedGLAccount">'; - - $Result = DB_query("SELECT accountcode, - accountname - FROM chartmaster - WHERE NOT EXISTS (SELECT glaccountusers.accountcode - FROM glaccountusers - WHERE glaccountusers.userid='" . $SelectedUser . "' - AND glaccountusers.accountcode=chartmaster.accountcode) - ORDER BY accountcode"); - - if (!isset($_POST['SelectedGLAccount'])) { - echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>'; + if(!isset($_POST['SelectedGLAccount'])) { + echo '<option selected="selected" value="">', _('Not Yet Selected'), '</option>'; } while ($MyRow = DB_fetch_array($Result)) { - if (isset($_POST['SelectedGLAccount']) and $MyRow['accountcode'] == $_POST['SelectedGLAccount']) { + if(isset($_POST['SelectedGLAccount']) and $MyRow['accountcode'] == $_POST['SelectedGLAccount']) { echo '<option selected="selected" value="'; } else { echo '<option value="'; } - echo $MyRow['accountcode'] . '">' . $MyRow['accountcode'] .' - '. $MyRow['accountname'] . '</option>'; - - } //end while loop - - echo '</select> - </td> - </tr> - </table>'; // close main table - DB_free_result($Result); - - echo '<div class="centre"> - <input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> - </div> - </form>'; - - } // end if user wish to delete + echo $MyRow['accountcode'], '">', $MyRow['accountcode'], ' - ', $MyRow['accountname'], '</option>'; + } + echo '</select></td> + <td><input type="submit" name="submit" value="Accept" />'; + } else {// If the user has access permissions to all GL accounts: + echo _('User has access permissions to all GL accounts'); + } + echo '</td> + </tr> + </table>'; + DB_free_result($Result); + echo '<br>', // Form buttons: + '<div class="centre noprint">', + '<button onclick="javascript:window.print()" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/printer.png" /> ', _('Print This'), '</button>', // "Print This" button. + '<button formaction="UserGLAccounts.php?Cancel" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/user.png" /> ', _('Select A Different User'), '</button>'; // "Select A Different User" button. } +echo '<button formaction="index.php?Application=GL" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button. + '</div> + </form>'; include('includes/footer.inc'); ?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-12-26 10:39:10 UTC (rev 7426) +++ trunk/doc/Change.log 2015-12-27 19:59:10 UTC (rev 7427) @@ -1,5 +1,6 @@ webERP Change Log +27/12/15 RChacon: On UserGLAccounts.php: Fix script name; add $ViewTopic and $BookMark; improve $SelectedUser validation; improve page_title_text; improve select user; regroup modify access permission code (improve logic); add classes to table elements; transalate database "0" and "1" to human "No" and "Yes"; simplify and tide code; modify prnMsg from multiple part sentence to one part sentence (better to trasnlate when language use a different gramar structrure fron English); add "Print This", "Select A Different User" and "Return" buttons. Add info to ManualGeneralLedger.html. 26/12/2015 Exson: Add items not received information on outstanding po inquiry screen in PO_SelectOSPurchOrder.php. 24/12/15 Exson: Add supplier no as a option for supplier transaction inquiry in SupplierTransInquiry.php. 24/12/15 Exson: Add width of printed text to make day to appear in PDFOstdgGRNsPageHeader.inc. Modified: trunk/doc/Manual/ManualGeneralLedger.html =================================================================== --- trunk/doc/Manual/ManualGeneralLedger.html 2015-12-26 10:39:10 UTC (rev 7426) +++ trunk/doc/Manual/ManualGeneralLedger.html 2015-12-27 19:59:10 UTC (rev 7427) @@ -400,3 +400,28 @@ <p>The report will be run as a pdf file for printing, emailing, archiving etc.</P> </li> </ul> + + + +<div class="floatright"><a class="minitext" href="#top">⬆ Top</a></div> +<h2>Maintenance</h2> + +<!--h3><a id="GLAccountUsers">GL Accounts Authorised Users</a></h3> +<p>.</p--> + +<h3><a id="UserGLAccounts">User Authorised GL Accounts</a></h3> +<p>This software has methods to assign permissions or access rights to specific users and groups of users. The system controls the ability of the users to view or make changes to the contents of the GL accounts.</p> +<p>With this script, you can change a specific user access permissions to GL accounts:</p> +<ul> +<li>You can add or remove the read permission for each GL account that grants or denies the ability of a user to view it.</li> +<li>You can add or remove the write permission for each GL account that grants or denies the ability of a user to update it.</li> +</ul> + +<!--h3><a id="BankAccounts.php">Bank Accounts</a></h3> +<p>.</p--> + +<!--h3><a id="BankAccountUsers.php">Bank Account Authorized Users</a></h3> +<p>.</p--> + +<!--h3><a id="UserBankAccounts.php">User Authorized Bank Accounts</a></h3> +<p>.</p--> |
From: <rc...@us...> - 2015-12-27 20:11:46
|
Revision: 7428 http://sourceforge.net/p/web-erp/reponame/7428 Author: rchacon Date: 2015-12-27 20:11:43 +0000 (Sun, 27 Dec 2015) Log Message: ----------- Modified Paths: -------------- trunk/UserGLAccounts.php trunk/doc/Change.log Modified: trunk/UserGLAccounts.php =================================================================== --- trunk/UserGLAccounts.php 2015-12-27 19:59:10 UTC (rev 7427) +++ trunk/UserGLAccounts.php 2015-12-27 20:11:43 UTC (rev 7428) @@ -1,5 +1,5 @@ <?php -/* $Id: UserGLAccounts.php 6806 2013-09-28 05:10:46Z daintree $*/ +/* $Id: UserGLAccounts.php 7427 2015-12-27 19:59:10Z rchacon $*/ /* Maintenance of GL Accounts allowed for a user. */ include('includes/session.inc'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-12-27 19:59:10 UTC (rev 7427) +++ trunk/doc/Change.log 2015-12-27 20:11:43 UTC (rev 7428) @@ -1,6 +1,6 @@ webERP Change Log -27/12/15 RChacon: On UserGLAccounts.php: Fix script name; add $ViewTopic and $BookMark; improve $SelectedUser validation; improve page_title_text; improve select user; regroup modify access permission code (improve logic); add classes to table elements; transalate database "0" and "1" to human "No" and "Yes"; simplify and tide code; modify prnMsg from multiple part sentence to one part sentence (better to trasnlate when language use a different gramar structrure fron English); add "Print This", "Select A Different User" and "Return" buttons. Add info to ManualGeneralLedger.html. +27/12/15 RChacon: On UserGLAccounts.php: Fix script name; add $ViewTopic and $BookMark; improve $SelectedUser validation; improve page_title_text; improve select user; regroup modify access permission code (improve logic); add classes to table elements; translate database "0" and "1" to human "No" and "Yes"; simplify and tide code; modify prnMsg from multiple part sentence to one part sentence (better to translate when language use a different grammar structure from English); add "Print This", "Select A Different User" and "Return" buttons. Add info to ManualGeneralLedger.html. 26/12/2015 Exson: Add items not received information on outstanding po inquiry screen in PO_SelectOSPurchOrder.php. 24/12/15 Exson: Add supplier no as a option for supplier transaction inquiry in SupplierTransInquiry.php. 24/12/15 Exson: Add width of printed text to make day to appear in PDFOstdgGRNsPageHeader.inc. |
From: <rc...@us...> - 2015-12-28 02:56:25
|
Revision: 7430 http://sourceforge.net/p/web-erp/reponame/7430 Author: rchacon Date: 2015-12-28 02:56:23 +0000 (Mon, 28 Dec 2015) Log Message: ----------- In UserGLAccounts.php, add warning if the user does not have access permissions to GL accounts. Modified Paths: -------------- trunk/UserGLAccounts.php trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po Modified: trunk/UserGLAccounts.php =================================================================== --- trunk/UserGLAccounts.php 2015-12-27 20:33:43 UTC (rev 7429) +++ trunk/UserGLAccounts.php 2015-12-28 02:56:23 UTC (rev 7430) @@ -43,8 +43,7 @@ if(isset($_POST['Process'])) { prnMsg(_('You have not selected any user'), 'error'); } - echo '<br />', - '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', + echo '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', '<table class="selection"> <tr> @@ -167,40 +166,42 @@ ON glaccountusers.accountcode=chartmaster.accountcode WHERE glaccountusers.userid='" . $SelectedUser . "' ORDER BY chartmaster.accountcode ASC"); + if(DB_num_rows($Result)>0) {// If the user has access permissions to one or more GL accounts: + $k = 0; //row colour counter + while ($MyRow = DB_fetch_array($Result)) { + if($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k = 1; + } + echo '<td class="text">', $MyRow['accountcode'], '</td> + <td class="text">', $MyRow['accountname'], '</td> + <td class="centre">'; + if($MyRow['canview'] == 1) { + echo _('Yes'); + } else { + echo _('No'); + } + echo '</td> + <td class="centre">'; - $k = 0; //row colour counter - - while ($MyRow = DB_fetch_array($Result)) { - if($k == 1) { - echo '<tr class="EvenTableRows">'; - $k = 0; - } else { - echo '<tr class="OddTableRows">'; - $k = 1; - } - echo '<td class="text">', $MyRow['accountcode'], '</td> - <td class="text">', $MyRow['accountname'], '</td> - <td class="centre">'; - if($MyRow['canview'] == 1) { - echo _('Yes'); - } else { - echo _('No'); - } - echo '</td> - <td class="centre">'; - - $ScriptName = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'); - if($MyRow['canupd'] == 1) { - echo _('Yes'), '</td> - <td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=0" onclick="return confirm(\'', _('Are you sure you wish to remove Update for this GL Account?'), '\');">', _('Remove Update'); - } else { - echo _('No'), '</td> - <td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=1" onclick="return confirm(\'', _('Are you sure you wish to add Update for this GL Account?'), '\');">', _('Add Update'); - } - echo '</a></td> - <td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&delete=yes" onclick="return confirm(\'', _('Are you sure you wish to un-authorise this GL Account?'), '\');">', _('Un-authorise'), '</a></td> - </tr>'; - }// End while list loop. + $ScriptName = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'); + if($MyRow['canupd'] == 1) { + echo _('Yes'), '</td>', + '<td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=0" onclick="return confirm(\'', _('Are you sure you wish to remove Update for this GL Account?'), '\');">', _('Remove Update'); + } else { + echo _('No'), '</td>', + '<td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=1" onclick="return confirm(\'', _('Are you sure you wish to add Update for this GL Account?'), '\');">', _('Add Update'); + } + echo '</a></td>', + '<td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&delete=yes" onclick="return confirm(\'', _('Are you sure you wish to un-authorise this GL Account?'), '\');">', _('Un-authorise'), '</a></td>', + '</tr>'; + }// End while list loop. + } else {// If the user does not have access permissions to GL accounts: + echo '<tr><td class="centre" colspan="6">', _('User does not have access permissions to GL accounts'), '</td></tr>'; + } echo '</tbody></table>', '<br />', '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2015-12-27 20:33:43 UTC (rev 7429) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2015-12-28 02:56:23 UTC (rev 7430) @@ -8,7 +8,7 @@ "Project-Id-Version: webERP 4.12.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-09-14 09:07-0600\n" -"PO-Revision-Date: 2015-09-21 09:50-0600\n" +"PO-Revision-Date: 2015-12-27 20:50-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "Language: es_ES\n" @@ -1816,7 +1816,7 @@ #: SupplierTypes.php:132 Suppliers.php:672 Z_DeleteInvoice.php:178 #: includes/DefineOfferClass.php:134 msgid "has been deleted" -msgstr "ha sido eliminado" +msgstr "ha sido suprimido" #: Areas.php:149 Areas.php:222 msgid "Area Name" @@ -3082,7 +3082,7 @@ #: PcExpensesTypeTab.php:212 PurchaseByPrefSupplier.php:317 #: StockCounts.php:121 UserLocations.php:120 UserLocations.php:236 msgid "Not Yet Selected" -msgstr "Aún NO Seleccionado" +msgstr "Aún no seleccionado" #: BankAccountUsers.php:129 BankAccountUsers.php:228 CustomerReceipt.php:947 #: CustomerReceipt.php:1161 CustomerTypes.php:269 ExchangeRateTrend.php:56 @@ -3096,7 +3096,7 @@ #: SalesTypes.php:282 SupplierTypes.php:236 UserLocations.php:137 #: UserLocations.php:255 Z_CheckDebtorsControl.php:61 msgid "Accept" -msgstr "Guardar" +msgstr "Aceptar" #: BankAccountUsers.php:130 BankAccountUsers.php:229 #: CustomerAllocations.php:450 CustomerReceipt.php:1162 @@ -7082,7 +7082,7 @@ #: CounterReturns.php:1659 CounterSales.php:2221 SelectOrderItems.php:1596 msgid "Enter partial Description" -msgstr "Introducir una parte de la descripción" +msgstr "Introducir descripción parcial" #: CounterReturns.php:1667 CounterSales.php:2232 SelectOrderItems.php:1615 msgid "Use Quick Entry" @@ -14521,7 +14521,7 @@ #: GLJournal.php:128 msgid "Enter Another General Ledger Journal" -msgstr "Introduzca otro Diario Contable" +msgstr "Introducir otro diario contable" #: GLJournal.php:154 GLJournal.php:191 msgid "" @@ -15149,7 +15149,7 @@ #: GoodsReceived.php:200 msgid "Enter Serial Nos" -msgstr "Introduzca Números de Serie" +msgstr "Introducir números de serie" #: GoodsReceived.php:203 msgid "Enter Batches" @@ -15748,7 +15748,7 @@ #: ImportBankTransAnalysis.php:53 ImportBankTransAnalysis.php:315 #: SuppTransGLAnalysis.php:29 SuppTransGLAnalysis.php:234 msgid "Enter GL Line" -msgstr "Introduzca Fila Contable" +msgstr "Introducir línea contable" #: ImportBankTransAnalysis.php:61 SuppTransGLAnalysis.php:37 msgid "You must select a general ledger code from the list below" @@ -15806,7 +15806,7 @@ #: ImportBankTransAnalysis.php:142 ImportBankTransAnalysis.php:144 #: Z_ImportGLTransactions.php:238 msgid "GL Payment" -msgstr "" +msgstr "Pago contable" #: ImportBankTransAnalysis.php:164 msgid "Receipt to Customer Account" @@ -15815,11 +15815,11 @@ #: ImportBankTransAnalysis.php:173 ImportBankTransAnalysis.php:175 #: Z_ImportGLTransactions.php:239 msgid "GL Receipt" -msgstr "" +msgstr "Recibo contable" #: ImportBankTransAnalysis.php:203 msgid "General ledger Analysis" -msgstr "" +msgstr "Análisis contable" #: ImportBankTransAnalysis.php:231 msgid "Total of GL Entries" @@ -19509,7 +19509,7 @@ #: PDFOrderStatus.php:325 PO_Header.php:794 PO_OrderDetails.php:142 msgid "Not yet printed" -msgstr "Aún sin imprimir" +msgstr "Aún no impreso" #: PDFOrderStatus.php:353 PDFOrdersInvoiced.php:350 PO_Items.php:766 msgid "Complete" @@ -19673,7 +19673,7 @@ #: PDFPickingList.php:151 msgid "Enter Another Date" -msgstr "Introduzca otra fecha" +msgstr "Introducir otra fecha" #: PDFPickingList.php:204 includes/PDFPickingListHeader.inc:12 #: includes/DatabaseTranslations.php:33 @@ -21454,7 +21454,7 @@ #: PO_Items.php:818 msgid "Not yet purchased" -msgstr "Todavía no ha comprado" +msgstr "Aún no comprado" #: PO_Items.php:825 SuppFixedAssetChgs.php:123 msgid "New Fixed Asset" @@ -22365,7 +22365,7 @@ #: Payments.php:620 msgid "Enter another General Ledger Payment" -msgstr "Introduzca otro pago Contable" +msgstr "Introducir otro pago contable" #: Payments.php:657 msgid "The Cheque/Voucher number has already been used" @@ -22453,7 +22453,7 @@ #: Payments.php:978 Payments.php:983 msgid "Enter GL Account Manually" -msgstr "Introduzca manualmente la cuenta contable" +msgstr "Introducir manualmente la cuenta contable" #: Payments.php:979 Payments.php:984 msgid "The account code" @@ -24893,7 +24893,7 @@ #: PurchaseByPrefSupplier.php:295 msgid "has been created." -msgstr "" +msgstr "ha sido creado." #: PurchaseByPrefSupplier.php:295 msgid "Total order value of" @@ -25040,7 +25040,7 @@ #: QATests.php:248 QATests.php:393 msgid "Group By" -msgstr "" +msgstr "Grupo por" #: QATests.php:249 msgid "" @@ -26142,7 +26142,7 @@ #: SalesAnalRepts.php:55 SalesAnalRepts.php:57 msgid "Not Used" -msgstr "No Usado" +msgstr "No usado" #: SalesAnalRepts.php:84 msgid "The report heading must be more than two characters long" @@ -27319,7 +27319,7 @@ #: SelectAsset.php:71 msgid "Enter partial description" -msgstr "Ingrese la descripción parcial" +msgstr "Introducir descripción parcial" #: SelectAsset.php:104 msgid "Enter partial asset code" @@ -27417,7 +27417,7 @@ #: SelectContract.php:51 msgid "Not Yet Quoted" -msgstr "Aún No Cotizado" +msgstr "Aún no cotizado" #: SelectContract.php:52 msgid "Quoted - No Order Placed" @@ -28044,7 +28044,7 @@ #: SelectOrderItems.php:560 msgid "Enter an Order or Quotation" -msgstr "Indique un pedido o cotización" +msgstr "Introducir un pedido o cotización" #: SelectOrderItems.php:560 msgid "Search for the Customer Branch." @@ -28386,7 +28386,7 @@ #: SelectProduct.php:213 SelectProduct.php:226 SelectProduct.php:227 msgid "Not Set" -msgstr "" +msgstr "No ajustado" #: SelectProduct.php:297 msgid "" @@ -31412,7 +31412,7 @@ #: StockCounts.php:217 msgid "Delete?" -msgstr "¿Suprimir?\t" +msgstr "¿Suprimir?" #: StockCounts.php:232 msgid "Save Changes" @@ -32381,7 +32381,7 @@ #: StockTransfers.php:134 msgid "Enter another Transfer" -msgstr "Introduzca otra Transferencia" +msgstr "Introducir otra transferencia" #: StockTransfers.php:177 WorkOrderEntry.php:339 msgid "The quantity entered must be a positive number greater than zero" @@ -33216,7 +33216,7 @@ #: SuppFixedAssetChgs.php:160 msgid "Enter Fixed Asset" -msgstr "Introduzca el activo fijo" +msgstr "Introducir activo fijo" #: SuppInvGRNs.php:12 msgid "Enter Supplier Invoice Against Goods Received" @@ -34139,7 +34139,7 @@ #: SupplierCredit.php:455 SupplierInvoice.php:825 msgid "General Ledger Analysis" -msgstr "Análisis Contable" +msgstr "Análisis contable" #: SupplierCredit.php:488 SupplierInvoice.php:850 msgid "Total GL Analysis" @@ -34468,7 +34468,7 @@ #: SupplierCredit.php:1330 msgid "Enter another Credit Note for this Supplier" -msgstr "Ingrese otra nota de Crédito para este proveedor" +msgstr "Introducir otra nota de crédito para este proveedor" #: SupplierInquiry.php:6 msgid "Supplier Inquiry" @@ -34854,7 +34854,7 @@ #: SupplierInvoice.php:1886 msgid "Enter another Invoice for this Supplier" -msgstr "Introduzca otra Factura para este proveedor" +msgstr "Introducir otra factura para este proveedor" #: SupplierInvoice.php:1888 msgid "Enter payment" @@ -37480,7 +37480,7 @@ #: TaxGroups.php:242 msgid "Enter Group" -msgstr "Guardar/Cambiar Nombre" +msgstr "Introducir grupo" #: TaxGroups.php:285 TaxGroups.php:338 msgid "Calculation Order" @@ -40328,7 +40328,7 @@ #: Z_ChangeLocationCode.php:246 msgid "Deleting the old location record" -msgstr "Eliminando el antiguo registro de localidad" +msgstr "Suprimiendo el registro de ubicación viejo" #: Z_ChangeLocationCode.php:248 msgid "The SQL to delete the old location record failed" @@ -40431,7 +40431,7 @@ #: Z_ChangeStockCategory.php:103 msgid "Deleting the old stock category record" -msgstr "La eliminación de la categoría del registro de existencias antiguo" +msgstr "Suprimiendo el registro de la categoría de inventario viejo" #: Z_ChangeStockCategory.php:105 msgid "The SQL to delete the old stock category record failed" @@ -40506,7 +40506,7 @@ #: Z_ChangeStockCode.php:191 msgid "Deleting the old stock master record" -msgstr "Eliminando antiguo maestro de existencias" +msgstr "Suprimiendo el registro maestro de inventario viejo" #: Z_ChangeStockCode.php:193 msgid "The SQL to delete the old stock master record failed" @@ -41258,7 +41258,7 @@ #: Z_DeleteSalesTransActions.php:117 msgid "Deleting all Purchase Orders" -msgstr "Borrando todas las Órdenes de Compra" +msgstr "Suprimiendo todas las órdenes de compra" #: Z_DeleteSalesTransActions.php:119 msgid "" @@ -41902,7 +41902,7 @@ #: Z_ImportGLTransactions.php:50 msgid "File contains incorrect headers" -msgstr "" +msgstr "Archivo contiene encabezados incorrectos" #: Z_ImportGLTransactions.php:98 msgid "Account code " @@ -42398,7 +42398,7 @@ #: Z_ReverseSuppPaymentRun.php:32 msgid "Deleting payment number" -msgstr "Eliminado pago número" +msgstr "Suprimiendo número de pago" #: Z_ReverseSuppPaymentRun.php:32 msgid "to supplier code" @@ -46873,7 +46873,7 @@ #: includes/SelectOrderItems_IntoCart.inc:65 msgid "Obsolete Item" -msgstr "Artículo Obsoleto" +msgstr "Artículo obsoleto" #: includes/SelectOrderItems_IntoCart.inc:182 msgid "Sell through support available and applied of" @@ -48754,7 +48754,7 @@ #: includes/DefineCartClass.php:230 msgid "Deleted Line Number" -msgstr "Número de Línea Eliminado" +msgstr "Número de línea suprimido" #: includes/DefineCartClass.php:230 msgid "from existing Order Number" @@ -50519,7 +50519,7 @@ #: reportwriter/languages/en_US/reports.php:68 msgid "Fifth" -msgstr "" +msgstr "Quinto" #: reportwriter/languages/en_US/reports.php:69 msgid "Filter" @@ -50539,7 +50539,7 @@ #: reportwriter/languages/en_US/reports.php:75 msgid "Fourth" -msgstr "" +msgstr "Cuarto" #: reportwriter/languages/en_US/reports.php:78 msgid "Inactive" @@ -50660,7 +50660,7 @@ #: reportwriter/languages/en_US/reports.php:133 msgid "Go Back" -msgstr "" +msgstr "Volver" #: reportwriter/languages/en_US/reports.php:135 msgid "Change" @@ -50728,7 +50728,7 @@ #: reportwriter/languages/en_US/reports.php:160 msgid "Grouped by:" -msgstr "" +msgstr "Agrupado por:" #: reportwriter/languages/en_US/reports.php:161 msgid "Sorted by:" @@ -50877,7 +50877,7 @@ #: reportwriter/languages/en_US/reports.php:198 msgid "Enter a New Field" -msgstr "" +msgstr "Introducir un campo nuevo" #: reportwriter/languages/en_US/reports.php:199 msgid "Field List" @@ -51279,7 +51279,7 @@ #: reportwriter/languages/en_US/reports.php:336 msgid "Green" -msgstr "" +msgstr "Verde" #: reportwriter/languages/en_US/reports.php:337 msgid "White" |
From: <rc...@us...> - 2015-12-29 18:06:38
|
Revision: 7433 http://sourceforge.net/p/web-erp/reponame/7433 Author: rchacon Date: 2015-12-29 18:06:35 +0000 (Tue, 29 Dec 2015) Log Message: ----------- On GLAccountUsers.php: Fix script name; add $ViewTopic and $BookMark; improve $SelectedGLAccount validation; improve page_title_text; improve select GL account; regroup modify access permission code (improve logic); add classes to table elements; translate database "0" and "1" to human "No" and "Yes"; simplify and tide code; modify prnMsg from multiple part sentence to one part sentence (better to translate when language use a different grammar structure from English); add "Print This", "Select A Different GL account" and "Return" buttons. Add info to ManualGeneralLedger.html. Modified Paths: -------------- trunk/GLAccountUsers.php trunk/UserGLAccounts.php trunk/doc/Manual/ManualGeneralLedger.html Modified: trunk/GLAccountUsers.php =================================================================== --- trunk/GLAccountUsers.php 2015-12-28 03:50:00 UTC (rev 7432) +++ trunk/GLAccountUsers.php 2015-12-29 18:06:35 UTC (rev 7433) @@ -1,261 +1,258 @@ <?php -/* $Id: glaccountusers.php 6806 2013-09-28 05:10:46Z daintree $*/ +/* $Id: GLAccountUsers.php 7385 2015-11-11 05:10:46Z tehonu $*/ +/* Maintenance of GL Accounts allowed for a user. */ include('includes/session.inc'); -$Title = _('GL Account Authorised Users Maintenance'); +$Title = _('GL Account Authorised Users'); +$ViewTopic = 'GeneralLedger'; +$BookMark = 'GLAccountUsers'; include('includes/header.inc'); -echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $Theme . '/images/money_add.png" title="' . _('GL Account Authorised Users') . '" alt="" />' . ' ' . $Title . '</p>'; +if(isset($_POST['SelectedGLAccount']) and $_POST['SelectedGLAccount']<>'') {//If POST not empty: + $SelectedGLAccount = mb_strtoupper($_POST['SelectedGLAccount']); +} elseif(isset($_GET['SelectedGLAccount']) and $_GET['SelectedGLAccount']<>'') {//If GET not empty: + $SelectedGLAccount = mb_strtoupper($_GET['SelectedGLAccount']); +} else {// Unset empty SelectedGLAccount: + unset($_GET['SelectedGLAccount']); + unset($_POST['SelectedGLAccount']); + unset($SelectedGLAccount); +} -if (isset($_POST['SelectedUser'])) { +if(isset($_POST['SelectedUser']) and $_POST['SelectedUser']<>'') {//If POST not empty: $SelectedUser = mb_strtoupper($_POST['SelectedUser']); -} elseif (isset($_GET['SelectedUser'])) { +} elseif(isset($_GET['SelectedUser']) and $_GET['SelectedGLAccount']<>'') {//If GET not empty: $SelectedUser = mb_strtoupper($_GET['SelectedUser']); -} else { - $SelectedUser = ''; +} else {// Unset empty SelectedUser: + unset($_GET['SelectedUser']); + unset($_POST['SelectedUser']); + unset($SelectedUser); } -if (isset($_POST['SelectedGLAccount'])) { - $SelectedGLAccount = mb_strtoupper($_POST['SelectedGLAccount']); -} elseif (isset($_GET['SelectedGLAccount'])) { - $SelectedGLAccount = mb_strtoupper($_GET['SelectedGLAccount']); -} - -if (isset($_POST['Cancel'])) { +if(isset($_POST['Cancel']) or isset($_GET['Cancel'] )) { unset($SelectedGLAccount); unset($SelectedUser); } -if (isset($_POST['Process'])) { - if ($_POST['SelectedGLAccount'] == '') { - prnMsg(_('You have not selected any GL Account'), 'error'); - echo '<br />'; - unset($SelectedGLAccount); - unset($_POST['SelectedGLAccount']); - } -} -if (isset($_POST['submit'])) { +if(!isset($SelectedGLAccount)) {// If is NOT set a GL account for users. - $InputError = 0; + /* It could still be the second time the page has been run and a record has been selected for modification - SelectedUser will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true. These will call the same page again and allow update/input or deletion of the records*/ - if ($_POST['SelectedUser'] == '') { - $InputError = 1; - prnMsg(_('You have not selected an user to be authorised to use this GL Account'), 'error'); - echo '<br />'; - unset($SelectedGLAccount); + echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" title="',// Icon image. + _('GL Account Authorised Users'), '" /> ',// Icon title. + _('GL Account Authorised Users'), '</p>';// Page title. + if(isset($_POST['Process'])) { + prnMsg(_('You have not selected any GL Account'), 'error'); } - - if ($InputError != 1) { - - // First check the user is not being duplicated - - $CheckSql = "SELECT count(*) - FROM glaccountusers - WHERE accountcode= '" . $_POST['SelectedGLAccount'] . "' - AND userid = '" . $_POST['SelectedUser'] . "'"; - - $CheckResult = DB_query($CheckSql); - $CheckRow = DB_fetch_row($CheckResult); - - if ($CheckRow[0] > 0) { - $InputError = 1; - prnMsg(_('The user') . ' ' . $_POST['SelectedUser'] . ' ' . _('is already authorised to use this GL Account'), 'error'); - } else { - // Add new record on submit - $SQL = "INSERT INTO glaccountusers (accountcode, - userid, - canview, - canupd) - VALUES ('" . $_POST['SelectedGLAccount'] . "', - '" . $_POST['SelectedUser'] . "', - '1', - '1')"; - - $msg = _('User') . ': ' . $_POST['SelectedUser'] . ' ' . _('authority to use the') . ' ' . $_POST['SelectedGLAccount'] . ' ' . _('GL Account has been changed'); - $Result = DB_query($SQL); - prnMsg($msg, 'success'); - unset($_POST['SelectedUser']); - } - } -} elseif (isset($_GET['delete'])) { - $SQL = "DELETE FROM glaccountusers - WHERE accountcode='" . $SelectedGLAccount . "' - AND userid='" . $SelectedUser . "'"; - - $ErrMsg = _('The GL Account user record could not be deleted because'); - $Result = DB_query($SQL, $ErrMsg); - prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to use the') . ' ' . $SelectedGLAccount . ' ' . _('GL Account removed'), 'success'); - unset($_GET['delete']); -} elseif (isset($_GET['ToggleUpdate'])) { - $SQL = "UPDATE glaccountusers - SET canupd='" . $_GET['ToggleUpdate'] . "' - WHERE accountcode='" . $SelectedGLAccount . "' - AND userid='" . $SelectedUser . "'"; - - $ErrMsg = _('The GL Account user record could not be deleted because'); - $Result = DB_query($SQL, $ErrMsg); - prnMsg(_('User') . ' ' . $SelectedUser . ' ' . _('has had their authority to update') . ' ' . $SelectedGLAccount . ' ' . _('GL Account removed'), 'success'); - unset($_GET['ToggleUpdate']); -} - -if (!isset($SelectedGLAccount)) { - - /* It could still be the second time the page has been run and a record has been selected for modification - SelectedUser will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters - then none of the above are true. These will call the same page again and allow update/input or deletion of the records*/ - echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <table class="selection"> + echo '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', + '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', + '<table class="selection"> <tr> - <td>' . _('Select GL Account') . ':</td> - <td><select name="SelectedGLAccount">'; - - $Result = DB_query("SELECT accountcode, - accountname - FROM chartmaster - ORDER BY accountcode"); - - echo '<option value="">' . _('Not Yet Selected') . '</option>'; + <td>', _('Select GL Account'), ':</td> + <td><select name="SelectedGLAccount" onchange="this.form.submit()">',// Submit when the value of the select is changed. + '<option value="">', _('Not Yet Selected'), '</option>'; + $Result = DB_query(" + SELECT + accountcode, + accountname + FROM chartmaster + ORDER BY accountcode"); while ($MyRow = DB_fetch_array($Result)) { - if (isset($SelectedGLAccount) and $MyRow['accountcode'] == $SelectedGLAccount) { - echo '<option selected="selected" value="'; - } else { - echo '<option value="'; + echo '<option '; + if(isset($SelectedGLAccount) and $MyRow['accountcode'] == $SelectedGLAccount) { + echo 'selected="selected" '; } - echo $MyRow['accountcode'] . '">' . $MyRow['accountcode'] . ' - ' . $MyRow['accountname'] . '</option>'; - - } //end while loop - - echo '</select></td></tr>'; - - echo '</table>'; // close main table + echo 'value="', $MyRow['accountcode'] . '">' . $MyRow['accountcode'] . ' - ' . $MyRow['accountname'] . '</option>'; + }// End while loop. + echo '</select></td> + </tr> + </table>';//Close Select_GL_Account table. DB_free_result($Result); + echo '<div class="centre noprint">',// Form buttons: + '<button name="Process" type="submit" value="Submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" /> ', _('Accept'), '</button> '; // "Accept" button. - echo '<div class="centre"> - <input type="submit" name="Process" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> - </div>'; - - echo '</form>'; - -} - -//end of ifs and buts! -if (isset($_POST['process']) or isset($SelectedGLAccount)) { - $SQLName = "SELECT accountname - FROM chartmaster - WHERE accountcode='" . $SelectedGLAccount . "'"; - $Result = DB_query($SQLName); +} else {// If is set a GL account for users ($SelectedGLAccount). + $Result = DB_query(" + SELECT accountname + FROM chartmaster + WHERE accountcode='" . $SelectedGLAccount . "'"); $MyRow = DB_fetch_array($Result); $SelectedGLAccountName = $MyRow['accountname']; + echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" title="',// Icon image. + _('GL Account Authorised Users'), '" /> ',// Icon title. + _('Authorised Users for'), ' ', $SelectedGLAccountName, '</p>';// Page title. - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Authorised users for') . ' ' . $SelectedGLAccountName . ' ' . _('GL Account') . '</a></div> - <form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '"> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <input type="hidden" name="SelectedGLAccount" value="' . $SelectedGLAccount . '" />'; - - $SQL = "SELECT glaccountusers.userid, - canview, - canupd, - www_users.realname - FROM glaccountusers INNER JOIN www_users - ON glaccountusers.userid=www_users.userid - WHERE glaccountusers.accountcode='" . $SelectedGLAccount . "' - ORDER BY glaccountusers.userid ASC"; - - $Result = DB_query($SQL); - - echo '<table class="selection">'; - echo '<tr> - <th colspan="6"><h3>' . _('Authorised users for GL Acccount') . ': ' . $SelectedGLAccountName . '</h3></th> - </tr>'; - echo '<tr> - <th>' . _('User Code') . '</th> - <th>' . _('User Name') . '</th> - <th>' . _('View') . '</th> - <th>' . _('Update') . '</th> - </tr>'; - - $k = 0; //row colour counter - - while ($MyRow = DB_fetch_array($Result)) { - if ($k == 1) { - echo '<tr class="EvenTableRows">'; - $k = 0; + // BEGIN: Needs $SelectedGLAccount, $SelectedUser. + if(isset($_POST['submit'])) { + if(!isset($SelectedUser)) { + prnMsg(_('You have not selected an user to be authorised to use this GL Account'), 'error'); } else { - echo '<tr class="OddTableRows">'; - $k = 1; - } + // First check the user is not being duplicated + $CheckResult = DB_query(" + SELECT count(*) + FROM glaccountusers + WHERE accountcode= '" . $SelectedGLAccount . "' + AND userid = '" . $SelectedUser . "'"); + $CheckRow = DB_fetch_row($CheckResult); - if ($MyRow['canupd'] == 1) { - $ToggleText = '<td><a href="%s?SelectedUser=%s&ToggleUpdate=0&SelectedGLAccount=' . $SelectedGLAccount . '" onclick="return confirm(\'' . _('Are you sure you wish to remove Update for this user?') . '\');">' . _('Remove Update') . '</a></td>'; - } else { - $ToggleText = '<td><a href="%s?SelectedUser=%s&ToggleUpdate=1&SelectedGLAccount=' . $SelectedGLAccount . '" onclick="return confirm(\'' . _('Are you sure you wish to add Update for this user?') . '\');">' . _('Add Update') . '</a></td>'; + if($CheckRow[0] > 0) { + prnMsg(_('The user') . ' ' . $SelectedUser . ' ' . _('is already authorised to use this GL Account'), 'error'); + } else { + // Add new record on submit + $SQL = "INSERT INTO glaccountusers ( + accountcode, + userid, + canview, + canupd + ) VALUES ('" . + $SelectedGLAccount . "','" . + $SelectedUser . "', + '1', + '1')"; + $ErrMsg = _('An access permission for a user could not be added'); + if(DB_query($SQL, $ErrMsg)) { + prnMsg(_('An access permission for a user was added') . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '. ' . _('User') . ': ' . $SelectedUser . '.', 'success'); + unset($_GET['SelectedUser']); + unset($_POST['SelectedUser']); + } + } } - - printf('<td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td>' . - $ToggleText . ' - <td><a href="%s?SelectedUser=%s&delete=yes&SelectedGLAccount=' . $SelectedGLAccount . '" onclick="return confirm(\'' . _('Are you sure you wish to un-authorise this user?') . '\');">' . _('Un-authorise') . '</a></td> - </tr>', - $MyRow['userid'], - $MyRow['realname'], - $MyRow['canview'], - $MyRow['canupd'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $MyRow['userid'], - htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'), - $MyRow['userid']); + } elseif(isset($_GET['delete'])) { + $SQL = "DELETE FROM glaccountusers + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + $ErrMsg = _('An access permission for a user could not be removed'); + if(DB_query($SQL, $ErrMsg)) { + prnMsg(_('An access permission for a user was removed') . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '. ' . _('User') . ': ' . $SelectedUser . '.', 'success'); + unset($_GET['delete']); + unset($_POST['delete']); + } + } elseif(isset($_GET['ToggleUpdate'])) { + $SQL = "UPDATE glaccountusers + SET canupd='" . $_GET['ToggleUpdate'] . "' + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + $ErrMsg = _('An access permission to update a GL account could not be modified'); + if(DB_query($SQL, $ErrMsg)) { + prnMsg(_('An access permission to update a GL account was modified') . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '. ' . _('User') . ': ' . $SelectedUser . '.', 'success'); + unset($_GET['ToggleUpdate']); + unset($_POST['ToggleUpdate']); + } } - //END WHILE LIST LOOP - echo '</table>'; + // END: Needs $SelectedGLAccount, $SelectedUser. - if (!isset($_GET['delete'])) { + echo '<table class="selection"> + <thead> + <tr> + <th class="text">', _('User Code'), '</th> + <th class="text">', _('User Name'), '</th> + <th class="centre">', _('View'), '</th> + <th class="centre">', _('Update'), '</th> + <th class="noprint" colspan="2"> </th> + </tr> + </thead><tbody>'; + $Result = DB_query(" + SELECT + glaccountusers.userid, + canview, + canupd, + www_users.realname + FROM glaccountusers INNER JOIN www_users + ON glaccountusers.userid=www_users.userid + WHERE glaccountusers.accountcode='" . $SelectedGLAccount . "' + ORDER BY glaccountusers.userid ASC"); + if(DB_num_rows($Result)>0) {// If the GL account has access permissions for one or more users: + $k = 0; //row colour counter + while($MyRow = DB_fetch_array($Result)) { + if($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k = 1; + } + echo '<td class="text">', $MyRow['userid'], '</td> + <td class="text">', $MyRow['realname'], '</td> + <td class="centre">'; + if($MyRow['canview'] == 1) { + echo _('Yes'); + } else { + echo _('No'); + } + echo '</td> + <td class="centre">'; - - echo '<table class="selection">'; //Main table - - echo '<tr> - <td>' . _('Select User') . ':</td> + $ScriptName = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'); + if($MyRow['canupd'] == 1) { + echo _('Yes'), '</td>', + '<td class="noprint"><a href="', $ScriptName, '?SelectedGLAccount=', $SelectedGLAccount, '&SelectedUser=', $MyRow['userid'], '&ToggleUpdate=0" onclick="return confirm(\'', _('Are you sure you wish to remove Update for this user?'), '\');">', _('Remove Update'); + } else { + echo _('No'), '</td>', + '<td class="noprint"><a href="', $ScriptName, '?SelectedGLAccount=', $SelectedGLAccount, '&SelectedUser=', $MyRow['userid'], '&ToggleUpdate=1" onclick="return confirm(\'', _('Are you sure you wish to add Update for this user?'), '\');">', _('Add Update'); + } + echo '</a></td>', + '<td class="noprint"><a href="', $ScriptName, '?SelectedGLAccount=', $SelectedGLAccount, '&SelectedUser=', $MyRow['userid'], '&delete=yes" onclick="return confirm(\'', _('Are you sure you wish to un-authorise this user?'), '\');">', _('Un-authorise'), '</a></td>', + '</tr>'; + }// End while list loop. + } else {// If the GL account does not have access permissions for users: + echo '<tr><td class="centre" colspan="6">', _('GL account does not have access permissions for users'), '</td></tr>'; + } + echo '</tbody></table>', + '<br />', + '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', + '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', + '<input name="SelectedGLAccount" type="hidden" value="', $SelectedGLAccount, '" />', + '<br /> + <table class="selection noprint"> + <tr> + <td>'; + $Result = DB_query(" + SELECT + userid, + realname + FROM www_users + WHERE NOT EXISTS (SELECT glaccountusers.userid + FROM glaccountusers + WHERE glaccountusers.accountcode='" . $SelectedGLAccount . "' + AND glaccountusers.userid=www_users.userid) + ORDER BY userid"); + if(DB_num_rows($Result)>0) {// If the GL account does not have access permissions for one or more users: + echo _('Add access permissions to a user'), ':</td> <td><select name="SelectedUser">'; - - $Result = DB_query("SELECT userid, - realname - FROM www_users - WHERE NOT EXISTS (SELECT glaccountusers.userid - FROM glaccountusers - WHERE glaccountusers.accountcode='" . $SelectedGLAccount . "' - AND glaccountusers.userid=www_users.userid)"); - - if (!isset($_POST['SelectedUser'])) { - echo '<option selected="selected" value="">' . _('Not Yet Selected') . '</option>'; + if(!isset($_POST['SelectedUser'])) { + echo '<option selected="selected" value="">', _('Not Yet Selected'), '</option>'; } while ($MyRow = DB_fetch_array($Result)) { - if (isset($_POST['SelectedUser']) and $MyRow['userid'] == $_POST['SelectedUser']) { + if(isset($_POST['SelectedUser']) and $MyRow['userid'] == $_POST['SelectedUser']) { echo '<option selected="selected" value="'; } else { echo '<option value="'; } - echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>'; - - } //end while loop - - echo '</select> - </td> - </tr> - </table>'; // close main table - DB_free_result($Result); - - echo '<div class="centre"> - <input type="submit" name="submit" value="' . _('Accept') . '" /> - <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> - </div> - </form>'; - - } // end if user wish to delete + echo $MyRow['userid'], '">', $MyRow['userid'], ' - ', $MyRow['realname'], '</option>'; + } + echo '</select></td> + <td><input type="submit" name="submit" value="Accept" />'; + } else {// If the GL account has access permissions for all users: + echo _('GL account has access permissions for all users'); + } + echo '</td> + </tr> + </table>'; + DB_free_result($Result); + echo '<br>', // Form buttons: + '<div class="centre noprint">', + '<button onclick="javascript:window.print()" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/printer.png" /> ', _('Print This'), '</button>', // "Print This" button. + '<button formaction="GLAccountUsers.php?Cancel" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" /> ', _('Select A Different GL account'), '</button>'; // "Select A Different GL account" button. } +echo '<button formaction="index.php?Application=GL" type="submit" value="Submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button. + '</div> + </form>'; include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/UserGLAccounts.php =================================================================== --- trunk/UserGLAccounts.php 2015-12-28 03:50:00 UTC (rev 7432) +++ trunk/UserGLAccounts.php 2015-12-29 18:06:35 UTC (rev 7433) @@ -1,260 +1,264 @@ -<?php -/* $Id: UserGLAccounts.php 7427 2015-12-27 19:59:10Z rchacon $*/ -/* Maintenance of GL Accounts allowed for a user. */ - -include('includes/session.inc'); -$Title = _('User Authorised GL Accounts'); -$ViewTopic = 'GeneralLedger'; -$BookMark = 'UserGLAccounts'; -include('includes/header.inc'); - -if(isset($_POST['SelectedUser']) and $_POST['SelectedUser']<>'') {//If POST not empty: - $SelectedUser = mb_strtoupper($_POST['SelectedUser']); -} elseif(isset($_GET['SelectedUser']) and $_GET['SelectedUser']<>'') {//If GET not empty: - $SelectedUser = mb_strtoupper($_GET['SelectedUser']); -} else {// Unset empty SelectedUser: - unset($_GET['SelectedUser']); - unset($_POST['SelectedUser']); - unset($SelectedUser); -} - -if(isset($_POST['SelectedGLAccount'])) { - $SelectedGLAccount = mb_strtoupper($_POST['SelectedGLAccount']); -} elseif(isset($_GET['SelectedGLAccount'])) { - $SelectedGLAccount = mb_strtoupper($_GET['SelectedGLAccount']); -} else { - $SelectedGLAccount = ''; -/* unset($SelectedGLAccount);*/ -} - -if(isset($_GET['Cancel']) or isset($_POST['Cancel'])) { - unset($SelectedUser); - unset($SelectedGLAccount); -} - -if(!isset($SelectedUser)) {// If is NOT set a user for GL accounts. - echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, - '/images/gl.png" title="',// Icon image. - _('User Authorised GL Accounts'), '" /> ',// Icon title. - _('User Authorised GL Accounts'), '</p>';// Page title. - - /* It could still be the second time the page has been run and a record has been selected for modification - SelectedGLAccount will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true. These will call the same page again and allow update/input or deletion of the records.*/ - - if(isset($_POST['Process'])) { - prnMsg(_('You have not selected any user'), 'error'); - } - echo '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', - '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', - '<table class="selection"> - <tr> - <td>', _('Select User'), ':</td> - <td><select name="SelectedUser" onchange="this.form.submit()">',// Submit when the value of the select is changed. - '<option value="">', _('Not Yet Selected'), '</option>'; - $Result = DB_query(" - SELECT - userid, - realname - FROM www_users - ORDER BY userid"); - while ($MyRow = DB_fetch_array($Result)) { - echo '<option '; - if(isset($SelectedUser) and $MyRow['userid'] == $SelectedUser) { - echo 'selected="selected" '; - } - echo 'value="', $MyRow['userid'], '">', $MyRow['userid'], ' - ', $MyRow['realname'], '</option>'; - }// End while loop. - echo '</select></td> - </tr> - </table>';//Close Select_User table. - - DB_free_result($Result); - - echo '<div class="centre noprint">',// Form buttons: - '<button name="Process" type="submit" value="Accept"><img alt="" src="', $RootPath, '/css/', $Theme, - '/images/user.png" /> ', _('Accept'), '</button> '; // "Accept" button. - -} else {// If is set a user for GL accounts ($SelectedUser). - $Result = DB_query(" - SELECT realname - FROM www_users - WHERE userid='" . $SelectedUser . "'"); - $MyRow = DB_fetch_array($Result); - $SelectedUserName = $MyRow['realname']; - echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, - '/images/gl.png" title="',// Icon image. - _('User Authorised GL Accounts'), '" /> ',// Icon title. - _('Authorised GL Accounts for'), ' ', $SelectedUserName, '</p>';// Page title. - -// BEGIN: Needs $SelectedUser, $SelectedGLAccount: - if (isset($_POST['submit'])) { - $InputError = 0; - if ($_POST['SelectedGLAccount'] == '') { - $InputError = 1; - prnMsg(_('You have not selected an GL Account to be authorised for this user'), 'error'); - unset($SelectedGLAccount); - } - if ($InputError != 1) { - // First check the user is not being duplicated - $CheckResult = DB_query(" - SELECT count(*) - FROM glaccountusers - WHERE accountcode= '" . $_POST['SelectedGLAccount'] . "' - AND userid = '" . $SelectedUser . "'"); - $CheckRow = DB_fetch_row($CheckResult); - if ($CheckRow[0] > 0) { - $InputError = 1; - prnMsg(_('The GL Account') . ' ' . $SelectedGLAccount . ' ' . _('is already authorised for this user'), 'error'); - } else { - // Add new record on submit - $SQL = "INSERT INTO glaccountusers (accountcode, - userid, - canview, - canupd) - VALUES ('" . $SelectedGLAccount . "', - '" . $SelectedUser . "', - '1', - '1')"; - $Result = DB_query($SQL); - prnMsg(_('An access permission to a GL account was added') . '. ' . _('User') . ': ' . $SelectedUser . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '.', 'success'); - unset($_POST['SelectedGLAccount']); - } - } - } elseif(isset($_GET['delete']) or isset($_POST['delete'])) { - $SQL = "DELETE FROM glaccountusers - WHERE accountcode='" . $SelectedGLAccount . "' - AND userid='" . $SelectedUser . "'"; - $ErrMsg = _('The GL Account user record could not be deleted because'); - $Result = DB_query($SQL, $ErrMsg); - prnMsg(_('An access permission to a GL account was removed') . '. ' . _('User') . ': ' . $SelectedUser . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '.', 'success'); - unset($_GET['delete']); - unset($_POST['delete']); - } elseif(isset($_GET['ToggleUpdate']) or isset($_POST['ToggleUpdate'])) {// Can update (write) GL accounts flag. - if(isset($_GET['ToggleUpdate']) and $_GET['ToggleUpdate']<>'') {//If GET not empty. - $ToggleUpdate = $_GET['ToggleUpdate']; - } elseif(isset($_POST['ToggleUpdate']) and $_POST['ToggleUpdate']<>'') {//If POST not empty. - $ToggleUpdate = $_POST['ToggleUpdate']; - } - $SQL = "UPDATE glaccountusers - SET canupd='" . $ToggleUpdate . "' - WHERE accountcode='" . $SelectedGLAccount . "' - AND userid='" . $SelectedUser . "'"; - $ErrMsg = _('The GL Account user record could not be updated because'); - $Result = DB_query($SQL, $ErrMsg); - prnMsg(_('The access permission to update a GL account was modified') . '. ' . _('User') . ': ' . $SelectedUser . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '.', 'success'); - unset($_GET['ToggleUpdate']); - unset($_POST['ToggleUpdate']); - } -// END: Needs $SelectedUser, $SelectedGLAccount. - - echo '<table class="selection"> - <thead> - <tr> - <th class="text">', _('Code'), '</th> - <th class="text">', _('Name'), '</th> - <th class="centre">', _('View'), '</th> - <th class="centre">', _('Update'), '</th> - <th class="noprint" colspan="2"> </th> - </tr> - </thead><tbody>'; - $Result = DB_query(" - SELECT - glaccountusers.accountcode, - canview, - canupd, - chartmaster.accountname - FROM glaccountusers INNER JOIN chartmaster - ON glaccountusers.accountcode=chartmaster.accountcode - WHERE glaccountusers.userid='" . $SelectedUser . "' - ORDER BY chartmaster.accountcode ASC"); - if(DB_num_rows($Result)>0) {// If the user has access permissions to one or more GL accounts: - $k = 0; //row colour counter - while ($MyRow = DB_fetch_array($Result)) { - if($k == 1) { - echo '<tr class="EvenTableRows">'; - $k = 0; - } else { - echo '<tr class="OddTableRows">'; - $k = 1; - } - echo '<td class="text">', $MyRow['accountcode'], '</td> - <td class="text">', $MyRow['accountname'], '</td> - <td class="centre">'; - if($MyRow['canview'] == 1) { - echo _('Yes'); - } else { - echo _('No'); - } - echo '</td> - <td class="centre">'; - - $ScriptName = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'); - if($MyRow['canupd'] == 1) { - echo _('Yes'), '</td>', - '<td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=0" onclick="return confirm(\'', _('Are you sure you wish to remove Update for this GL Account?'), '\');">', _('Remove Update'); - } else { - echo _('No'), '</td>', - '<td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=1" onclick="return confirm(\'', _('Are you sure you wish to add Update for this GL Account?'), '\');">', _('Add Update'); - } - echo '</a></td>', - '<td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&delete=yes" onclick="return confirm(\'', _('Are you sure you wish to un-authorise this GL Account?'), '\');">', _('Un-authorise'), '</a></td>', - '</tr>'; - }// End while list loop. - } else {// If the user does not have access permissions to GL accounts: - echo '<tr><td class="centre" colspan="6">', _('User does not have access permissions to GL accounts'), '</td></tr>'; - } - echo '</tbody></table>', - '<br />', - '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', - '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', - '<input name="SelectedUser" type="hidden" value="', $SelectedUser, '" />', - '<br /> - <table class="selection noprint"> - <tr> - <td>'; - $Result = DB_query(" - SELECT - accountcode, - accountname - FROM chartmaster - WHERE NOT EXISTS (SELECT glaccountusers.accountcode - FROM glaccountusers - WHERE glaccountusers.userid='" . $SelectedUser . "' - AND glaccountusers.accountcode=chartmaster.accountcode) - ORDER BY accountcode"); - if(DB_num_rows($Result)>0) {// If the user does not have access permissions to one or more GL accounts: - echo _('Add access permissions to a GL account'), ':</td> - <td><select name="SelectedGLAccount">'; - if(!isset($_POST['SelectedGLAccount'])) { - echo '<option selected="selected" value="">', _('Not Yet Selected'), '</option>'; - } - while ($MyRow = DB_fetch_array($Result)) { - if(isset($_POST['SelectedGLAccount']) and $MyRow['accountcode'] == $_POST['SelectedGLAccount']) { - echo '<option selected="selected" value="'; - } else { - echo '<option value="'; - } - echo $MyRow['accountcode'], '">', $MyRow['accountcode'], ' - ', $MyRow['accountname'], '</option>'; - } - echo '</select></td> - <td><input type="submit" name="submit" value="Accept" />'; - } else {// If the user has access permissions to all GL accounts: - echo _('User has access permissions to all GL accounts'); - } - echo '</td> - </tr> - </table>'; - DB_free_result($Result); - echo '<br>', // Form buttons: - '<div class="centre noprint">', - '<button onclick="javascript:window.print()" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, - '/images/printer.png" /> ', _('Print This'), '</button>', // "Print This" button. - '<button formaction="UserGLAccounts.php?Cancel" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, - '/images/user.png" /> ', _('Select A Different User'), '</button>'; // "Select A Different User" button. -} -echo '<button formaction="index.php?Application=GL" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, - '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button. - '</div> - </form>'; - -include('includes/footer.inc'); -?> +<?php +/* $Id: UserGLAccounts.php 7427 2015-12-27 19:59:10Z rchacon $*/ +/* Maintenance of GL Accounts allowed for a user. */ + +include('includes/session.inc'); +$Title = _('User Authorised GL Accounts'); +$ViewTopic = 'GeneralLedger'; +$BookMark = 'UserGLAccounts'; +include('includes/header.inc'); + +if(isset($_POST['SelectedUser']) and $_POST['SelectedUser']<>'') {//If POST not empty: + $SelectedUser = mb_strtoupper($_POST['SelectedUser']); +} elseif(isset($_GET['SelectedUser']) and $_GET['SelectedUser']<>'') {//If GET not empty: + $SelectedUser = mb_strtoupper($_GET['SelectedUser']); +} else {// Unset empty SelectedUser: + unset($_GET['SelectedUser']); + unset($_POST['SelectedUser']); + unset($SelectedUser); +} + +if(isset($_POST['SelectedGLAccount'])) { + $SelectedGLAccount = mb_strtoupper($_POST['SelectedGLAccount']); +} elseif(isset($_GET['SelectedGLAccount'])) { + $SelectedGLAccount = mb_strtoupper($_GET['SelectedGLAccount']); +} else { + $SelectedGLAccount = '';/*// Unset empty SelectedGLAccount: + unset($_GET['SelectedGLAccount']); + unset($_POST['SelectedGLAccount']); + unset($SelectedGLAccount);*/ +} + +if(isset($_GET['Cancel']) or isset($_POST['Cancel'])) { + unset($SelectedUser); + unset($SelectedGLAccount); +} + +if(!isset($SelectedUser)) {// If is NOT set a user for GL accounts. + echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" title="',// Icon image. + _('User Authorised GL Accounts'), '" /> ',// Icon title. + _('User Authorised GL Accounts'), '</p>';// Page title. + + /* It could still be the second time the page has been run and a record has been selected for modification - SelectedGLAccount will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters then none of the above are true. These will call the same page again and allow update/input or deletion of the records.*/ + + if(isset($_POST['Process'])) { + prnMsg(_('You have not selected any user'), 'error'); + } + echo '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', + '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', + '<table class="selection"> + <tr> + <td>', _('Select User'), ':</td> + <td><select name="SelectedUser" onchange="this.form.submit()">',// Submit when the value of the select is changed. + '<option value="">', _('Not Yet Selected'), '</option>'; + $Result = DB_query(" + SELECT + userid, + realname + FROM www_users + ORDER BY userid"); + while ($MyRow = DB_fetch_array($Result)) { + echo '<option '; + if(isset($SelectedUser) and $MyRow['userid'] == $SelectedUser) { + echo 'selected="selected" '; + } + echo 'value="', $MyRow['userid'], '">', $MyRow['userid'], ' - ', $MyRow['realname'], '</option>'; + }// End while loop. + echo '</select></td> + </tr> + </table>';//Close Select_User table. + + DB_free_result($Result); + + echo '<div class="centre noprint">',// Form buttons: + '<button name="Process" type="submit" value="Accept"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/user.png" /> ', _('Accept'), '</button> '; // "Accept" button. + +} else {// If is set a user for GL accounts ($SelectedUser). + $Result = DB_query(" + SELECT realname + FROM www_users + WHERE userid='" . $SelectedUser . "'"); + $MyRow = DB_fetch_array($Result); + $SelectedUserName = $MyRow['realname']; + echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/gl.png" title="',// Icon image. + _('User Authorised GL Accounts'), '" /> ',// Icon title. + _('Authorised GL Accounts for'), ' ', $SelectedUserName, '</p>';// Page title. + + // BEGIN: Needs $SelectedUser, $SelectedGLAccount: + if(isset($_POST['submit'])) { + if(!isset('SelectedGLAccount')) { + prnMsg(_('You have not selected an GL Account to be authorised for this user'), 'error'); + } else { + // First check the user is not being duplicated + $CheckResult = DB_query(" + SELECT count(*) + FROM glaccountusers + WHERE accountcode= '" . $_POST['SelectedGLAccount'] . "' + AND userid = '" . $SelectedUser . "'"); + $CheckRow = DB_fetch_row($CheckResult); + if($CheckRow[0] > 0) { + prnMsg(_('The GL Account') . ' ' . $SelectedGLAccount . ' ' . _('is already authorised for this user'), 'error'); + } else { + // Add new record on submit + $SQL = "INSERT INTO glaccountusers ( + accountcode, + userid, + canview, + canupd + ) VALUES ('" . + $SelectedGLAccount . "','" . + $SelectedUser . "', + '1', + '1')"; + $ErrMsg = _('An access permission to a GL account could not be added'); + if(DB_query($SQL, $ErrMsg)) { + prnMsg(_('An access permission to a GL account was added') . '. ' . _('User') . ': ' . $SelectedUser . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '.', 'success'); + unset($_GET['SelectedGLAccount']); + unset($_POST['SelectedGLAccount']); + } + } + } + } elseif(isset($_GET['delete']) or isset($_POST['delete'])) { + $SQL = "DELETE FROM glaccountusers + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + $ErrMsg = _('An access permission to a GL account could not be removed'); + if(DB_query($SQL, $ErrMsg)) { + prnMsg(_('An access permission to a GL account was removed') . '. ' . _('User') . ': ' . $SelectedUser . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '.', 'success'); + unset($_GET['delete']); + unset($_POST['delete']); + } + } elseif(isset($_GET['ToggleUpdate']) or isset($_POST['ToggleUpdate'])) {// Can update (write) GL accounts flag. + if(isset($_GET['ToggleUpdate']) and $_GET['ToggleUpdate']<>'') {//If GET not empty. + $ToggleUpdate = $_GET['ToggleUpdate']; + } elseif(isset($_POST['ToggleUpdate']) and $_POST['ToggleUpdate']<>'') {//If POST not empty. + $ToggleUpdate = $_POST['ToggleUpdate']; + } + $SQL = "UPDATE glaccountusers + SET canupd='" . $ToggleUpdate . "' + WHERE accountcode='" . $SelectedGLAccount . "' + AND userid='" . $SelectedUser . "'"; + $ErrMsg = _('An access permission to update a GL account could not be modified'); + if(DB_query($SQL, $ErrMsg)) { + prnMsg(_('An access permission to update a GL account was modified') . '. ' . _('User') . ': ' . $SelectedUser . '. ' . _('GL Account') . ': ' . $SelectedGLAccount . '.', 'success'); + unset($_GET['ToggleUpdate']); + unset($_POST['ToggleUpdate']); + } + } +// END: Needs $SelectedUser, $SelectedGLAccount. + + echo '<table class="selection"> + <thead> + <tr> + <th class="text">', _('Code'), '</th> + <th class="text">', _('Name'), '</th> + <th class="centre">', _('View'), '</th> + <th class="centre">', _('Update'), '</th> + <th class="noprint" colspan="2"> </th> + </tr> + </thead><tbody>'; + $Result = DB_query(" + SELECT + glaccountusers.accountcode, + canview, + canupd, + chartmaster.accountname + FROM glaccountusers INNER JOIN chartmaster + ON glaccountusers.accountcode=chartmaster.accountcode + WHERE glaccountusers.userid='" . $SelectedUser . "' + ORDER BY chartmaster.accountcode ASC"); + if(DB_num_rows($Result)>0) {// If the user has access permissions to one or more GL accounts: + $k = 0; //row colour counter + while ($MyRow = DB_fetch_array($Result)) { + if($k == 1) { + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k = 1; + } + echo '<td class="text">', $MyRow['accountcode'], '</td> + <td class="text">', $MyRow['accountname'], '</td> + <td class="centre">'; + if($MyRow['canview'] == 1) { + echo _('Yes'); + } else { + echo _('No'); + } + echo '</td> + <td class="centre">'; + + $ScriptName = htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8'); + if($MyRow['canupd'] == 1) { + echo _('Yes'), '</td>', + '<td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=0" onclick="return confirm(\'', _('Are you sure you wish to remove Update for this GL Account?'), '\');">', _('Remove Update'); + } else { + echo _('No'), '</td>', + '<td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&ToggleUpdate=1" onclick="return confirm(\'', _('Are you sure you wish to add Update for this GL Account?'), '\');">', _('Add Update'); + } + echo '</a></td>', + '<td class="noprint"><a href="', $ScriptName, '?SelectedUser=', $SelectedUser, '&SelectedGLAccount=', $MyRow['accountcode'], '&delete=yes" onclick="return confirm(\'', _('Are you sure you wish to un-authorise this GL Account?'), '\');">', _('Un-authorise'), '</a></td>', + '</tr>'; + }// End while list loop. + } else {// If the user does not have access permissions to GL accounts: + echo '<tr><td class="centre" colspan="6">', _('User does not have access permissions to GL accounts'), '</td></tr>'; + } + echo '</tbody></table>', + '<br />', + '<form action="', htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8'), '" method="post">', + '<input name="FormID" type="hidden" value="', $_SESSION['FormID'], '" />', + '<input name="SelectedUser" type="hidden" value="', $SelectedUser, '" />', + '<br /> + <table class="selection noprint"> + <tr> + <td>'; + $Result = DB_query(" + SELECT + accountcode, + accountname + FROM chartmaster + WHERE NOT EXISTS (SELECT glaccountusers.accountcode + FROM glaccountusers + WHERE glaccountusers.userid='" . $SelectedUser . "' + AND glaccountusers.accountcode=chartmaster.accountcode) + ORDER BY accountcode"); + if(DB_num_rows($Result)>0) {// If the user does not have access permissions to one or more GL accounts: + echo _('Add access permissions to a GL account'), ':</td> + <td><select name="SelectedGLAccount">'; + if(!isset($_POST['SelectedGLAccount'])) { + echo '<option selected="selected" value="">', _('Not Yet Selected'), '</option>'; + } + while ($MyRow = DB_fetch_array($Result)) { + if(isset($_POST['SelectedGLAccount']) and $MyRow['accountcode'] == $_POST['SelectedGLAccount']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $MyRow['accountcode'], '">', $MyRow['accountcode'], ' - ', $MyRow['accountname'], '</option>'; + } + echo '</select></td> + <td><input type="submit" name="submit" value="Accept" />'; + } else {// If the user has access permissions to all GL accounts: + echo _('User has access permissions to all GL accounts'); + } + echo '</td> + </tr> + </table>'; + DB_free_result($Result); + echo '<br>', // Form buttons: + '<div class="centre noprint">', + '<button onclick="javascript:window.print()" type="button"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/printer.png" /> ', _('Print This'), '</button>', // "Print This" button. + '<button formaction="UserGLAccounts.php?Cancel" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/user.png" /> ', _('Select A Different User'), '</button>'; // "Select A Different User" button. +} +echo '<button formaction="index.php?Application=GL" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button. + '</div> + </form>'; + +include('includes/footer.inc'); +?> Modified: trunk/doc/Manual/ManualGeneralLedger.html =================================================================== --- trunk/doc/Manual/ManualGeneralLedger.html 2015-12-28 03:50:00 UTC (rev 7432) +++ trunk/doc/Manual/ManualGeneralLedger.html 2015-12-29 18:06:35 UTC (rev 7433) @@ -406,15 +406,20 @@ <div class="floatright"><a class="minitext" href="#top">⬆ Top</a></div> <h2>Maintenance</h2> -<!--h3><a id="GLAccountUsers">GL Accounts Authorised Users</a></h3> -<p>.</p--> +<h3><a id="GLAccountUsers">GL Accounts Authorised Users</a></h3> +<p>This software has methods to assign permissions or access rights to specific users and groups of users. The system controls the ability of the users to view or make changes to the contents of the GL accounts.</p> +<p>With this script, you can change a specific GL account access permissions for users:</p> +<ul> +<li>You can add or remove the read permission for each user that grants or denies his ability to view that GL account.</li> +<li>You can add or remove the write permission for each user that grants or denies the ability to update that GL account.</li> +</ul> <h3><a id="UserGLAccounts">User Authorised GL Accounts</a></h3> <p>This software has methods to assign permissions or access rights to specific users and groups of users. The system controls the ability of the users to view or make changes to the contents of the GL accounts.</p> <p>With this script, you can change a specific user access permissions to GL accounts:</p> <ul> -<li>You can add or remove the read permission for each GL account that grants or denies the ability of a user to view it.</li> -<li>You can add or remove the write permission for each GL account that grants or denies the ability of a user to update it.</li> +<li>You can add or remove the read permission for each GL account that grants or denies the ability of that user to view it.</li> +<li>You can add or remove the write permission for each GL account that grants or denies the ability of that user to update it.</li> </ul> <!--h3><a id="BankAccounts.php">Bank Accounts</a></h3> |
From: <rc...@us...> - 2015-12-29 18:39:13
|
Revision: 7435 http://sourceforge.net/p/web-erp/reponame/7435 Author: rchacon Date: 2015-12-29 18:39:08 +0000 (Tue, 29 Dec 2015) Log Message: ----------- Rebuild languages files *.pot, *.po and *.mo. Modified Paths: -------------- trunk/UserGLAccounts.php trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.mo trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po trunk/locale/ar_SY.utf8/LC_MESSAGES/messages.mo trunk/locale/ar_SY.utf8/LC_MESSAGES/messages.po trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/ko_KR.utf8/LC_MESSAGES/messages.mo trunk/locale/ko_KR.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/mr_IN.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/locale/zh_TW.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_TW.utf8/LC_MESSAGES/messages.po Modified: trunk/UserGLAccounts.php =================================================================== --- trunk/UserGLAccounts.php 2015-12-29 18:09:02 UTC (rev 7434) +++ trunk/UserGLAccounts.php 2015-12-29 18:39:08 UTC (rev 7435) @@ -18,15 +18,14 @@ unset($SelectedUser); } -if(isset($_POST['SelectedGLAccount'])) { +if(isset($_POST['SelectedGLAccount']) and $_POST['SelectedGLAccount']<>'') {//If POST not empty: $SelectedGLAccount = mb_strtoupper($_POST['SelectedGLAccount']); -} elseif(isset($_GET['SelectedGLAccount'])) { +} elseif(isset($_GET['SelectedGLAccount']) and $_GET['SelectedGLAccount']<>'') {//If GET not empty: $SelectedGLAccount = mb_strtoupper($_GET['SelectedGLAccount']); -} else { - $SelectedGLAccount = '';/*// Unset empty SelectedGLAccount: +} else {// Unset empty SelectedGLAccount: unset($_GET['SelectedGLAccount']); unset($_POST['SelectedGLAccount']); - unset($SelectedGLAccount);*/ + unset($SelectedGLAccount); } if(isset($_GET['Cancel']) or isset($_POST['Cancel'])) { @@ -34,6 +33,7 @@ unset($SelectedGLAccount); } + if(!isset($SelectedUser)) {// If is NOT set a user for GL accounts. echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, '/images/gl.png" title="',// Icon image. @@ -72,7 +72,7 @@ DB_free_result($Result); echo '<div class="centre noprint">',// Form buttons: - '<button name="Process" type="submit" value="Accept"><img alt="" src="', $RootPath, '/css/', $Theme, + '<button name="Process" type="submit" value="Submit"><img alt="" src="', $RootPath, '/css/', $Theme, '/images/user.png" /> ', _('Accept'), '</button> '; // "Accept" button. } else {// If is set a user for GL accounts ($SelectedUser). @@ -89,14 +89,14 @@ // BEGIN: Needs $SelectedUser, $SelectedGLAccount: if(isset($_POST['submit'])) { - if(!isset('SelectedGLAccount')) { + if(!isset($SelectedGLAccount)) { prnMsg(_('You have not selected an GL Account to be authorised for this user'), 'error'); } else { // First check the user is not being duplicated $CheckResult = DB_query(" SELECT count(*) FROM glaccountusers - WHERE accountcode= '" . $_POST['SelectedGLAccount'] . "' + WHERE accountcode= '" . $SelectedGLAccount . "' AND userid = '" . $SelectedUser . "'"); $CheckRow = DB_fetch_row($CheckResult); if($CheckRow[0] > 0) { Modified: trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po 2015-12-29 18:09:02 UTC (rev 7434) +++ trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po 2015-12-29 18:39:08 UTC (rev 7435) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 4.12.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-09-14 09:07-0600\n" +"POT-Creation-Date: 2015-12-29 12:33-0600\n" "PO-Revision-Date: 2013-06-01 11:19-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: Arabic <ar...@li...>\n" @@ -18,7 +18,7 @@ "X-Generator: Poedit 1.5.4\n" "X-Launchpad-Export-Date: 2012-03-07 23:01+0000\n" -#: AccountGroups.php:6 includes/MainMenuLinksArray.php:395 +#: AccountGroups.php:6 includes/MainMenuLinksArray.php:397 msgid "Account Groups" msgstr "مجموعات العضوية" @@ -230,48 +230,49 @@ #: AgedSuppliers.php:276 Areas.php:144 AuditTrail.php:11 #: BOMExtendedQty.php:256 BOMIndented.php:249 BOMIndentedReverse.php:236 #: BOMInquiry.php:186 BOMListing.php:110 BOMs.php:239 BOMs.php:890 -#: COGSGLPostings.php:19 CompanyPreferences.php:102 CounterReturns.php:1629 -#: CounterSales.php:2097 CounterSales.php:2193 CreditStatus.php:21 -#: Credit_Invoice.php:276 CustEDISetup.php:17 CustItem.php:120 -#: CustItem.php:210 CustItem.php:238 DebtorsAtPeriodEnd.php:129 -#: DiscountCategories.php:12 DiscountCategories.php:149 DiscountMatrix.php:16 -#: EDIMessageFormat.php:105 FixedAssetLocations.php:13 -#: FixedAssetRegister.php:16 FixedAssetRegister.php:256 -#: FixedAssetTransfer.php:14 FormDesigner.php:185 GLBudgets.php:32 -#: GLJournal.php:250 GLJournalInquiry.php:11 HistoricalTestResults.php:42 -#: InternalStockRequest.php:311 InventoryPlanning.php:459 -#: InventoryPlanningPrefSupplier.php:386 MRPReport.php:544 -#: MaintenanceTasks.php:14 MaintenanceUserSchedule.php:16 NoSalesItems.php:91 -#: PDFPickingList.php:29 PDFStockLocTransfer.php:16 POReport.php:60 -#: POReport.php:64 POReport.php:68 PO_AuthorisationLevels.php:10 -#: PO_SelectOSPurchOrder.php:153 PcAssignCashToTab.php:59 -#: PcAssignCashToTab.php:133 PcAssignCashToTab.php:149 -#: PcAssignCashToTab.php:193 PriceMatrix.php:16 Prices.php:11 -#: PricesBasedOnMarkUp.php:8 Prices_Customer.php:35 ProductSpecs.php:38 -#: PurchData.php:241 PurchData.php:373 PurchData.php:401 +#: COGSGLPostings.php:19 CollectiveWorkOrderCost.php:7 +#: CollectiveWorkOrderCost.php:273 CompanyPreferences.php:102 +#: CounterReturns.php:1629 CounterSales.php:2097 CounterSales.php:2193 +#: CreditStatus.php:21 Credit_Invoice.php:276 CustEDISetup.php:17 +#: CustItem.php:120 CustItem.php:210 CustItem.php:238 +#: DebtorsAtPeriodEnd.php:129 DiscountCategories.php:12 +#: DiscountCategories.php:149 DiscountMatrix.php:16 EDIMessageFormat.php:105 +#: FixedAssetLocations.php:13 FixedAssetRegister.php:16 +#: FixedAssetRegister.php:256 FixedAssetTransfer.php:14 FormDesigner.php:185 +#: GLBudgets.php:32 GLJournal.php:250 GLJournalInquiry.php:11 +#: HistoricalTestResults.php:42 InternalStockRequest.php:311 +#: InventoryPlanning.php:459 InventoryPlanningPrefSupplier.php:386 +#: MRPReport.php:544 MaintenanceTasks.php:14 MaintenanceUserSchedule.php:16 +#: NoSalesItems.php:91 PDFPickingList.php:29 PDFStockLocTransfer.php:16 +#: POReport.php:60 POReport.php:64 POReport.php:68 +#: PO_AuthorisationLevels.php:10 PO_SelectOSPurchOrder.php:153 +#: PcAssignCashToTab.php:59 PcAssignCashToTab.php:144 +#: PcAssignCashToTab.php:160 PcAssignCashToTab.php:204 PriceMatrix.php:16 +#: Prices.php:11 PricesBasedOnMarkUp.php:8 Prices_Customer.php:35 +#: ProductSpecs.php:38 PurchData.php:241 PurchData.php:373 PurchData.php:401 #: PurchaseByPrefSupplier.php:305 QATests.php:22 RecurringSalesOrders.php:320 #: RelatedItemsUpdate.php:24 SalesAnalReptCols.php:51 SalesAnalRepts.php:14 #: SalesCategories.php:11 SalesGLPostings.php:19 SalesGraph.php:40 #: SalesPeople.php:28 SalesTypes.php:20 SelectAsset.php:48 #: SelectCompletedOrder.php:11 SelectContract.php:69 SelectCreditItems.php:220 -#: SelectCreditItems.php:291 SelectCustomer.php:266 SelectGLAccount.php:65 -#: SelectOrderItems.php:559 SelectOrderItems.php:1467 -#: SelectOrderItems.php:1567 SelectProduct.php:502 SelectQASamples.php:45 -#: SelectSalesOrder.php:512 SelectSupplier.php:14 SelectSupplier.php:220 +#: SelectCreditItems.php:291 SelectCustomer.php:267 SelectGLAccount.php:77 +#: SelectOrderItems.php:559 SelectOrderItems.php:1469 +#: SelectOrderItems.php:1569 SelectProduct.php:518 SelectQASamples.php:45 +#: SelectSalesOrder.php:512 SelectSupplier.php:14 SelectSupplier.php:222 #: SelectWorkOrder.php:9 SelectWorkOrder.php:174 SellThroughSupport.php:229 #: ShipmentCosting.php:11 Shipments.php:17 Shippers.php:123 Shippers.php:160 -#: Shipt_Select.php:8 StockLocMovements.php:14 StockLocStatus.php:29 -#: StockSerialItemResearch.php:30 SupplierPriceList.php:14 -#: SupplierPriceList.php:224 SupplierPriceList.php:394 -#: SupplierPriceList.php:398 SupplierPriceList.php:449 -#: SupplierPriceList.php:499 SupplierTenderCreate.php:556 -#: SupplierTenderCreate.php:664 SupplierTenders.php:322 -#: SupplierTenders.php:388 SupplierTransInquiry.php:10 Suppliers.php:304 -#: TestPlanResults.php:27 TopItems.php:118 UnitsOfMeasure.php:10 -#: WWW_Users.php:34 WhereUsedInquiry.php:18 WorkCentres.php:111 -#: WorkCentres.php:163 WorkOrderCosting.php:22 WorkOrderEntry.php:11 -#: WorkOrderIssue.php:22 WorkOrderReceive.php:34 WorkOrderStatus.php:58 -#: Z_BottomUpCosts.php:57 ../webSHOP/includes/header.php:251 +#: Shipt_Select.php:8 StockLocMovements.php:14 StockSerialItemResearch.php:30 +#: SupplierPriceList.php:14 SupplierPriceList.php:224 +#: SupplierPriceList.php:394 SupplierPriceList.php:398 +#: SupplierPriceList.php:449 SupplierPriceList.php:499 +#: SupplierTenderCreate.php:556 SupplierTenderCreate.php:664 +#: SupplierTenders.php:322 SupplierTenders.php:388 SupplierTransInquiry.php:10 +#: Suppliers.php:304 TestPlanResults.php:27 TopItems.php:118 +#: UnitsOfMeasure.php:10 WWW_Users.php:34 WhereUsedInquiry.php:18 +#: WorkCentres.php:111 WorkCentres.php:163 WorkOrderCosting.php:22 +#: WorkOrderEntry.php:11 WorkOrderIssue.php:22 WorkOrderReceive.php:34 +#: WorkOrderStatus.php:58 Z_BottomUpCosts.php:57 +#: ../webSHOP/includes/header.php:251 msgid "Search" msgstr "إبحث" @@ -288,8 +289,8 @@ msgstr "" #: AccountGroups.php:289 AccountGroups.php:441 GLProfit_Loss.php:6 -#: GLProfit_Loss.php:135 GLProfit_Loss.php:136 GLProfit_Loss.php:187 -#: SelectGLAccount.php:23 SelectGLAccount.php:37 SelectGLAccount.php:51 +#: GLProfit_Loss.php:135 GLProfit_Loss.php:136 GLProfit_Loss.php:188 +#: SelectGLAccount.php:23 SelectGLAccount.php:41 SelectGLAccount.php:59 msgid "Profit and Loss" msgstr "" @@ -301,48 +302,49 @@ #: ContractCosting.php:202 Currencies.php:342 Currencies.php:520 #: Currencies.php:522 CustomerBranches.php:452 Customers.php:659 #: Customers.php:1049 Customers.php:1055 Customers.php:1058 -#: DailyBankTransactions.php:156 DeliveryDetails.php:1158 +#: DailyBankTransactions.php:212 DeliveryDetails.php:1158 #: DeliveryDetails.php:1199 DeliveryDetails.php:1202 FormDesigner.php:101 -#: GLTransInquiry.php:74 Labels.php:601 Labels.php:603 Labels.php:628 -#: Locations.php:446 Locations.php:670 Locations.php:672 Locations.php:685 -#: Locations.php:687 Locations.php:703 MRP.php:554 MRP.php:558 MRP.php:562 -#: MRP.php:566 MRP.php:570 MRPCalendar.php:224 PDFChequeListing.php:65 -#: PDFDIFOT.php:80 PDFDeliveryDifferences.php:76 PDFWOPrint.php:600 -#: PDFWOPrint.php:604 PO_AuthorisationLevels.php:134 -#: PO_AuthorisationLevels.php:139 PO_Header.php:807 PO_PDFPurchOrder.php:413 -#: PO_PDFPurchOrder.php:416 PaymentMethods.php:206 PaymentMethods.php:207 -#: PaymentMethods.php:208 PaymentMethods.php:209 PaymentMethods.php:275 -#: PaymentMethods.php:282 PaymentMethods.php:289 PaymentMethods.php:296 -#: PcAuthorizeExpenses.php:248 ProductSpecs.php:188 ProductSpecs.php:409 -#: ProductSpecs.php:414 ProductSpecs.php:420 ProductSpecs.php:425 -#: ProductSpecs.php:430 ProductSpecs.php:562 ProductSpecs.php:608 -#: ProductSpecs.php:610 ProductSpecs.php:621 ProductSpecs.php:623 -#: ProductSpecs.php:634 ProductSpecs.php:636 ProductSpecs.php:647 -#: ProductSpecs.php:649 PurchData.php:296 PurchData.php:667 PurchData.php:670 -#: QATests.php:293 QATests.php:295 QATests.php:306 QATests.php:308 -#: QATests.php:319 QATests.php:321 QATests.php:332 QATests.php:334 -#: QATests.php:345 QATests.php:347 QATests.php:414 QATests.php:419 -#: QATests.php:424 QATests.php:429 QATests.php:434 -#: RecurringSalesOrders.php:493 RecurringSalesOrders.php:496 -#: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 -#: SalesAnalReptCols.php:422 SalesAnalRepts.php:420 SalesAnalRepts.php:423 -#: SalesAnalRepts.php:448 SalesAnalRepts.php:451 SalesAnalRepts.php:476 -#: SalesAnalRepts.php:479 SalesCategories.php:264 SalesCategories.php:351 -#: SalesCategories.php:355 SalesPeople.php:227 SalesPeople.php:367 -#: SalesPeople.php:369 SelectProduct.php:229 SelectProduct.php:354 -#: SelectQASamples.php:424 SelectQASamples.php:518 SelectQASamples.php:520 -#: SelectQASamples.php:574 SelectQASamples.php:576 SelectQASamples.php:588 -#: SelectQASamples.php:590 ShipmentCosting.php:667 ShopParameters.php:289 -#: ShopParameters.php:293 ShopParameters.php:337 ShopParameters.php:341 -#: ShopParameters.php:391 ShopParameters.php:395 ShopParameters.php:413 -#: ShopParameters.php:417 ShopParameters.php:495 ShopParameters.php:499 -#: StockClone.php:922 StockClone.php:924 StockClone.php:947 StockClone.php:949 -#: Stocks.php:1256 Stocks.php:1258 Stocks.php:1281 Stocks.php:1283 -#: SuppContractChgs.php:90 SystemParameters.php:479 SystemParameters.php:502 -#: SystemParameters.php:543 SystemParameters.php:624 SystemParameters.php:632 -#: SystemParameters.php:672 SystemParameters.php:763 SystemParameters.php:772 -#: SystemParameters.php:780 SystemParameters.php:798 SystemParameters.php:805 -#: SystemParameters.php:849 SystemParameters.php:945 SystemParameters.php:1088 +#: GLAccountUsers.php:181 GLAccountUsers.php:190 GLTransInquiry.php:74 +#: Labels.php:606 Labels.php:608 Labels.php:634 Locations.php:446 +#: Locations.php:670 Locations.php:672 Locations.php:685 Locations.php:687 +#: Locations.php:703 MRP.php:554 MRP.php:558 MRP.php:562 MRP.php:566 +#: MRP.php:570 MRPCalendar.php:224 PDFChequeListing.php:65 PDFDIFOT.php:80 +#: PDFDeliveryDifferences.php:76 PDFWOPrint.php:602 PDFWOPrint.php:606 +#: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 +#: PO_Header.php:807 PO_PDFPurchOrder.php:413 PO_PDFPurchOrder.php:416 +#: PaymentMethods.php:206 PaymentMethods.php:207 PaymentMethods.php:208 +#: PaymentMethods.php:209 PaymentMethods.php:275 PaymentMethods.php:282 +#: PaymentMethods.php:289 PaymentMethods.php:296 PcAuthorizeExpenses.php:248 +#: ProductSpecs.php:188 ProductSpecs.php:409 ProductSpecs.php:414 +#: ProductSpecs.php:420 ProductSpecs.php:425 ProductSpecs.php:430 +#: ProductSpecs.php:562 ProductSpecs.php:608 ProductSpecs.php:610 +#: ProductSpecs.php:621 ProductSpecs.php:623 ProductSpecs.php:634 +#: ProductSpecs.php:636 ProductSpecs.php:647 ProductSpecs.php:649 +#: PurchData.php:296 PurchData.php:667 PurchData.php:670 QATests.php:293 +#: QATests.php:295 QATests.php:306 QATests.php:308 QATests.php:319 +#: QATests.php:321 QATests.php:332 QATests.php:334 QATests.php:345 +#: QATests.php:347 QATests.php:414 QATests.php:419 QATests.php:424 +#: QATests.php:429 QATests.php:434 RecurringSalesOrders.php:493 +#: RecurringSalesOrders.php:496 SalesAnalReptCols.php:284 +#: SalesAnalReptCols.php:419 SalesAnalReptCols.php:422 SalesAnalRepts.php:420 +#: SalesAnalRepts.php:423 SalesAnalRepts.php:448 SalesAnalRepts.php:451 +#: SalesAnalRepts.php:476 SalesAnalRepts.php:479 SalesCategories.php:264 +#: SalesCategories.php:351 SalesCategories.php:355 SalesPeople.php:227 +#: SalesPeople.php:367 SalesPeople.php:369 SelectProduct.php:227 +#: SelectProduct.php:365 SelectQASamples.php:424 SelectQASamples.php:518 +#: SelectQASamples.php:520 SelectQASamples.php:574 SelectQASamples.php:576 +#: SelectQASamples.php:588 SelectQASamples.php:590 ShipmentCosting.php:667 +#: ShopParameters.php:289 ShopParameters.php:293 ShopParameters.php:337 +#: ShopParameters.php:341 ShopParameters.php:391 ShopParameters.php:395 +#: ShopParameters.php:413 ShopParameters.php:417 ShopParameters.php:495 +#: ShopParameters.php:499 StockClone.php:922 StockClone.php:924 +#: StockClone.php:947 StockClone.php:949 Stocks.php:1256 Stocks.php:1258 +#: Stocks.php:1281 Stocks.php:1283 SuppContractChgs.php:90 +#: SystemParameters.php:479 SystemParameters.php:502 SystemParameters.php:543 +#: SystemParameters.php:624 SystemParameters.php:632 SystemParameters.php:672 +#: SystemParameters.php:763 SystemParameters.php:772 SystemParameters.php:780 +#: SystemParameters.php:798 SystemParameters.php:805 SystemParameters.php:849 +#: SystemParameters.php:945 SystemParameters.php:1088 #: SystemParameters.php:1090 SystemParameters.php:1100 #: SystemParameters.php:1102 SystemParameters.php:1156 #: SystemParameters.php:1168 SystemParameters.php:1170 @@ -350,9 +352,10 @@ #: SystemParameters.php:1232 SystemParameters.php:1234 TaxGroups.php:310 #: TaxGroups.php:313 TaxGroups.php:364 TestPlanResults.php:304 #: TestPlanResults.php:532 TestPlanResults.php:747 TestPlanResults.php:864 -#: TestPlanResults.php:924 TestPlanResults.php:928 WWW_Users.php:516 -#: WWW_Users.php:518 WWW_Users.php:689 WWW_Users.php:691 WWW_Users.php:704 -#: WWW_Users.php:706 reportwriter/languages/en_US/reports.php:114 +#: TestPlanResults.php:924 TestPlanResults.php:928 UserGLAccounts.php:187 +#: UserGLAccounts.php:196 WWW_Users.php:534 WWW_Users.php:536 +#: WWW_Users.php:707 WWW_Users.php:709 WWW_Users.php:722 WWW_Users.php:724 +#: reportwriter/languages/en_US/reports.php:114 msgid "Yes" msgstr "موافق" @@ -365,14 +368,15 @@ #: ContractCosting.php:200 Currencies.php:344 Currencies.php:525 #: Currencies.php:527 CustomerBranches.php:452 Customers.php:658 #: Customers.php:1047 Customers.php:1054 Customers.php:1057 -#: DailyBankTransactions.php:158 DeliveryDetails.php:1159 +#: DailyBankTransactions.php:214 DeliveryDetails.php:1159 #: DeliveryDetails.php:1200 DeliveryDetails.php:1203 FormDesigner.php:99 -#: GLTransInquiry.php:93 Labels.php:600 Labels.php:604 Labels.php:629 -#: Locations.php:446 Locations.php:675 Locations.php:677 Locations.php:690 -#: Locations.php:692 Locations.php:704 MRP.php:552 MRP.php:556 MRP.php:560 -#: MRP.php:564 MRP.php:568 MRPCalendar.php:226 NoSalesItems.php:191 +#: GLAccountUsers.php:183 GLAccountUsers.php:193 GLTransInquiry.php:93 +#: Labels.php:605 Labels.php:609 Labels.php:635 Locations.php:446 +#: Locations.php:675 Locations.php:677 Locations.php:690 Locations.php:692 +#: Locations.php:704 MRP.php:552 MRP.php:556 MRP.php:560 MRP.php:564 +#: MRP.php:568 MRPCalendar.php:226 NoSalesItems.php:191 #: PDFChequeListing.php:64 PDFDIFOT.php:79 PDFDeliveryDifferences.php:75 -#: PDFWOPrint.php:601 PDFWOPrint.php:605 PO_AuthorisationLevels.php:136 +#: PDFWOPrint.php:603 PDFWOPrint.php:607 PO_AuthorisationLevels.php:136 #: PO_AuthorisationLevels.php:141 PO_Header.php:806 PO_PDFPurchOrder.php:414 #: PO_PDFPurchOrder.php:417 PaymentMethods.php:206 PaymentMethods.php:207 #: PaymentMethods.php:208 PaymentMethods.php:209 PaymentMethods.php:276 @@ -392,8 +396,8 @@ #: SalesAnalRepts.php:422 SalesAnalRepts.php:447 SalesAnalRepts.php:450 #: SalesAnalRepts.php:475 SalesAnalRepts.php:478 SalesCategories.php:266 #: SalesCategories.php:352 SalesCategories.php:354 SalesPeople.php:229 -#: SalesPeople.php:372 SalesPeople.php:374 SelectProduct.php:231 -#: SelectProduct.php:356 SelectQASamples.php:426 SelectQASamples.php:523 +#: SalesPeople.php:372 SalesPeople.php:374 SelectProduct.php:229 +#: SelectProduct.php:367 SelectQASamples.php:426 SelectQASamples.php:523 #: SelectQASamples.php:525 SelectQASamples.php:579 SelectQASamples.php:581 #: SelectQASamples.php:593 SelectQASamples.php:595 ShipmentCosting.php:668 #: ShopParameters.php:290 ShopParameters.php:292 ShopParameters.php:338 @@ -414,9 +418,10 @@ #: SystemParameters.php:1231 SystemParameters.php:1235 TaxGroups.php:311 #: TaxGroups.php:314 TaxGroups.php:366 TestPlanResults.php:306 #: TestPlanResults.php:535 TestPlanResults.php:749 TestPlanResults.php:866 -#: TestPlanResults.php:925 TestPlanResults.php:927 WWW_Users.php:515 -#: WWW_Users.php:519 WWW_Users.php:688 WWW_Users.php:692 WWW_Users.php:703 -#: WWW_Users.php:707 includes/PDFLowGPPageHeader.inc:44 +#: TestPlanResults.php:925 TestPlanResults.php:927 UserGLAccounts.php:189 +#: UserGLAccounts.php:199 WWW_Users.php:533 WWW_Users.php:537 +#: WWW_Users.php:706 WWW_Users.php:710 WWW_Users.php:721 WWW_Users.php:725 +#: includes/PDFLowGPPageHeader.inc:44 #: reportwriter/languages/en_US/reports.php:82 msgid "No" msgstr "ﻻ" @@ -434,21 +439,21 @@ #: Labels.php:358 Locations.php:439 MRPDemandTypes.php:120 MRPDemands.php:309 #: MailingGroupMaintenance.php:178 MaintenanceTasks.php:118 #: Manufacturers.php:217 PO_AuthorisationLevels.php:151 PaymentMethods.php:210 -#: PaymentTerms.php:205 PcAssignCashToTab.php:277 +#: PaymentTerms.php:205 PcAssignCashToTab.php:288 #: PcClaimExpensesFromTab.php:276 PcExpenses.php:226 PcTabs.php:236 -#: PcTypeTabs.php:180 PriceMatrix.php:287 Prices.php:253 +#: PcTypeTabs.php:180 PriceMatrix.php:293 Prices.php:253 #: Prices_Customer.php:286 ProductSpecs.php:465 PurchData.php:312 #: QATests.php:467 SalesCategories.php:272 SalesGLPostings.php:137 #: SalesGLPostings.php:255 SalesPeople.php:240 SalesTypes.php:206 -#: SecurityTokens.php:130 SelectCustomer.php:615 SelectCustomer.php:634 -#: SelectCustomer.php:664 SelectCustomer.php:682 SelectCustomer.php:706 -#: SelectCustomer.php:723 SelectGLAccount.php:117 SelectGLAccount.php:132 +#: SecurityTokens.php:130 SelectCustomer.php:616 SelectCustomer.php:635 +#: SelectCustomer.php:665 SelectCustomer.php:683 SelectCustomer.php:707 +#: SelectCustomer.php:724 SelectGLAccount.php:130 SelectGLAccount.php:145 #: SelectQASamples.php:417 SellThroughSupport.php:298 Shippers.php:144 #: StockCategories.php:296 SuppTransGLAnalysis.php:125 #: SupplierContacts.php:165 SupplierTenderCreate.php:157 SupplierTypes.php:170 #: TaxAuthorities.php:172 TaxCategories.php:184 TaxGroups.php:190 #: TaxProvinces.php:179 UnitsOfMeasure.php:185 WWW_Access.php:132 -#: WWW_Users.php:350 WorkCentres.php:142 includes/InputSerialItems.php:110 +#: WWW_Users.php:368 WorkCentres.php:142 includes/InputSerialItems.php:110 #: includes/OutputSerialItems.php:20 #: reportwriter/languages/en_US/reports.php:143 #, php-format @@ -465,37 +470,37 @@ #: COGSGLPostings.php:220 ContractBOM.php:272 ContractOtherReqts.php:124 #: CounterReturns.php:740 CounterSales.php:836 CreditStatus.php:176 #: Credit_Invoice.php:409 Currencies.php:377 CustItem.php:167 -#: CustomerReceipt.php:987 CustomerTypes.php:206 Customers.php:1166 +#: CustomerReceipt.php:994 CustomerTypes.php:206 Customers.php:1166 #: Departments.php:187 DiscountCategories.php:238 DiscountMatrix.php:183 #: EDIMessageFormat.php:151 FixedAssetCategories.php:191 FreightCosts.php:254 -#: GLAccounts.php:318 GLJournal.php:430 GLTags.php:97 GeocodeSetup.php:174 +#: GLAccounts.php:318 GLJournal.php:431 GLTags.php:97 GeocodeSetup.php:174 #: ImportBankTransAnalysis.php:224 InternalStockCategoriesByRole.php:184 -#: InternalStockRequest.php:294 Labels.php:334 Labels.php:359 Labels.php:607 +#: InternalStockRequest.php:294 Labels.php:334 Labels.php:359 Labels.php:612 #: Locations.php:440 MRPDemandTypes.php:121 MRPDemands.php:310 #: MailingGroupMaintenance.php:179 MaintenanceTasks.php:119 #: Manufacturers.php:218 PO_AuthorisationLevels.php:153 PO_Items.php:768 -#: PaymentMethods.php:211 PaymentTerms.php:206 Payments.php:1112 -#: PcAssignCashToTab.php:281 PcClaimExpensesFromTab.php:277 PcExpenses.php:227 +#: PaymentMethods.php:211 PaymentTerms.php:206 Payments.php:1114 +#: PcAssignCashToTab.php:292 PcClaimExpensesFromTab.php:277 PcExpenses.php:227 #: PcExpensesTypeTab.php:187 PcTabs.php:237 PcTypeTabs.php:181 -#: PriceMatrix.php:286 Prices.php:254 Prices_Customer.php:287 +#: PriceMatrix.php:292 Prices.php:254 Prices_Customer.php:287 #: ProductSpecs.php:466 PurchData.php:314 PurchData.php:721 QATests.php:468 #: RelatedItemsUpdate.php:155 RelatedItemsUpdate.php:170 #: SalesAnalReptCols.php:299 SalesAnalRepts.php:307 SalesCategories.php:273 #: SalesGLPostings.php:138 SalesGLPostings.php:256 SalesPeople.php:241 #: SalesTypes.php:207 SecurityTokens.php:131 SelectCreditItems.php:778 -#: SelectCustomer.php:616 SelectCustomer.php:635 SelectCustomer.php:665 -#: SelectCustomer.php:683 SelectCustomer.php:707 SelectCustomer.php:724 -#: SelectOrderItems.php:1379 SelectQASamples.php:418 +#: SelectCustomer.php:617 SelectCustomer.php:636 SelectCustomer.php:666 +#: SelectCustomer.php:684 SelectCustomer.php:708 SelectCustomer.php:725 +#: SelectOrderItems.php:1381 SelectQASamples.php:418 #: SellThroughSupport.php:299 Shipments.php:438 Shippers.php:145 #: SpecialOrder.php:667 StockCategories.php:297 StockCategories.php:626 #: StockLocTransfer.php:325 SuppContractChgs.php:99 SuppCreditGRNs.php:117 -#: SuppFixedAssetChgs.php:90 SuppInvGRNs.php:147 SuppShiptChgs.php:90 +#: SuppFixedAssetChgs.php:90 SuppInvGRNs.php:150 SuppShiptChgs.php:90 #: SuppTransGLAnalysis.php:126 SupplierContacts.php:166 #: SupplierTenderCreate.php:422 SupplierTenderCreate.php:452 #: SupplierTypes.php:172 TaxAuthorities.php:173 TaxCategories.php:186 #: TaxGroups.php:191 TaxProvinces.php:180 TestPlanResults.php:920 #: UnitsOfMeasure.php:186 WOSerialNos.php:335 WWW_Access.php:133 -#: WWW_Users.php:351 WorkCentres.php:143 includes/InputSerialItemsKeyed.php:60 +#: WWW_Users.php:369 WorkCentres.php:143 includes/InputSerialItemsKeyed.php:60 #: includes/OutputSerialItems.php:99 #: reportwriter/languages/en_US/reports.php:141 #, php-format @@ -566,22 +571,22 @@ #: CreditStatus.php:259 Currencies.php:537 CustLoginSetup.php:273 #: Departments.php:258 DiscountMatrix.php:142 EDIMessageFormat.php:248 #: FixedAssetCategories.php:350 FixedAssetLocations.php:161 -#: FreightCosts.php:371 GLAccounts.php:265 GeocodeSetup.php:271 Labels.php:641 +#: FreightCosts.php:371 GLAccounts.php:265 GeocodeSetup.php:271 Labels.php:647 #: Locations.php:716 MRPDemandTypes.php:188 MRPDemands.php:424 #: Manufacturers.php:312 OffersReceived.php:57 OffersReceived.php:146 #: PO_AuthorisationLevels.php:264 PaymentMethods.php:302 PaymentTerms.php:310 -#: PriceMatrix.php:230 Prices_Customer.php:369 ProductSpecs.php:661 +#: PriceMatrix.php:236 Prices_Customer.php:369 ProductSpecs.php:661 #: QATests.php:359 SalesAnalReptCols.php:552 SalesAnalRepts.php:519 #: SalesGLPostings.php:427 SalesPeople.php:381 SelectQASamples.php:531 #: SelectQASamples.php:601 Shippers.php:203 StockCategories.php:653 #: SuppLoginSetup.php:291 SupplierContacts.php:284 TaxAuthorities.php:327 #: TaxCategories.php:244 TaxProvinces.php:234 TestPlanResults.php:967 -#: UnitsOfMeasure.php:241 WWW_Users.php:774 WorkCentres.php:283 +#: UnitsOfMeasure.php:241 WWW_Users.php:792 WorkCentres.php:283 msgid "Enter Information" msgstr "أدخل المعلومات" #: AccountSections.php:6 AccountSections.php:172 AccountSections.php:173 -#: includes/MainMenuLinksArray.php:394 +#: includes/MainMenuLinksArray.php:396 msgid "Account Sections" msgstr "أعدادات العضو" @@ -639,8 +644,8 @@ msgid "Could not retrieve the requested section please try again." msgstr "لم أستطيع استرجاع القطاع المطلوب حاول مجددا" -#: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:607 -#: SelectCustomer.php:642 +#: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:608 +#: SelectCustomer.php:643 msgid "Customer Contacts" msgstr "" @@ -677,7 +682,7 @@ #: AddCustomerTypeNotes.php:48 Areas.php:72 CustomerTypes.php:68 #: DeliveryDetails.php:809 DeliveryDetails.php:826 Factors.php:105 #: FixedAssetItems.php:250 MRPCalendar.php:176 PO_Items.php:380 -#: PcAssignCashToTab.php:91 PcClaimExpensesFromTab.php:82 PcExpenses.php:98 +#: PcAssignCashToTab.php:102 PcClaimExpensesFromTab.php:82 PcExpenses.php:98 #: PcTabs.php:104 PcTypeTabs.php:63 ProductSpecs.php:315 QATests.php:76 #: SalesAnalReptCols.php:129 SalesPeople.php:105 SalesTypes.php:66 #: SelectQASamples.php:85 Stocks.php:589 SupplierTypes.php:68 @@ -698,15 +703,16 @@ #: ImportBankTransAnalysis.php:207 PrintWOItemSlip.php:184 #: PrintWOItemSlip.php:195 PrintWOItemSlip.php:206 ProductSpecs.php:164 #: ProductSpecs.php:385 QATests.php:391 SalesPeople.php:208 -#: SelectCustomer.php:610 StockDispatch.php:275 StockDispatch.php:286 +#: SelectCustomer.php:611 StockDispatch.php:275 StockDispatch.php:286 #: StockDispatch.php:297 SuppTransGLAnalysis.php:108 SupplierContacts.php:152 -#: Tax.php:411 TestPlanResults.php:508 UserLocations.php:176 +#: Tax.php:411 TestPlanResults.php:508 UserBankAccounts.php:161 +#: UserGLAccounts.php:157 UserLocations.php:176 #: includes/InputSerialItemsFile.php:92 includes/InputSerialItemsFile.php:144 msgid "Name" msgstr "" #: AddCustomerContacts.php:127 AddCustomerContacts.php:223 Customers.php:1119 -#: Customers.php:1127 SelectCustomer.php:611 WWW_Access.php:113 +#: Customers.php:1127 SelectCustomer.php:612 WWW_Access.php:113 #: WWW_Access.php:179 msgid "Role" msgstr "" @@ -721,13 +727,13 @@ #: CustomerInquiry.php:409 CustomerInquiry.php:444 CustomerInquiry.php:490 #: Customers.php:1121 Customers.php:1129 EmailCustTrans.php:16 #: EmailCustTrans.php:65 Factors.php:246 Factors.php:297 Locations.php:639 -#: OrderDetails.php:115 PDFRemittanceAdvice.php:251 PDFWOPrint.php:591 -#: PDFWOPrint.php:594 PDFWOPrint.php:674 PDFWOPrint.php:677 +#: OrderDetails.php:115 PDFRemittanceAdvice.php:251 PDFWOPrint.php:593 +#: PDFWOPrint.php:596 PDFWOPrint.php:676 PDFWOPrint.php:679 #: PO_PDFPurchOrder.php:400 PO_PDFPurchOrder.php:403 PrintCustTrans.php:740 #: PrintCustTransPortrait.php:793 PrintCustTransPortrait.php:1039 -#: PrintCustTransPortrait.php:1095 SelectCustomer.php:428 -#: SelectCustomer.php:613 SelectSupplier.php:288 SupplierContacts.php:156 -#: SupplierContacts.php:277 UserSettings.php:184 WWW_Users.php:304 +#: PrintCustTransPortrait.php:1095 SelectCustomer.php:429 +#: SelectCustomer.php:614 SelectSupplier.php:290 SupplierContacts.php:156 +#: SupplierContacts.php:277 UserSettings.php:184 WWW_Users.php:322 #: includes/PDFPickingListHeader.inc:25 includes/PDFStatementPageHeader.inc:67 #: includes/PDFTransPageHeader.inc:85 #: includes/PDFTransPageHeaderPortrait.inc:114 includes/PDFWOPageHeader.inc:19 @@ -739,10 +745,10 @@ #: AddCustomerContacts.php:130 AddCustomerContacts.php:250 #: AnalysisHorizontalIncome.php:169 AnalysisHorizontalPosition.php:132 #: Customers.php:1122 Customers.php:1130 PDFQuotation.php:252 -#: PDFQuotationPortrait.php:249 PcAssignCashToTab.php:242 -#: PcAssignCashToTab.php:380 PcAuthorizeExpenses.php:97 +#: PDFQuotationPortrait.php:249 PcAssignCashToTab.php:253 +#: PcAssignCashToTab.php:391 PcAuthorizeExpenses.php:97 #: PcClaimExpensesFromTab.php:238 PcClaimExpensesFromTab.php:405 -#: PcReportTab.php:333 SelectCustomer.php:614 ShopParameters.php:198 +#: PcReportTab.php:333 SelectCustomer.php:615 ShopParameters.php:198 #: SystemParameters.php:411 WOSerialNos.php:306 WOSerialNos.php:312 msgid "Notes" msgstr "" @@ -766,8 +772,8 @@ msgstr "" #: AddCustomerContacts.php:232 Contracts.php:781 PDFRemittanceAdvice.php:247 -#: PO_Header.php:1025 PO_Header.php:1110 SelectCreditItems.php:245 -#: SelectCustomer.php:426 SelectOrderItems.php:597 +#: PO_Header.php:1026 PO_Header.php:1111 SelectCreditItems.php:245 +#: SelectCustomer.php:427 SelectOrderItems.php:597 #: SupplierTenderCreate.php:395 includes/PDFStatementPageHeader.inc:63 #: includes/PDFTransPageHeader.inc:84 #: includes/PDFTransPageHeaderPortrait.inc:110 ../webSHOP/Checkout.php:389 @@ -775,8 +781,8 @@ msgid "Phone" msgstr "" -#: AddCustomerNotes.php:6 AddCustomerNotes.php:51 SelectCustomer.php:657 -#: SelectCustomer.php:690 +#: AddCustomerNotes.php:6 AddCustomerNotes.php:51 SelectCustomer.php:658 +#: SelectCustomer.php:691 msgid "Customer Notes" msgstr "" @@ -814,20 +820,19 @@ #: BankReconciliation.php:212 BankReconciliation.php:289 #: ContractCosting.php:177 CustomerAccount.php:252 CustomerAllocations.php:348 #: CustomerAllocations.php:378 CustomerInquiry.php:251 -#: CustomerTransInquiry.php:100 GLAccountInquiry.php:173 -#: GLAccountReport.php:343 GLTransInquiry.php:47 GoodsReceived.php:109 -#: MRPCalendar.php:219 PDFRemittanceAdvice.php:308 PDFWOPrint.php:448 -#: PaymentAllocations.php:66 PcAssignCashToTab.php:238 +#: CustomerTransInquiry.php:100 GLAccountReport.php:347 GLTransInquiry.php:47 +#: GoodsReceived.php:130 MRPCalendar.php:219 PDFRemittanceAdvice.php:308 +#: PDFWOPrint.php:450 PaymentAllocations.php:66 PcAssignCashToTab.php:249 #: PcAuthorizeExpenses.php:93 PrintCustTrans.php:822 #: PrintCustTransPortrait.php:907 PrintWOItemSlip.php:186 -#: PrintWOItemSlip.php:197 PrintWOItemSlip.php:208 ReverseGRN.php:398 -#: SelectCustomer.php:660 SelectCustomer.php:702 ShipmentCosting.php:538 +#: PrintWOItemSlip.php:197 PrintWOItemSlip.php:208 ReverseGRN.php:401 +#: SelectCustomer.php:661 SelectCustomer.php:703 ShipmentCosting.php:538 #: ShipmentCosting.php:615 Shipments.php:489 StockDispatch.php:277 #: StockDispatch.php:288 StockDispatch.php:299 StockLocMovements.php:92 #: StockMovements.php:105 StockSerialItemResearch.php:82 #: SupplierAllocations.php:456 SupplierAllocations.php:569 #: SupplierAllocations.php:644 SupplierInquiry.php:210 -#: SupplierTransInquiry.php:105 Tax.php:408 +#: SupplierTransInquiry.php:111 Tax.php:408 #: includes/PDFQuotationPageHeader.inc:23 #: includes/PDFQuotationPortraitPageHeader.inc:80 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTransPageHeader.inc:51 @@ -837,7 +842,7 @@ msgstr "" #: AddCustomerNotes.php:118 AddCustomerTypeNotes.php:112 PcReportTab.php:180 -#: SelectCustomer.php:661 SelectCustomer.php:703 StockClone.php:926 +#: SelectCustomer.php:662 SelectCustomer.php:704 StockClone.php:926 #: Stocks.php:1260 UpgradeDatabase.php:244 UpgradeDatabase.php:247 #: UpgradeDatabase.php:250 UpgradeDatabase.php:253 UpgradeDatabase.php:256 #: UpgradeDatabase.php:259 UpgradeDatabase.php:262 UpgradeDatabase.php:265 @@ -856,7 +861,7 @@ #: AddCustomerNotes.php:120 AddCustomerNotes.php:231 #: AddCustomerTypeNotes.php:114 AddCustomerTypeNotes.php:215 -#: SelectCustomer.php:663 SelectCustomer.php:705 +#: SelectCustomer.php:664 SelectCustomer.php:706 msgid "Priority" msgstr "" @@ -877,7 +882,7 @@ msgid "Contact Note" msgstr "" -#: AddCustomerTypeNotes.php:5 SelectCustomer.php:699 +#: AddCustomerTypeNotes.php:5 SelectCustomer.php:700 msgid "Customer Type (Group) Notes" msgstr "" @@ -893,7 +898,7 @@ msgid "The contacts notes may not be empty" msgstr "" -#: AddCustomerTypeNotes.php:48 SelectCustomer.php:731 +#: AddCustomerTypeNotes.php:48 SelectCustomer.php:732 msgid "Customer Group Notes" msgstr "" @@ -935,7 +940,7 @@ #: AgedControlledInventory.php:12 InventoryQuantities.php:155 #: InventoryValuation.php:217 Locations.php:12 MRP.php:542 MRPCalendar.php:21 -#: MRPCreateDemands.php:197 MRPDemandTypes.php:17 MRPDemands.php:27 +#: MRPCreateDemands.php:193 MRPDemandTypes.php:17 MRPDemands.php:27 #: MRPPlannedPurchaseOrders.php:265 MRPPlannedWorkOrders.php:247 #: MRPPlannedWorkOrders.php:321 PricesByCost.php:8 ReorderLevel.php:194 #: ReorderLevelLocation.php:12 SelectProduct.php:89 StockDispatch.php:319 @@ -959,15 +964,16 @@ #: AgedControlledInventory.php:43 AutomaticTranslationDescriptions.php:37 #: BOMIndented.php:315 BOMIndentedReverse.php:293 BOMInquiry.php:109 -#: BOMInquiry.php:198 BOMs.php:567 BOMs.php:914 ContractBOM.php:242 -#: ContractBOM.php:354 ContractOtherReqts.php:98 CounterReturns.php:1692 -#: CounterSales.php:2102 CounterSales.php:2256 CreditStatus.php:152 -#: CreditStatus.php:243 CustomerPurchases.php:81 EmailConfirmation.php:219 +#: BOMInquiry.php:198 BOMs.php:567 BOMs.php:914 CollectiveWorkOrderCost.php:45 +#: CollectiveWorkOrderCost.php:317 ContractBOM.php:242 ContractBOM.php:354 +#: ContractOtherReqts.php:98 CounterReturns.php:1692 CounterSales.php:2102 +#: CounterSales.php:2256 CreditStatus.php:152 CreditStatus.php:243 +#: CustomerPurchases.php:81 EmailConfirmation.php:219 #: EmailConfirmation.php:349 FixedAssetCategories.php:167 #: FixedAssetDepreciation.php:91 FixedAssetRegister.php:87 #: FixedAssetRegister.php:388 FixedAssetTransfer.php:60 #: FixedAssetTransfer.php:162 GLTags.php:63 GLTags.php:82 -#: GLTransInquiry.php:49 GoodsReceived.php:101 +#: GLTransInquiry.php:49 GoodsReceived.php:122 #: InternalStockCategoriesByRole.php:168 InternalStockRequest.php:345 #: InternalStockRequest.php:559 InternalStockRequest.php:629 #: InventoryPlanning.php:419 InventoryQuantities.php:246 @@ -982,18 +988,18 @@ #: PaymentTerms.php:182 PcExpenses.php:190 PcExpenses.php:296 #: PcExpensesTypeTab.php:171 PcReportTab.php:178 PcTypeTabs.php:164 #: PricesByCost.php:153 RelatedItemsUpdate.php:154 ReorderLevel.php:298 -#: ReorderLevelLocation.php:73 ReverseGRN.php:397 SalesCategories.php:509 +#: ReorderLevelLocation.php:73 ReverseGRN.php:400 SalesCategories.php:509 #: SecurityTokens.php:94 SecurityTokens.php:103 SecurityTokens.php:120 #: SelectAsset.php:264 SelectCompletedOrder.php:505 SelectContract.php:147 -#: SelectCreditItems.php:1021 SelectOrderItems.php:1477 -#: SelectOrderItems.php:1639 SelectProduct.php:522 SelectProduct.php:748 +#: SelectCreditItems.php:1021 SelectOrderItems.php:1479 +#: SelectOrderItems.php:1641 SelectProduct.php:538 SelectProduct.php:826 #: SelectQASamples.php:299 SelectQASamples.php:397 SelectSalesOrder.php:560 -#: SelectWorkOrder.php:219 Shipt_Select.php:191 StockClone.php:680 -#: StockCounts.php:142 StockDispatch.php:504 StockLocStatus.php:173 +#: SelectWorkOrder.php:219 Shipt_Select.php:191 StockClone.php:679 +#: StockCounts.php:142 StockDispatch.php:504 StockLocStatus.php:176 #: StockQuantityByDate.php:109 Stocks.php:1013 SuppCreditGRNs.php:92 -#: SuppCreditGRNs.php:192 SuppFixedAssetChgs.php:78 SuppInvGRNs.php:120 -#: SuppInvGRNs.php:258 SuppPriceList.php:309 SupplierCredit.php:317 -#: SupplierCredit.php:385 SupplierInvoice.php:666 SupplierInvoice.php:746 +#: SuppCreditGRNs.php:192 SuppFixedAssetChgs.php:78 SuppInvGRNs.php:122 +#: SuppInvGRNs.php:264 SuppPriceList.php:309 SupplierCredit.php:317 +#: SupplierCredit.php:385 SupplierInvoice.php:668 SupplierInvoice.php:750 #: SupplierPriceList.php:39 SupplierPriceList.php:271 #: SupplierPriceList.php:533 SupplierTenderCreate.php:434 #: SupplierTenderCreate.php:695 SupplierTenderCreate.php:853 @@ -1001,7 +1007,7 @@ #: TestPlanResults.php:177 TestPlanResults.php:280 TopItems.php:170 #: WorkCentres.php:128 WorkOrderCosting.php:98 WorkOrderCosting.php:130 #: WorkOrderEntry.php:735 WorkOrderIssue.php:761 Z_ItemsWithoutPicture.php:33 -#: api/api_xml-rpc.php:3489 includes/PDFGrnHeader.inc:29 +#: api/api_xml-rpc.php:3489 includes/PDFGrnHeader.inc:30 #: includes/PDFInventoryPlanPageHeader.inc:51 #: includes/PDFOstdgGRNsPageHeader.inc:38 #: includes/PDFStockLocTransferHeader.inc:65 @@ -1035,12 +1041,12 @@ #: CounterSales.php:855 Credit_Invoice.php:298 Credit_Invoice.php:302 #: CustomerAllocations.php:349 CustomerAllocations.php:379 #: CustomerInquiry.php:256 DeliveryDetails.php:884 DeliveryDetails.php:953 -#: GLBalanceSheet.php:195 GLBalanceSheet.php:207 GLBalanceSheet.php:297 -#: GLBalanceSheet.php:306 GLBudgets.php:213 GLJournal.php:435 -#: GLTransInquiry.php:195 GLTrialBalance.php:223 GLTrialBalance.php:243 -#: GLTrialBalance.php:264 GLTrialBalance.php:360 GLTrialBalance.php:491 -#: GLTrialBalance.php:511 GLTrialBalance.php:535 GLTrialBalance.php:647 -#: GLTrialBalance.php:667 GLTrialBalance.php:691 InventoryValuation.php:197 +#: GLBalanceSheet.php:196 GLBalanceSheet.php:208 GLBalanceSheet.php:298 +#: GLBalanceSheet.php:307 GLBudgets.php:213 GLJournal.php:436 +#: GLTransInquiry.php:219 GLTrialBalance.php:225 GLTrialBalance.php:245 +#: GLTrialBalance.php:266 GLTrialBalance.php:362 GLTrialBalance.php:495 +#: GLTrialBalance.php:515 GLTrialBalance.php:539 GLTrialBalance.php:651 +#: GLTrialBalance.php:671 GLTrialBalance.php:695 InventoryValuation.php:197 #: MaterialsNotUsed.php:77 OffersReceived.php:111 OrderDetails.php:177 #: OutstandingGRNs.php:246 PDFCustTransListing.php:137 #: PDFOrdersInvoiced.php:379 PDFRemittanceAdvice.php:310 @@ -1048,7 +1054,7 @@ #: SalesByTypePeriodInquiry.php:395 SalesByTypePeriodInquiry.php:430 #: SalesByTypePeriodInquiry.php:465 SalesByTypePeriodInquiry.php:500 #: SalesByTypePeriodInquiry.php:561 SelectCreditItems.php:692 -#: SelectCreditItems.php:696 SelectOrderItems.php:1317 +#: SelectCreditItems.php:696 SelectOrderItems.php:1319 #: SuppContractChgs.php:107 SuppFixedAssetChgs.php:97 SuppShiptChgs.php:97 #: SuppTransGLAnalysis.php:139 SupplierAllocations.php:458 #: SupplierAllocations.php:570 SupplierAllocations.php:645 @@ -1081,8 +1087,8 @@ #: AgedSuppliers.php:108 BOMExtendedQty.php:154 BOMIndented.php:153 #: BOMIndentedReverse.php:140 BOMListing.php:42 BOMListing.php:53 #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:112 -#: GLBalanceSheet.php:151 GLProfit_Loss.php:187 GLTagProfit_Loss.php:194 -#: GLTrialBalance.php:165 InternalStockRequest.php:320 +#: GLBalanceSheet.php:152 GLProfit_Loss.php:188 GLTagProfit_Loss.php:195 +#: GLTrialBalance.php:167 InternalStockRequest.php:320 #: InventoryPlanning.php:99 InventoryPlanning.php:176 #: InventoryPlanning.php:213 InventoryPlanning.php:262 #: InventoryPlanningPrefSupplier.php:183 InventoryPlanningPrefSupplier.php:241 @@ -1119,10 +1125,10 @@ #: BOMIndentedReverse.php:144 BOMIndentedReverse.php:222 BOMListing.php:45 #: Credit_Invoice.php:201 Dashboard.php:146 Dashboard.php:257 #: Dashboard.php:438 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 -#: FTP_RadioBeacon.php:187 GLBalanceSheet.php:116 GLBalanceSheet.php:154 -#: GLBalanceSheet.php:333 GLProfit_Loss.php:190 GLProfit_Loss.php:202 -#: GLTagProfit_Loss.php:198 GLTagProfit_Loss.php:211 GLTrialBalance.php:168 -#: GLTrialBalance.php:180 GetStockImage.php:150 InventoryPlanning.php:102 +#: FTP_RadioBeacon.php:187 GLBalanceSheet.php:116 GLBalanceSheet.php:155 +#: GLBalanceSheet.php:334 GLProfit_Loss.php:191 GLProfit_Loss.php:203 +#: GLTagProfit_Loss.php:199 GLTagProfit_Loss.php:212 GLTrialBalance.php:170 +#: GLTrialBalance.php:182 GetStockImage.php:150 InventoryPlanning.php:102 #: InventoryPlanning.php:179 InventoryPlanning.php:216 #: InventoryPlanning.php:265 InventoryPlanning.php:340 #: InventoryPlanningPrefSupplier.php:186 InventoryPlanningPrefSupplier.php:244 @@ -1138,8 +1144,8 @@ #: MailInventoryValuation.php:243 MailInventoryValuation.php:251 #: OutstandingGRNs.php:49 OutstandingGRNs.php:62 PDFCustomerList.php:235 #: PDFCustomerList.php:247 PDFFGLabel.php:217 PDFGLJournal.php:100 -#: PDFGrn.php:176 PDFLowGP.php:59 PDFLowGP.php:71 PDFPriceList.php:147 -#: PDFPrintLabel.php:45 PDFQALabel.php:116 PDFQuotation.php:276 +#: PDFGrn.php:180 PDFLowGP.php:59 PDFLowGP.php:71 PDFPriceList.php:147 +#: PDFPrintLabel.php:42 PDFQALabel.php:116 PDFQuotation.php:276 #: PDFQuotationPortrait.php:268 PDFRemittanceAdvice.php:83 #: PDFSalesBySalesperson.php:160 PDFSalesBySalesperson.php:168 #: PDFSellThroughSupportClaim.php:74 PDFSellThroughSupportClaim.php:86 @@ -1177,7 +1183,7 @@ msgstr "" #: AgedDebtors.php:371 AgedSuppliers.php:197 Dashboard.php:256 -#: GLAccountCSV.php:175 GLAccountInquiry.php:161 GLAccountReport.php:97 +#: GLAccountCSV.php:179 GLAccountInquiry.php:167 GLAccountReport.php:97 #: PO_Items.php:451 PO_Items.php:580 PO_Items.php:605 #: PurchaseByPrefSupplier.php:29 PurchaseByPrefSupplier.php:54 #: SalesAnalReptCols.php:365 SpecialOrder.php:448 @@ -1186,35 +1192,35 @@ msgid "could not be retrieved because" msgstr "" -#: AgedDebtors.php:374 AgedSuppliers.php:200 AnalysisHorizontalIncome.php:199 +#: AgedDebtors.php:374 AgedSuppliers.php:200 AnalysisHorizontalIncome.php:200 #: Areas.php:94 ConfirmDispatch_Invoice.php:172 #: ConfirmDispatch_Invoice.php:1005 ConfirmDispatch_Invoice.php:1019 #: Contracts.php:592 CounterReturns.php:1024 CounterReturns.php:1038 #: CounterSales.php:1425 CounterSales.php:1439 Credit_Invoice.php:754 #: Credit_Invoice.php:775 CustItem.php:73 CustItem.php:86 CustItem.php:197 -#: CustomerReceipt.php:574 CustomerReceipt.php:726 CustomerReceipt.php:754 +#: CustomerReceipt.php:580 CustomerReceipt.php:733 CustomerReceipt.php:761 #: CustomerTransInquiry.php:91 Dashboard.php:259 Dashboard.php:440 -#: DeliveryDetails.php:412 GLProfit_Loss.php:611 GLTagProfit_Loss.php:515 +#: DeliveryDetails.php:412 GLProfit_Loss.php:613 GLTagProfit_Loss.php:516 #: PDFRemittanceAdvice.php:85 Payments.php:361 PurchData.php:114 #: PurchData.php:132 PurchData.php:360 RecurringSalesOrders.php:267 -#: ReverseGRN.php:192 ReverseGRN.php:206 ReverseGRN.php:385 SMTPServer.php:66 +#: ReverseGRN.php:193 ReverseGRN.php:207 ReverseGRN.php:387 SMTPServer.php:66 #: SelectCreditItems.php:1447 SelectSalesOrder.php:209 #: SelectSalesOrder.php:375 SellThroughSupport.php:81 #: SellThroughSupport.php:97 StockCheck.php:217 StockClone.php:430 #: StockClone.php:504 StockCostUpdate.php:78 StockCostUpdate.php:88 -#: StockLocStatus.php:165 StockLocTransferReceive.php:215 +#: StockLocStatus.php:167 StockLocTransferReceive.php:215 #: StockLocTransferReceive.php:368 StockMovements.php:98 #: StockQuantityByDate.php:98 StockReorderLevel.php:45 StockStatus.php:285 #: StockTransfers.php:202 StockTransfers.php:232 StockTransfers.php:387 #: StockUsage.php:142 StockUsageGraph.php:55 SuppPaymentRun.php:114 #: SuppPaymentRun.php:188 SuppPaymentRun.php:219 SupplierInquiry.php:79 #: SupplierInquiry.php:101 SupplierInquiry.php:139 SupplierInquiry.php:195 -#: SupplierPriceList.php:382 SupplierTransInquiry.php:97 WOSerialNos.php:49 +#: SupplierPriceList.php:382 SupplierTransInquiry.php:103 WOSerialNos.php:49 #: WorkOrderCosting.php:427 WorkOrderReceive.php:305 #: Z_ChangeBranchCode.php:112 Z_ChangeCustomerCode.php:97 #: Z_ChangeSupplierCode.php:88 Z_DeleteCreditNote.php:63 #: Z_DeleteCreditNote.php:73 Z_DeleteCreditNote.php:82 Z_DeleteInvoice.php:88 -#: Z_DeleteInvoice.php:98 Z_DeleteInvoice.php:110 Z_UpdateItemCosts.php:90 +#: Z_DeleteInvoice.php:98 Z_DeleteInvoice.php:110 Z_UpdateItemCosts.php:93 #: includes/ConnectDB_mysql.inc:66 includes/ConnectDB_mysqli.inc:74 #: includes/PDFPaymentRun_PymtFooter.php:61 #: includes/PDFPaymentRun_PymtFooter.php:91 @@ -1371,10 +1377,10 @@ #: AnalysisHorizontalIncome.php:10 AnalysisHorizontalPosition.php:10 #: BOMs.php:126 BOMs.php:132 BOMs.php:140 BOMs.php:932 BankAccounts.php:369 -#: InternalStockRequest.php:579 PO_SelectOSPurchOrder.php:621 +#: InternalStockRequest.php:579 PO_SelectOSPurchOrder.php:627 #: PaymentTerms.php:190 PaymentTerms.php:196 SalesAnalReptCols.php:285 -#: SelectProduct.php:135 SelectProduct.php:185 SelectProduct.php:246 -#: SelectProduct.php:247 SelectProduct.php:768 +#: SelectProduct.php:135 SelectProduct.php:184 SelectProduct.php:244 +#: SelectProduct.php:245 SelectProduct.php:846 #: StockCategorySalesInquiry.php:154 StockCategorySalesInquiry.php:188 #: StockCategorySalesInquiry.php:189 StockCategorySalesInquiry.php:194 #: StockCategorySalesInquiry.php:217 StockCategorySalesInquiry.php:230 @@ -1384,7 +1390,7 @@ #: AnalysisHorizontalIncome.php:15 AnalysisHorizontalIncome.php:31 #: AnalysisHorizontalIncome.php:146 AnalysisHorizontalIncome.php:147 -#: includes/MainMenuLinksArray.php:374 +#: includes/MainMenuLinksArray.php:376 msgid "Horizontal Analysis of Statement of Comprehensive Income" msgstr "" @@ -1473,49 +1479,49 @@ msgid "Show on Screen (HTML)" msgstr "" -#: AnalysisHorizontalIncome.php:121 AnalysisHorizontalIncome.php:521 -#: AnalysisHorizontalPosition.php:88 AnalysisHorizontalPosition.php:370 -#: DailyBankTransactions.php:190 GLBalanceSheet.php:718 GLProfit_Loss.php:1315 -#: GLTrialBalance.php:736 +#: AnalysisHorizontalIncome.php:121 AnalysisHorizontalIncome.php:522 +#: AnalysisHorizontalPosition.php:88 AnalysisHorizontalPosition.php:371 +#: DailyBankTransactions.php:255 GLAccountUsers.php:253 GLBalanceSheet.php:720 +#: GLProfit_Loss.php:1317 GLTrialBalance.php:740 UserGLAccounts.php:259 msgid "Return" msgstr "" #: AnalysisHorizontalIncome.php:131 GLProfit_Loss.php:147 -#: GLProfit_Loss.php:576 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:479 +#: GLProfit_Loss.php:577 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:480 msgid "A period up to 12 months in duration can be specified" msgstr "" #: AnalysisHorizontalIncome.php:131 GLProfit_Loss.php:147 -#: GLProfit_Loss.php:576 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:479 +#: GLProfit_Loss.php:577 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:480 msgid "" "the system automatically shows a comparative for the same period from the " "previous year" msgstr "" #: AnalysisHorizontalIncome.php:131 GLProfit_Loss.php:147 -#: GLProfit_Loss.php:576 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:479 +#: GLProfit_Loss.php:577 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:480 msgid "it cannot do this if a period of more than 12 months is specified" msgstr "" #: AnalysisHorizontalIncome.php:131 GLProfit_Loss.php:147 -#: GLProfit_Loss.php:576 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:479 +#: GLProfit_Loss.php:577 GLTagProfit_Loss.php:155 GLTagProfit_Loss.php:480 msgid "Please select an alternative period range" msgstr "" -#: AnalysisHorizontalIncome.php:149 FreightCosts.php:76 GLProfit_Loss.php:622 +#: AnalysisHorizontalIncome.php:149 FreightCosts.php:76 GLProfit_Loss.php:624 #: MRPReport.php:446 SalesGraph.php:229 SalesGraph.php:237 msgid "For" msgstr "" -#: AnalysisHorizontalIncome.php:149 GLProfit_Loss.php:622 -#: GLTagProfit_Loss.php:529 GLTrialBalance.php:440 Tax.php:25 +#: AnalysisHorizontalIncome.php:149 GLProfit_Loss.php:624 +#: GLTagProfit_Loss.php:530 GLTrialBalance.php:444 Tax.php:25 #: includes/PDFTaxPageHeader.inc:31 msgid "months to" msgstr "" #: AnalysisHorizontalIncome.php:150 AnalysisHorizontalPosition.php:113 #: Contracts.php:829 CustomerAccount.php:230 CustomerInquiry.php:162 -#: CustomerReceipt.php:1022 GLBalanceSheet.php:402 GLProfit_Loss.php:624 +#: CustomerReceipt.php:1029 GLBalanceSheet.php:404 GLProfit_Loss.php:626 #: PDFRemittanceAdvice.php:275 PO_Header.php:609 PrintCustTrans.php:776 #: PrintCustTransPortrait.php:933 SupplierInquiry.php:121 #: includes/PDFQuotationPageHeader.inc:88 @@ -1527,10 +1533,10 @@ msgstr "" #: AnalysisHorizontalIncome.php:155 AnalysisHorizontalPosition.php:118 -#: GLAccountInquiry.php:47 GLAccounts.php:196 GLBalanceSheet.php:408 -#: GLProfit_Loss.php:633 GLTagProfit_Loss.php:536 GLTrialBalance.php:448 +#: GLAccountInquiry.php:49 GLAccounts.php:196 GLBalanceSheet.php:410 +#: GLProfit_Loss.php:635 GLTagProfit_Loss.php:537 GLTrialBalance.php:452 #: ImportBankTransAnalysis.php:206 PrintCustTransPortrait.php:96 -#: SuppTransGLAnalysis.php:107 SupplierCredit.php:458 SupplierInvoice.php:828 +#: SuppTransGLAnalysis.php:107 SupplierCredit.php:458 SupplierInvoice.php:832 #: includes/PDFProfitAndLossPageHeader.inc:31 #: includes/PDFTagProfitAndLossPageHeader.inc:33 #: includes/PDFTrialBalancePageHeader.inc:28 @@ -1539,9 +1545,9 @@ #: AnalysisHorizontalIncome.php:156 AnalysisHorizontalPosition.php:119 #: Dashboard.php:533 GLAccounts.php:242 GLAccounts.php:295 -#: GLBalanceSheet.php:409 GLCodesInquiry.php:27 GLProfit_Loss.php:634 -#: GLTagProfit_Loss.php:537 GLTrialBalance.php:449 SelectGLAccount.php:113 -#: SupplierCredit.php:459 SupplierInvoice.php:829 +#: GLBalanceSheet.php:411 GLCodesInquiry.php:27 GLProfit_Loss.php:636 +#: GLTagProfit_Loss.php:538 GLTrialBalance.php:453 SelectGLAccount.php:126 +#: SupplierCredit.php:459 SupplierInvoice.php:833 #: Z_CreateCompanyTemplateFile.php:237 #: includes/PDFProfitAndLossPageHeader.inc:32 #: includes/PDFTagProfitAndLossPageHeader.inc:34 @@ -1550,8 +1556,8 @@ msgstr "" #: AnalysisHorizontalIncome.php:161 AnalysisHorizontalPosition.php:124 -#: GLBalanceSheet.php:411 GLBalanceSheet.php:417 GLProfit_Loss.php:637 -#: GLProfit_Loss.php:644 includes/PDFBalanceSheetPageHeader.inc:30 +#: GLBalanceSheet.php:413 GLBalanceSheet.php:419 GLProfit_Loss.php:639 +#: GLProfit_Loss.php:646 includes/PDFBalanceSheetPageHeader.inc:30 #: includes/PDFProfitAndLossPageHeader.inc:35 #: includes/PDFTagProfitAndLossPageHeader.inc:37 msgid "Last Year" @@ -1579,62 +1585,62 @@ "that account." msgstr "" -#: AnalysisHorizontalIncome.php:199 AnalysisHorizontalPosition.php:174 -#: GLBalanceSheet.php:153 GLBalanceSheet.php:390 GLCodesInquiry.php:18 -#: GLProfit_Loss.php:189 GLProfit_Loss.php:611 GLTagProfit_Loss.php:196 -#: GLTagProfit_Loss.php:515 GLTrialBalance.php:167 GLTrialBalance.php:434 +#: AnalysisHorizontalIncome.php:200 AnalysisHorizontalPosition.php:175 +#: GLBalanceSheet.php:154 GLBalanceSheet.php:392 GLCodesInquiry.php:18 +#: GLProfit_Loss.php:190 GLProfit_Loss.php:613 GLTagProfit_Loss.php:197 +#: GLTagProfit_Loss.php:516 GLTrialBalance.php:169 GLTrialBalance.php:438 msgid "No general ledger accounts were returned by the SQL because" msgstr "" -#: AnalysisHorizontalIncome.php:230 AnalysisHorizontalIncome.php:251 -#: AnalysisHorizontalIncome.php:406 AnalysisHorizontalIncome.php:437 -#: GLProfit_Loss.php:240 GLProfit_Loss.php:269 GLProfit_Loss.php:437 -#: GLProfit_Loss.php:466 GLProfit_Loss.php:682 GLProfit_Loss.php:728 -#: GLProfit_Loss.php:1041 GLProfit_Loss.php:1086 GLTagProfit_Loss.php:239 -#: GLTagProfit_Loss.php:264 GLTagProfit_Loss.php:384 GLTagProfit_Loss.php:407 -#: GLTagProfit_Loss.php:579 GLTagProfit_Loss.php:613 GLTagProfit_Loss.php:798 -#: GLTagProfit_Loss.php:824 +#: AnalysisHorizontalIncome.php:231 AnalysisHorizontalIncome.php:252 +#: AnalysisHorizontalIncome.php:407 AnalysisHorizontalIncome.php:438 +#: GLProfit_Loss.php:241 GLProfit_Loss.php:270 GLProfit_Loss.php:438 +#: GLProfit_Loss.php:467 GLProfit_Loss.php:684 GLProfit_Loss.php:730 +#: GLProfit_Loss.php:1043 GLProfit_Loss.php:1088 GLTagProfit_Loss.php:240 +#: GLTagProfit_Loss.php:265 GLTagProfit_Loss.php:385 GLTagProfit_Loss.php:408 +#: GLTagProfit_Loss.php:580 GLTagProfit_Loss.php:614 GLTagProfit_Loss.php:799 +#: GLTagProfit_Loss.php:825 msgid "total" msgstr "" -#: AnalysisHorizontalIncome.php:311 AnalysisHorizontalIncome.php:480 -#: Contracts.php:937 GLProfit_Loss.php:323 GLProfit_Loss.php:516 -#: GLProfit_Loss.php:829 GLProfit_Loss.php:1186 GLTagProfit_Loss.php:309 -#: GLTagProfit_Loss.php:447 GLTagProfit_Loss.php:684 GLTagProfit_Loss.php:883 +#: AnalysisHorizontalIncome.php:312 AnalysisHorizontalIncome.php:481 +#: Contracts.php:937 GLProfit_Loss.php:324 GLProfit_Loss.php:517 +#: GLProfit_Loss.php:831 GLProfit_Loss.php:1188 GLTagProfit_Loss.php:310 +#: GLTagProfit_Loss.php:448 GLTagProfit_Loss.php:685 GLTagProfit_Loss.php:884 #: PDFPriceList.php:431 SalesAnalReptCols.php:31 SalesAnalReptCols.php:33 #: SalesByTypePeriodInquiry.php:362 SalesCategoryPeriodInquiry.php:169 #: SalesGraph.php:196 SalesGraph.php:215 SalesGraph.php:278 -#: SelectProduct.php:180 +#: SelectProduct.php:179 #, php-format msgid "Gross Profit" msgstr "" -#: AnalysisHorizontalIncome.php:322 +#: AnalysisHorizontalIncome.php:323 msgid "Earnings after" msgstr "" -#: AnalysisHorizontalIncome.php:500 +#: AnalysisHorizontalIncome.php:501 msgid "Net Profit" msgstr "" -#: AnalysisHorizontalIncome.php:517 AnalysisHorizontalPosition.php:366 -#: DailyBankTransactions.php:184 GLBalanceSheet.php:714 GLProfit_Loss.php:1311 -#: GLTrialBalance.php:732 +#: AnalysisHorizontalIncome.php:518 AnalysisHorizontalPosition.php:367 +#: DailyBankTransactions.php:249 GLAccountUsers.php:248 GLBalanceSheet.php:716 +#: GLProfit_Loss.php:1313 GLTrialBalance.php:736 UserGLAccounts.php:254 msgid "Print This" msgstr "" -#: AnalysisHorizontalIncome.php:518 AnalysisHorizontalIncome.php:519 -#: AnalysisHorizontalPosition.php:367 AnalysisHorizontalPosition.php:368 -#: DailyBankTransactions.php:185 GLBalanceSheet.php:715 GLProfit_Loss.php:1312 -#: GLProfit_Loss.php:1313 GLTagProfit_Loss.php:938 GLTrialBalance.php:24 -#: GLTrialBalance.php:733 GLTrialBalance.php:734 SalesGraph.php:20 +#: AnalysisHorizontalIncome.php:519 AnalysisHorizontalIncome.php:520 +#: AnalysisHorizontalPosition.php:368 AnalysisHorizontalPosition.php:369 +#: DailyBankTransactions.php:250 GLBalanceSheet.php:717 GLProfit_Loss.php:1314 +#: GLProfit_Loss.php:1315 GLTagProfit_Loss.php:939 GLTrialBalance.php:24 +#: GLTrialBalance.php:737 GLTrialBalance.php:738 SalesGraph.php:20 #: SalesGraph.php:29 SalesGraph.php:34 msgid "Select A Different Period" msgstr "" #: AnalysisHorizontalPosition.php:15 AnalysisHorizontalPosition.php:28 #: AnalysisHorizontalPosition.php:109 AnalysisHorizontalPosition.php:110 -#: includes/MainMenuLinksArray.php:375 +#: includes/MainMenuLinksArray.php:377 msgid "Horizontal Analysis of Statement of Financial Position" msgstr "" @@ -1646,7 +1652,7 @@ msgid "Select the balance date" msgstr "" -#: AnalysisHorizontalPosition.php:112 GLBalanceSheet.php:401 +#: AnalysisHorizontalPosition.php:112 GLBalanceSheet.php:403 #: includes/PDFDebtorBalsPageHeader.inc:17 #: includes/PDFSupplierBalsPageHeader.inc:17 msgid "as at" @@ -1659,14 +1665,14 @@ msgstr "" #: AnalysisHorizontalPosition.php:148 GLBalanceSheet.php:114 -#: GLBalanceSheet.php:364 +#: GLBalanceSheet.php:365 msgid "" "The accumulated profits brought forward could not be calculated by the SQL " "because" msgstr "" -#: AnalysisHorizontalPosition.php:350 GLBalanceSheet.php:325 -#: GLBalanceSheet.php:694 +#: AnalysisHorizontalPosition.php:351 GLBalanceSheet.php:326 +#: GLBalanceSheet.php:696 #, php-format msgid "Check Total" msgstr "" @@ -1738,7 +1744,7 @@ #: Areas.php:131 CustomerTypes.php:167 Factors.php:140 #: FixedAssetCategories.php:142 GLAccounts.php:196 #: InternalStockCategoriesByRole.php:102 Locations.php:380 MRPDemands.php:250 -#: Manufacturers.php:163 PcAssignCashToTab.php:138 +#: Manufacturers.php:163 PcAssignCashToTab.php:149 #: PcClaimExpensesFromTab.php:130 PcExpenses.php:169 PcExpensesTypeTab.php:101 #: PcTabs.php:168 PcTypeTabs.php:143 SalesAnalReptCols.php:215 #: SalesCategories.php:139 SalesTypes.php:156 StockCategories.php:233 @@ -1791,13 +1797,15 @@ msgid "User ID" msgstr "" -#: AuditTrai... [truncated message content] |
From: <te...@us...> - 2016-01-04 00:16:57
|
Revision: 7436 http://sourceforge.net/p/web-erp/reponame/7436 Author: tehonu Date: 2016-01-04 00:16:55 +0000 (Mon, 04 Jan 2016) Log Message: ----------- Changed pow(1, to pow(10, everywhere as: pow(1,X) = 1 for any X. Made no sense. Modified Paths: -------------- trunk/StockCostUpdate.php trunk/Z_UpdateItemCosts.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2015-12-29 18:39:08 UTC (rev 7435) +++ trunk/StockCostUpdate.php 2016-01-04 00:16:55 UTC (rev 7436) @@ -62,7 +62,7 @@ $myrow = DB_fetch_row($result); if (DB_num_rows($result)==0) { prnMsg (_('The entered item code does not exist'),'error',_('Non-existent Item')); - } elseif (abs($NewCost - $OldCost) > pow(1,-($_SESSION['StandardCostDecimalPlaces']+1))){ + } elseif (abs($NewCost - $OldCost) > pow(10,-($_SESSION['StandardCostDecimalPlaces']+1))){ $Result = DB_Txn_Begin(); ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $_POST['QOH']); Modified: trunk/Z_UpdateItemCosts.php =================================================================== --- trunk/Z_UpdateItemCosts.php 2015-12-29 18:39:08 UTC (rev 7435) +++ trunk/Z_UpdateItemCosts.php 2016-01-04 00:16:55 UTC (rev 7436) @@ -75,7 +75,7 @@ $OldCost = $OldRow['materialcost'] + $OldRow['labourcost'] + $OldRow['overheadcost']; //dont update costs for assembly or kit-sets or ghost items!! - if ((abs($NewCost - $OldCost) > pow(1,-($_SESSION['StandardCostDecimalPlaces']+1))) + if ((abs($NewCost - $OldCost) > pow(10,-($_SESSION['StandardCostDecimalPlaces']+1))) AND $OldRow['mbflag']!='K' AND $OldRow['mbflag']!='A' AND $OldRow['mbflag']!='G'){ Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2015-12-29 18:39:08 UTC (rev 7435) +++ trunk/includes/SQL_CommonFunctions.inc 2016-01-04 00:16:55 UTC (rev 7436) @@ -160,7 +160,7 @@ function ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $QOH) { if ($_SESSION['CompanyRecord']['gllink_stock']==1 AND $QOH!=0 - AND (abs($NewCost - $OldCost) > pow(1,-($_SESSION['StandardCostDecimalPlaces']+1)))){ + AND (abs($NewCost - $OldCost) > pow(10,-($_SESSION['StandardCostDecimalPlaces']+1)))){ $CostUpdateNo = GetNextTransNo(35, $db); $PeriodNo = GetPeriod(date($_SESSION['DefaultDateFormat']), $db); |
From: <dai...@us...> - 2016-01-13 07:32:38
|
Revision: 7444 http://sourceforge.net/p/web-erp/reponame/7444 Author: daintree Date: 2016-01-13 07:32:36 +0000 (Wed, 13 Jan 2016) Log Message: ----------- Fixed bug in creating customer credit notes manually - blank taxes were being added that caused the SQL to commit the transaction to fail with foreign key constraint to tax authorities Modified Paths: -------------- trunk/SelectCreditItems.php trunk/TaxGroups.php trunk/doc/Change.log trunk/includes/DefineCartClass.php Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2016-01-13 03:03:24 UTC (rev 7443) +++ trunk/SelectCreditItems.php 2016-01-13 07:32:36 UTC (rev 7444) @@ -407,9 +407,9 @@ /*Always do the stuff below if not looking for a customerid Set up the form for the credit note display and entry*/ - echo '<form id="MainForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" method="post">'; - echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<form id="MainForm" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?identifier='.$identifier . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*Process Quick Entry */ @@ -569,9 +569,9 @@ $DiscountPercentage = filter_number_format($_POST['Discount_' . $LineItem->LineNumber]); - foreach ($LineItem->Taxes as $TaxLine) { - if (isset($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ - $_SESSION['CreditItems'.$identifier]->LineItems[$LineItem->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; + foreach ($LineItem->Taxes as $TaxKey=>$TaxLine) { + if (is_numeric(filter_number_format($_POST[$LineItem->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate']))){ + $_SESSION['CreditItems'.$identifier]->LineItems[$LineItem->LineNumber]->Taxes[$TaxKey]->TaxRate = filter_number_format($_POST[$LineItem->LineNumber . $TaxKey . '_TaxRate'])/100; } } } @@ -593,9 +593,9 @@ } - foreach ($_SESSION['CreditItems'.$identifier]->FreightTaxes as $FreightTaxLine) { - if (isset($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])){ - $_SESSION['CreditItems'.$identifier]->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; + foreach ($_SESSION['CreditItems'.$identifier]->FreightTaxes as $FreightTaxKey=>$FreightTaxLine) { + if (is_numeric(filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder]))){ + $_SESSION['CreditItems'.$identifier]->FreightTaxes[$FreightTaxKey]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxKey])/100; } } @@ -737,13 +737,9 @@ /*Need to list the taxes applicable to this line */ echo '<td>'; - $i=0; foreach ($_SESSION['CreditItems'.$identifier]->LineItems[$LineItem->LineNumber]->Taxes AS $Tax) { - if ($i>0){ - echo '<br />'; - } + echo '<br />'; echo $Tax->TaxAuthDescription; - $i++; } echo '</td>'; echo '<td>'; @@ -751,11 +747,12 @@ $i=0; // initialise the number of taxes iterated through $TaxLineTotal =0; //initialise tax total for the line - foreach ($LineItem->Taxes AS $Tax) { + foreach ($LineItem->Taxes AS $TaxKey=>$Tax) { + if ($i>0){ echo '<br />'; } - echo '<input type="text" class="number" name="' . $LineItem->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" maxlength="4" size="4" value="' . locale_number_format($Tax->TaxRate*100,'Variable') . '" />'; + echo '<input type="text" class="number" name="' . $LineItem->LineNumber . $TaxKey . '_TaxRate" maxlength="4" size="4" value="' . locale_number_format($Tax->TaxRate*100,'Variable') . '" />'; $i++; if ($Tax->TaxOnTax ==1){ $TaxTotals[$Tax->TaxAuthID] += ($Tax->TaxRate * ($LineTotal + $TaxLineTotal)); Modified: trunk/TaxGroups.php =================================================================== --- trunk/TaxGroups.php 2016-01-13 03:03:24 UTC (rev 7443) +++ trunk/TaxGroups.php 2016-01-13 07:32:36 UTC (rev 7444) @@ -59,6 +59,7 @@ } elseif(isset($SelectedGroup) ) { $TaxAuthority = $_GET['TaxAuthority']; if( isset($_GET['add']) ) { // adding a tax authority to a tax group + $sql = "INSERT INTO taxgrouptaxes ( taxgroupid, taxauthid, calculationorder) Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2016-01-13 03:03:24 UTC (rev 7443) +++ trunk/doc/Change.log 2016-01-13 07:32:36 UTC (rev 7444) @@ -1,6 +1,8 @@ webERP Change Log -13/01/16 Exson: Fixed the variables non-refresh bugs in GLAccountInquiry.php. Reported by Richard. -11/01/16 Exson: Fixed the bug of bank account original amount data error. Reported by Tim, Richard and make this data only available for bank account. + +13/1/16 Phil: Fixed bug in creating customer credit notes manually - blank taxes were being added that caused the SQL to commit the transaction to fail with foreign key constraint to tax authorities +13/01/16 Exson: Fixed the variables non-refresh bugs in GLAccountInquiry.php. Reported by Richard. +11/01/16 Exson: Fixed the bug of bank account original amount data error. Reported by Tim, Richard and make this data only available for bank account. 01/07/16 Exson: Fixed the lot control items negative not allowed problem and fix the data storage caused precision error which make material issuing is impossible under some situation in WorkOrderIssue.php. 29/12/15 RChacon: On GLAccountUsers.php: Fix script name; add $ViewTopic and $BookMark; improve $SelectedGLAccount validation; improve page_title_text; improve select GL account; regroup modify access permission code (improve logic); add classes to table elements; translate database "0" and "1" to human "No" and "Yes"; simplify and tide code; modify prnMsg from multiple part sentence to one part sentence (better to translate when language use a different grammar structure from English); add "Print This", "Select A Different GL account" and "Return" buttons. Add info to ManualGeneralLedger.html. 28/12/15 Exson: Fixed the bug that discount not modified for items whose discount is null in discount matrix in SelectOrderItems.php. Modified: trunk/includes/DefineCartClass.php =================================================================== --- trunk/includes/DefineCartClass.php 2016-01-13 03:03:24 UTC (rev 7443) +++ trunk/includes/DefineCartClass.php 2016-01-13 07:32:36 UTC (rev 7444) @@ -314,11 +314,11 @@ while ($myrow = DB_fetch_array($GetTaxRatesResult)){ $this->LineItems[$LineNumber]->Taxes[$i] = new Tax($myrow['taxcalculationorder'], - $myrow['taxauthid'], - $myrow['description'], - $myrow['taxrate'], - $myrow['taxontax'], - $myrow['taxglcode']); + $myrow['taxauthid'], + $myrow['description'], + $myrow['taxrate'], + $myrow['taxontax'], + $myrow['taxglcode']); $i++; } } //end method GetExistingTaxes @@ -353,13 +353,12 @@ } else { $i=1; while ($myrow = DB_fetch_array($GetTaxRatesResult)){ - $this->LineItems[$LineNumber]->Taxes[$i] = new Tax($myrow['calculationorder'], - $myrow['taxauthid'], - $myrow['description'], - $myrow['taxrate'], - $myrow['taxontax'], - $myrow['taxglcode']); + $myrow['taxauthid'], + $myrow['description'], + $myrow['taxrate'], + $myrow['taxontax'], + $myrow['taxglcode']); $i++; } //end loop around different taxes } //end if there are some taxes defined @@ -403,11 +402,11 @@ while ($myrow = DB_fetch_array($GetTaxRatesResult)){ $this->FreightTaxes[$i] = new Tax($myrow['calculationorder'], - $myrow['taxauthid'], - $myrow['description'], - $myrow['taxrate'], - $myrow['taxontax'], - $myrow['taxglcode']); + $myrow['taxauthid'], + $myrow['description'], + $myrow['taxrate'], + $myrow['taxontax'], + $myrow['taxglcode']); $i++; } } //end method GetFreightTaxes() @@ -545,4 +544,4 @@ } } -?> +?> \ No newline at end of file |
From: <ex...@us...> - 2016-01-13 08:17:50
|
Revision: 7445 http://sourceforge.net/p/web-erp/reponame/7445 Author: exsonqu Date: 2016-01-13 08:17:47 +0000 (Wed, 13 Jan 2016) Log Message: ----------- 13/01/16 Exson: Add remark to BOM items and make the BOM printable via the new print.css created by Rafael. Modified Paths: -------------- trunk/BOMs.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Modified: trunk/BOMs.php =================================================================== --- trunk/BOMs.php 2016-01-13 07:32:36 UTC (rev 7444) +++ trunk/BOMs.php 2016-01-13 08:17:47 UTC (rev 7445) @@ -84,6 +84,7 @@ bom.effectiveto, stockmaster.mbflag, bom.autoissue, + bom.remark, stockmaster.controlled, locstock.quantity AS qoh, stockmaster.decimalplaces @@ -141,22 +142,24 @@ } else { $QuantityOnHand = locale_number_format($myrow['qoh'],$myrow['decimalplaces']); } + $TextIndent= $Level . 'em'; - printf('<td>%s</td> + printf('<td class="number" style="text-align:left;text-indent:' . $textindent . ';" >%s</td> + <td class="number">%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td>%s</td> <td class="number">%s</td> <td>%s</td> <td>%s</td> <td>%s</td> <td>%s</td> - <td class="number">%s</td> - <td><a href="%s&Select=%s&SelectedComponent=%s">' . _('Edit') . '</a></td> - <td>' . $DrillText . '</td> - <td><a href="%s&Select=%s&SelectedComponent=%s&delete=1&ReSelect=%s&Location=%s&WorkCentre=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this component from the bill of material?') . '\');">' . _('Delete') . '</a></td> + <td class="number noprint">%s</td> + <td class="noprint"><a href="%s&Select=%s&SelectedComponent=%s">' . _('Edit') . '</a></td> + <td class="noprint">' . $DrillText . '</td> + <td class="noprint"><a href="%s&Select=%s&SelectedComponent=%s&delete=1&ReSelect=%s&Location=%s&WorkCentre=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this component from the bill of material?') . '\');">' . _('Delete') . '</a></td> + </tr><tr><td colspan="11" style="text-indent:' . $TextIndent . ';">%s</td> </tr>', $Level1, $myrow['sequence'], @@ -180,7 +183,9 @@ $myrow['component'], $UltimateParent, $myrow['loccode'], - $myrow['workcentrecode']); + $myrow['workcentrecode'], + $myrow['remark'] + ); } //END WHILE LIST LOOP } //end of function DisplayBOMItems @@ -236,7 +241,7 @@ if (isset($Select)) { //Parent Stock Item selected so display BOM or edit Component $SelectedParent = $Select; unset($Select);// = NULL; - echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . + echo '<p class="page_title_text noprint"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p><br />'; if (isset($SelectedParent) AND isset($_POST['Submit'])) { @@ -303,7 +308,8 @@ effectiveafter='" . $EffectiveAfterSQL . "', effectiveto='" . $EffectiveToSQL . "', quantity= '" . filter_number_format($_POST['Quantity']) . "', - autoissue='" . $_POST['AutoIssue'] . "' + autoissue='" . $_POST['AutoIssue'] . "', + remark='" . $_POST['Remark'] . "' WHERE bom.parent='" . $SelectedParent . "' AND bom.component='" . $SelectedComponent . "'"; @@ -345,7 +351,8 @@ quantity, effectiveafter, effectiveto, - autoissue) + autoissue, + remark) VALUES ('" . $_POST['Sequence'] . "', '".$SelectedParent."', '" . $_POST['Component'] . "', @@ -354,7 +361,8 @@ " . filter_number_format($_POST['Quantity']) . ", '" . $EffectiveAfterSQL . "', '" . $EffectiveToSQL . "', - " . $_POST['AutoIssue'] . ")"; + " . $_POST['AutoIssue'] . ", + '" . $_POST['Remark'] . "')"; $ErrMsg = _('Could not insert the BOM component because'); $DbgMsg = _('The SQL used to insert the component was'); @@ -449,7 +457,7 @@ break; } - echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select a Different BOM') . '</a></div><br />'; + echo '<br /><div class="centre noprint"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select a Different BOM') . '</a></div><br />'; // Display Manufatured Parent Items $sql = "SELECT bom.parent, stockmaster.description, @@ -464,7 +472,7 @@ $result=DB_query($sql,$ErrMsg,$DbgMsg); $ix = 0; if( DB_num_rows($result) > 0 ) { - echo '<table class="selection">'; + echo '<table class="selection noprint">'; echo '<tr><td><div class="centre">' . _('Manufactured parent items').' : '; while ($myrow = DB_fetch_array($result)){ echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . @@ -553,6 +561,7 @@ echo '<tr> <th colspan="13"><div class="centre"><b>' . $SelectedParent .' - ' . $myrow[0] . ' ('. $MBdesc. ') </b></div></th> </tr>'; + echo '</table><div id="Report"><table class="selection">'; $BOMTree = array(); //BOMTree is a 2 dimensional array with three elements for each item in the array - Level, Parent, Component @@ -572,7 +581,7 @@ <th>' . _('Effective After') . '</th> <th>' . _('Effective To') . '</th> <th>' . _('Auto Issue') . '</th> - <th>' . _('Qty On Hand') . '</th> + <th class="noprint">' . _('Qty On Hand') . '</th> </tr>'; echo $TableHeader; if(count($BOMTree) == 0) { @@ -598,7 +607,7 @@ DisplayBOMItems($UltimateParent, $Parent, $Component, $Level, $db); } } - echo '</table> + echo '</table></div> <br />'; /* We do want to show the new component entry form in any case - it is a lot of work to get back to it otherwise if we need to add */ @@ -615,7 +624,8 @@ effectiveto, workcentreadded, quantity, - autoissue + autoissue, + remark FROM bom INNER JOIN locationusers ON locationusers.loccode=bom.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 WHERE parent='".$SelectedParent."' @@ -631,12 +641,13 @@ $_POST['WorkCentreAdded'] = $myrow['workcentreadded']; $_POST['Quantity'] = locale_number_format($myrow['quantity'],'Variable'); $_POST['AutoIssue'] = $myrow['autoissue']; + $_POST['Remark'] = $myrow['remark']; prnMsg(_('Edit the details of the selected component in the fields below') . '. <br />' . _('Click on the Enter Information button to update the component details'),'info'); echo '<br /> <input type="hidden" name="SelectedParent" value="' . $SelectedParent . '" />'; echo '<input type="hidden" name="SelectedComponent" value="' . $SelectedComponent . '" />'; - echo '<table class="selection">'; + echo '<table class="selection noprint">'; echo '<tr> <th colspan="13"><div class="centre"><b>' . ('Edit Component Details') . '</b></div></th> </tr>'; @@ -648,10 +659,11 @@ } else { //end of if $SelectedComponent $_POST['Sequence'] = 0; + $_POST['Remark'] = ''; echo '<input type="hidden" name="SelectedParent" value="' . $SelectedParent . '" />'; /* echo "Enter the details of a new component in the fields below. <br />Click on 'Enter Information' to add the new component, once all fields are completed."; */ - echo '<table class="selection">'; + echo '<table class="selection noprint">'; echo '<tr> <th colspan="13"><div class="centre"><b>' . _('New Component Details') . '</b></div></th> </tr>'; @@ -702,7 +714,6 @@ <td>' . _('Sequence in BOM') . ':</td> <td><input type="text" class="integer" required="required" size="5" name="Sequence" value="' . $_POST['Sequence'] . '" /></td> </tr>'; - echo '<tr> <td>' . _('Location') . ': </td> <td><select tabindex="2" name="LocCode">'; @@ -811,11 +822,18 @@ } else { echo '<input type="hidden" name="AutoIssue" value="0" />'; } + + echo '<tr><td>' . _('Remark') . '</td> + <td><textarea rows="3" col="20" name="Remark" >' . $_POST['Remark'] . '</textarea></td> + </tr>'; echo '</table> <br /> - <div class="centre"> + <div class="centre noprint"> <input tabindex="8" type="submit" name="Submit" value="' . _('Enter Information') . '" /> + <button onclick="javascript:window.print()" type="button"><img alt="" src="' . $RootPath . '/css/' . $Theme . + '/images/printer.png" /> ' . + _('Print This') . '</button> </div> </div> </form>'; @@ -936,7 +954,7 @@ $tab = $j+3; printf('<td><input tabindex="' . $tab . '" type="submit" name="Select" value="%s" /></td> <td>%s</td> - <td class="number">%s</td> + <td class="number noprint">%s</td> <td>%s</td> </tr>', $myrow['stockid'], @@ -985,4 +1003,4 @@ } include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2016-01-13 07:32:36 UTC (rev 7444) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2016-01-13 08:17:47 UTC (rev 7445) @@ -49,6 +49,7 @@ ALTER table stockrequest DROP FOREIGN KEY `stockrequest_ibfk_3`; ALTER table stockrequest DROP FOREIGN KEY `stockrequest_ibfk_4`; INSERT INTO scripts VALUES('CollectiveWorkOrderCost.php',2,'Multiple work orders cost review'); +ALTER table BOM ADD remark varchar(500) NOT NULL DEFAULT ''; -- Update version number: |
From: <ex...@us...> - 2016-01-14 08:19:22
|
Revision: 7447 http://sourceforge.net/p/web-erp/reponame/7447 Author: exsonqu Date: 2016-01-14 08:19:19 +0000 (Thu, 14 Jan 2016) Log Message: ----------- 14/01/16 Exson: Add credit note allocation option for CustWhereAlloc.php and add a link to it in CustomerInquiry.php and make the allocation printable by print.css. Modified Paths: -------------- trunk/CustWhereAlloc.php trunk/CustomerInquiry.php Modified: trunk/CustWhereAlloc.php =================================================================== --- trunk/CustWhereAlloc.php 2016-01-13 08:20:05 UTC (rev 7446) +++ trunk/CustWhereAlloc.php 2016-01-14 08:19:19 UTC (rev 7447) @@ -9,14 +9,19 @@ $BookMark = 'WhereAllocated'; include('includes/header.inc'); +if (isset($_GET['TransNo']) AND isset($_GET['TransType'])) { + $_POST['TransNo'] = (int)$_GET['TransNo']; + $_POST['TransType'] = (int)$_GET['TransType']; + $_POST['ShowResults'] = true; +} echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> <div> <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <p class="page_title_text"> + <p class="page_title_text noprint"> <img src="'.$RootPath.'/css/'.$Theme.'/images/money_add.png" title="' . _('Customer Where Allocated'). '" alt="" />' . $Title . ' </p> - <table class="selection"> + <table class="selection noprint"> <tr> <td>' . _('Type') . ':</td> <td><select tabindex="1" name="TransType"> '; @@ -25,11 +30,17 @@ $_POST['TransType']='10'; } if ($_POST['TransType']==10){ - echo '<option selected="selected" value="10">' . _('Invoices') . '</option> - <option value="12">' . _('Negative Receipts (Payments)') . '</option>'; -} else { - echo '<option selected="selected" value="12">' . _('Negative Receipts (Payments)') . '</option> - <option selected="selected" value="10">' . _('Invoices') . '</option>'; + echo '<option selected="selected" value="10">' . _('Invoice') . '</option> + <option value="12">' . _('Receipt') . '</option> + <option value="11">' . _('Credit Note') . '</option>'; +} elseif ($_POST['TransType'] == 12) { + echo '<option selected="selected" value="12">' . _('Receipt') . '</option> + <option value="10">' . _('Invoice') . '</option> + <option value="11">' . _('Credit Note') . '</option>'; +} elseif ($_POST['TransType'] == 11) { + echo '<option selected="selected" value="11">' . _('Credit Note') . '</option> + <option value="10">' . _('Invoice') . '</option> + <option value="12">' . _('Receipt') . '</option>'; } echo '</select></td>'; @@ -40,7 +51,7 @@ </tr> </table> <br /> - <div class="centre"> + <div class="centre noprint"> <input tabindex="3" type="submit" name="ShowResults" value="' . _('Show How Allocated') . '" /> </div>'; @@ -63,7 +74,10 @@ ON debtorsmaster.currcode=currencies.currabrev WHERE type='" . $_POST['TransType'] . "' AND transno = '" . $_POST['TransNo']."'"; - + + if ($_SESSION['SalesmanLogin'] != '') { + $sql .= " AND debtortrans.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; + } $result = DB_query($sql ); if (DB_num_rows($result)==1){ @@ -71,7 +85,6 @@ $AllocToID = $myrow['id']; $CurrCode = $myrow['currcode']; $CurrDecimalPlaces = $myrow['currdecimalplaces']; - $sql = "SELECT type, transno, trandate, @@ -81,28 +94,39 @@ ovamount+ovgst+ovfreight+ovdiscount as totalamt, custallocns.amt FROM debtortrans - INNER JOIN custallocns - ON debtortrans.id=custallocns.transid_allocfrom - WHERE custallocns.transid_allocto='". $AllocToID."'"; + INNER JOIN custallocns "; + if ($_POST['TransType']==12 OR $_POST['TransType'] == 11){ + $TitleInfo = ($_POST['TransType'] == 12)?_('Receipt'):_('Credit Note'); + $sql .= "ON debtortrans.id = custallocns.transid_allocto + WHERE custallocns.transid_allocfrom = '" . $AllocToID . "'"; + } else { + $TitleInfo = _('invoice'); + $sql .= "ON debtortrans.id = custallocns.transid_allocfrom + WHERE custallocns.transid_allocto = '" . $AllocToID . "'"; + } + $sql .= " ORDER BY transno "; + $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because'); $TransResult = DB_query($sql, $ErrMsg); if (DB_num_rows($TransResult)==0){ - - if ($myrow['totamt']<0 AND $_POST['TransType']==12){ + + if ($myrow['totamt']<0 AND ($_POST['TransType']==12 OR $_POST['TransType'] == 11)){ prnMsg(_('This transaction was a receipt of funds and there can be no allocations of receipts or credits to a receipt. This inquiry is meant to be used to see how a payment which is entered as a negative receipt is settled against credit notes or receipts'),'info'); } else { prnMsg(_('There are no allocations made against this transaction'),'info'); } } else { + $Printer = true; echo '<br /> + <div id="Report"> <table class="selection">'; echo '<tr> <th colspan="6"> <div class="centre"> - <b>' . _('Allocations made against invoice number') . ' ' . $_POST['TransNo'] . '<br />' . _('Transaction Total').': '. locale_number_format($myrow['totamt'],$CurrDecimalPlaces) . ' ' . $CurrCode . '</b> + <b>' . _('Allocations made against') . ' ' . $TitleInfo . ' ' . _('number') . ' ' . $_POST['TransNo'] . '<br />' . _('Transaction Total').': '. locale_number_format($myrow['totamt'],$CurrDecimalPlaces) . ' ' . $CurrCode . '</b> </div> </th> </tr>'; @@ -132,6 +156,8 @@ if ($myrow['type']==11){ $TransType = _('Credit Note'); + } elseif ($myrow['type'] == 10){ + $TransType = _('Invoice'); } else { $TransType = _('Receipt'); } @@ -156,12 +182,21 @@ <td colspan="5" class="number">' . _('Total allocated') . '</td> <td class="number">' . locale_number_format($AllocsTotal,$CurrDecimalPlaces) . '</td> </tr> - </table>'; + </table> + </div>'; } // end if there are allocations against the transaction } //got the ID of the transaction to find allocations for } echo '</div>'; echo '</form>'; +if (isset($Printer)) { + echo '<div class="centre noprint"> + <button onclick="javascript:window.print()" type="button"><img alt="" src="' . $RootPath . '/css/' . $Theme . + '/images/printer.png" /> ' . + _('Print This') . ' + </button> + </div>';// "Print This" button. +} include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2016-01-13 08:20:05 UTC (rev 7446) +++ trunk/CustomerInquiry.php 2016-01-14 08:19:19 UTC (rev 7447) @@ -292,7 +292,7 @@ * - User can view GL transactions */ echo '<td>', _($MyRow['typename']), '</td> - <td>', $MyRow['transno'], '</td> + <td><a href="' . $RootPath . '/CustWhereAlloc.php?TransType=' . $MyRow['type'] . '&TransNo=' . $MyRow['transno'] . '" target="_blank">' . $MyRow['transno'] . '</a></td> <td>', ConvertSQLDate($MyRow['trandate']), '</td> <td>', $MyRow['branchcode'], '</td> <td>', $MyRow['reference'], '</td> @@ -338,7 +338,7 @@ * - User cannot view GL transactions */ echo '<td>', _($MyRow['typename']), '</td> - <td>', $MyRow['transno'], '</td> + <td><a href="' . $RootPath . '/CustWhereAlloc.php?TransType=' . $MyRow['type'] . '&TransNo=' . $MyRow['transno'] . '">' . $MyRow['transno'] . '</a></td> <td>', ConvertSQLDate($MyRow['trandate']), '</td> <td>', $MyRow['branchcode'], '</td> <td>', $MyRow['reference'], '</td> @@ -419,7 +419,7 @@ */ if ($_SESSION['CompanyRecord']['gllink_debtors'] == 1 and in_array($_SESSION['PageSecurityArray']['GLTransInquiry.php'], $_SESSION['AllowedPageSecurityTokens'])) { echo '<td>', _($MyRow['typename']), '</td> - <td>', $MyRow['transno'], '</td> + <td><a href="' . $RootPath . '/CustWhereAlloc.php?TransType=' . $MyRow['type'] . '&TransNo=' . $MyRow['transno'] . '">' . $MyRow['transno'] . '</a></td> <td>', ConvertSQLDate($MyRow['trandate']), '</td> <td>', $MyRow['branchcode'], '</td> <td>', $MyRow['reference'], '</td> @@ -465,7 +465,7 @@ * - User cannot view GL transactions */ echo '<td>', _($MyRow['typename']), '</td> - <td>', $MyRow['transno'], '</td> + <td><a href="' . $RootPath . '/CustWhereAlloc.php?TransType=' . $MyRow['type'] . '&TransNo=' . $MyRow['transno'] . '">' . $MyRow['transno'] . '</a></td> <td>', ConvertSQLDate($MyRow['trandate']), '</td> <td>', $MyRow['branchcode'], '</td> <td>', $MyRow['reference'], '</td> @@ -508,7 +508,7 @@ */ if ($_SESSION['CompanyRecord']['gllink_debtors'] == 1 and in_array($_SESSION['PageSecurityArray']['GLTransInquiry.php'], $_SESSION['AllowedPageSecurityTokens'])) { echo '<td>', _($MyRow['typename']), '</td> - <td>', $MyRow['transno'], '</td> + <td><a href="' . $RootPath . '/CustWhereAlloc.php?TransType=' . $MyRow['type'] . '&TransNo=' . $MyRow['transno'] . '">' . $MyRow['transno'] . '</a></td> <td>', ConvertSQLDate($MyRow['trandate']), '</td> <td>', $MyRow['branchcode'], '</td> <td>', $MyRow['reference'], '</td> @@ -669,4 +669,4 @@ echo '</tbody></table>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> |
From: <ex...@us...> - 2016-01-14 10:08:53
|
Revision: 7449 http://sourceforge.net/p/web-erp/reponame/7449 Author: exsonqu Date: 2016-01-14 10:08:51 +0000 (Thu, 14 Jan 2016) Log Message: ----------- 14/01/16 Exson: Add Supplier transaction allocation inquiry in SuppWhereAlloc.php and add a link to in SupplierInquiry.php. Modified Paths: -------------- trunk/SupplierInquiry.php trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.12.3-4.13.sql Added Paths: ----------- trunk/SuppWhereAlloc.php Added: trunk/SuppWhereAlloc.php =================================================================== --- trunk/SuppWhereAlloc.php (rev 0) +++ trunk/SuppWhereAlloc.php 2016-01-14 10:08:51 UTC (rev 7449) @@ -0,0 +1,200 @@ +<?php + +include('includes/session.inc'); +$Title = _('Supplier How Paid Inquiry'); + +$ViewTopic = 'APInquiries'; +$BookMark = 'WhereAllocated'; + +include('includes/header.inc'); +if (isset($_GET['TransNo']) AND isset($_GET['TransType'])) { + $_POST['TransNo'] = (int)$_GET['TransNo']; + $_POST['TransType'] = (int)$_GET['TransType']; + $_POST['ShowResults'] = true; +} + +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <p class="page_title_text noprint"> + <img src="'.$RootPath.'/css/'.$Theme.'/images/money_add.png" title="' . _('Supplier Where Allocated'). '" alt="" />' . $Title . ' + </p> + <table class="selection noprint"> + <tr> + <td>' . _('Type') . ':</td> + <td><select tabindex="1" name="TransType"> '; + +if (!isset($_POST['TransType'])){ + $_POST['TransType']='20'; +} +if ($_POST['TransType']==20){ + echo '<option selected="selected" value="20">' . _('Purchase Invoice') . '</option> + <option value="22">' . _('Payment') . '</option> + <option value="21">' . _('Debit Note') . '</option>'; +} elseif ($_POST['TransType'] == 22) { + echo '<option selected="selected" value="22">' . _('Payment') . '</option> + <option value="20">' . _('Purchase Invoice') . '</option> + <option value="21">' . _('Debit Note') . '</option>'; +} elseif ($_POST['TransType'] == 21) { + echo '<option selected="selected" value="21">' . _('Debit Note') . '</option> + <option value="20">' . _('Purchase Invoice') . '</option> + <option value="22">' . _('Payment') . '</option>'; +} + +echo '</select></td>'; + +if (!isset($_POST['TransNo'])) {$_POST['TransNo']='';} +echo '<td>' . _('Transaction Number').':</td> + <td><input tabindex="2" type="text" class="number" name="TransNo" required="required" maxlength="20" size="20" value="'. $_POST['TransNo'] . '" /></td> + </tr> + </table> + <br /> + <div class="centre noprint"> + <input tabindex="3" type="submit" name="ShowResults" value="' . _('Show How Allocated') . '" /> + </div>'; + +if (isset($_POST['ShowResults']) AND $_POST['TransNo']==''){ + echo '<br />'; + prnMsg(_('The transaction number to be queried must be entered first'),'warn'); +} + +if (isset($_POST['ShowResults']) AND $_POST['TransNo']!=''){ + + +/*First off get the DebtorTransID of the transaction (invoice normally) selected */ + $sql = "SELECT supptrans.id, + ovamount+ovgst AS totamt, + currencies.decimalplaces AS currdecimalplaces, + suppliers.currcode + FROM supptrans INNER JOIN suppliers + ON supptrans.supplierno=suppliers.supplierid + INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev + WHERE type='" . $_POST['TransType'] . "' + AND transno = '" . $_POST['TransNo']."'"; + + if ($_SESSION['SalesmanLogin'] != '') { + $sql .= " AND supptrans.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; + } + $result = DB_query($sql); + + if (DB_num_rows($result)==1){ + $myrow = DB_fetch_array($result); + $AllocToID = $myrow['id']; + $CurrCode = $myrow['currcode']; + $CurrDecimalPlaces = $myrow['currdecimalplaces']; + $sql = "SELECT type, + transno, + trandate, + supptrans.supplierno, + suppreference, + supptrans.rate, + ovamount+ovgst as totalamt, + suppallocs.amt + FROM supptrans + INNER JOIN suppallocs "; + if ($_POST['TransType']==22 OR $_POST['TransType'] == 21){ + + $TitleInfo = ($_POST['TransType'] == 22)?_('Payment'):_('Debit Note'); + $sql .= "ON supptrans.id = suppallocs.transid_allocto + WHERE suppallocs.transid_allocfrom = '" . $AllocToID . "'"; + } else { + $TitleInfo = _('invoice'); + $sql .= "ON supptrans.id = suppallocs.transid_allocfrom + WHERE suppallocs.transid_allocto = '" . $AllocToID . "'"; + } + $sql .= " ORDER BY transno "; + + $ErrMsg = _('The customer transactions for the selected criteria could not be retrieved because'); + $TransResult = DB_query($sql, $ErrMsg); + + if (DB_num_rows($TransResult)==0){ + + if ($myrow['totamt']>0 AND ($_POST['TransType']==22 OR $_POST['TransType'] == 21)){ + prnMsg(_('This transaction was a receipt of funds and there can be no allocations of receipts or credits to a receipt. This inquiry is meant to be used to see how a payment which is entered as a negative receipt is settled against credit notes or receipts'),'info'); + } else { + prnMsg(_('There are no allocations made against this transaction'),'info'); + } + } else { + $Printer = true; + echo '<br /> + <div id="Report"> + <table class="selection">'; + + echo '<tr> + <th colspan="6"> + <div class="centre"> + <b>' . _('Allocations made against') . ' ' . $TitleInfo . ' ' . _('number') . ' ' . $_POST['TransNo'] . '<br />' . _('Transaction Total').': '. locale_number_format($myrow['totamt'],$CurrDecimalPlaces) . ' ' . $CurrCode . '</b> + </div> + </th> + </tr>'; + + $TableHeader = '<tr> + <th>' . _('Type') . '</th> + <th>' . _('Number') . '</th> + <th>' . _('Reference') . '</th> + <th>' . _('Ex Rate') . '</th> + <th>' . _('Amount') . '</th> + <th>' . _('Alloc') . '</th> + </tr>'; + echo $TableHeader; + + $RowCounter = 1; + $k = 0; //row colour counter + $AllocsTotal = 0; + + while ($myrow=DB_fetch_array($TransResult)) { + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + + if ($myrow['type']==21){ + $TransType = _('Debit Note'); + } elseif ($myrow['type'] == 20){ + $TransType = _('Purchase Invoice'); + } else { + $TransType = _('Payment'); + } + echo '<td>' . $TransType . '</td> + <td>' . $myrow['transno'] . '</td> + <td>' . $myrow['suppreference'] . '</td> + <td>' . $myrow['rate'] . '</td> + <td class="number">' . locale_number_format($myrow['totalamt'],$CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($myrow['amt'],$CurrDecimalPlaces) . '</td> + </tr>'; + + $RowCounter++; + If ($RowCounter == 22){ + $RowCounter=1; + echo $TableHeader; + } + //end of page full new headings if + $AllocsTotal +=$myrow['amt']; + } + //end of while loop + echo '<tr> + <td colspan="5" class="number">' . _('Total allocated') . '</td> + <td class="number">' . locale_number_format($AllocsTotal,$CurrDecimalPlaces) . '</td> + </tr> + </table> + </div>'; + } // end if there are allocations against the transaction + } //got the ID of the transaction to find allocations for +} +echo '</div>'; +echo '</form>'; +if (isset($Printer)) { + echo '<div class="centre noprint"> + <button onclick="javascript:window.print()" type="button"><img alt="" src="' . $RootPath . '/css/' . $Theme . + '/images/printer.png" /> ' . + _('Print This') . ' + </button> + </div>';// "Print This" button. +} +include('includes/footer.inc'); + +?> Modified: trunk/SupplierInquiry.php =================================================================== --- trunk/SupplierInquiry.php 2016-01-14 08:19:54 UTC (rev 7448) +++ trunk/SupplierInquiry.php 2016-01-14 10:08:51 UTC (rev 7449) @@ -255,7 +255,7 @@ $BaseTD8 = '<td>' . ConvertSQLDate($myrow['trandate']) . '</td> <td>' . _($myrow['typename']) . '</td> - <td class="number">' . $myrow['transno'] . '</td> + <td class="number"><a href="' . $RootPath . '/SuppWhereAlloc.php?TransType=' . $myrow['type'] . '&TransNo=' . $myrow['transno'] . '">' . $myrow['transno'] . '</a></td> <td>' . $myrow['suppreference'] . '</td> <td>' . $myrow['transtext'] . '</td> <td class="number">' . locale_number_format($myrow['totalamount'],$SupplierRecord['currdecimalplaces']) . '</td> @@ -315,7 +315,7 @@ echo $BaseTD8 . ' <td class="noprint"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES,'UTF-8') . '/PaymentAllocations.php?SuppID=' . $myrow['type'] . '&InvID=' . $myrow['transno'] . '">' . _('View Payments') . '</a></td> - <td class="noprint"><a href="' . $HoldValue . '?HoldType=' . $_POST['TransAfterDate'] . '&HoldTrans=' . $HoldValue . '&HoldStatus=' . + <td class="noprint"><a href="' .htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES,'UTF-8') . '?HoldType=' . $_POST['TransAfterDate'] . '&HoldTrans=' . $HoldValue . '&HoldStatus=' . $RootPath . '&FromDate='. $myrow['supplierno'] . '">' . $myrow['suppreference'] . '</a></td></tr>'; } } @@ -341,4 +341,4 @@ echo '</tbody></table>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2016-01-14 08:19:54 UTC (rev 7448) +++ trunk/includes/MainMenuLinksArray.php 2016-01-14 10:08:51 UTC (rev 7449) @@ -144,7 +144,8 @@ $MenuItems['AP']['Transactions']['URL'] = array('/SelectSupplier.php', '/SupplierAllocations.php'); -$MenuItems['AP']['Reports']['Caption'] = array( _('Aged Supplier Report'), +$MenuItems['AP']['Reports']['Caption'] = array( _('Where Allocated Inquiry.php'), + _('Aged Supplier Report'), _('Payment Run Report'), _('Remittance Advices'), _('Outstanding GRNs Report'), @@ -152,7 +153,8 @@ _('List Daily Transactions'), _('Supplier Transaction Inquiries')); -$MenuItems['AP']['Reports']['URL'] = array( '/AgedSuppliers.php', +$MenuItems['AP']['Reports']['URL'] = array( '/SuppWhereAlloc.php', + '/AgedSuppliers.php', '/SuppPaymentRun.php', '/PDFRemittanceAdvice.php', '/OutstandingGRNs.php', Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2016-01-14 08:19:54 UTC (rev 7448) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2016-01-14 10:08:51 UTC (rev 7449) @@ -50,6 +50,7 @@ ALTER table stockrequest DROP FOREIGN KEY `stockrequest_ibfk_4`; INSERT INTO scripts VALUES('CollectiveWorkOrderCost.php',2,'Multiple work orders cost review'); ALTER table BOM ADD remark varchar(500) NOT NULL DEFAULT ''; +INSERT INTO scripts VALUES ('SuppWhereAlloc.php',3,'Suppliers Where allocated'); -- Update version number: |
From: <dai...@us...> - 2016-03-09 08:09:39
|
Revision: 7470 http://sourceforge.net/p/web-erp/reponame/7470 Author: daintree Date: 2016-03-09 08:09:37 +0000 (Wed, 09 Mar 2016) Log Message: ----------- Andrew Galuski fix to FormDesigner.php casting XML elements as strings Modified Paths: -------------- trunk/FormDesigner.php trunk/doc/Change.log trunk/includes/MainMenuLinksArray.php Modified: trunk/FormDesigner.php =================================================================== --- trunk/FormDesigner.php 2016-03-09 03:00:30 UTC (rev 7469) +++ trunk/FormDesigner.php 2016-03-09 08:09:37 UTC (rev 7470) @@ -165,7 +165,7 @@ echo '<meta http-equiv="Refresh" content="0; url=' . $RootPath . '/PDFFGLabel.php?' . SID .'WO=Preview">'; break; case 'ShippingLabel.xml': - echo '<meta http-equiv="Refresh" content="0; url=' . $RootPath . '/PDFShipLabel.php?' . SID .'SO=Preview">'; + echo '<meta http-equiv="Refresh" content="0; url=' . $RootPath . '/PDFShipLabel.php?' . SID .'ORD=Preview">'; break; } } else { @@ -194,7 +194,8 @@ while (false !== ($file = readdir($handle))) { if ($file[0]!='.') { $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/'.$file); - echo '<option value="'.$file.'">' . _($FormDesign['name']) . '</option>'; + //echo "name is". $FormDesign['name']; + echo '<option value="'.$file.'">' . /*_(*/ $FormDesign['name'] /*)*/ . '</option>'; } } closedir($handle); @@ -211,13 +212,13 @@ 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 Designer') . '" alt="" />' . ' ' . _('Form Designer') . '<br />' . _($FormDesign['name']) . '</p>'; +echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/reports.png" title="' . _('Form Designer') . '" alt="" />' . ' ' . _('Form Designer') . '<br />' . _((string)$FormDesign['name']) . '</p>'; echo '<div class="page_help_text">' . _('Enter the changes that you want in the form layout below.') . '<br /> '. _('All measurements are in PostScript points (72 points = 25,4 mm).') . '<br /> '. _('All coordinates are measured from the lower left corner of the sheet to the top left corner of the element.') . '</div><br />'; -$Papers=array('A4_Landscape', 'A4_Portrait', 'A5_Landscape', 'A5_Portrait', 'A6_Landscape', 'A3_Landscape', 'A3_Portrait', 'Letter_Portrait', 'Letter_Landscape', 'Legal_Portrait', 'Legal_Landscape'); // Possible paper sizes/orientations amg adds A6 +$Papers=array('A4_Landscape', 'A4_Portrait', 'A5_Landscape', 'A5_Portrait', 'A6_Landscape', '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'],ENT_QUOTES,'UTF-8') . '?' . SID . '">'; echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -245,7 +246,7 @@ foreach ($FormDesign as $key) { switch ($key['type']) { case 'image': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="4">' . _($key['name']) . '</th>'; + echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="4">' . _((string)$key['name']) . '</th>'; echo '</tr><tr>'; // New table row. InputX($key['id'], $key->x); InputY($key['id'], $key->y); @@ -259,7 +260,7 @@ break; case 'SimpleText': echo '<td colspan="1" valign="top"><table width="100%" border="1">'; - echo '<tr><th colspan="6">' . _($key['name']) . '</th>'; + echo '<tr><th colspan="6">' . _((string)$key['name']) . '</th>'; echo '</tr><tr>'; // New table row. InputX($key['id'], $key->x); InputY($key['id'], $key->y); @@ -270,7 +271,7 @@ break; case 'MultiLineText': echo '<td colspan="1" valign="top"><table width="100%" border="1">'; - echo '<tr><th colspan="8">' . _($key['name']) . '</th>'; + echo '<tr><th colspan="8">' . _((string)$key['name']) . '</th>'; echo '</tr><tr>'; // New table row. InputX($key['id'], $key->x); InputY($key['id'], $key->y); @@ -281,27 +282,27 @@ $counter=$counter+1; break; case 'ElementArray': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="7">' . _($key['name']) . '</th></tr>'; + echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="7">' . _((string)$key['name']) . '</th></tr>'; foreach ($key as $subkey) { echo '<tr>'; if ($subkey['type']=='SimpleText') { - echo '<td>' . _($subkey['name']) . '</td>'; + echo '<td>' . _((string)$subkey['name']) . '</td>'; InputX($subkey['id'], $subkey->x); InputY($subkey['id'], $subkey->y); SelectFontSize($subkey['id'], $subkey->FontSize); } elseif ($subkey['type']=='MultiLineText') { // This element (9 td) overflows the table size (7 td). - echo '<td>' . _($subkey['name']) . '</td>'; + echo '<td>' . _((string)$subkey['name']) . '</td>'; InputX($subkey['id'], $subkey->x); InputY($subkey['id'], $subkey->y); InputWidth($subkey['id'], $subkey->Length); SelectFontSize($subkey['id'], $subkey->FontSize); } elseif ($subkey['type']=='DataText') { - echo '<td>' . _($subkey['name']) . '</td>'; + echo '<td>' . _((string)$subkey['name']) . '</td>'; InputX($subkey['id'], $subkey->x); InputWidth($subkey['id'], $subkey->Length); SelectFontSize($subkey['id'], $subkey->FontSize); } elseif ($subkey['type']=='StartLine') { - echo '<td colspan="3">' . _($subkey['name']) . ' = ' . '</td>'; + echo '<td colspan="3">' . _((string)$subkey['name']) . ' = ' . '</td>'; echo '<td><input type="text" class="number" name="StartLine" size="4" maxlength="4" value="'.$key->y.'" /></td>'; } echo '</tr>'; @@ -310,7 +311,7 @@ $counter=$counter+1; break; case 'CurvedRectangle': - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">' . _($key['name']) . '</th>'; + echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">' . _((string)$key['name']) . '</th>'; echo '</tr><tr>'; // New table row. InputX($key['id'], $key->x); InputY($key['id'], $key->y); @@ -332,7 +333,7 @@ $counter=$counter+1; break; case 'Rectangle': // This case is probably included in CurvedRectangle. - echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="8">' . _($key['name']) . '</th>'; + echo '<td colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="8">' . _((string)$key['name']) . '</th>'; echo '</tr><tr>'; // New table row. InputX($key['id'], $key->x); InputY($key['id'], $key->y); @@ -345,7 +346,7 @@ $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 colspan="1" valign="top"><table width="100%" border="1"><tr><th colspan="6">' . _((string)$key['name']) . '</th></tr>'; echo '<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>'; @@ -373,4 +374,4 @@ /* BEGIN: Final common code division. */ include('includes/footer.inc'); /* END: Final common code division. */ -?> +?> \ No newline at end of file Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2016-03-09 03:00:30 UTC (rev 7469) +++ trunk/doc/Change.log 2016-03-09 08:09:37 UTC (rev 7470) @@ -1,5 +1,6 @@ webERP Change Log +9/3/16 Andrew Galuski: Fix FormDesigner requires casting XML elements as strings 03/09/16 Exson: Add PO details option to show balance of each outstanding PO in PO_SelectOSPurchOrder.php. 03/09/16 Exson: Fixed the typo which make sql query failed in GLPostings.inc. reported by Richard. 24/02/16: Richard, Exson Fix the GLPosting initiating error in GLPostings.inc. Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2016-03-09 03:00:30 UTC (rev 7469) +++ trunk/includes/MainMenuLinksArray.php 2016-03-09 08:09:37 UTC (rev 7470) @@ -153,7 +153,7 @@ _('List Daily Transactions'), _('Supplier Transaction Inquiries')); -$MenuItems['AP']['Reports']['URL'] = array( '/SuppWhereAlloc.php', +$MenuItems['AP']['Reports']['URL'] = array( '/SuppWhereAlloc.php', '/AgedSuppliers.php', '/SuppPaymentRun.php', '/PDFRemittanceAdvice.php', |
From: <rc...@us...> - 2016-03-24 17:10:04
|
Revision: 7480 http://sourceforge.net/p/web-erp/reponame/7480 Author: rchacon Date: 2016-03-24 17:10:01 +0000 (Thu, 24 Mar 2016) Log Message: ----------- Minor changes: standardise names and variables in horizontal analysis. Modified Paths: -------------- trunk/AnalysisHorizontalIncome.php trunk/AnalysisHorizontalPosition.php trunk/doc/Manual/ManualGeneralLedger.html Modified: trunk/AnalysisHorizontalIncome.php =================================================================== --- trunk/AnalysisHorizontalIncome.php 2016-03-24 02:22:23 UTC (rev 7479) +++ trunk/AnalysisHorizontalIncome.php 2016-03-24 17:10:01 UTC (rev 7480) @@ -2,10 +2,10 @@ /* $Id: AnalysisHorizontalIncome.php 7349 2015-09-14 14:43:19Z rchacon $*/ /* Shows the horizontal analysis of the statement of comprehensive income. */ -function RelativeChange($SelectedPeriod, $PreviousPeriod) { +function RelativeChange($selected_period, $previous_period) { // Calculates the relative change between selected and previous periods. Uses percent with locale number format. - if($PreviousPeriod<>0) { - return locale_number_format(($SelectedPeriod-$PreviousPeriod)*100/$PreviousPeriod,$_SESSION['CompanyRecord']['decimalplaces']) . '%'; + if($previous_period<>0) { + return locale_number_format(($selected_period-$previous_period)*100/$previous_period, $_SESSION['CompanyRecord']['decimalplaces']) . '%'; } else { return _('N/A'); } @@ -157,8 +157,8 @@ } else {// Summary report: echo '<th class="text" colspan="2">', _('Summary'), '</th>'; } - echo '<th class="number">', ' - ', $myrow[0], '</th> - <th class="number">', _('Last Year'), '</th> + echo '<th class="number">', _('Current period'), '</th> + <th class="number">', _('Last period'), '</th> <th class="number">', _('Actual change'), '</th> <th class="number">', _('Relative change'), '</th> </tr> @@ -183,8 +183,8 @@ SUM(CASE WHEN chartdetails.period='" . $_POST['ToPeriod'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwd, SUM(CASE WHEN chartdetails.period='" . ($_POST['FromPeriod'] - 12) . "' THEN chartdetails.bfwd ELSE 0 END) AS firstprdbfwdly, SUM(CASE WHEN chartdetails.period='" . ($_POST['ToPeriod']-12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS lastprdcfwdly - FROM chartmaster - INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 WHERE accountgroups.pandl=1 Modified: trunk/AnalysisHorizontalPosition.php =================================================================== --- trunk/AnalysisHorizontalPosition.php 2016-03-24 02:22:23 UTC (rev 7479) +++ trunk/AnalysisHorizontalPosition.php 2016-03-24 17:10:01 UTC (rev 7480) @@ -2,10 +2,10 @@ /* $Id: AnalysisHorizontalPosition.php 7349 2015-09-14 14:43:19Z rchacon $*/ /* Shows the horizontal analysis of the statement of financial position. */ -function RelativeChange($SelectedPeriod, $PreviousPeriod) { +function RelativeChange($selected_period, $previous_period) { // Calculates the relative change between selected and previous periods. Uses percent with locale number format. - if($PreviousPeriod<>0) { - return locale_number_format(($SelectedPeriod-$PreviousPeriod)*100/$PreviousPeriod,$_SESSION['CompanyRecord']['decimalplaces']) . '%'; + if($previous_period<>0) { + return locale_number_format(($selected_period-$previous_period)*100/$previous_period, $_SESSION['CompanyRecord']['decimalplaces']) . '%'; } else { return _('N/A'); } @@ -57,15 +57,6 @@ } echo ' value="', $myrow['periodno'], '">', MonthAndYearFromSQLDate($myrow['lastdate_in_period']), '</option>'; } -/* - while($myrow=DB_fetch_array($Periods)) { - echo '<option'; - if($myrow['periodno']==$DefaultToPeriod) { - echo ' selected="selected"'; - } - echo ' value="', $myrow['periodno'], '">', MonthAndYearFromSQLDate($myrow['lastdate_in_period']), '</option>'; - } -*/ echo '</select></td> </tr> <tr> @@ -120,8 +111,8 @@ } else {// Summary report: echo '<th class="text" colspan="2">', _('Summary'), '</th>'; } - echo '<th class="number">', $BalanceDate, '</th> - <th class="number">', _('Last Year'), '</th> + echo '<th class="number">', _('Current period'), '</th> + <th class="number">', _('Last period'), '</th> <th class="number">', _('Actual change'), '</th> <th class="number">', _('Relative change'), '</th> </tr> @@ -156,8 +147,8 @@ chartmaster.accountname, Sum(CASE WHEN chartdetails.period='" . $_POST['BalancePeriodEnd'] . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS balancecfwd, Sum(CASE WHEN chartdetails.period='" . ($_POST['BalancePeriodEnd'] - 12) . "' THEN chartdetails.bfwd + chartdetails.actual ELSE 0 END) AS balancecfwdly - FROM chartmaster - INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname + FROM chartmaster + INNER JOIN accountgroups ON chartmaster.group_ = accountgroups.groupname INNER JOIN chartdetails ON chartmaster.accountcode= chartdetails.accountcode INNER JOIN glaccountusers ON glaccountusers.accountcode=chartmaster.accountcode AND glaccountusers.userid='" . $_SESSION['UserID'] . "' AND glaccountusers.canview=1 WHERE accountgroups.pandl=0 Modified: trunk/doc/Manual/ManualGeneralLedger.html =================================================================== --- trunk/doc/Manual/ManualGeneralLedger.html 2016-03-24 02:22:23 UTC (rev 7479) +++ trunk/doc/Manual/ManualGeneralLedger.html 2016-03-24 17:10:01 UTC (rev 7480) @@ -364,9 +364,9 @@ <li> <h3><a id="AnalysisHorizontal">Horizontal analysis</a></h3> <p>The horizontal analysis, also known as trend analysis, is a financial statement analysis technique that shows changes in the amounts of corresponding financial statement items over a period of time. It is a useful tool to evaluate trend situations.</p> - <p>The statements for two periods are used in horizontal analysis. The earliest period is used as the base period. The items on the later statement are compared with items on the statement of the base period. The changes are shown both in currency (absolute variation) and percentage (relative variation).</p> - <p>The absolute variation is calculated as <i>selected_period</i> - <i>previous_period</i>. - <p>The relative variation is calculated as (<i>selected_period</i> - <i>previous_period</i>) / <i>previous_period</i> * 100. + <p>The statements for two periods are used in horizontal analysis. The earliest period is used as the base period. The items on the later statement are compared with items on the statement of the base period. The changes are shown both in currency (actual change) and percentage (relative change).</p> + <p>The actual change is calculated as <i>selected_period</i> - <i>previous_period</i>. + <p>The relative change is calculated as (<i>selected_period</i> - <i>previous_period</i>) / <i>previous_period</i> * 100. <h4><a id="AnalysisHorizontalPosition">Horizontal Analysis of Statement of Financial Position</a></h4> <p>The debit amounts (assets) of the selected and previous statement of financial position are shown as positive numbers; the credit amounts (liabilities and equity) are shown as negative numbers.</p> <p>The sources of funds are shown as positive numbers in the absolute variation column; the applications of funds are shown as negative numbers in the absolute variation column.</p> |