From: <dai...@us...> - 2011-01-23 04:09:00
|
Revision: 4473 http://web-erp.svn.sourceforge.net/web-erp/?rev=4473&view=rev Author: daintree Date: 2011-01-23 04:08:53 +0000 (Sun, 23 Jan 2011) Log Message: ----------- Depreciation period fixes Modified Paths: -------------- trunk/CounterSales.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetRegister.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/PricesBasedOnMarkUp.php trunk/SupplierInvoice.php trunk/UpgradeDatabase.php trunk/doc/Change.log.html trunk/includes/ConnectDB_mysql.inc trunk/includes/ConnectDB_mysqli.inc trunk/includes/DateFunctions.inc trunk/index.php trunk/sql/mysql/upgrade3.11.1-4.00.sql Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/CounterSales.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -713,7 +713,7 @@ <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="3" maxlength="40" value="' . $OrderLine->GPPercent . '" /></td>'; echo '<td class="number">' . number_format($SubTotal,2) . '</td>'; $LineDueDate = $OrderLine->ItemDue; - if (!is_Date($OrderLine->ItemDue)){ + if (!Is_Date($OrderLine->ItemDue)){ $LineDueDate = DateAdd (Date($_SESSION['DefaultDateFormat']),'d', $_SESSION['Items'.$identifier]->DeliveryDays); $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->ItemDue= $LineDueDate; } Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/FixedAssetDepreciation.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -26,16 +26,22 @@ $AllowUserEnteredProcessDate = true; -if ($LastDepnRun[1]==0 AND $LastDepnRun[0]==NULL) { //then depn has never been run yet? - +if (DB_num_rows($result)==0) { //then depn has never been run yet? /*in this case default depreciation calc to the last day of last month - and allow user to select a period */ if (!isset($_POST['ProcessDate'])) { $_POST['ProcessDate'] = Date($_SESSION['DefaultDateFormat'],mktime(0,0,0,date('m'),0,date('Y'))); + } else { //ProcessDate is set - make sure it is on the last day of the month selected + if (!Is_Date($_POST['ProcessDate'])){ + prnMsg(_('The date is expected to be in the format') . ' ' . $_SESSION['DefaultDateFormat'], 'error'); + $InputError =true; + }else { + $_POST['ProcessDate'] = LastDayOfMonth($_POST['ProcessDate']); + } } } else { //depn calc has been run previously $AllowUserEnteredProcessDate = false; - $_POST['ProcessDate'] = DateAdd(ConvertSQLDate($LastDepnRun[0]),'m',1); + $_POST['ProcessDate'] = LastDayOfMonth(DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28)); } @@ -204,7 +210,7 @@ periodno, inputdate, fixedassettranstype, - depn) + amount) VALUES ('" . $AssetRow['assetid'] . "', '44', '" . $TransNo . "', @@ -254,11 +260,14 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p></p>'; echo '<table class=selection width=30%><tr></tr><tr>'; - if (AllowUserEnteredProcessDate){ + if ($AllowUserEnteredProcessDate){ echo '<td>'._('Date to Process Depreciation'). ':</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" name="ProcessDate" maxlength=10 size=11 value="' . $_POST['ProcessDate'] . '"></td>'; + } else { + echo '<td>'._('Date to Process Depreciation'). ':</td> + <td>' . $_POST['ProcessDate'] .'</td>'; } - echo '<td><input type="submit" name="CommitDepreciation" value="'._('Commit Depreciation').'">'; + echo '<td><div class="centre"><input type="submit" name="CommitDepreciation" value="'._('Commit Depreciation').'"></div>'; echo '</tr></table><br>'; echo '</form>'; } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/FixedAssetItems.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -153,12 +153,12 @@ //debit cost for the new category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) "; + typeno, + trandate, + periodno, + account, + narrative, + amount) "; $SQL= $SQL . "VALUES (42, '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -230,8 +230,7 @@ prnMsg( _('Asset') . ' ' . $AssetID . ' ' . _('has been updated'), 'success'); echo '<br>'; } else { //it is a NEW part - $sql = "INSERT INTO fixedassets ( - description, + $sql = "INSERT INTO fixedassets (description, longdescription, assetcategoryid, assetlocation, @@ -247,8 +246,7 @@ '" . $_POST['DepnType'] . "', '" . $_POST['DepnRate']. "', '" . $_POST['BarCode'] . "', - '" . $_POST['SerialNo'] . "' - )"; + '" . $_POST['SerialNo'] . "' )"; $ErrMsg = _('The asset could not be added because'); $DbgMsg = _('The SQL that was used to add the asset failed was'); $result = DB_query($sql,$db, $ErrMsg, $DbgMsg); @@ -349,7 +347,6 @@ } //end if cost > 0 - $sql="DELETE FROM fixedassets WHERE assetid='" . $AssetID . "'"; $result=DB_query($sql,$db, _('Could not delete the asset record'),'',true); @@ -444,10 +441,9 @@ } echo '<tr><td>' . _('Asset Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'."\n"; -if ($New == 0) { //ie not new at all! - // Add image upload for New Item - by Ori +if (!isset($New) ) { //ie not new at all! + echo '<tr><td>'. _('Image File (.jpg)') . ':</td><td><input type="file" id="ItemPicture" name="ItemPicture"></td>'; - // EOR Add Image upload for New Item - by Ori if (function_exists('imagecreatefromjpg')){ $StockImgLink = '<img src="GetStockImage.php?SID&automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. @@ -553,7 +549,7 @@ </table>'; -if ($New==1) { +if (isset($New)) { echo '<div class=centre><br><input type="Submit" name="submit" value="' . _('Insert New Fixed Asset') . '">'; } else { Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/FixedAssetRegister.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -125,7 +125,7 @@ $AccumDepnCfwd = 0; } else { $CostCfwd = $myrow['periodadditions'] + $myrow['costbfwd']; - $AccumDepnCfwd = $myrow['periodepn'] + $myrow['depnbfwd']; + $AccumDepnCfwd = $myrow['perioddepn'] + $myrow['depnbfwd']; } if (isset($_POST['pdf'])) { @@ -165,12 +165,14 @@ echo '<td style="vertical-align:top">' . $myrow['longdescription'] . '</td>'; echo '<td style="vertical-align:top">' . $myrow['serialno'] . '</td>'; echo '<td>' . $myrow['locationdescription'] . '<br>'; - for ($i = 1;$i < sizeOf($Ancestors) - 1;$i++) { + /* Not reworked yet + * for ($i = 1;$i < sizeOf($Ancestors) - 1;$i++) { for ($j = 0;$j < $i;$j++) { echo ' '; } echo '|_' . $Ancestors[$i] . '<br>'; } + */ echo '</td><td style="vertical-align:top">' . ConvertSQLDate($myrow['datepurchased']) . '</td>'; echo '<td style="vertical-align:top" class="number">' . number_format($myrow['costbfwd'], 2) . '</td>'; echo '<td style="vertical-align:top" class="number">' . number_format($myrow['depnbfwd'], 2) . '</td>'; @@ -304,11 +306,12 @@ $Page_Height, $Page_Width, $Top_Margin, + $Bottom_Margin, $FontSize, $Left_Margin, $Right_Margin, - $line_height; - $AssetDescription; + $line_height, + $AssetDescription, $AssetCategory; if ($PageNumber>1){ Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/MRPDemands.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -144,7 +144,7 @@ $InputError = 1; prnMsg(_('Quantity must be greater than 0'),'error'); } - if (!is_Date($_POST['Duedate'])) { + if (!Is_Date($_POST['Duedate'])) { $InputError = 1; prnMsg(_('Invalid due date'),'error'); } Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/MRPPlannedPurchaseOrders.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -28,7 +28,7 @@ $Xpos = $Left_Margin+1; $wheredate = " "; $reportdate = " "; - if (is_Date($_POST['cutoffdate'])) { + if (Is_Date($_POST['cutoffdate'])) { $formatdate = FormatDateForSQL($_POST['cutoffdate']); $wheredate = ' AND duedate <= "' . $formatdate . '" '; $reportdate = _(' Through ') . Format_Date($_POST['cutoffdate']); @@ -165,7 +165,7 @@ // Get and print supplier info for part list($lastdate,$lastsupplier,$preferredsupplier) = GetPartInfo($db,$holdpart); $displaydate = $lastdate; - if (!is_Date($lastdate)) { + if (!Is_Date($lastdate)) { $displaydate = " "; } $YPos -= $line_height; @@ -228,7 +228,7 @@ // Get and print supplier info for part list($lastdate,$lastsupplier,$preferredsupplier) = GetPartInfo($db,$holdpart); $displaydate = $lastdate; - if (!is_Date($lastdate)) { + if (!Is_Date($lastdate)) { $displaydate = " "; } $YPos -= $line_height; Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/MRPPlannedWorkOrders.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -20,7 +20,7 @@ $wheredate = " "; $reportdate = " "; - if (is_Date($_POST['cutoffdate'])) { + if (Is_Date($_POST['cutoffdate'])) { $formatdate = FormatDateForSQL($_POST['cutoffdate']); $wheredate = ' AND duedate <= "' . $formatdate . '" '; $reportdate = _(' Through ') . $_POST['cutoffdate']; Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/PricesBasedOnMarkUp.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -200,7 +200,7 @@ $InputError =1; } if ($_POST['CostType']=='OtherPriceList' AND $_POST['BasePriceList']=='0'){ - echo '<br />Base price list selected: ' .$_POST['BasePriceList']; + echo '<br />' . _('Base price list selected') . ': ' .$_POST['BasePriceList']; prnMsg(_('When you are updating prices based on another price list - the other price list must also be selected. No updates will take place until the other price list is selected'),'error'); $InputError =1; } Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/SupplierInvoice.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -270,7 +270,8 @@ } echo ' <input type="submit" name="FixedAssets" VALUE="' . _('Fixed Assets') . '"></div>'; - + $TotalGRNValue = 0; + if (count( $_SESSION['SuppTrans']->GRNs)>0){ /*if there are any GRNs selected for invoicing then */ /*Show all the selected GRNs so far from the SESSION['SuppInv']->GRNs array */ @@ -284,8 +285,6 @@ <th>' . _('Line Total') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th></tr>'; echo $tableheader; - $TotalGRNValue = 0; - foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ echo '<tr><td>' . $EnteredGRN->GRNNo . '</td><td>' . $EnteredGRN->ItemCode . @@ -304,6 +303,8 @@ echo '</table>'; } + $TotalShiptValue = 0; + if (count( $_SESSION['SuppTrans']->Shipts) > 0){ /*if there are any Shipment charges on the invoice*/ echo '<br /><table cellpadding=2 class=selection> @@ -312,7 +313,7 @@ <th>" . _('Amount') . '</th></tr>'; echo $TableHeader; - $TotalShiptValue = 0; + foreach ($_SESSION['SuppTrans']->Shipts as $EnteredShiptRef){ @@ -332,6 +333,7 @@ <td class=number><font size=4 color=BLUE><U>' . number_format($TotalShiptValue,2) . '</U></font></td></tr></table>'; } + $TotalAssetValue = 0; if (count( $_SESSION['SuppTrans']->Assets) > 0){ /*if there are any fixed assets on the invoice*/ @@ -342,8 +344,6 @@ <th>' . _('Amount') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th></tr>'; echo $TableHeader; - $TotalAssetValue = 0; - foreach ($_SESSION['SuppTrans']->Assets as $EnteredAsset){ echo '<tr><td>' . $EnteredAsset->AssetID . '</td> @@ -363,8 +363,8 @@ <td class=number><font size=4 color=BLUE><U>' . number_format($TotalAssetValue,2) . '</U></font></td></tr></table>'; } //end loop around assets added to invocie + $TotalContractsValue = 0; - if (count( $_SESSION['SuppTrans']->Contracts) > 0){ /*if there are any contract charges on the invoice*/ echo '<br /><table cellpadding="2" class=selection> @@ -374,7 +374,7 @@ <th>' . _('Narrative') . '</th></tr>'; echo $TableHeader; - $TotalContractsValue = 0; + $i=0; foreach ($_SESSION['SuppTrans']->Contracts as $Contract){ @@ -397,7 +397,8 @@ </tr></table>'; } - + $TotalGLValue = 0; + if ( $_SESSION['SuppTrans']->GLLink_Creditors == 1){ if (count($_SESSION['SuppTrans']->GLCodes) > 0){ @@ -409,8 +410,6 @@ <th>' . _('Narrative') . '</th></tr>'; echo $TableHeader; - $TotalGLValue = 0; - foreach ($_SESSION['SuppTrans']->GLCodes as $EnteredGLCode){ echo '<tr><td>' . $EnteredGLCode->GLCode . '</td> @@ -427,21 +426,6 @@ </tr></table>'; } - if (!isset($TotalGRNValue)){ - $TotalGRNValue = 0; - } - if (!isset($TotalGLValue)){ - $TotalGLValue = 0; - } - if (!isset($TotalShiptValue)){ - $TotalShiptValue = 0; - } - if (!isset($TotalContractsValue)){ - $TotalContractsValue = 0; - } - if (!isset($TotalAssetValue)){ - $TotalAssetValue = 0; - } $_SESSION['SuppTrans']->OvAmount = ($TotalGRNValue + $TotalGLValue + $TotalAssetValue + $TotalShiptValue + $TotalContractsValue); echo '<br /><table class=selection><tr><td>' . _('Amount in supplier currency') . ':</td><td colspan=2 class=number>' . @@ -500,7 +484,7 @@ } else { /*Tax being entered manually accept the taxamount entered as is*/ // if (!isset($_POST['TaxAmount' . $Tax->TaxCalculationOrder])) { // $_POST['TaxAmount' . $Tax->TaxCalculationOrder]=0; -// } +// } $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount = $_POST['TaxAmount' . $Tax->TaxCalculationOrder]; echo ' <input type="hidden" name="TaxRate"' . $Tax->TaxCalculationOrder . ' value="' . $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate * 100 . '">'; @@ -554,33 +538,43 @@ $InputError = False; if ( $TaxTotal + $_SESSION['SuppTrans']->OvAmount < 0){ + $InputError = True; prnMsg(_('The invoice as entered cannot be processed because the total amount of the invoice is less than 0') . '. ' . _('Invoices are expected to have a positive charge'),'error'); echo '<p> The tax total is : ' . $TaxTotal; echo '<p> The ovamount is : ' . $_SESSION['SuppTrans']->OvAmount; + } elseif ( $TaxTotal + $_SESSION['SuppTrans']->OvAmount == 0){ + prnMsg(_('The invoice as entered will be processed but be warned the amount of the invoice is zero!') . '. ' . _('Invoices are normally expected to have a positive charge'),'warn'); + } elseif (strlen( $_SESSION['SuppTrans']->SuppReference)<1){ + $InputError = True; prnMsg(_('The invoice as entered cannot be processed because the there is no suppliers invoice number or reference entered') . '. ' . _('The supplier invoice number must be entered'),'error'); } elseif (!is_date( $_SESSION['SuppTrans']->TranDate)){ + $InputError = True; prnMsg( _('The invoice as entered cannot be processed because the invoice date entered is not in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error'); - } elseif (DateDiff(Date($_SESSION['DefaultDateFormat']), $_SESSION['SuppTrans']->TranDate, "d") < 0){ + } elseif (DateDiff(Date($_SESSION['DefaultDateFormat']), $_SESSION['SuppTrans']->TranDate, 'd') < 0){ + $InputError = True; prnMsg(_('The invoice as entered cannot be processed because the invoice date is after today') . '. ' . _('Purchase invoices are expected to have a date prior to or today'),'error'); }elseif ( $_SESSION['SuppTrans']->ExRate <= 0){ + $InputError = True; prnMsg( _('The invoice as entered cannot be processed because the exchange rate for the invoice has been entered as a negative or zero number') . '. ' . _('The exchange rate is expected to show how many of the suppliers currency there are in 1 of the local currency'),'error'); - - }elseif ( $_SESSION['SuppTrans']->OvAmount < round($TotalShiptValue + $TotalGLValue + $TotalContractsValue+ $TotalAssetValue+$TotalGRNValue,2)){ + + } elseif ( $_SESSION['SuppTrans']->OvAmount < round($TotalShiptValue + $TotalGLValue + $TotalContractsValue+ $TotalAssetValue+$TotalGRNValue,2)){ + prnMsg( _('The invoice total as entered is less than the sum of the shipment charges, the general ledger entries (if any), the charges for goods received, contract charges and fixed asset charges. There must be a mistake somewhere, the invoice as entered will not be processed'),'error'); $InputError = True; } else { + $sql = "SELECT count(*) FROM supptrans WHERE supplierno='" . $_SESSION['SuppTrans']->SupplierID . "' Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/UpgradeDatabase.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -104,7 +104,7 @@ } $result = DB_IgnoreForeignKeys($db); - + foreach ($SQLScripts AS $SQLScriptFile) { $SQLEntries = file($SQLScriptFile); @@ -135,7 +135,7 @@ } if (strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,strlen($sql)-1); - $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); + $result = DB_query($sql, $db, '','', false, false); echo '<tr><td>' . $sql . '</td>'; switch (DB_error_no($db)) { case 0: Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/doc/Change.log.html 2011-01-23 04:08:53 UTC (rev 4473) @@ -1,5 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> +<p>23/1/11:Phil changed back references throughout several MRP scripts from is_date to Is_Date - as Is_Date is used throughout the code and much bigger job to change all references to is_date</p> <p>20/1/11: Tim changed back addinfo calls to addInfo on PDF reports - Zhigio originally thought to be an issue with Turkish utf-8 pdfs but turned out to be a red herring. class.pdf call changed back to addInfo too - most of calls had not been changed to lower case info</p> <p>20/1/11: Tim changed PricesBasedOnMarkUp to have end date day before new prices effective from</p> <p>20/1/11: Phil FixedAssetRegister.php FixedAssetDepreciation.php fixes </p> Modified: trunk/includes/ConnectDB_mysql.inc =================================================================== --- trunk/includes/ConnectDB_mysql.inc 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/includes/ConnectDB_mysql.inc 2011-01-23 04:08:53 UTC (rev 4473) @@ -5,6 +5,9 @@ define ('LIKE','LIKE'); global $db; // Make sure it IS global, regardless of our context +if (!isset($mysqlport)){ + $mysqlport = 3306; +} $db = mysql_connect($host.':'.$mysqlport , $dbuser, $dbpassword); //printf("tried making mysql Connection.\n"); Modified: trunk/includes/ConnectDB_mysqli.inc =================================================================== --- trunk/includes/ConnectDB_mysqli.inc 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/includes/ConnectDB_mysqli.inc 2011-01-23 04:08:53 UTC (rev 4473) @@ -9,6 +9,9 @@ define ('LIKE','LIKE'); +if (!isset($mysqlport)){ + $mysqlport = 3306; +} global $db; // Make sure it IS global, regardless of our context $db = mysqli_connect($host , $dbuser, $dbpassword,$_SESSION['DatabaseName'], $mysqlport); Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/includes/DateFunctions.inc 2011-01-23 04:08:53 UTC (rev 4473) @@ -15,7 +15,7 @@ */ -function is_date($DateEntry) { +function Is_date($DateEntry) { $DateEntry =Trim($DateEntry); @@ -41,7 +41,6 @@ return 0; } - if ((int)$Date_Array[2] >9999) { return 0; } @@ -79,7 +78,6 @@ } //end of Is_Date function - //_______________________________________________________________ function MonthAndYearFromSQLDate($DateEntry) { @@ -338,7 +336,7 @@ if ((int)$Date_Array[2] <60) { $Date_Array[2] = '20'.$Date_Array[2]; - } elseif ((int)$Date_Array[2] >59 AND (int)$Date_Array[2] <100) { + } elseif ((int)$Date_Array[2] >59 AND (int)$Date_Array[2] <100){ $Date_Array[2] = '19'.$Date_Array[2]; } elseif ((int)$Date_Array[2] >9999) { return 0; @@ -354,11 +352,11 @@ return $Date_Array[0].'.'.$Date_Array[1].'.'.$Date_Array[2]; } } elseif ($_SESSION['DefaultDateFormat']='m/d/Y'){ - if (checkdate((int)$Date_Array[0],(int)$Date_Array[1],(int)$Date_Array[2])) { + if (checkdate((int)$Date_Array[0],(int)$Date_Array[1],(int)$Date_Array[2])){ return $Date_Array[0].'/'.$Date_Array[1].'/'.$Date_Array[2]; } } elseif ($_SESSION['DefaultDateFormat']='Y/m/d'){ - if (checkdate((int)$Date_Array[2],(int)$Date_Array[0],(int)$Date_Array[1])) { + if (checkdate((int)$Date_Array[2],(int)$Date_Array[0],(int)$Date_Array[1])){ return $Date_Array[0].'/'.$Date_Array[1].'/'.$Date_Array[2]; } } // end if check date @@ -367,9 +365,6 @@ } }// end of function - - - function FormatDateForSQL($DateEntry) { /* takes a date in a the format specified in $_SESSION['DefaultDateFormat'] @@ -434,7 +429,70 @@ return FormatDateForSQL( $dt[0] ) . ' ' . $dt[1]; } +function LastDayOfMonth ( $DateEntry) { + /*Expects a date in DefaultDateFormat and + * Returns the last day of the month in the entered date + * in the DefaultDateFormat + * + * mktime (0,0,0 month, day, year) + */ + + $DateEntry = trim($DateEntry); + if (strpos($DateEntry,'/')) { + $Date_Array = explode('/',$DateEntry); + } elseif (strpos ($DateEntry,'-')) { + $Date_Array = explode('-',$DateEntry); + } elseif (strpos ($DateEntry,'.')) { + $Date_Array = explode('.',$DateEntry); + } elseif (strlen($DateEntry)==6) { + $Date_Array[0]= substr($DateEntry,0,2); + $Date_Array[1]= substr($DateEntry,2,2); + $Date_Array[2]= substr($DateEntry,4,2); + } elseif (strlen($DateEntry)==8) { + $Date_Array[0]= substr($DateEntry,0,4); + $Date_Array[1]= substr($DateEntry,4,2); + $Date_Array[2]= substr($DateEntry,6,2); + } + + if ($_SESSION['DefaultDateFormat']=='Y/m/d') { + if (strlen($Date_Array[0])==2) { + if ((int)$Date_Array[0] <=60) { + $Date_Array[0] = '20'.$Date_Array[2]; + } elseif ((int)$Date_Array[0] >60 AND (int)$Date_Array[2] <100) { + $Date_Array[0] = '19'.$Date_Array[2]; + } + } + + $DateStamp = mktime(0,0,0, $Date_Array[1]+1, 0, $Date_Array[0]); + + }elseif (($_SESSION['DefaultDateFormat']=='d/m/Y') OR $_SESSION['DefaultDateFormat']=='d.m.Y'){ + if (strlen($Date_Array[2])==2) { + if ((int)$Date_Array[2] <=60) { + $Date_Array[2] = '20'.$Date_Array[2]; + } elseif ((int)$Date_Array[2] >60 AND (int)$Date_Array[2] <100) { + $Date_Array[2] = '19'.$Date_Array[2]; + } + } + $DateStamp = mktime(0,0,0, $Date_Array[1]+1, 0, $Date_Array[2]); + + + } elseif ($_SESSION['DefaultDateFormat']=='m/d/Y') { + if (strlen($Date_Array[2])==2) { + if ((int)$Date_Array[2] <=60) { + $Date_Array[2] = '20'.$Date_Array[2]; + } elseif ((int)$Date_Array[2] >60 AND (int)$Date_Array[2] <100) { + $Date_Array[2] = '19'.$Date_Array[2]; + } + } + return $Date_Array[2].'-'.$Date_Array[0].'-'.$Date_Array[1]; + $DateStamp = mktime(0,0,0, $Date_Array[0]+1, 0, $Date_Array[2]); + } + return Date($_SESSION['DefaultDateFormat'],$DateStamp); +}// end of Last Day in the month function + + + function Date1GreaterThanDate2 ($Date1, $Date2) { /* returns true (1) if Date1 is greater than Date2 */ @@ -875,4 +933,5 @@ return $myrow[0]; } -?> + +?> \ No newline at end of file Modified: trunk/index.php =================================================================== --- trunk/index.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/index.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -291,11 +291,6 @@ <table width="100%" class="table_index"> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCustomer.php?' . SID . '">' . _('Customer Transaction Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> <?php echo '<p>• <a href="' . $rootpath . '/CustWhereAlloc.php?' . SID . '">' . _('Where Allocated Inquiry') . '</a></p>'; ?> </td> </tr> @@ -327,11 +322,6 @@ </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerTransInquiry.php?' . SID . '">' . _('Transaction Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> <?php echo '<p>• <a href="' . $rootpath . '/PDFBankingSummary.php?' . SID . '">' . _('Re-Print A Deposit Listing') . '</a></p>'; ?> </td> </tr> @@ -357,6 +347,11 @@ </tr> <tr> <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/CustomerTransInquiry.php?' . SID . '">' . _('Customer Transaction Inquiries') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> <?php echo GetRptLinks('ar'); ?> </td> </tr> @@ -1506,13 +1501,13 @@ $Title= array(_('Custom Reports'), _('Standard Reports and Forms')); - $sql= "SELECT id, - reporttype, - defaultreport, - groupname, + $sql= "SELECT id, + reporttype, + defaultreport, + groupname, reportname - FROM reports - ORDER BY groupname, + FROM reports + ORDER BY groupname, reportname"; $Result=DB_query($sql,$db,'','',false,true); $ReportList = ''; Modified: trunk/sql/mysql/upgrade3.11.1-4.00.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-4.00.sql 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/sql/mysql/upgrade3.11.1-4.00.sql 2011-01-23 04:08:53 UTC (rev 4473) @@ -812,5 +812,5 @@ ALTER TABLE `purchorderdetails` CHANGE `gw` `kgs` VARCHAR( 50 ) DEFAULT ''; ALTER TABLE `purchorderdetails` ADD `conversionfactor` DOUBLE NOT NULL DEFAULT '1'; UPDATE config SET confvalue='3.12.3' WHERE confname='VersionNumber'; -ALTER TABLE `purchorderdetails` CHANGE `uom` `suppliersunit` VARCHAR( 50 ) +ALTER TABLE `purchorderdetails` CHANGE `uom` `suppliersunit` VARCHAR( 50 ); UPDATE config SET confvalue='3.12.31' WHERE confname='VersionNumber'; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-01-23 04:09:01
|
Revision: 4473 http://web-erp.svn.sourceforge.net/web-erp/?rev=4473&view=rev Author: daintree Date: 2011-01-23 04:08:53 +0000 (Sun, 23 Jan 2011) Log Message: ----------- Depreciation period fixes Modified Paths: -------------- trunk/CounterSales.php trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/FixedAssetRegister.php trunk/MRPDemands.php trunk/MRPPlannedPurchaseOrders.php trunk/MRPPlannedWorkOrders.php trunk/PricesBasedOnMarkUp.php trunk/SupplierInvoice.php trunk/UpgradeDatabase.php trunk/doc/Change.log.html trunk/includes/ConnectDB_mysql.inc trunk/includes/ConnectDB_mysqli.inc trunk/includes/DateFunctions.inc trunk/index.php trunk/sql/mysql/upgrade3.11.1-4.00.sql Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/CounterSales.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -713,7 +713,7 @@ <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="3" maxlength="40" value="' . $OrderLine->GPPercent . '" /></td>'; echo '<td class="number">' . number_format($SubTotal,2) . '</td>'; $LineDueDate = $OrderLine->ItemDue; - if (!is_Date($OrderLine->ItemDue)){ + if (!Is_Date($OrderLine->ItemDue)){ $LineDueDate = DateAdd (Date($_SESSION['DefaultDateFormat']),'d', $_SESSION['Items'.$identifier]->DeliveryDays); $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->ItemDue= $LineDueDate; } Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/FixedAssetDepreciation.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -26,16 +26,22 @@ $AllowUserEnteredProcessDate = true; -if ($LastDepnRun[1]==0 AND $LastDepnRun[0]==NULL) { //then depn has never been run yet? - +if (DB_num_rows($result)==0) { //then depn has never been run yet? /*in this case default depreciation calc to the last day of last month - and allow user to select a period */ if (!isset($_POST['ProcessDate'])) { $_POST['ProcessDate'] = Date($_SESSION['DefaultDateFormat'],mktime(0,0,0,date('m'),0,date('Y'))); + } else { //ProcessDate is set - make sure it is on the last day of the month selected + if (!Is_Date($_POST['ProcessDate'])){ + prnMsg(_('The date is expected to be in the format') . ' ' . $_SESSION['DefaultDateFormat'], 'error'); + $InputError =true; + }else { + $_POST['ProcessDate'] = LastDayOfMonth($_POST['ProcessDate']); + } } } else { //depn calc has been run previously $AllowUserEnteredProcessDate = false; - $_POST['ProcessDate'] = DateAdd(ConvertSQLDate($LastDepnRun[0]),'m',1); + $_POST['ProcessDate'] = LastDayOfMonth(DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28)); } @@ -204,7 +210,7 @@ periodno, inputdate, fixedassettranstype, - depn) + amount) VALUES ('" . $AssetRow['assetid'] . "', '44', '" . $TransNo . "', @@ -254,11 +260,14 @@ echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<p></p>'; echo '<table class=selection width=30%><tr></tr><tr>'; - if (AllowUserEnteredProcessDate){ + if ($AllowUserEnteredProcessDate){ echo '<td>'._('Date to Process Depreciation'). ':</td> <td><input type="text" class="date" alt="' .$_SESSION['DefaultDateFormat']. '" name="ProcessDate" maxlength=10 size=11 value="' . $_POST['ProcessDate'] . '"></td>'; + } else { + echo '<td>'._('Date to Process Depreciation'). ':</td> + <td>' . $_POST['ProcessDate'] .'</td>'; } - echo '<td><input type="submit" name="CommitDepreciation" value="'._('Commit Depreciation').'">'; + echo '<td><div class="centre"><input type="submit" name="CommitDepreciation" value="'._('Commit Depreciation').'"></div>'; echo '</tr></table><br>'; echo '</form>'; } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/FixedAssetItems.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -153,12 +153,12 @@ //debit cost for the new category $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) "; + typeno, + trandate, + periodno, + account, + narrative, + amount) "; $SQL= $SQL . "VALUES (42, '" . $TransNo . "', '" . Date('Y-m-d') . "', @@ -230,8 +230,7 @@ prnMsg( _('Asset') . ' ' . $AssetID . ' ' . _('has been updated'), 'success'); echo '<br>'; } else { //it is a NEW part - $sql = "INSERT INTO fixedassets ( - description, + $sql = "INSERT INTO fixedassets (description, longdescription, assetcategoryid, assetlocation, @@ -247,8 +246,7 @@ '" . $_POST['DepnType'] . "', '" . $_POST['DepnRate']. "', '" . $_POST['BarCode'] . "', - '" . $_POST['SerialNo'] . "' - )"; + '" . $_POST['SerialNo'] . "' )"; $ErrMsg = _('The asset could not be added because'); $DbgMsg = _('The SQL that was used to add the asset failed was'); $result = DB_query($sql,$db, $ErrMsg, $DbgMsg); @@ -349,7 +347,6 @@ } //end if cost > 0 - $sql="DELETE FROM fixedassets WHERE assetid='" . $AssetID . "'"; $result=DB_query($sql,$db, _('Could not delete the asset record'),'',true); @@ -444,10 +441,9 @@ } echo '<tr><td>' . _('Asset Description') . ' (' . _('long') . '):</td><td><textarea ' . (in_array('LongDescription',$Errors) ? 'class="texterror"' : '' ) .' name="LongDescription" cols=40 rows=4>' . stripslashes($LongDescription) . '</textarea></td></tr>'."\n"; -if ($New == 0) { //ie not new at all! - // Add image upload for New Item - by Ori +if (!isset($New) ) { //ie not new at all! + echo '<tr><td>'. _('Image File (.jpg)') . ':</td><td><input type="file" id="ItemPicture" name="ItemPicture"></td>'; - // EOR Add Image upload for New Item - by Ori if (function_exists('imagecreatefromjpg')){ $StockImgLink = '<img src="GetStockImage.php?SID&automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. @@ -553,7 +549,7 @@ </table>'; -if ($New==1) { +if (isset($New)) { echo '<div class=centre><br><input type="Submit" name="submit" value="' . _('Insert New Fixed Asset') . '">'; } else { Modified: trunk/FixedAssetRegister.php =================================================================== --- trunk/FixedAssetRegister.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/FixedAssetRegister.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -125,7 +125,7 @@ $AccumDepnCfwd = 0; } else { $CostCfwd = $myrow['periodadditions'] + $myrow['costbfwd']; - $AccumDepnCfwd = $myrow['periodepn'] + $myrow['depnbfwd']; + $AccumDepnCfwd = $myrow['perioddepn'] + $myrow['depnbfwd']; } if (isset($_POST['pdf'])) { @@ -165,12 +165,14 @@ echo '<td style="vertical-align:top">' . $myrow['longdescription'] . '</td>'; echo '<td style="vertical-align:top">' . $myrow['serialno'] . '</td>'; echo '<td>' . $myrow['locationdescription'] . '<br>'; - for ($i = 1;$i < sizeOf($Ancestors) - 1;$i++) { + /* Not reworked yet + * for ($i = 1;$i < sizeOf($Ancestors) - 1;$i++) { for ($j = 0;$j < $i;$j++) { echo ' '; } echo '|_' . $Ancestors[$i] . '<br>'; } + */ echo '</td><td style="vertical-align:top">' . ConvertSQLDate($myrow['datepurchased']) . '</td>'; echo '<td style="vertical-align:top" class="number">' . number_format($myrow['costbfwd'], 2) . '</td>'; echo '<td style="vertical-align:top" class="number">' . number_format($myrow['depnbfwd'], 2) . '</td>'; @@ -304,11 +306,12 @@ $Page_Height, $Page_Width, $Top_Margin, + $Bottom_Margin, $FontSize, $Left_Margin, $Right_Margin, - $line_height; - $AssetDescription; + $line_height, + $AssetDescription, $AssetCategory; if ($PageNumber>1){ Modified: trunk/MRPDemands.php =================================================================== --- trunk/MRPDemands.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/MRPDemands.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -144,7 +144,7 @@ $InputError = 1; prnMsg(_('Quantity must be greater than 0'),'error'); } - if (!is_Date($_POST['Duedate'])) { + if (!Is_Date($_POST['Duedate'])) { $InputError = 1; prnMsg(_('Invalid due date'),'error'); } Modified: trunk/MRPPlannedPurchaseOrders.php =================================================================== --- trunk/MRPPlannedPurchaseOrders.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/MRPPlannedPurchaseOrders.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -28,7 +28,7 @@ $Xpos = $Left_Margin+1; $wheredate = " "; $reportdate = " "; - if (is_Date($_POST['cutoffdate'])) { + if (Is_Date($_POST['cutoffdate'])) { $formatdate = FormatDateForSQL($_POST['cutoffdate']); $wheredate = ' AND duedate <= "' . $formatdate . '" '; $reportdate = _(' Through ') . Format_Date($_POST['cutoffdate']); @@ -165,7 +165,7 @@ // Get and print supplier info for part list($lastdate,$lastsupplier,$preferredsupplier) = GetPartInfo($db,$holdpart); $displaydate = $lastdate; - if (!is_Date($lastdate)) { + if (!Is_Date($lastdate)) { $displaydate = " "; } $YPos -= $line_height; @@ -228,7 +228,7 @@ // Get and print supplier info for part list($lastdate,$lastsupplier,$preferredsupplier) = GetPartInfo($db,$holdpart); $displaydate = $lastdate; - if (!is_Date($lastdate)) { + if (!Is_Date($lastdate)) { $displaydate = " "; } $YPos -= $line_height; Modified: trunk/MRPPlannedWorkOrders.php =================================================================== --- trunk/MRPPlannedWorkOrders.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/MRPPlannedWorkOrders.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -20,7 +20,7 @@ $wheredate = " "; $reportdate = " "; - if (is_Date($_POST['cutoffdate'])) { + if (Is_Date($_POST['cutoffdate'])) { $formatdate = FormatDateForSQL($_POST['cutoffdate']); $wheredate = ' AND duedate <= "' . $formatdate . '" '; $reportdate = _(' Through ') . $_POST['cutoffdate']; Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/PricesBasedOnMarkUp.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -200,7 +200,7 @@ $InputError =1; } if ($_POST['CostType']=='OtherPriceList' AND $_POST['BasePriceList']=='0'){ - echo '<br />Base price list selected: ' .$_POST['BasePriceList']; + echo '<br />' . _('Base price list selected') . ': ' .$_POST['BasePriceList']; prnMsg(_('When you are updating prices based on another price list - the other price list must also be selected. No updates will take place until the other price list is selected'),'error'); $InputError =1; } Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/SupplierInvoice.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -270,7 +270,8 @@ } echo ' <input type="submit" name="FixedAssets" VALUE="' . _('Fixed Assets') . '"></div>'; - + $TotalGRNValue = 0; + if (count( $_SESSION['SuppTrans']->GRNs)>0){ /*if there are any GRNs selected for invoicing then */ /*Show all the selected GRNs so far from the SESSION['SuppInv']->GRNs array */ @@ -284,8 +285,6 @@ <th>' . _('Line Total') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th></tr>'; echo $tableheader; - $TotalGRNValue = 0; - foreach ($_SESSION['SuppTrans']->GRNs as $EnteredGRN){ echo '<tr><td>' . $EnteredGRN->GRNNo . '</td><td>' . $EnteredGRN->ItemCode . @@ -304,6 +303,8 @@ echo '</table>'; } + $TotalShiptValue = 0; + if (count( $_SESSION['SuppTrans']->Shipts) > 0){ /*if there are any Shipment charges on the invoice*/ echo '<br /><table cellpadding=2 class=selection> @@ -312,7 +313,7 @@ <th>" . _('Amount') . '</th></tr>'; echo $TableHeader; - $TotalShiptValue = 0; + foreach ($_SESSION['SuppTrans']->Shipts as $EnteredShiptRef){ @@ -332,6 +333,7 @@ <td class=number><font size=4 color=BLUE><U>' . number_format($TotalShiptValue,2) . '</U></font></td></tr></table>'; } + $TotalAssetValue = 0; if (count( $_SESSION['SuppTrans']->Assets) > 0){ /*if there are any fixed assets on the invoice*/ @@ -342,8 +344,6 @@ <th>' . _('Amount') . ' ' . $_SESSION['SuppTrans']->CurrCode . '</th></tr>'; echo $TableHeader; - $TotalAssetValue = 0; - foreach ($_SESSION['SuppTrans']->Assets as $EnteredAsset){ echo '<tr><td>' . $EnteredAsset->AssetID . '</td> @@ -363,8 +363,8 @@ <td class=number><font size=4 color=BLUE><U>' . number_format($TotalAssetValue,2) . '</U></font></td></tr></table>'; } //end loop around assets added to invocie + $TotalContractsValue = 0; - if (count( $_SESSION['SuppTrans']->Contracts) > 0){ /*if there are any contract charges on the invoice*/ echo '<br /><table cellpadding="2" class=selection> @@ -374,7 +374,7 @@ <th>' . _('Narrative') . '</th></tr>'; echo $TableHeader; - $TotalContractsValue = 0; + $i=0; foreach ($_SESSION['SuppTrans']->Contracts as $Contract){ @@ -397,7 +397,8 @@ </tr></table>'; } - + $TotalGLValue = 0; + if ( $_SESSION['SuppTrans']->GLLink_Creditors == 1){ if (count($_SESSION['SuppTrans']->GLCodes) > 0){ @@ -409,8 +410,6 @@ <th>' . _('Narrative') . '</th></tr>'; echo $TableHeader; - $TotalGLValue = 0; - foreach ($_SESSION['SuppTrans']->GLCodes as $EnteredGLCode){ echo '<tr><td>' . $EnteredGLCode->GLCode . '</td> @@ -427,21 +426,6 @@ </tr></table>'; } - if (!isset($TotalGRNValue)){ - $TotalGRNValue = 0; - } - if (!isset($TotalGLValue)){ - $TotalGLValue = 0; - } - if (!isset($TotalShiptValue)){ - $TotalShiptValue = 0; - } - if (!isset($TotalContractsValue)){ - $TotalContractsValue = 0; - } - if (!isset($TotalAssetValue)){ - $TotalAssetValue = 0; - } $_SESSION['SuppTrans']->OvAmount = ($TotalGRNValue + $TotalGLValue + $TotalAssetValue + $TotalShiptValue + $TotalContractsValue); echo '<br /><table class=selection><tr><td>' . _('Amount in supplier currency') . ':</td><td colspan=2 class=number>' . @@ -500,7 +484,7 @@ } else { /*Tax being entered manually accept the taxamount entered as is*/ // if (!isset($_POST['TaxAmount' . $Tax->TaxCalculationOrder])) { // $_POST['TaxAmount' . $Tax->TaxCalculationOrder]=0; -// } +// } $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxOvAmount = $_POST['TaxAmount' . $Tax->TaxCalculationOrder]; echo ' <input type="hidden" name="TaxRate"' . $Tax->TaxCalculationOrder . ' value="' . $_SESSION['SuppTrans']->Taxes[$Tax->TaxCalculationOrder]->TaxRate * 100 . '">'; @@ -554,33 +538,43 @@ $InputError = False; if ( $TaxTotal + $_SESSION['SuppTrans']->OvAmount < 0){ + $InputError = True; prnMsg(_('The invoice as entered cannot be processed because the total amount of the invoice is less than 0') . '. ' . _('Invoices are expected to have a positive charge'),'error'); echo '<p> The tax total is : ' . $TaxTotal; echo '<p> The ovamount is : ' . $_SESSION['SuppTrans']->OvAmount; + } elseif ( $TaxTotal + $_SESSION['SuppTrans']->OvAmount == 0){ + prnMsg(_('The invoice as entered will be processed but be warned the amount of the invoice is zero!') . '. ' . _('Invoices are normally expected to have a positive charge'),'warn'); + } elseif (strlen( $_SESSION['SuppTrans']->SuppReference)<1){ + $InputError = True; prnMsg(_('The invoice as entered cannot be processed because the there is no suppliers invoice number or reference entered') . '. ' . _('The supplier invoice number must be entered'),'error'); } elseif (!is_date( $_SESSION['SuppTrans']->TranDate)){ + $InputError = True; prnMsg( _('The invoice as entered cannot be processed because the invoice date entered is not in the format') . ' ' . $_SESSION['DefaultDateFormat'],'error'); - } elseif (DateDiff(Date($_SESSION['DefaultDateFormat']), $_SESSION['SuppTrans']->TranDate, "d") < 0){ + } elseif (DateDiff(Date($_SESSION['DefaultDateFormat']), $_SESSION['SuppTrans']->TranDate, 'd') < 0){ + $InputError = True; prnMsg(_('The invoice as entered cannot be processed because the invoice date is after today') . '. ' . _('Purchase invoices are expected to have a date prior to or today'),'error'); }elseif ( $_SESSION['SuppTrans']->ExRate <= 0){ + $InputError = True; prnMsg( _('The invoice as entered cannot be processed because the exchange rate for the invoice has been entered as a negative or zero number') . '. ' . _('The exchange rate is expected to show how many of the suppliers currency there are in 1 of the local currency'),'error'); - - }elseif ( $_SESSION['SuppTrans']->OvAmount < round($TotalShiptValue + $TotalGLValue + $TotalContractsValue+ $TotalAssetValue+$TotalGRNValue,2)){ + + } elseif ( $_SESSION['SuppTrans']->OvAmount < round($TotalShiptValue + $TotalGLValue + $TotalContractsValue+ $TotalAssetValue+$TotalGRNValue,2)){ + prnMsg( _('The invoice total as entered is less than the sum of the shipment charges, the general ledger entries (if any), the charges for goods received, contract charges and fixed asset charges. There must be a mistake somewhere, the invoice as entered will not be processed'),'error'); $InputError = True; } else { + $sql = "SELECT count(*) FROM supptrans WHERE supplierno='" . $_SESSION['SuppTrans']->SupplierID . "' Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/UpgradeDatabase.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -104,7 +104,7 @@ } $result = DB_IgnoreForeignKeys($db); - + foreach ($SQLScripts AS $SQLScriptFile) { $SQLEntries = file($SQLScriptFile); @@ -135,7 +135,7 @@ } if (strpos($SQLEntries[$i],';')>0 AND ! $InAFunction){ $sql = substr($sql,0,strlen($sql)-1); - $result = DB_query($sql, $db, $ErrMsg, $DBMsg, false, false); + $result = DB_query($sql, $db, '','', false, false); echo '<tr><td>' . $sql . '</td>'; switch (DB_error_no($db)) { case 0: Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/doc/Change.log.html 2011-01-23 04:08:53 UTC (rev 4473) @@ -1,5 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> +<p>23/1/11:Phil changed back references throughout several MRP scripts from is_date to Is_Date - as Is_Date is used throughout the code and much bigger job to change all references to is_date</p> <p>20/1/11: Tim changed back addinfo calls to addInfo on PDF reports - Zhigio originally thought to be an issue with Turkish utf-8 pdfs but turned out to be a red herring. class.pdf call changed back to addInfo too - most of calls had not been changed to lower case info</p> <p>20/1/11: Tim changed PricesBasedOnMarkUp to have end date day before new prices effective from</p> <p>20/1/11: Phil FixedAssetRegister.php FixedAssetDepreciation.php fixes </p> Modified: trunk/includes/ConnectDB_mysql.inc =================================================================== --- trunk/includes/ConnectDB_mysql.inc 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/includes/ConnectDB_mysql.inc 2011-01-23 04:08:53 UTC (rev 4473) @@ -5,6 +5,9 @@ define ('LIKE','LIKE'); global $db; // Make sure it IS global, regardless of our context +if (!isset($mysqlport)){ + $mysqlport = 3306; +} $db = mysql_connect($host.':'.$mysqlport , $dbuser, $dbpassword); //printf("tried making mysql Connection.\n"); Modified: trunk/includes/ConnectDB_mysqli.inc =================================================================== --- trunk/includes/ConnectDB_mysqli.inc 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/includes/ConnectDB_mysqli.inc 2011-01-23 04:08:53 UTC (rev 4473) @@ -9,6 +9,9 @@ define ('LIKE','LIKE'); +if (!isset($mysqlport)){ + $mysqlport = 3306; +} global $db; // Make sure it IS global, regardless of our context $db = mysqli_connect($host , $dbuser, $dbpassword,$_SESSION['DatabaseName'], $mysqlport); Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/includes/DateFunctions.inc 2011-01-23 04:08:53 UTC (rev 4473) @@ -15,7 +15,7 @@ */ -function is_date($DateEntry) { +function Is_date($DateEntry) { $DateEntry =Trim($DateEntry); @@ -41,7 +41,6 @@ return 0; } - if ((int)$Date_Array[2] >9999) { return 0; } @@ -79,7 +78,6 @@ } //end of Is_Date function - //_______________________________________________________________ function MonthAndYearFromSQLDate($DateEntry) { @@ -338,7 +336,7 @@ if ((int)$Date_Array[2] <60) { $Date_Array[2] = '20'.$Date_Array[2]; - } elseif ((int)$Date_Array[2] >59 AND (int)$Date_Array[2] <100) { + } elseif ((int)$Date_Array[2] >59 AND (int)$Date_Array[2] <100){ $Date_Array[2] = '19'.$Date_Array[2]; } elseif ((int)$Date_Array[2] >9999) { return 0; @@ -354,11 +352,11 @@ return $Date_Array[0].'.'.$Date_Array[1].'.'.$Date_Array[2]; } } elseif ($_SESSION['DefaultDateFormat']='m/d/Y'){ - if (checkdate((int)$Date_Array[0],(int)$Date_Array[1],(int)$Date_Array[2])) { + if (checkdate((int)$Date_Array[0],(int)$Date_Array[1],(int)$Date_Array[2])){ return $Date_Array[0].'/'.$Date_Array[1].'/'.$Date_Array[2]; } } elseif ($_SESSION['DefaultDateFormat']='Y/m/d'){ - if (checkdate((int)$Date_Array[2],(int)$Date_Array[0],(int)$Date_Array[1])) { + if (checkdate((int)$Date_Array[2],(int)$Date_Array[0],(int)$Date_Array[1])){ return $Date_Array[0].'/'.$Date_Array[1].'/'.$Date_Array[2]; } } // end if check date @@ -367,9 +365,6 @@ } }// end of function - - - function FormatDateForSQL($DateEntry) { /* takes a date in a the format specified in $_SESSION['DefaultDateFormat'] @@ -434,7 +429,70 @@ return FormatDateForSQL( $dt[0] ) . ' ' . $dt[1]; } +function LastDayOfMonth ( $DateEntry) { + /*Expects a date in DefaultDateFormat and + * Returns the last day of the month in the entered date + * in the DefaultDateFormat + * + * mktime (0,0,0 month, day, year) + */ + + $DateEntry = trim($DateEntry); + if (strpos($DateEntry,'/')) { + $Date_Array = explode('/',$DateEntry); + } elseif (strpos ($DateEntry,'-')) { + $Date_Array = explode('-',$DateEntry); + } elseif (strpos ($DateEntry,'.')) { + $Date_Array = explode('.',$DateEntry); + } elseif (strlen($DateEntry)==6) { + $Date_Array[0]= substr($DateEntry,0,2); + $Date_Array[1]= substr($DateEntry,2,2); + $Date_Array[2]= substr($DateEntry,4,2); + } elseif (strlen($DateEntry)==8) { + $Date_Array[0]= substr($DateEntry,0,4); + $Date_Array[1]= substr($DateEntry,4,2); + $Date_Array[2]= substr($DateEntry,6,2); + } + + if ($_SESSION['DefaultDateFormat']=='Y/m/d') { + if (strlen($Date_Array[0])==2) { + if ((int)$Date_Array[0] <=60) { + $Date_Array[0] = '20'.$Date_Array[2]; + } elseif ((int)$Date_Array[0] >60 AND (int)$Date_Array[2] <100) { + $Date_Array[0] = '19'.$Date_Array[2]; + } + } + + $DateStamp = mktime(0,0,0, $Date_Array[1]+1, 0, $Date_Array[0]); + + }elseif (($_SESSION['DefaultDateFormat']=='d/m/Y') OR $_SESSION['DefaultDateFormat']=='d.m.Y'){ + if (strlen($Date_Array[2])==2) { + if ((int)$Date_Array[2] <=60) { + $Date_Array[2] = '20'.$Date_Array[2]; + } elseif ((int)$Date_Array[2] >60 AND (int)$Date_Array[2] <100) { + $Date_Array[2] = '19'.$Date_Array[2]; + } + } + $DateStamp = mktime(0,0,0, $Date_Array[1]+1, 0, $Date_Array[2]); + + + } elseif ($_SESSION['DefaultDateFormat']=='m/d/Y') { + if (strlen($Date_Array[2])==2) { + if ((int)$Date_Array[2] <=60) { + $Date_Array[2] = '20'.$Date_Array[2]; + } elseif ((int)$Date_Array[2] >60 AND (int)$Date_Array[2] <100) { + $Date_Array[2] = '19'.$Date_Array[2]; + } + } + return $Date_Array[2].'-'.$Date_Array[0].'-'.$Date_Array[1]; + $DateStamp = mktime(0,0,0, $Date_Array[0]+1, 0, $Date_Array[2]); + } + return Date($_SESSION['DefaultDateFormat'],$DateStamp); +}// end of Last Day in the month function + + + function Date1GreaterThanDate2 ($Date1, $Date2) { /* returns true (1) if Date1 is greater than Date2 */ @@ -875,4 +933,5 @@ return $myrow[0]; } -?> + +?> \ No newline at end of file Modified: trunk/index.php =================================================================== --- trunk/index.php 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/index.php 2011-01-23 04:08:53 UTC (rev 4473) @@ -291,11 +291,6 @@ <table width="100%" class="table_index"> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/SelectCustomer.php?' . SID . '">' . _('Customer Transaction Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> <?php echo '<p>• <a href="' . $rootpath . '/CustWhereAlloc.php?' . SID . '">' . _('Where Allocated Inquiry') . '</a></p>'; ?> </td> </tr> @@ -327,11 +322,6 @@ </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/CustomerTransInquiry.php?' . SID . '">' . _('Transaction Inquiries') . '</a></p>'; ?> - </td> - </tr> - <tr> - <td class="menu_group_item"> <?php echo '<p>• <a href="' . $rootpath . '/PDFBankingSummary.php?' . SID . '">' . _('Re-Print A Deposit Listing') . '</a></p>'; ?> </td> </tr> @@ -357,6 +347,11 @@ </tr> <tr> <td class="menu_group_item"> + <?php echo '<p>• <a href="' . $rootpath . '/CustomerTransInquiry.php?' . SID . '">' . _('Customer Transaction Inquiries') . '</a></p>'; ?> + </td> + </tr> + <tr> + <td class="menu_group_item"> <?php echo GetRptLinks('ar'); ?> </td> </tr> @@ -1506,13 +1501,13 @@ $Title= array(_('Custom Reports'), _('Standard Reports and Forms')); - $sql= "SELECT id, - reporttype, - defaultreport, - groupname, + $sql= "SELECT id, + reporttype, + defaultreport, + groupname, reportname - FROM reports - ORDER BY groupname, + FROM reports + ORDER BY groupname, reportname"; $Result=DB_query($sql,$db,'','',false,true); $ReportList = ''; Modified: trunk/sql/mysql/upgrade3.11.1-4.00.sql =================================================================== --- trunk/sql/mysql/upgrade3.11.1-4.00.sql 2011-01-20 09:04:43 UTC (rev 4472) +++ trunk/sql/mysql/upgrade3.11.1-4.00.sql 2011-01-23 04:08:53 UTC (rev 4473) @@ -812,5 +812,5 @@ ALTER TABLE `purchorderdetails` CHANGE `gw` `kgs` VARCHAR( 50 ) DEFAULT ''; ALTER TABLE `purchorderdetails` ADD `conversionfactor` DOUBLE NOT NULL DEFAULT '1'; UPDATE config SET confvalue='3.12.3' WHERE confname='VersionNumber'; -ALTER TABLE `purchorderdetails` CHANGE `uom` `suppliersunit` VARCHAR( 50 ) +ALTER TABLE `purchorderdetails` CHANGE `uom` `suppliersunit` VARCHAR( 50 ); UPDATE config SET confvalue='3.12.31' WHERE confname='VersionNumber'; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-01-23 04:38:50
|
Revision: 4474 http://web-erp.svn.sourceforge.net/web-erp/?rev=4474&view=rev Author: daintree Date: 2011-01-23 04:38:44 +0000 (Sun, 23 Jan 2011) Log Message: ----------- PDFTopItems SQL quote fixes Modified Paths: -------------- trunk/PDFTopItems.php trunk/doc/Change.log.html Modified: trunk/PDFTopItems.php =================================================================== --- trunk/PDFTopItems.php 2011-01-23 04:08:53 UTC (rev 4473) +++ trunk/PDFTopItems.php 2011-01-23 04:38:44 UTC (rev 4474) @@ -24,7 +24,7 @@ AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC - LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; + LIMIT 0," . $_GET['NumberOfTopItems'] ; } else { //the situation if only location type selected "All" if ($_GET["location"] == "All") { $SQL = "SELECT salesorderdetails.stkcode, @@ -40,7 +40,7 @@ AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC - LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; + LIMIT 0," . $_GET['NumberOfTopItems']; } else { //the situation if the customer type selected "All" if ($_GET["customers"] == "All") { @@ -58,7 +58,7 @@ AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC - LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; + LIMIT 0," . $_GET['NumberOfTopItems']; } else { //the situation if the location and customer type not selected "All" $SQL = " @@ -76,7 +76,7 @@ AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC - LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; + LIMIT 0," . $_GET['NumberOfTopItems']; } } } @@ -133,4 +133,4 @@ $pdf->Output('TopItems.pdf', 'I'); } /*end of else not PrintPDF */ -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-23 04:08:53 UTC (rev 4473) +++ trunk/doc/Change.log.html 2011-01-23 04:38:44 UTC (rev 4474) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>23/1/11:Peter Otandeka: PDFTopItems.php SQL quoting fixes</p> <p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> <p>23/1/11:Phil changed back references throughout several MRP scripts from is_date to Is_Date - as Is_Date is used throughout the code and much bigger job to change all references to is_date</p> <p>20/1/11: Tim changed back addinfo calls to addInfo on PDF reports - Zhigio originally thought to be an issue with Turkish utf-8 pdfs but turned out to be a red herring. class.pdf call changed back to addInfo too - most of calls had not been changed to lower case info</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-01-23 04:38:50
|
Revision: 4474 http://web-erp.svn.sourceforge.net/web-erp/?rev=4474&view=rev Author: daintree Date: 2011-01-23 04:38:44 +0000 (Sun, 23 Jan 2011) Log Message: ----------- PDFTopItems SQL quote fixes Modified Paths: -------------- trunk/PDFTopItems.php trunk/doc/Change.log.html Modified: trunk/PDFTopItems.php =================================================================== --- trunk/PDFTopItems.php 2011-01-23 04:08:53 UTC (rev 4473) +++ trunk/PDFTopItems.php 2011-01-23 04:38:44 UTC (rev 4474) @@ -24,7 +24,7 @@ AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC - LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; + LIMIT 0," . $_GET['NumberOfTopItems'] ; } else { //the situation if only location type selected "All" if ($_GET["location"] == "All") { $SQL = "SELECT salesorderdetails.stkcode, @@ -40,7 +40,7 @@ AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC - LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; + LIMIT 0," . $_GET['NumberOfTopItems']; } else { //the situation if the customer type selected "All" if ($_GET["customers"] == "All") { @@ -58,7 +58,7 @@ AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC - LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; + LIMIT 0," . $_GET['NumberOfTopItems']; } else { //the situation if the location and customer type not selected "All" $SQL = " @@ -76,7 +76,7 @@ AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC - LIMIT 0,'" . $_GET['NumberOfTopItems'] . "'"; + LIMIT 0," . $_GET['NumberOfTopItems']; } } } @@ -133,4 +133,4 @@ $pdf->Output('TopItems.pdf', 'I'); } /*end of else not PrintPDF */ -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-23 04:08:53 UTC (rev 4473) +++ trunk/doc/Change.log.html 2011-01-23 04:38:44 UTC (rev 4474) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>23/1/11:Peter Otandeka: PDFTopItems.php SQL quoting fixes</p> <p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> <p>23/1/11:Phil changed back references throughout several MRP scripts from is_date to Is_Date - as Is_Date is used throughout the code and much bigger job to change all references to is_date</p> <p>20/1/11: Tim changed back addinfo calls to addInfo on PDF reports - Zhigio originally thought to be an issue with Turkish utf-8 pdfs but turned out to be a red herring. class.pdf call changed back to addInfo too - most of calls had not been changed to lower case info</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-01-24 05:25:49
|
Revision: 4475 http://web-erp.svn.sourceforge.net/web-erp/?rev=4475&view=rev Author: daintree Date: 2011-01-24 05:25:42 +0000 (Mon, 24 Jan 2011) Log Message: ----------- Asset module fixes Modified Paths: -------------- trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/SelectAsset.php trunk/doc/Change.log.html Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-01-23 04:38:44 UTC (rev 4474) +++ trunk/FixedAssetDepreciation.php 2011-01-24 05:25:42 UTC (rev 4475) @@ -18,7 +18,8 @@ FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 - GROUP BY periods.lastdate_in_period',$db); + GROUP BY periods.lastdate_in_period + ORDER BY periods.lastdate_in_period DESC',$db); $LastDepnRun = DB_fetch_row($result); @@ -41,6 +42,8 @@ } else { //depn calc has been run previously $AllowUserEnteredProcessDate = false; + prnMsg('LastDepnRun[0] = ' . $LastDepnRun[0] . '<br />ConvertSQLDate($LastDepnRun[0]) = ' . ConvertSQLDate($LastDepnRun[0]) . '<br />DateAdd(ConvertSQLDate($LastDepnRun[0]),d,28) = ' . DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28), 'info'); + $_POST['ProcessDate'] = LastDayOfMonth(DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28)); } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-01-23 04:38:44 UTC (rev 4474) +++ trunk/FixedAssetItems.php 2011-01-24 05:25:42 UTC (rev 4475) @@ -538,7 +538,14 @@ echo '<tr><td>' . _('Accumulated Depreciation') . ':</td><td class="number">' . number_format($AssetRow['accumdepn'],2) . '</td></tr>'; echo '<tr><td>' . _('Net Book Value') . ':</td><td class="number">' . number_format($AssetRow['cost']-$AssetRow['accumdepn'],2) . '</td></tr>'; -$result = DB_query('SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period',$db); +$result = DB_query('SELECT periods.lastdate_in_period, + max(fixedassettrans.periodno) + FROM fixedassettrans INNER JOIN periods + ON fixedassettrans.periodno=periods.periodno + WHERE transtype=44 + GROUP BY periods.lastdate_in_period + ORDER BY periods.lastdate_in_period DESC',$db); + $LastDepnRun = DB_fetch_row($result); if(DB_num_rows($result)==0){ $LastRunDate = _('Not Yet Run'); Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2011-01-23 04:38:44 UTC (rev 4474) +++ trunk/SelectAsset.php 2011-01-24 05:25:42 UTC (rev 4475) @@ -124,7 +124,7 @@ //insert wildcard characters in spaces $_POST['Keywords'] = strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - if ($_POST['AssetCategory'] == 'All') { + if ($_POST['AssetCategory'] == 'ALL') { if ($_POST['AssetLocation']=='ALL'){ $SQL .= 'WHERE description ' . LIKE . "'" . $SearchString . "' ORDER BY fixedassets.assetid"; } else { @@ -171,6 +171,7 @@ $ErrMsg = _('No assets were returned by the SQL because'); $DbgMsg = _('The SQL that returned an error was'); $searchresult = DB_query($SQL, $db, $ErrMsg, $DbgMsg); + if (DB_num_rows($searchresult) == 0) { prnMsg(_('No assets were returned by this search please re-enter alternative criteria to try again'), 'info'); } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-23 04:38:44 UTC (rev 4474) +++ trunk/doc/Change.log.html 2011-01-24 05:25:42 UTC (rev 4475) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>24/1/11:Phil Depreciation fixes - SelectAsset by description fix</p> <p>23/1/11:Peter Otandeka: PDFTopItems.php SQL quoting fixes</p> <p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> <p>23/1/11:Phil changed back references throughout several MRP scripts from is_date to Is_Date - as Is_Date is used throughout the code and much bigger job to change all references to is_date</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-01-24 05:25:49
|
Revision: 4475 http://web-erp.svn.sourceforge.net/web-erp/?rev=4475&view=rev Author: daintree Date: 2011-01-24 05:25:42 +0000 (Mon, 24 Jan 2011) Log Message: ----------- Asset module fixes Modified Paths: -------------- trunk/FixedAssetDepreciation.php trunk/FixedAssetItems.php trunk/SelectAsset.php trunk/doc/Change.log.html Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-01-23 04:38:44 UTC (rev 4474) +++ trunk/FixedAssetDepreciation.php 2011-01-24 05:25:42 UTC (rev 4475) @@ -18,7 +18,8 @@ FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 - GROUP BY periods.lastdate_in_period',$db); + GROUP BY periods.lastdate_in_period + ORDER BY periods.lastdate_in_period DESC',$db); $LastDepnRun = DB_fetch_row($result); @@ -41,6 +42,8 @@ } else { //depn calc has been run previously $AllowUserEnteredProcessDate = false; + prnMsg('LastDepnRun[0] = ' . $LastDepnRun[0] . '<br />ConvertSQLDate($LastDepnRun[0]) = ' . ConvertSQLDate($LastDepnRun[0]) . '<br />DateAdd(ConvertSQLDate($LastDepnRun[0]),d,28) = ' . DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28), 'info'); + $_POST['ProcessDate'] = LastDayOfMonth(DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28)); } Modified: trunk/FixedAssetItems.php =================================================================== --- trunk/FixedAssetItems.php 2011-01-23 04:38:44 UTC (rev 4474) +++ trunk/FixedAssetItems.php 2011-01-24 05:25:42 UTC (rev 4475) @@ -538,7 +538,14 @@ echo '<tr><td>' . _('Accumulated Depreciation') . ':</td><td class="number">' . number_format($AssetRow['accumdepn'],2) . '</td></tr>'; echo '<tr><td>' . _('Net Book Value') . ':</td><td class="number">' . number_format($AssetRow['cost']-$AssetRow['accumdepn'],2) . '</td></tr>'; -$result = DB_query('SELECT periods.lastdate_in_period, max(fixedassettrans.periodno) FROM fixedassettrans INNER JOIN periods ON fixedassettrans.periodno=periods.periodno WHERE transtype=44 GROUP BY periods.lastdate_in_period',$db); +$result = DB_query('SELECT periods.lastdate_in_period, + max(fixedassettrans.periodno) + FROM fixedassettrans INNER JOIN periods + ON fixedassettrans.periodno=periods.periodno + WHERE transtype=44 + GROUP BY periods.lastdate_in_period + ORDER BY periods.lastdate_in_period DESC',$db); + $LastDepnRun = DB_fetch_row($result); if(DB_num_rows($result)==0){ $LastRunDate = _('Not Yet Run'); Modified: trunk/SelectAsset.php =================================================================== --- trunk/SelectAsset.php 2011-01-23 04:38:44 UTC (rev 4474) +++ trunk/SelectAsset.php 2011-01-24 05:25:42 UTC (rev 4475) @@ -124,7 +124,7 @@ //insert wildcard characters in spaces $_POST['Keywords'] = strtoupper($_POST['Keywords']); $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - if ($_POST['AssetCategory'] == 'All') { + if ($_POST['AssetCategory'] == 'ALL') { if ($_POST['AssetLocation']=='ALL'){ $SQL .= 'WHERE description ' . LIKE . "'" . $SearchString . "' ORDER BY fixedassets.assetid"; } else { @@ -171,6 +171,7 @@ $ErrMsg = _('No assets were returned by the SQL because'); $DbgMsg = _('The SQL that returned an error was'); $searchresult = DB_query($SQL, $db, $ErrMsg, $DbgMsg); + if (DB_num_rows($searchresult) == 0) { prnMsg(_('No assets were returned by this search please re-enter alternative criteria to try again'), 'info'); } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-23 04:38:44 UTC (rev 4474) +++ trunk/doc/Change.log.html 2011-01-24 05:25:42 UTC (rev 4475) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>24/1/11:Phil Depreciation fixes - SelectAsset by description fix</p> <p>23/1/11:Peter Otandeka: PDFTopItems.php SQL quoting fixes</p> <p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> <p>23/1/11:Phil changed back references throughout several MRP scripts from is_date to Is_Date - as Is_Date is used throughout the code and much bigger job to change all references to is_date</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-01-29 21:47:03
|
Revision: 4477 http://web-erp.svn.sourceforge.net/web-erp/?rev=4477&view=rev Author: daintree Date: 2011-01-29 21:46:53 +0000 (Sat, 29 Jan 2011) Log Message: ----------- Exson string - Tim report writer fix Modified Paths: -------------- trunk/PDFLowGP.php trunk/doc/Change.log.html trunk/includes/tcpdf/tcpdf.php trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/reportwriter/WriteReport.inc Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-01-24 05:44:58 UTC (rev 4476) +++ trunk/PDFLowGP.php 2011-01-29 21:46:53 UTC (rev 4477) @@ -161,7 +161,7 @@ <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' size=10 maxlength=10 VALUE='" . $_POST['ToDate'] . "'></td> </tr>"; - echo '<tr><td>' . _('Show sales with GP % below') . ":</td> + echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ":</td> <td><input type=text class='number' name='GPMin' maxlength=3 size=3 value=" . $_POST['GPMin'] . "></td> </tr>"; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-24 05:44:58 UTC (rev 4476) +++ trunk/doc/Change.log.html 2011-01-29 21:46:53 UTC (rev 4477) @@ -1,5 +1,7 @@ -<p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> +<p>/<font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>30/1/11:Exson changed PDFLowGP report remove % from gettext string</p> +<p>29/1/11:Tim fix reportwriter with tcpdf using parent::__construct rather than $this->Cpdf( </p> <p>24/1/11:Phil Depreciation fixes - SelectAsset by description fix</p> <p>23/1/11:Peter Otandeka: PDFTopItems.php SQL quoting fixes</p> <p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> Modified: trunk/includes/tcpdf/tcpdf.php =================================================================== --- trunk/includes/tcpdf/tcpdf.php 2011-01-24 05:44:58 UTC (rev 4476) +++ trunk/includes/tcpdf/tcpdf.php 2011-01-29 21:46:53 UTC (rev 4477) @@ -5514,7 +5514,7 @@ $imgalpha = imagecreate($wpx, $hpx); // generate gray scale pallete for ($c = 0; $c < 256; ++$c) { - ImageColorAllocate($imgalpha, $c, $c, $c); + imagecolorallocate($imgalpha, $c, $c, $c); } // extract alpha channel for ($xpx = 0; $xpx < $wpx; ++$xpx) { Modified: trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po 2011-01-24 05:44:58 UTC (rev 4476) +++ trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po 2011-01-29 21:46:53 UTC (rev 4477) @@ -1,23 +1,25 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# +# weberp 简体中文界面文件 +# Copyright (C) 2007 Logic Works Ltd +# This file is distributed under the same license as the webERP package. +# FIRST AUTHOR <rom...@gm...>, 2006. +# THIS VERSION FROM http://weberp-china.oicp.net msgid "" msgstr "" -"Project-Id-Version: WEBERP3.13\n" +"Project-Id-Version: WEBERP3.05 VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-01-04 22:11+1200\n" -"PO-Revision-Date: 2010-06-16 00:41+0800\n" -"Last-Translator: \n" -"Language-Team: WebERP Translation Team <web-erp-translation@lists." -"sourceforge.net>\n" +"POT-Creation-Date: 2011-01-04 22:15+1200\n" +"PO-Revision-Date: 2011-01-29 15:12+0000\n" +"Last-Translator: Exson qu <hex...@gm...>\n" +"Language-Team: WebERP Translation Team <web-erp-" +"tra...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Chinese\n" +"X-Launchpad-Export-Date: 2011-01-29 15:16+0000\n" +"X-Generator: Launchpad (build 12274)\n" "X-Poedit-Country: CHINA\n" -"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-SearchPath-0: webERPRC4\n" +"X-Poedit-Basepath: C:\\改过自新\\\n" #: AccountGroups.php:9 index.php:1273 msgid "Account Groups" @@ -27,26 +29,26 @@ msgid "" "An error occurred in retrieving the account groups of the parent account " "group during the check for recursion" -msgstr "中检索的父帐户的组帐户组的递归检查过程中发生错误" +msgstr "在递归检查中查询父账户组中的科目组发生错误" #: AccountGroups.php:20 msgid "" "The SQL that was used to retrieve the account groups of the parent account " "group and that failed in the process was" -msgstr "SQL,用来检索的父帐户的组帐户组和过程中失败" +msgstr "用于查询父账户组的科目组失败的SQL是" #: AccountGroups.php:57 AccountGroups.php:94 AccountGroups.php:177 #: AccountGroups.php:187 msgid "The SQL that was used to retrieve the information was" -msgstr "在用来检索信息的 SQL 是" +msgstr "用于查找交易数据的SQL是" #: AccountGroups.php:58 msgid "Could not check whether the group exists because" -msgstr "无法检查组存在的原因" +msgstr "未能判定组别是否存在, 因为" #: AccountGroups.php:65 msgid "The account group name already exists in the database" -msgstr "该科目组名称已经存在" +msgstr "科目组名称已经存在在数据库中。" #: AccountGroups.php:71 msgid "The account group name cannot contain the character" @@ -59,20 +61,18 @@ #: AccountGroups.php:77 msgid "The account group name must be at least one character long" -msgstr "帐户的组名称必须至少一个字符" +msgstr "科目组名称必须不少于 1 个字" #: AccountGroups.php:84 msgid "" "The parent account group selected appears to result in a recursive account " "structure - select an alternative parent account group or make this group a " "top level account group" -msgstr "" -"所选的父帐户组出现导致递归帐户结构-选择一个另类的父帐户组或使这组最高级别科目" -"组" +msgstr "所选的父账户组看来会导致一个递归的账户结构-选择一个另外的父账户组或者将此账户组作为一个最顶层的账户组" #: AccountGroups.php:95 msgid "Could not check whether the group is recursive because" -msgstr "无法检查组是否递归因为" +msgstr "未能检查此组是否递归, 因为" #: AccountGroups.php:107 msgid "The section in accounts must be an integer" @@ -84,15 +84,15 @@ #: AccountGroups.php:119 msgid "The sequence in the TB must be numeric and less than" -msgstr "试算表行次必须为数字且小于" +msgstr "试算表内顺序必须是数字且小于" #: AccountGroups.php:136 msgid "An error occurred in updating the account group" -msgstr "更新科目组发生错误" +msgstr "更新科目组是发生了错误" #: AccountGroups.php:137 msgid "The SQL that was used to update the account group was" -msgstr "SQL 用于更新帐户组是" +msgstr "用于更新科目组失败的 SQL 是" #: AccountGroups.php:139 AccountSections.php:106 PaymentMethods.php:91 msgid "Record Updated" @@ -100,19 +100,20 @@ #: AccountGroups.php:157 msgid "An error occurred in inserting the account group" -msgstr "插入科目组发生错误" +msgstr "插入科目组时发生错误, 因为" #: AccountGroups.php:158 msgid "The SQL that was used to insert the account group was" -msgstr "SQL 用于插入组中的帐户是" +msgstr "用作插入科目组失败的 SQL 是" #: AccountGroups.php:159 AccountSections.php:118 PaymentMethods.php:113 msgid "Record inserted" msgstr "记录已新增" #: AccountGroups.php:176 -msgid "An error occurred in retrieving the group information from chartmaster" -msgstr "从图表学习检索组信息的过程中出错" +msgid "" +"An error occurred in retrieving the group information from chartmaster" +msgstr "从主表中查找组信息时发生错误" #: AccountGroups.php:181 msgid "" @@ -145,29 +146,29 @@ #: AccountGroups.php:182 msgid "general ledger accounts that refer to this account group" -msgstr "个属于此科目组的会计科目" +msgstr "属于此科目组的会计科目" #: AccountGroups.php:186 msgid "An error occurred in retrieving the parent group information" -msgstr "检索该父组信息的过程中出错" +msgstr "查找父组信息时发生错误" #: AccountGroups.php:191 msgid "" "Cannot delete this account group because it is a parent account group of " "other account group(s)" -msgstr "不能删除此帐户的组,因为它是父帐户组的其他帐户组" +msgstr "删除会计科目组失败, 由于它是其他账户组的父账户组。" #: AccountGroups.php:192 msgid "account groups that have this group as its/there parent account group" -msgstr "" +msgstr "账户组将此账户作为他的/他们的父账户组" #: AccountGroups.php:195 msgid "An error occurred in deleting the account group" -msgstr "删去帐户组中的一个错误" +msgstr "删除账户组是发生错误" #: AccountGroups.php:196 msgid "The SQL that was used to delete the account group was" -msgstr "所用的帐户组中删除的 SQL 是" +msgstr "用于账户组的 SQL 是" #: AccountGroups.php:198 msgid "group has been deleted" @@ -175,7 +176,7 @@ #: AccountGroups.php:223 msgid "The sql that was used to retrieve the account group information was " -msgstr "用于检索组的帐户信息的 sql 是" +msgstr "用于查询账户组信息的SQL是 " #: AccountGroups.php:224 msgid "Could not get account groups because" @@ -221,7 +222,7 @@ #: WorkOrderReceive.php:15 WorkOrderStatus.php:43 WWW_Access.php:13 #: WWW_Users.php:38 Z_BottomUpCosts.php:51 msgid "Search" -msgstr "搜索" +msgstr "查找" #: AccountGroups.php:230 msgid "Group Name" @@ -379,18 +380,17 @@ #: AccountGroups.php:294 msgid "An error occurred in retrieving the account group information" -msgstr "检索组的帐户信息的过程中出错" +msgstr "查找账户组信息时发生错误" #: AccountGroups.php:295 msgid "" "The SQL that was used to retrieve the account group and that failed in the " "process was" -msgstr "SQL 用来检索帐户组和过程中失败" +msgstr "用于查询科目组失败的SQL是" #: AccountGroups.php:298 -#, fuzzy msgid "The account group name does not exist in the database" -msgstr "该科目组名称已经存在" +msgstr "科目组名称在数据库中不存在。" #: AccountGroups.php:314 GLAccounts.php:250 GLAccounts.php:299 #: Z_ImportGLAccountGroups.php:28 @@ -403,7 +403,7 @@ #: AccountGroups.php:348 AccountGroups.php:350 msgid "Top Level Group" -msgstr "最高级别组" +msgstr "顶层组" #: AccountGroups.php:364 msgid "Section In Accounts" @@ -433,7 +433,7 @@ #: AccountSections.php:68 msgid "The account section already exists in the database" -msgstr "在数据库中已存在的帐户部分" +msgstr "会计要素已经存在于数据库" #: AccountSections.php:75 msgid "The account section name cannot contain the character" @@ -441,7 +441,7 @@ #: AccountSections.php:81 msgid "The account section name must contain at least one character" -msgstr "帐户一节名称必须包含至少一个字符" +msgstr "会计要素名称必须包含至少一个字符" #: AccountSections.php:87 AccountSections.php:93 msgid "The section number must be an integer" @@ -488,7 +488,7 @@ #: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:601 #: SelectCustomer.php:630 msgid "Customer Contacts" -msgstr "客户联系" +msgstr "顾客联系人" #: AddCustomerContacts.php:20 CustEDISetup.php:11 CustLoginSetup.php:24 #: Z_CheckDebtorsControl.php:21 @@ -497,24 +497,23 @@ #: AddCustomerContacts.php:26 msgid "Contacts for Customer: <b>" -msgstr "客户联系人:" +msgstr "客户的联系人" #: AddCustomerContacts.php:29 -#, fuzzy msgid "Edit contact for <b>" -msgstr "客户联系人:" +msgstr "编辑联系人" #: AddCustomerContacts.php:41 msgid "The Contact must be an integer." -msgstr "联系必须完整" +msgstr "联系人必须是整数" #: AddCustomerContacts.php:44 msgid "The contact's name must be forty characters or less long" -msgstr "联系人的名称必须是四十个字符或更少的长" +msgstr "联系人名称必须不多于50个字符" #: AddCustomerContacts.php:47 msgid "The contact's name may not be empty" -msgstr "联系人的姓名不能为空" +msgstr "联系人名称不能留空" #: AddCustomerContacts.php:59 AddCustomerNotes.php:49 #: AddCustomerTypeNotes.php:49 Areas.php:74 CustomerTypes.php:71 @@ -528,11 +527,11 @@ #: AddCustomerContacts.php:70 msgid "The contact record has been added" -msgstr "已添加联系人记录" +msgstr "联系人已新增" #: AddCustomerContacts.php:98 msgid "The contact record has been deleted" -msgstr "联系人记录已被删除" +msgstr "联系人记录已删除" #: AddCustomerContacts.php:112 CompanyPreferences.php:229 #: CustomerBranches.php:377 Customers.php:899 Customers.php:905 @@ -552,7 +551,7 @@ #: AddCustomerContacts.php:114 Customers.php:973 msgid "Phone no" -msgstr "电话号码" +msgstr "电话" #: AddCustomerContacts.php:115 AddCustomerContacts.php:202 Customers.php:902 #: Customers.php:908 Customers.php:974 PcAssignCashToTab.php:216 @@ -565,11 +564,11 @@ #: AddCustomerContacts.php:149 msgid "Review all contacts for this Customer" -msgstr "审查该客户的所有联系方式" +msgstr "查看此顾客的所有联络人" #: AddCustomerContacts.php:179 msgid "Contact Code" -msgstr "联系编号" +msgstr "联系人代码" #: AddCustomerContacts.php:184 Factors.php:279 SupplierContacts.php:219 msgid "Contact Name" @@ -586,7 +585,7 @@ #: AddCustomerNotes.php:6 AddCustomerNotes.php:49 SelectCustomer.php:638 #: SelectCustomer.php:668 msgid "Customer Notes" -msgstr "客户备注" +msgstr "客户通知" #: AddCustomerNotes.php:20 AddCustomerTypeNotes.php:20 msgid "Back to Select Customer" @@ -594,28 +593,27 @@ #: AddCustomerNotes.php:31 msgid "The contact priority must be an integer." -msgstr "联系人的优先级必须是整数" +msgstr "联系优先级必须是整数" #: AddCustomerNotes.php:34 AddCustomerTypeNotes.php:34 msgid "The contact's notes must be two hundred characters or less long" -msgstr "联系人的说明必须是二百个字符或更少的长" +msgstr "联系人备注必须不多于200个字符" #: AddCustomerNotes.php:37 AddCustomerTypeNotes.php:37 msgid "The contact's notes may not be empty" -msgstr "联系人的说明不能留空" +msgstr "联系人备注不能留空" #: AddCustomerNotes.php:60 msgid "The contact notes record has been added" -msgstr "已添加联系人的说明" +msgstr "联系人备注记录已新增" #: AddCustomerNotes.php:87 msgid "The contact note record has been deleted" -msgstr "联系人说明记录已经被删除" +msgstr "联系人备注记录已删除" #: AddCustomerNotes.php:98 -#, fuzzy msgid "Notes for Customer" -msgstr "顾客说明" +msgstr "客户通知:" #: AddCustomerNotes.php:106 AddCustomerNotes.php:189 #: AddCustomerTypeNotes.php:104 AddCustomerTypeNotes.php:186 @@ -653,7 +651,7 @@ #: AddCustomerNotes.php:108 AddCustomerNotes.php:183 msgid "WWW" -msgstr "www" +msgstr "WWW万维网" #: AddCustomerNotes.php:109 AddCustomerNotes.php:195 #: AddCustomerTypeNotes.php:107 AddCustomerTypeNotes.php:189 @@ -662,57 +660,55 @@ #: AddCustomerNotes.php:143 msgid "Review all notes for this Customer" -msgstr "此用户查看所有的说明" +msgstr "查看此顾客的所有通知" #: AddCustomerNotes.php:172 AddCustomerTypeNotes.php:171 msgid "Note ID" -msgstr "备注 ID" +msgstr "Note ID" #: AddCustomerNotes.php:177 msgid "Contact Note" -msgstr "联系人说明" +msgstr "联络人备注" #: AddCustomerTypeNotes.php:6 SelectCustomer.php:676 msgid "Customer Type (Group) Notes" -msgstr "客户类型 (集团) 说明" +msgstr "顾客种类(组)备注" #: AddCustomerTypeNotes.php:31 msgid "The Contact priority must be an integer." -msgstr "联系人的优先级必须是整体" +msgstr "联络人优先级必须是整数" #: AddCustomerTypeNotes.php:49 SelectCustomer.php:706 msgid "Customer Group Notes" -msgstr "客户群体说明" +msgstr "顾客组通知" #: AddCustomerTypeNotes.php:60 msgid "The contact group notes record has been added" -msgstr "已添加客户群体说明记录" +msgstr "联系人组通知记录已增加" #: AddCustomerTypeNotes.php:84 msgid "The contact group note record has been deleted" -msgstr "联系人群体说明记录已被删除" +msgstr "联系人组通知记录已经删除" #: AddCustomerTypeNotes.php:95 -#, fuzzy msgid "Notes for Customer Type" -msgstr "客户说明类型" +msgstr "顾客类型的通知:" #: AddCustomerTypeNotes.php:106 msgid "href" -msgstr "超链接" +msgstr "href" #: AddCustomerTypeNotes.php:141 msgid "Review all notes for this Customer Type" -msgstr "查看所有的说明为该客户类型" +msgstr "查看此顾客类型的所有通知。" #: AddCustomerTypeNotes.php:182 msgid "Contact Group Note" -msgstr "联系人群体说明" +msgstr "联系人组通知" #: AddCustomerTypeNotes.php:184 -#, fuzzy msgid "Web site" -msgstr "物料" +msgstr "网站" #: AgedDebtors.php:17 msgid "Aged Customer Balance Listing" @@ -848,7 +844,7 @@ #: AgedDebtors.php:438 msgid "There are no customers meeting the criteria specified to list" -msgstr "没有符合选择条件的客户" +msgstr "没有符合条件的客户" #: AgedDebtors.php:464 msgid "Aged Debtor Analysis" @@ -910,7 +906,7 @@ #: PrintCustTransPortrait.php:630 ReorderLevel.php:229 StockDispatch.php:309 #: SupplierBalsAtPeriodEnd.php:155 SuppPriceList.php:237 Tax.php:352 msgid "Print PDF" -msgstr "生成PDF" +msgstr "打印到PDF" #: AgedSuppliers.php:18 msgid "Aged Supplier Listing" @@ -972,7 +968,7 @@ #: Areas.php:46 msgid "The area code entered already exists" -msgstr "区号输入已经存在" +msgstr "输入的区域代码已经存在" #: Areas.php:51 msgid "The area description must be twenty five characters or less long" @@ -1016,7 +1012,7 @@ msgid "" "Cannot delete this area because sales analysis records exist that use this " "area" -msgstr "不能删除这方面,因为销售分析使用该区域的记录已经存在" +msgstr "不能删除这个区域因为此区域已用于现有的销售分析记录" #: Areas.php:126 msgid "sales analysis records referring this area code" @@ -1041,9 +1037,8 @@ msgstr "区域名称" #: Areas.php:167 -#, fuzzy msgid "View Customers from this Area" -msgstr "客户详细资料" +msgstr "查看此区域的顾客" #: Areas.php:177 msgid "Review Areas Defined" @@ -1051,21 +1046,21 @@ #: AuditTrail.php:9 msgid "Audit Trail" -msgstr "审计跟踪" +msgstr "审核追踪" #: AuditTrail.php:23 msgid "Incorrect date format used, please re-enter" -msgstr "使用不正确的日期格式,请重新输入" +msgstr "输入的日期无效, 请输入有效日期格式" #: AuditTrail.php:37 BOMIndented.php:317 BOMIndentedReverse.php:305 #: MRPCalendar.php:260 msgid "From Date" -msgstr "起始日期" +msgstr "从 日期" #: AuditTrail.php:39 BOMIndented.php:318 BOMIndentedReverse.php:306 #: MRPCalendar.php:262 msgid "To Date" -msgstr "截止日期" +msgstr "到 日期" #: AuditTrail.php:43 PO_AuthorisationLevels.php:123 #: PO_AuthorisationLevels.php:160 PO_AuthorisationLevels.php:163 @@ -1075,7 +1070,7 @@ #: AuditTrail.php:56 msgid "Table " -msgstr "目录" +msgstr "表 " #: AuditTrail.php:68 MRPReport.php:789 PO_SelectPurchOrder.php:357 #: SelectContract.php:196 SelectProduct.php:710 @@ -1104,16 +1099,16 @@ #: includes/InputSerialItemsFile.php:86 includes/InputSerialItemsFile.php:126 #: includes/PDFTaxPageHeader.inc:34 msgid "Type" -msgstr "类型" +msgstr "凭证类型" #: AuditTrail.php:147 msgid "Table" -msgstr "表格" +msgstr "表" #: AuditTrail.php:148 api/api_xml-rpc.php:314 api/api_xml-rpc.php:729 #: api/api_xml-rpc.php:1892 msgid "Field Name" -msgstr "域名" +msgstr "字段名" #: AuditTrail.php:149 SystemParameters.php:312 #: includes/PDFInventoryValnPageHeader.inc:38 @@ -1123,7 +1118,7 @@ #: BankAccounts.php:9 msgid "Bank Accounts Maintenance" -msgstr "银行账户" +msgstr "银行账户维护" #: BankAccounts.php:13 TaxAuthorities.php:149 msgid "Bank" @@ -1135,12 +1130,11 @@ "Codes. Set Default for Invoices to \"yes\" to print Account details on " "Invoices (only one account can be set to \"yes\")." msgstr "" -"更新账户详细信息。守则是对于 SWIFT 或 BSB 的帐户键入银行代码。设置默认值为" -"\"yes\"发票,(只有一个帐户可以将设置为\"是\") 的发票上打印帐户详细信息" +"更新银行账户细节。账户代码是SWIFT或者BSB类型的银行代码。将发票默认项设置为\"是\"来在发票上打印账户的细节 (仅一个账户可以被设置为\"是\")" #: BankAccounts.php:46 msgid "The bank account code already exists in the database" -msgstr "银行账户代码已经存在于数据库" +msgstr "输入的银行账户代码已经存在于数据库" #: BankAccounts.php:52 msgid "The bank account name must be fifty characters or less long" @@ -1152,11 +1146,11 @@ #: BankAccounts.php:64 msgid "The bank account number may not be empty." -msgstr "银行账户不能留空" +msgstr "银行账户号码不能留空" #: BankAccounts.php:70 msgid "The bank account number must be fifty characters or less long" -msgstr "银行账户长度必须是或少于50个字" +msgstr "银行帐号长度必须是或少于50个字" #: BankAccounts.php:76 msgid "The bank address must be fifty characters or less long" @@ -1166,11 +1160,11 @@ msgid "" "Note that it is not possible to change the currency of the account once " "there are transactions against it" -msgstr "请注意,不可能去改变货币的账户,一旦反对交易。" +msgstr "注意:一旦已经记录了交易,就不能再改变账户的币种。" #: BankAccounts.php:108 msgid "The bank account details have been updated" -msgstr "银行账户已更新" +msgstr "银行帐号已更新" #: BankAccounts.php:129 msgid "The new bank account has been entered" @@ -1188,7 +1182,7 @@ msgid "" "Cannot delete this bank account because transactions have been created using " "this account" -msgstr "不能删除此银行账户,因为此账号已有交易" +msgstr "不能删除此银行账户,因为此账户已有交易" #: BankAccounts.php:163 msgid "transactions with this bank account code" @@ -1200,7 +1194,7 @@ #: BankAccounts.php:190 msgid "The bank accounts set up could not be retrieved because" -msgstr "银行账户不能检索设立是由于" +msgstr "设置的银行账户没找到,原因是" #: BankAccounts.php:191 msgid "The SQL used to retrieve the bank account details was" @@ -1208,7 +1202,7 @@ #: BankAccounts.php:196 GLJournal.php:280 msgid "GL Account Code" -msgstr "总账科目" +msgstr "总帐账户代码" #: BankAccounts.php:197 BankAccounts.php:326 msgid "Bank Account Name" @@ -1216,11 +1210,11 @@ #: BankAccounts.php:198 BankAccounts.php:328 msgid "Bank Account Code" -msgstr "银行代码" +msgstr "银行账户代码" #: BankAccounts.php:199 BankAccounts.php:330 msgid "Bank Account Number" -msgstr "银行账户" +msgstr "银行账号" #: BankAccounts.php:200 BankAccounts.php:332 msgid "Bank Address" @@ -1243,7 +1237,7 @@ #: BankAccounts.php:202 BankAccounts.php:351 msgid "Default for Invoices" -msgstr "发票默认" +msgstr "发票默认值" #: BankAccounts.php:251 msgid "Show All Bank Accounts Defined" @@ -1251,15 +1245,15 @@ #: BankAccounts.php:284 BankAccounts.php:287 msgid "Bank Account GL Code" -msgstr "银行账户科目" +msgstr "会计科目" #: BankAccounts.php:334 msgid "Currency Of Account" -msgstr "记帐货币" +msgstr "账户的货币" #: BankMatching.php:8 msgid "Bank Account Matching" -msgstr "银行账户匹配" +msgstr "银行账户对账" #: BankMatching.php:15 PDFCustTransListing.php:44 Z_CheckDebtorsControl.php:80 msgid "Receipts" @@ -1267,11 +1261,11 @@ #: BankMatching.php:16 BankMatching.php:23 msgid "Bank Matching" -msgstr "银行结算" +msgstr "银行对账" #: BankMatching.php:16 msgid "Bank Account Matching - Receipts" -msgstr "银行对账-收据" +msgstr "银行账户对账-收款" #: BankMatching.php:22 PaymentAllocations.php:33 PaymentMethods.php:13 #: PDFSuppTransListing.php:44 @@ -1280,7 +1274,7 @@ #: BankMatching.php:23 msgid "Bank Account Matching - Payments" -msgstr "银行账户匹配-支付" +msgstr "银行账户对账-付款" #: BankMatching.php:27 msgid "This page must be called with a bank transaction type" @@ -1292,11 +1286,11 @@ #: BankMatching.php:40 msgid "Could not retrieve transaction information" -msgstr "无法检索的交易信息" +msgstr "找不到此交易信息" #: BankMatching.php:47 msgid "Could not match off this payment because" -msgstr "未能确认此付款是因为" +msgstr "无法确认这笔付款, 因为" #: BankMatching.php:58 msgid "Could not update the amount matched off this bank transaction because" @@ -1311,9 +1305,7 @@ "Use this screen to match webERP Receipts and Payments to your Bank " "Statement. Check your bank statement and click the check-box when you find " "the matching transaction." -msgstr "" -"\"使用此屏幕以匹配您的银行结单的 webERP 收支。请检查您银行对帐单,当您找到匹" -"配的交易记录,请单击复选框\"" +msgstr "使用此屏幕来核对webERP与您银行收款和付款对账单。核对您的银行对账单并且当您发现符合的交易时点击核取框。" #: BankMatching.php:80 BankReconciliation.php:97 CustomerReceipt.php:729 #: DailyBankTransactions.php:28 Payments.php:732 PDFChequeListing.php:46 @@ -1437,7 +1429,8 @@ msgstr "之后" #: BankMatching.php:218 -msgid "The payments with the selected criteria could not be retrieved because" +msgid "" +"The payments with the selected criteria could not be retrieved because" msgstr "未能提取符合条件的付款, 因为" #: BankMatching.php:221 ShipmentCosting.php:502 ShipmentCosting.php:573 @@ -1495,33 +1488,31 @@ "The entry in the bank statement balance is not numeric. The balance on the " "bank statement should be entered. The exchange difference has not been " "calculated and no general ledger journal has been created" -msgstr "" -"银行对账单条目不是数字的,应输入银行月结单上的剩余。交换的区别没有被计算并总" -"帐日志未已被创建" +msgstr "输入的银行对账表余额不是数字。银行对账表的余额需要输入。汇兑差异没有被计算并且没有创建总帐日记帐。" #: BankReconciliation.php:29 msgid "Could not retrieve the exchange rate for the selected bank account" -msgstr "无法检索所选的银行账户的汇率" +msgstr "无法查询所选银行账户的汇率, 因为" #: BankReconciliation.php:59 BankReconciliation.php:77 msgid "reconciliation on" -msgstr "对帐上" +msgstr "对账于" #: BankReconciliation.php:62 msgid "Cannot insert a GL entry for the exchange difference because" -msgstr "不能插入一个总账的汇兑差额,因为" +msgstr "未能插入汇兑差异的总账凭证, 因为" #: BankReconciliation.php:63 msgid "The SQL that failed to insert the exchange difference GL entry was" -msgstr "SQL 插入交换不同总帐项失败是" +msgstr "插入汇率差异总账凭证失败的SQL是" #: BankReconciliation.php:83 msgid "Exchange difference of" -msgstr "交换不同的" +msgstr "汇兑差异" #: BankReconciliation.php:83 msgid "has been posted" -msgstr "已公布" +msgstr "已过账" #: BankReconciliation.php:93 SuppPaymentRun.php:300 msgid "The bank accounts could not be retrieved by the SQL because" @@ -1530,7 +1521,7 @@ #: BankReconciliation.php:94 CustomerReceipt.php:720 #: DailyBankTransactions.php:25 Payments.php:729 SuppPaymentRun.php:302 msgid "The SQL used to retrieve the bank accounts was" -msgstr "SQL 用于检索银行账户是" +msgstr "找不到银行账户的SQL是" #: BankReconciliation.php:100 CustomerReceipt.php:734 msgid "Bank Accounts have not yet been defined" @@ -1556,25 +1547,25 @@ #: BankReconciliation.php:134 msgid "The bank account balance could not be returned by the SQL because" -msgstr "银行账户余额没找到,原因是" +msgstr "无法返回银行账户余额,原因是" #: BankReconciliation.php:147 msgid "" "Could not retrieve the currency and exchange rate for the selected bank " "account" -msgstr "无法检索的货币和汇率为所选的银行账户" +msgstr "无法找到所选银行账户的货币和汇率, 因为" #: BankReconciliation.php:155 msgid "Balance as at" -msgstr "结余于" +msgstr "余额截止" #: BankReconciliation.php:178 msgid "The unpresented cheques could not be retrieved by the SQL because" -msgstr "未找到企业已付银行的未清算记录, 因为" +msgstr "未找到企业已付银行未付记录, 因为" #: BankReconciliation.php:181 msgid "Add back unpresented cheques" -msgstr "加:企业已付银行未清算" +msgstr "加:企业已付银行未付" #: BankReconciliation.php:186 BankReconciliation.php:258 #: CustomerAllocations.php:331 CustomerAllocations.php:357 @@ -1606,7 +1597,7 @@ #: includes/PDFStockTransListingPageHeader.inc:72 #: includes/PDFSuppTransListingPageHeader.inc:49 msgid "Reference" -msgstr "参考" +msgstr "摘要" #: BankReconciliation.php:188 BankReconciliation.php:260 msgid "Orig Amount" @@ -1614,19 +1605,19 @@ #: BankReconciliation.php:231 msgid "Total of all unpresented cheques" -msgstr "企业已付银行未清算合计:" +msgstr "企业已付银行未付合计:" #: BankReconciliation.php:249 msgid "The uncleared deposits could not be retrieved by the SQL because" -msgstr "未找到企业已收银行的未清算记录, 因为" +msgstr "未找到企业已收银行未收记录, 因为" #: BankReconciliation.php:253 msgid "Less deposits not cleared" -msgstr "减:企业已收银行未清算" +msgstr "减:企业已收银行未收" #: BankReconciliation.php:303 msgid "Total of all uncleared deposits" -msgstr "企业已收银行未清算合计:" +msgstr "企业已收银行未收合计:" #: BankReconciliation.php:305 msgid "Bank statement balance should be" @@ -1634,26 +1625,24 @@ #: BankReconciliation.php:309 msgid "Enter the actual bank statement balance" -msgstr "输入实际银行对账单结算" +msgstr "输入实际的银行对账单余额" #: BankReconciliation.php:311 BankReconciliation.php:321 msgid "Calculate and Post Exchange Difference" -msgstr "计算与兑换差异" +msgstr "计算并将汇兑差异过账" #: BankReconciliation.php:311 msgid "" "This will create a general ledger journal to write off the exchange " "difference in the current balance of the account. It is important that the " "exchange rate above reflects the current value of the bank account currency" -msgstr "" -"这将创建一个总账去冲销当前的收支平衡帐户兑换不同。重要的是上述的汇率反映了银" -"行账户币种的当前值" +msgstr "这将在账户的当前余额产生一个总帐日记账来核销汇兑差异。重要的是上述的汇率反应了银行账户货币的目前价值。" #: BankReconciliation.php:311 CounterSales.php:741 Customers.php:1014 #: SelectOrderItems.php:1374 Stocks.php:1029 WorkOrderCosting.php:512 #: WorkOrderEntry.php:549 msgid "Are You Sure?" -msgstr "确认要删除吗?" +msgstr "确信要删除么?" #: BankReconciliation.php:320 msgid "" @@ -1665,10 +1654,8 @@ "exchange difference based on the current exchange rate to correct the " "reconciliation to the actual bank statement balance click below." msgstr "" -"这是正常的外币帐户具有需要得到反映,交换率因不同地点而异的交换差异。该对帐已" -"准备好使用汇率设置货币表中 (请参见设置选项表上的)。此表必须与当前汇率保持在" -"运行对帐前。如果您想要创建一个分类账,以反映兑换不同基于当前汇率来更正实际银" -"行对账单平衡对帐,点击下面。" +"当汇率变化时,对于外币账户而言,需要反应汇率差异是正常不过的事情。系统设置为使用在货币表中设置的汇率来进行核对(参考设置项)。在进行核对前,此表必须用目前" +"的汇率来维护。如果您希望去创建一个日记账来反应汇兑差异,根据目前的汇率对实际的银行对账表余额来修正此核对,请点击下面。" #: BankReconciliation.php:326 msgid "Match off cleared payments" @@ -1678,38 +1665,38 @@ msgid "Match off cleared deposits" msgstr "核对收款" +# 成品或你指定父项对本层物料的需求数量,如成品A下面挂半成品B2个,半成品B挂原材料C3个,那原材料C的Quantity是3,Extend Qty=3×2=6 #: BOMExtendedQty.php:14 BOMExtendedQty.php:15 BOMExtendedQty.php:156 #: BOMExtendedQty.php:283 -#, fuzzy msgid "Quantity Extended BOM Listing" -msgstr "扩展物料清单数量" +msgstr "数量展开的BOM列表" #: BOMExtendedQty.php:34 BOMIndentedReverse.php:30 MRPCalendar.php:87 #: MRP.php:29 SalesInquiry.php:1191 msgid "The SQL to to create passbom failed with the message" -msgstr "创建通过物料清单失败,其SQL消息是" +msgstr "创建passbom的SQL失败,伴随信息" #: BOMExtendedQty.php:47 BOMIndented.php:42 BOMIndentedReverse.php:43 #: MRP.php:36 msgid "Create of tempbom failed because" -msgstr "创建临时物料清单失败,因为" +msgstr "创建临时BOM失败, 因为" #: BOMExtendedQty.php:158 msgid "" "The Quantiy Extended BOM Listing could not be retrieved by the SQL because" -msgstr "扩展物料清单数量不能被检索,SQL是" +msgstr "未能由 SQL 查询到数量延展的BOM列表, 因为" #: BOMExtendedQty.php:260 BOMIndented.php:235 msgid "Print Indented BOM Listing Error" -msgstr "打印缩排式物料清单错误" +msgstr "打印缩排式BOM列表错误" #: BOMExtendedQty.php:262 BOMIndented.php:237 msgid "There were no items for the selected assembly" -msgstr "没有为所选的程序集的项目" +msgstr "所选的组合没有物料" #: BOMExtendedQty.php:290 BOMIndented.php:266 BOMIndentedReverse.php:260 msgid "Part" -msgstr "成分" +msgstr "部件" #: BOMExtendedQty.php:291 BOMExtendedQty.php:342 BOMExtendedQty.php:343 #: BOMExtendedQty.php:344 BOMExtendedQty.php:345 BOMIndented.php:316 @@ -1764,11 +1751,11 @@ #: BOMExtendedQty.php:293 msgid "Show All Parts" -msgstr "显示所有部分" +msgstr "显示所有部品" #: BOMExtendedQty.php:294 msgid "Only Show Shortages" -msgstr "只显示不足" +msgstr "只显示缺少数量" #: BOMExtendedQty.php:296 BOMIndented.php:274 BOMIndentedReverse.php:262 #: MRPPlannedPurchaseOrders.php:273 MRPPlannedWorkOrders.php:339 @@ -1780,17 +1767,17 @@ #: MRPPlannedPurchaseOrders.php:274 MRPPlannedWorkOrders.php:340 #: MRPReschedules.php:157 MRPShortages.php:259 msgid "Print With Alternating Highlighted Lines" -msgstr "交互式高亮行打印" +msgstr "与另外高亮显示的行一起打印" #: BOMExtendedQty.php:298 BOMIndented.php:276 BOMIndentedReverse.php:264 #: MRPPlannedPurchaseOrders.php:275 MRPPlannedWorkOrders.php:341 #: MRPReschedules.php:158 MRPShortages.php:260 msgid "Plain Print" -msgstr "普通打印" +msgstr "空白打印纸" #: BOMExtendedQty.php:322 msgid "Extended Quantity BOM Listing For " -msgstr "扩展物料清单数量" +msgstr "展开数量(Extended Quantity成品或父项对本层物料的需求量)的BOM列表为 " #: BOMExtendedQty.php:324 BOMIndented.php:303 BOMIndentedReverse.php:291 #: GLAccountReport.php:353 InventoryPlanningPrefSupplier.php:63 @@ -1884,11 +1871,11 @@ #: BOMExtendedQty.php:327 msgid "Build Quantity: " -msgstr "生产量" +msgstr "制造数量 " #: BOMExtendedQty.php:334 msgid "Build" -msgstr "生产" +msgstr "制造" #: BOMExtendedQty.php:335 BOMInquiry.php:94 BOMs.php:811 CounterSales.php:1947 #: CounterSales.php:2125 PO_SelectOSPurchOrder.php:214 @@ -1902,11 +1889,11 @@ #: BOMExtende... [truncated message content] |
From: <dai...@us...> - 2011-01-29 21:47:03
|
Revision: 4477 http://web-erp.svn.sourceforge.net/web-erp/?rev=4477&view=rev Author: daintree Date: 2011-01-29 21:46:53 +0000 (Sat, 29 Jan 2011) Log Message: ----------- Exson string - Tim report writer fix Modified Paths: -------------- trunk/PDFLowGP.php trunk/doc/Change.log.html trunk/includes/tcpdf/tcpdf.php trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/reportwriter/WriteReport.inc Modified: trunk/PDFLowGP.php =================================================================== --- trunk/PDFLowGP.php 2011-01-24 05:44:58 UTC (rev 4476) +++ trunk/PDFLowGP.php 2011-01-29 21:46:53 UTC (rev 4477) @@ -161,7 +161,7 @@ <td><input type=text class='date' alt='".$_SESSION['DefaultDateFormat']."' name='ToDate' size=10 maxlength=10 VALUE='" . $_POST['ToDate'] . "'></td> </tr>"; - echo '<tr><td>' . _('Show sales with GP % below') . ":</td> + echo '<tr><td>' . _('Show sales with GP') . '%' . _('below') . ":</td> <td><input type=text class='number' name='GPMin' maxlength=3 size=3 value=" . $_POST['GPMin'] . "></td> </tr>"; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-24 05:44:58 UTC (rev 4476) +++ trunk/doc/Change.log.html 2011-01-29 21:46:53 UTC (rev 4477) @@ -1,5 +1,7 @@ -<p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> +<p>/<font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>30/1/11:Exson changed PDFLowGP report remove % from gettext string</p> +<p>29/1/11:Tim fix reportwriter with tcpdf using parent::__construct rather than $this->Cpdf( </p> <p>24/1/11:Phil Depreciation fixes - SelectAsset by description fix</p> <p>23/1/11:Peter Otandeka: PDFTopItems.php SQL quoting fixes</p> <p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> Modified: trunk/includes/tcpdf/tcpdf.php =================================================================== --- trunk/includes/tcpdf/tcpdf.php 2011-01-24 05:44:58 UTC (rev 4476) +++ trunk/includes/tcpdf/tcpdf.php 2011-01-29 21:46:53 UTC (rev 4477) @@ -5514,7 +5514,7 @@ $imgalpha = imagecreate($wpx, $hpx); // generate gray scale pallete for ($c = 0; $c < 256; ++$c) { - ImageColorAllocate($imgalpha, $c, $c, $c); + imagecolorallocate($imgalpha, $c, $c, $c); } // extract alpha channel for ($xpx = 0; $xpx < $wpx; ++$xpx) { Modified: trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po 2011-01-24 05:44:58 UTC (rev 4476) +++ trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po 2011-01-29 21:46:53 UTC (rev 4477) @@ -1,23 +1,25 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. -# +# weberp 简体中文界面文件 +# Copyright (C) 2007 Logic Works Ltd +# This file is distributed under the same license as the webERP package. +# FIRST AUTHOR <rom...@gm...>, 2006. +# THIS VERSION FROM http://weberp-china.oicp.net msgid "" msgstr "" -"Project-Id-Version: WEBERP3.13\n" +"Project-Id-Version: WEBERP3.05 VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-01-04 22:11+1200\n" -"PO-Revision-Date: 2010-06-16 00:41+0800\n" -"Last-Translator: \n" -"Language-Team: WebERP Translation Team <web-erp-translation@lists." -"sourceforge.net>\n" +"POT-Creation-Date: 2011-01-04 22:15+1200\n" +"PO-Revision-Date: 2011-01-29 15:12+0000\n" +"Last-Translator: Exson qu <hex...@gm...>\n" +"Language-Team: WebERP Translation Team <web-erp-" +"tra...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: Chinese\n" +"X-Launchpad-Export-Date: 2011-01-29 15:16+0000\n" +"X-Generator: Launchpad (build 12274)\n" "X-Poedit-Country: CHINA\n" -"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-SearchPath-0: webERPRC4\n" +"X-Poedit-Basepath: C:\\改过自新\\\n" #: AccountGroups.php:9 index.php:1273 msgid "Account Groups" @@ -27,26 +29,26 @@ msgid "" "An error occurred in retrieving the account groups of the parent account " "group during the check for recursion" -msgstr "中检索的父帐户的组帐户组的递归检查过程中发生错误" +msgstr "在递归检查中查询父账户组中的科目组发生错误" #: AccountGroups.php:20 msgid "" "The SQL that was used to retrieve the account groups of the parent account " "group and that failed in the process was" -msgstr "SQL,用来检索的父帐户的组帐户组和过程中失败" +msgstr "用于查询父账户组的科目组失败的SQL是" #: AccountGroups.php:57 AccountGroups.php:94 AccountGroups.php:177 #: AccountGroups.php:187 msgid "The SQL that was used to retrieve the information was" -msgstr "在用来检索信息的 SQL 是" +msgstr "用于查找交易数据的SQL是" #: AccountGroups.php:58 msgid "Could not check whether the group exists because" -msgstr "无法检查组存在的原因" +msgstr "未能判定组别是否存在, 因为" #: AccountGroups.php:65 msgid "The account group name already exists in the database" -msgstr "该科目组名称已经存在" +msgstr "科目组名称已经存在在数据库中。" #: AccountGroups.php:71 msgid "The account group name cannot contain the character" @@ -59,20 +61,18 @@ #: AccountGroups.php:77 msgid "The account group name must be at least one character long" -msgstr "帐户的组名称必须至少一个字符" +msgstr "科目组名称必须不少于 1 个字" #: AccountGroups.php:84 msgid "" "The parent account group selected appears to result in a recursive account " "structure - select an alternative parent account group or make this group a " "top level account group" -msgstr "" -"所选的父帐户组出现导致递归帐户结构-选择一个另类的父帐户组或使这组最高级别科目" -"组" +msgstr "所选的父账户组看来会导致一个递归的账户结构-选择一个另外的父账户组或者将此账户组作为一个最顶层的账户组" #: AccountGroups.php:95 msgid "Could not check whether the group is recursive because" -msgstr "无法检查组是否递归因为" +msgstr "未能检查此组是否递归, 因为" #: AccountGroups.php:107 msgid "The section in accounts must be an integer" @@ -84,15 +84,15 @@ #: AccountGroups.php:119 msgid "The sequence in the TB must be numeric and less than" -msgstr "试算表行次必须为数字且小于" +msgstr "试算表内顺序必须是数字且小于" #: AccountGroups.php:136 msgid "An error occurred in updating the account group" -msgstr "更新科目组发生错误" +msgstr "更新科目组是发生了错误" #: AccountGroups.php:137 msgid "The SQL that was used to update the account group was" -msgstr "SQL 用于更新帐户组是" +msgstr "用于更新科目组失败的 SQL 是" #: AccountGroups.php:139 AccountSections.php:106 PaymentMethods.php:91 msgid "Record Updated" @@ -100,19 +100,20 @@ #: AccountGroups.php:157 msgid "An error occurred in inserting the account group" -msgstr "插入科目组发生错误" +msgstr "插入科目组时发生错误, 因为" #: AccountGroups.php:158 msgid "The SQL that was used to insert the account group was" -msgstr "SQL 用于插入组中的帐户是" +msgstr "用作插入科目组失败的 SQL 是" #: AccountGroups.php:159 AccountSections.php:118 PaymentMethods.php:113 msgid "Record inserted" msgstr "记录已新增" #: AccountGroups.php:176 -msgid "An error occurred in retrieving the group information from chartmaster" -msgstr "从图表学习检索组信息的过程中出错" +msgid "" +"An error occurred in retrieving the group information from chartmaster" +msgstr "从主表中查找组信息时发生错误" #: AccountGroups.php:181 msgid "" @@ -145,29 +146,29 @@ #: AccountGroups.php:182 msgid "general ledger accounts that refer to this account group" -msgstr "个属于此科目组的会计科目" +msgstr "属于此科目组的会计科目" #: AccountGroups.php:186 msgid "An error occurred in retrieving the parent group information" -msgstr "检索该父组信息的过程中出错" +msgstr "查找父组信息时发生错误" #: AccountGroups.php:191 msgid "" "Cannot delete this account group because it is a parent account group of " "other account group(s)" -msgstr "不能删除此帐户的组,因为它是父帐户组的其他帐户组" +msgstr "删除会计科目组失败, 由于它是其他账户组的父账户组。" #: AccountGroups.php:192 msgid "account groups that have this group as its/there parent account group" -msgstr "" +msgstr "账户组将此账户作为他的/他们的父账户组" #: AccountGroups.php:195 msgid "An error occurred in deleting the account group" -msgstr "删去帐户组中的一个错误" +msgstr "删除账户组是发生错误" #: AccountGroups.php:196 msgid "The SQL that was used to delete the account group was" -msgstr "所用的帐户组中删除的 SQL 是" +msgstr "用于账户组的 SQL 是" #: AccountGroups.php:198 msgid "group has been deleted" @@ -175,7 +176,7 @@ #: AccountGroups.php:223 msgid "The sql that was used to retrieve the account group information was " -msgstr "用于检索组的帐户信息的 sql 是" +msgstr "用于查询账户组信息的SQL是 " #: AccountGroups.php:224 msgid "Could not get account groups because" @@ -221,7 +222,7 @@ #: WorkOrderReceive.php:15 WorkOrderStatus.php:43 WWW_Access.php:13 #: WWW_Users.php:38 Z_BottomUpCosts.php:51 msgid "Search" -msgstr "搜索" +msgstr "查找" #: AccountGroups.php:230 msgid "Group Name" @@ -379,18 +380,17 @@ #: AccountGroups.php:294 msgid "An error occurred in retrieving the account group information" -msgstr "检索组的帐户信息的过程中出错" +msgstr "查找账户组信息时发生错误" #: AccountGroups.php:295 msgid "" "The SQL that was used to retrieve the account group and that failed in the " "process was" -msgstr "SQL 用来检索帐户组和过程中失败" +msgstr "用于查询科目组失败的SQL是" #: AccountGroups.php:298 -#, fuzzy msgid "The account group name does not exist in the database" -msgstr "该科目组名称已经存在" +msgstr "科目组名称在数据库中不存在。" #: AccountGroups.php:314 GLAccounts.php:250 GLAccounts.php:299 #: Z_ImportGLAccountGroups.php:28 @@ -403,7 +403,7 @@ #: AccountGroups.php:348 AccountGroups.php:350 msgid "Top Level Group" -msgstr "最高级别组" +msgstr "顶层组" #: AccountGroups.php:364 msgid "Section In Accounts" @@ -433,7 +433,7 @@ #: AccountSections.php:68 msgid "The account section already exists in the database" -msgstr "在数据库中已存在的帐户部分" +msgstr "会计要素已经存在于数据库" #: AccountSections.php:75 msgid "The account section name cannot contain the character" @@ -441,7 +441,7 @@ #: AccountSections.php:81 msgid "The account section name must contain at least one character" -msgstr "帐户一节名称必须包含至少一个字符" +msgstr "会计要素名称必须包含至少一个字符" #: AccountSections.php:87 AccountSections.php:93 msgid "The section number must be an integer" @@ -488,7 +488,7 @@ #: AddCustomerContacts.php:6 AddCustomerContacts.php:59 SelectCustomer.php:601 #: SelectCustomer.php:630 msgid "Customer Contacts" -msgstr "客户联系" +msgstr "顾客联系人" #: AddCustomerContacts.php:20 CustEDISetup.php:11 CustLoginSetup.php:24 #: Z_CheckDebtorsControl.php:21 @@ -497,24 +497,23 @@ #: AddCustomerContacts.php:26 msgid "Contacts for Customer: <b>" -msgstr "客户联系人:" +msgstr "客户的联系人" #: AddCustomerContacts.php:29 -#, fuzzy msgid "Edit contact for <b>" -msgstr "客户联系人:" +msgstr "编辑联系人" #: AddCustomerContacts.php:41 msgid "The Contact must be an integer." -msgstr "联系必须完整" +msgstr "联系人必须是整数" #: AddCustomerContacts.php:44 msgid "The contact's name must be forty characters or less long" -msgstr "联系人的名称必须是四十个字符或更少的长" +msgstr "联系人名称必须不多于50个字符" #: AddCustomerContacts.php:47 msgid "The contact's name may not be empty" -msgstr "联系人的姓名不能为空" +msgstr "联系人名称不能留空" #: AddCustomerContacts.php:59 AddCustomerNotes.php:49 #: AddCustomerTypeNotes.php:49 Areas.php:74 CustomerTypes.php:71 @@ -528,11 +527,11 @@ #: AddCustomerContacts.php:70 msgid "The contact record has been added" -msgstr "已添加联系人记录" +msgstr "联系人已新增" #: AddCustomerContacts.php:98 msgid "The contact record has been deleted" -msgstr "联系人记录已被删除" +msgstr "联系人记录已删除" #: AddCustomerContacts.php:112 CompanyPreferences.php:229 #: CustomerBranches.php:377 Customers.php:899 Customers.php:905 @@ -552,7 +551,7 @@ #: AddCustomerContacts.php:114 Customers.php:973 msgid "Phone no" -msgstr "电话号码" +msgstr "电话" #: AddCustomerContacts.php:115 AddCustomerContacts.php:202 Customers.php:902 #: Customers.php:908 Customers.php:974 PcAssignCashToTab.php:216 @@ -565,11 +564,11 @@ #: AddCustomerContacts.php:149 msgid "Review all contacts for this Customer" -msgstr "审查该客户的所有联系方式" +msgstr "查看此顾客的所有联络人" #: AddCustomerContacts.php:179 msgid "Contact Code" -msgstr "联系编号" +msgstr "联系人代码" #: AddCustomerContacts.php:184 Factors.php:279 SupplierContacts.php:219 msgid "Contact Name" @@ -586,7 +585,7 @@ #: AddCustomerNotes.php:6 AddCustomerNotes.php:49 SelectCustomer.php:638 #: SelectCustomer.php:668 msgid "Customer Notes" -msgstr "客户备注" +msgstr "客户通知" #: AddCustomerNotes.php:20 AddCustomerTypeNotes.php:20 msgid "Back to Select Customer" @@ -594,28 +593,27 @@ #: AddCustomerNotes.php:31 msgid "The contact priority must be an integer." -msgstr "联系人的优先级必须是整数" +msgstr "联系优先级必须是整数" #: AddCustomerNotes.php:34 AddCustomerTypeNotes.php:34 msgid "The contact's notes must be two hundred characters or less long" -msgstr "联系人的说明必须是二百个字符或更少的长" +msgstr "联系人备注必须不多于200个字符" #: AddCustomerNotes.php:37 AddCustomerTypeNotes.php:37 msgid "The contact's notes may not be empty" -msgstr "联系人的说明不能留空" +msgstr "联系人备注不能留空" #: AddCustomerNotes.php:60 msgid "The contact notes record has been added" -msgstr "已添加联系人的说明" +msgstr "联系人备注记录已新增" #: AddCustomerNotes.php:87 msgid "The contact note record has been deleted" -msgstr "联系人说明记录已经被删除" +msgstr "联系人备注记录已删除" #: AddCustomerNotes.php:98 -#, fuzzy msgid "Notes for Customer" -msgstr "顾客说明" +msgstr "客户通知:" #: AddCustomerNotes.php:106 AddCustomerNotes.php:189 #: AddCustomerTypeNotes.php:104 AddCustomerTypeNotes.php:186 @@ -653,7 +651,7 @@ #: AddCustomerNotes.php:108 AddCustomerNotes.php:183 msgid "WWW" -msgstr "www" +msgstr "WWW万维网" #: AddCustomerNotes.php:109 AddCustomerNotes.php:195 #: AddCustomerTypeNotes.php:107 AddCustomerTypeNotes.php:189 @@ -662,57 +660,55 @@ #: AddCustomerNotes.php:143 msgid "Review all notes for this Customer" -msgstr "此用户查看所有的说明" +msgstr "查看此顾客的所有通知" #: AddCustomerNotes.php:172 AddCustomerTypeNotes.php:171 msgid "Note ID" -msgstr "备注 ID" +msgstr "Note ID" #: AddCustomerNotes.php:177 msgid "Contact Note" -msgstr "联系人说明" +msgstr "联络人备注" #: AddCustomerTypeNotes.php:6 SelectCustomer.php:676 msgid "Customer Type (Group) Notes" -msgstr "客户类型 (集团) 说明" +msgstr "顾客种类(组)备注" #: AddCustomerTypeNotes.php:31 msgid "The Contact priority must be an integer." -msgstr "联系人的优先级必须是整体" +msgstr "联络人优先级必须是整数" #: AddCustomerTypeNotes.php:49 SelectCustomer.php:706 msgid "Customer Group Notes" -msgstr "客户群体说明" +msgstr "顾客组通知" #: AddCustomerTypeNotes.php:60 msgid "The contact group notes record has been added" -msgstr "已添加客户群体说明记录" +msgstr "联系人组通知记录已增加" #: AddCustomerTypeNotes.php:84 msgid "The contact group note record has been deleted" -msgstr "联系人群体说明记录已被删除" +msgstr "联系人组通知记录已经删除" #: AddCustomerTypeNotes.php:95 -#, fuzzy msgid "Notes for Customer Type" -msgstr "客户说明类型" +msgstr "顾客类型的通知:" #: AddCustomerTypeNotes.php:106 msgid "href" -msgstr "超链接" +msgstr "href" #: AddCustomerTypeNotes.php:141 msgid "Review all notes for this Customer Type" -msgstr "查看所有的说明为该客户类型" +msgstr "查看此顾客类型的所有通知。" #: AddCustomerTypeNotes.php:182 msgid "Contact Group Note" -msgstr "联系人群体说明" +msgstr "联系人组通知" #: AddCustomerTypeNotes.php:184 -#, fuzzy msgid "Web site" -msgstr "物料" +msgstr "网站" #: AgedDebtors.php:17 msgid "Aged Customer Balance Listing" @@ -848,7 +844,7 @@ #: AgedDebtors.php:438 msgid "There are no customers meeting the criteria specified to list" -msgstr "没有符合选择条件的客户" +msgstr "没有符合条件的客户" #: AgedDebtors.php:464 msgid "Aged Debtor Analysis" @@ -910,7 +906,7 @@ #: PrintCustTransPortrait.php:630 ReorderLevel.php:229 StockDispatch.php:309 #: SupplierBalsAtPeriodEnd.php:155 SuppPriceList.php:237 Tax.php:352 msgid "Print PDF" -msgstr "生成PDF" +msgstr "打印到PDF" #: AgedSuppliers.php:18 msgid "Aged Supplier Listing" @@ -972,7 +968,7 @@ #: Areas.php:46 msgid "The area code entered already exists" -msgstr "区号输入已经存在" +msgstr "输入的区域代码已经存在" #: Areas.php:51 msgid "The area description must be twenty five characters or less long" @@ -1016,7 +1012,7 @@ msgid "" "Cannot delete this area because sales analysis records exist that use this " "area" -msgstr "不能删除这方面,因为销售分析使用该区域的记录已经存在" +msgstr "不能删除这个区域因为此区域已用于现有的销售分析记录" #: Areas.php:126 msgid "sales analysis records referring this area code" @@ -1041,9 +1037,8 @@ msgstr "区域名称" #: Areas.php:167 -#, fuzzy msgid "View Customers from this Area" -msgstr "客户详细资料" +msgstr "查看此区域的顾客" #: Areas.php:177 msgid "Review Areas Defined" @@ -1051,21 +1046,21 @@ #: AuditTrail.php:9 msgid "Audit Trail" -msgstr "审计跟踪" +msgstr "审核追踪" #: AuditTrail.php:23 msgid "Incorrect date format used, please re-enter" -msgstr "使用不正确的日期格式,请重新输入" +msgstr "输入的日期无效, 请输入有效日期格式" #: AuditTrail.php:37 BOMIndented.php:317 BOMIndentedReverse.php:305 #: MRPCalendar.php:260 msgid "From Date" -msgstr "起始日期" +msgstr "从 日期" #: AuditTrail.php:39 BOMIndented.php:318 BOMIndentedReverse.php:306 #: MRPCalendar.php:262 msgid "To Date" -msgstr "截止日期" +msgstr "到 日期" #: AuditTrail.php:43 PO_AuthorisationLevels.php:123 #: PO_AuthorisationLevels.php:160 PO_AuthorisationLevels.php:163 @@ -1075,7 +1070,7 @@ #: AuditTrail.php:56 msgid "Table " -msgstr "目录" +msgstr "表 " #: AuditTrail.php:68 MRPReport.php:789 PO_SelectPurchOrder.php:357 #: SelectContract.php:196 SelectProduct.php:710 @@ -1104,16 +1099,16 @@ #: includes/InputSerialItemsFile.php:86 includes/InputSerialItemsFile.php:126 #: includes/PDFTaxPageHeader.inc:34 msgid "Type" -msgstr "类型" +msgstr "凭证类型" #: AuditTrail.php:147 msgid "Table" -msgstr "表格" +msgstr "表" #: AuditTrail.php:148 api/api_xml-rpc.php:314 api/api_xml-rpc.php:729 #: api/api_xml-rpc.php:1892 msgid "Field Name" -msgstr "域名" +msgstr "字段名" #: AuditTrail.php:149 SystemParameters.php:312 #: includes/PDFInventoryValnPageHeader.inc:38 @@ -1123,7 +1118,7 @@ #: BankAccounts.php:9 msgid "Bank Accounts Maintenance" -msgstr "银行账户" +msgstr "银行账户维护" #: BankAccounts.php:13 TaxAuthorities.php:149 msgid "Bank" @@ -1135,12 +1130,11 @@ "Codes. Set Default for Invoices to \"yes\" to print Account details on " "Invoices (only one account can be set to \"yes\")." msgstr "" -"更新账户详细信息。守则是对于 SWIFT 或 BSB 的帐户键入银行代码。设置默认值为" -"\"yes\"发票,(只有一个帐户可以将设置为\"是\") 的发票上打印帐户详细信息" +"更新银行账户细节。账户代码是SWIFT或者BSB类型的银行代码。将发票默认项设置为\"是\"来在发票上打印账户的细节 (仅一个账户可以被设置为\"是\")" #: BankAccounts.php:46 msgid "The bank account code already exists in the database" -msgstr "银行账户代码已经存在于数据库" +msgstr "输入的银行账户代码已经存在于数据库" #: BankAccounts.php:52 msgid "The bank account name must be fifty characters or less long" @@ -1152,11 +1146,11 @@ #: BankAccounts.php:64 msgid "The bank account number may not be empty." -msgstr "银行账户不能留空" +msgstr "银行账户号码不能留空" #: BankAccounts.php:70 msgid "The bank account number must be fifty characters or less long" -msgstr "银行账户长度必须是或少于50个字" +msgstr "银行帐号长度必须是或少于50个字" #: BankAccounts.php:76 msgid "The bank address must be fifty characters or less long" @@ -1166,11 +1160,11 @@ msgid "" "Note that it is not possible to change the currency of the account once " "there are transactions against it" -msgstr "请注意,不可能去改变货币的账户,一旦反对交易。" +msgstr "注意:一旦已经记录了交易,就不能再改变账户的币种。" #: BankAccounts.php:108 msgid "The bank account details have been updated" -msgstr "银行账户已更新" +msgstr "银行帐号已更新" #: BankAccounts.php:129 msgid "The new bank account has been entered" @@ -1188,7 +1182,7 @@ msgid "" "Cannot delete this bank account because transactions have been created using " "this account" -msgstr "不能删除此银行账户,因为此账号已有交易" +msgstr "不能删除此银行账户,因为此账户已有交易" #: BankAccounts.php:163 msgid "transactions with this bank account code" @@ -1200,7 +1194,7 @@ #: BankAccounts.php:190 msgid "The bank accounts set up could not be retrieved because" -msgstr "银行账户不能检索设立是由于" +msgstr "设置的银行账户没找到,原因是" #: BankAccounts.php:191 msgid "The SQL used to retrieve the bank account details was" @@ -1208,7 +1202,7 @@ #: BankAccounts.php:196 GLJournal.php:280 msgid "GL Account Code" -msgstr "总账科目" +msgstr "总帐账户代码" #: BankAccounts.php:197 BankAccounts.php:326 msgid "Bank Account Name" @@ -1216,11 +1210,11 @@ #: BankAccounts.php:198 BankAccounts.php:328 msgid "Bank Account Code" -msgstr "银行代码" +msgstr "银行账户代码" #: BankAccounts.php:199 BankAccounts.php:330 msgid "Bank Account Number" -msgstr "银行账户" +msgstr "银行账号" #: BankAccounts.php:200 BankAccounts.php:332 msgid "Bank Address" @@ -1243,7 +1237,7 @@ #: BankAccounts.php:202 BankAccounts.php:351 msgid "Default for Invoices" -msgstr "发票默认" +msgstr "发票默认值" #: BankAccounts.php:251 msgid "Show All Bank Accounts Defined" @@ -1251,15 +1245,15 @@ #: BankAccounts.php:284 BankAccounts.php:287 msgid "Bank Account GL Code" -msgstr "银行账户科目" +msgstr "会计科目" #: BankAccounts.php:334 msgid "Currency Of Account" -msgstr "记帐货币" +msgstr "账户的货币" #: BankMatching.php:8 msgid "Bank Account Matching" -msgstr "银行账户匹配" +msgstr "银行账户对账" #: BankMatching.php:15 PDFCustTransListing.php:44 Z_CheckDebtorsControl.php:80 msgid "Receipts" @@ -1267,11 +1261,11 @@ #: BankMatching.php:16 BankMatching.php:23 msgid "Bank Matching" -msgstr "银行结算" +msgstr "银行对账" #: BankMatching.php:16 msgid "Bank Account Matching - Receipts" -msgstr "银行对账-收据" +msgstr "银行账户对账-收款" #: BankMatching.php:22 PaymentAllocations.php:33 PaymentMethods.php:13 #: PDFSuppTransListing.php:44 @@ -1280,7 +1274,7 @@ #: BankMatching.php:23 msgid "Bank Account Matching - Payments" -msgstr "银行账户匹配-支付" +msgstr "银行账户对账-付款" #: BankMatching.php:27 msgid "This page must be called with a bank transaction type" @@ -1292,11 +1286,11 @@ #: BankMatching.php:40 msgid "Could not retrieve transaction information" -msgstr "无法检索的交易信息" +msgstr "找不到此交易信息" #: BankMatching.php:47 msgid "Could not match off this payment because" -msgstr "未能确认此付款是因为" +msgstr "无法确认这笔付款, 因为" #: BankMatching.php:58 msgid "Could not update the amount matched off this bank transaction because" @@ -1311,9 +1305,7 @@ "Use this screen to match webERP Receipts and Payments to your Bank " "Statement. Check your bank statement and click the check-box when you find " "the matching transaction." -msgstr "" -"\"使用此屏幕以匹配您的银行结单的 webERP 收支。请检查您银行对帐单,当您找到匹" -"配的交易记录,请单击复选框\"" +msgstr "使用此屏幕来核对webERP与您银行收款和付款对账单。核对您的银行对账单并且当您发现符合的交易时点击核取框。" #: BankMatching.php:80 BankReconciliation.php:97 CustomerReceipt.php:729 #: DailyBankTransactions.php:28 Payments.php:732 PDFChequeListing.php:46 @@ -1437,7 +1429,8 @@ msgstr "之后" #: BankMatching.php:218 -msgid "The payments with the selected criteria could not be retrieved because" +msgid "" +"The payments with the selected criteria could not be retrieved because" msgstr "未能提取符合条件的付款, 因为" #: BankMatching.php:221 ShipmentCosting.php:502 ShipmentCosting.php:573 @@ -1495,33 +1488,31 @@ "The entry in the bank statement balance is not numeric. The balance on the " "bank statement should be entered. The exchange difference has not been " "calculated and no general ledger journal has been created" -msgstr "" -"银行对账单条目不是数字的,应输入银行月结单上的剩余。交换的区别没有被计算并总" -"帐日志未已被创建" +msgstr "输入的银行对账表余额不是数字。银行对账表的余额需要输入。汇兑差异没有被计算并且没有创建总帐日记帐。" #: BankReconciliation.php:29 msgid "Could not retrieve the exchange rate for the selected bank account" -msgstr "无法检索所选的银行账户的汇率" +msgstr "无法查询所选银行账户的汇率, 因为" #: BankReconciliation.php:59 BankReconciliation.php:77 msgid "reconciliation on" -msgstr "对帐上" +msgstr "对账于" #: BankReconciliation.php:62 msgid "Cannot insert a GL entry for the exchange difference because" -msgstr "不能插入一个总账的汇兑差额,因为" +msgstr "未能插入汇兑差异的总账凭证, 因为" #: BankReconciliation.php:63 msgid "The SQL that failed to insert the exchange difference GL entry was" -msgstr "SQL 插入交换不同总帐项失败是" +msgstr "插入汇率差异总账凭证失败的SQL是" #: BankReconciliation.php:83 msgid "Exchange difference of" -msgstr "交换不同的" +msgstr "汇兑差异" #: BankReconciliation.php:83 msgid "has been posted" -msgstr "已公布" +msgstr "已过账" #: BankReconciliation.php:93 SuppPaymentRun.php:300 msgid "The bank accounts could not be retrieved by the SQL because" @@ -1530,7 +1521,7 @@ #: BankReconciliation.php:94 CustomerReceipt.php:720 #: DailyBankTransactions.php:25 Payments.php:729 SuppPaymentRun.php:302 msgid "The SQL used to retrieve the bank accounts was" -msgstr "SQL 用于检索银行账户是" +msgstr "找不到银行账户的SQL是" #: BankReconciliation.php:100 CustomerReceipt.php:734 msgid "Bank Accounts have not yet been defined" @@ -1556,25 +1547,25 @@ #: BankReconciliation.php:134 msgid "The bank account balance could not be returned by the SQL because" -msgstr "银行账户余额没找到,原因是" +msgstr "无法返回银行账户余额,原因是" #: BankReconciliation.php:147 msgid "" "Could not retrieve the currency and exchange rate for the selected bank " "account" -msgstr "无法检索的货币和汇率为所选的银行账户" +msgstr "无法找到所选银行账户的货币和汇率, 因为" #: BankReconciliation.php:155 msgid "Balance as at" -msgstr "结余于" +msgstr "余额截止" #: BankReconciliation.php:178 msgid "The unpresented cheques could not be retrieved by the SQL because" -msgstr "未找到企业已付银行的未清算记录, 因为" +msgstr "未找到企业已付银行未付记录, 因为" #: BankReconciliation.php:181 msgid "Add back unpresented cheques" -msgstr "加:企业已付银行未清算" +msgstr "加:企业已付银行未付" #: BankReconciliation.php:186 BankReconciliation.php:258 #: CustomerAllocations.php:331 CustomerAllocations.php:357 @@ -1606,7 +1597,7 @@ #: includes/PDFStockTransListingPageHeader.inc:72 #: includes/PDFSuppTransListingPageHeader.inc:49 msgid "Reference" -msgstr "参考" +msgstr "摘要" #: BankReconciliation.php:188 BankReconciliation.php:260 msgid "Orig Amount" @@ -1614,19 +1605,19 @@ #: BankReconciliation.php:231 msgid "Total of all unpresented cheques" -msgstr "企业已付银行未清算合计:" +msgstr "企业已付银行未付合计:" #: BankReconciliation.php:249 msgid "The uncleared deposits could not be retrieved by the SQL because" -msgstr "未找到企业已收银行的未清算记录, 因为" +msgstr "未找到企业已收银行未收记录, 因为" #: BankReconciliation.php:253 msgid "Less deposits not cleared" -msgstr "减:企业已收银行未清算" +msgstr "减:企业已收银行未收" #: BankReconciliation.php:303 msgid "Total of all uncleared deposits" -msgstr "企业已收银行未清算合计:" +msgstr "企业已收银行未收合计:" #: BankReconciliation.php:305 msgid "Bank statement balance should be" @@ -1634,26 +1625,24 @@ #: BankReconciliation.php:309 msgid "Enter the actual bank statement balance" -msgstr "输入实际银行对账单结算" +msgstr "输入实际的银行对账单余额" #: BankReconciliation.php:311 BankReconciliation.php:321 msgid "Calculate and Post Exchange Difference" -msgstr "计算与兑换差异" +msgstr "计算并将汇兑差异过账" #: BankReconciliation.php:311 msgid "" "This will create a general ledger journal to write off the exchange " "difference in the current balance of the account. It is important that the " "exchange rate above reflects the current value of the bank account currency" -msgstr "" -"这将创建一个总账去冲销当前的收支平衡帐户兑换不同。重要的是上述的汇率反映了银" -"行账户币种的当前值" +msgstr "这将在账户的当前余额产生一个总帐日记账来核销汇兑差异。重要的是上述的汇率反应了银行账户货币的目前价值。" #: BankReconciliation.php:311 CounterSales.php:741 Customers.php:1014 #: SelectOrderItems.php:1374 Stocks.php:1029 WorkOrderCosting.php:512 #: WorkOrderEntry.php:549 msgid "Are You Sure?" -msgstr "确认要删除吗?" +msgstr "确信要删除么?" #: BankReconciliation.php:320 msgid "" @@ -1665,10 +1654,8 @@ "exchange difference based on the current exchange rate to correct the " "reconciliation to the actual bank statement balance click below." msgstr "" -"这是正常的外币帐户具有需要得到反映,交换率因不同地点而异的交换差异。该对帐已" -"准备好使用汇率设置货币表中 (请参见设置选项表上的)。此表必须与当前汇率保持在" -"运行对帐前。如果您想要创建一个分类账,以反映兑换不同基于当前汇率来更正实际银" -"行对账单平衡对帐,点击下面。" +"当汇率变化时,对于外币账户而言,需要反应汇率差异是正常不过的事情。系统设置为使用在货币表中设置的汇率来进行核对(参考设置项)。在进行核对前,此表必须用目前" +"的汇率来维护。如果您希望去创建一个日记账来反应汇兑差异,根据目前的汇率对实际的银行对账表余额来修正此核对,请点击下面。" #: BankReconciliation.php:326 msgid "Match off cleared payments" @@ -1678,38 +1665,38 @@ msgid "Match off cleared deposits" msgstr "核对收款" +# 成品或你指定父项对本层物料的需求数量,如成品A下面挂半成品B2个,半成品B挂原材料C3个,那原材料C的Quantity是3,Extend Qty=3×2=6 #: BOMExtendedQty.php:14 BOMExtendedQty.php:15 BOMExtendedQty.php:156 #: BOMExtendedQty.php:283 -#, fuzzy msgid "Quantity Extended BOM Listing" -msgstr "扩展物料清单数量" +msgstr "数量展开的BOM列表" #: BOMExtendedQty.php:34 BOMIndentedReverse.php:30 MRPCalendar.php:87 #: MRP.php:29 SalesInquiry.php:1191 msgid "The SQL to to create passbom failed with the message" -msgstr "创建通过物料清单失败,其SQL消息是" +msgstr "创建passbom的SQL失败,伴随信息" #: BOMExtendedQty.php:47 BOMIndented.php:42 BOMIndentedReverse.php:43 #: MRP.php:36 msgid "Create of tempbom failed because" -msgstr "创建临时物料清单失败,因为" +msgstr "创建临时BOM失败, 因为" #: BOMExtendedQty.php:158 msgid "" "The Quantiy Extended BOM Listing could not be retrieved by the SQL because" -msgstr "扩展物料清单数量不能被检索,SQL是" +msgstr "未能由 SQL 查询到数量延展的BOM列表, 因为" #: BOMExtendedQty.php:260 BOMIndented.php:235 msgid "Print Indented BOM Listing Error" -msgstr "打印缩排式物料清单错误" +msgstr "打印缩排式BOM列表错误" #: BOMExtendedQty.php:262 BOMIndented.php:237 msgid "There were no items for the selected assembly" -msgstr "没有为所选的程序集的项目" +msgstr "所选的组合没有物料" #: BOMExtendedQty.php:290 BOMIndented.php:266 BOMIndentedReverse.php:260 msgid "Part" -msgstr "成分" +msgstr "部件" #: BOMExtendedQty.php:291 BOMExtendedQty.php:342 BOMExtendedQty.php:343 #: BOMExtendedQty.php:344 BOMExtendedQty.php:345 BOMIndented.php:316 @@ -1764,11 +1751,11 @@ #: BOMExtendedQty.php:293 msgid "Show All Parts" -msgstr "显示所有部分" +msgstr "显示所有部品" #: BOMExtendedQty.php:294 msgid "Only Show Shortages" -msgstr "只显示不足" +msgstr "只显示缺少数量" #: BOMExtendedQty.php:296 BOMIndented.php:274 BOMIndentedReverse.php:262 #: MRPPlannedPurchaseOrders.php:273 MRPPlannedWorkOrders.php:339 @@ -1780,17 +1767,17 @@ #: MRPPlannedPurchaseOrders.php:274 MRPPlannedWorkOrders.php:340 #: MRPReschedules.php:157 MRPShortages.php:259 msgid "Print With Alternating Highlighted Lines" -msgstr "交互式高亮行打印" +msgstr "与另外高亮显示的行一起打印" #: BOMExtendedQty.php:298 BOMIndented.php:276 BOMIndentedReverse.php:264 #: MRPPlannedPurchaseOrders.php:275 MRPPlannedWorkOrders.php:341 #: MRPReschedules.php:158 MRPShortages.php:260 msgid "Plain Print" -msgstr "普通打印" +msgstr "空白打印纸" #: BOMExtendedQty.php:322 msgid "Extended Quantity BOM Listing For " -msgstr "扩展物料清单数量" +msgstr "展开数量(Extended Quantity成品或父项对本层物料的需求量)的BOM列表为 " #: BOMExtendedQty.php:324 BOMIndented.php:303 BOMIndentedReverse.php:291 #: GLAccountReport.php:353 InventoryPlanningPrefSupplier.php:63 @@ -1884,11 +1871,11 @@ #: BOMExtendedQty.php:327 msgid "Build Quantity: " -msgstr "生产量" +msgstr "制造数量 " #: BOMExtendedQty.php:334 msgid "Build" -msgstr "生产" +msgstr "制造" #: BOMExtendedQty.php:335 BOMInquiry.php:94 BOMs.php:811 CounterSales.php:1947 #: CounterSales.php:2125 PO_SelectOSPurchOrder.php:214 @@ -1902,11 +1889,11 @@ #: BOMExtende... [truncated message content] |
From: <dai...@us...> - 2011-01-30 05:16:10
|
Revision: 4479 http://web-erp.svn.sourceforge.net/web-erp/?rev=4479&view=rev Author: daintree Date: 2011-01-30 05:16:03 +0000 (Sun, 30 Jan 2011) Log Message: ----------- Purch order stuff goods received etc Modified Paths: -------------- trunk/GoodsReceived.php trunk/PDFGrn.php trunk/PO_PDFPurchOrder.php trunk/doc/Change.log.html trunk/includes/DefinePOClass.php Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/GoodsReceived.php 2011-01-30 05:16:03 UTC (rev 4479) @@ -81,12 +81,21 @@ '"></td></tr></table><br>'; echo '<table cellpadding=2 class=selection> + <tr><th colspan="2"></th> + <th align="centre" colspan="3"><b>' . _('Supplier Units') . '</b></th> + <th></th> + <th align="centre" colspan="5"><b>' . _('Our Units') . '</b></th> + </tr> <tr><th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Quantity') . '<br>' . _('Ordered') . '</th> <th>' . _('Units') . '</th> - <th>' . _('Already Received') . '</th> - <th>' . _('This Delivery') . '<br>' . _('Quantity') . '</th>'; + <th>' . _('Already') . '<br />' . _('Received') . '</th> + <th>' . _('Conversion') . '<br />' . _('Factor') . '</th> + <th>' . _('Quantity') . '<br>' . _('Ordered') . '</th> + <th>' . _('Units') . '</th> + <th>' . _('Already') . '<br />' . _('Received') . '</th> + <th>' . _('This Delivery') . '<br />' . _('Quantity') . '</th>'; if ($_SESSION['ShowValueOnGRN']==1) { echo '<th>' . _('Price') . '</th><th>' . _('Total Value') . '<br>' . _('Received') . '</th>'; @@ -125,41 +134,23 @@ $LineTotal = ($LnItm->ReceiveQty * $LnItm->Price ); $_SESSION['PO'.$identifier]->Total = $_SESSION['PO'.$identifier]->Total + $LineTotal; + $DisplaySupplierQtyOrd = number_format($LnItm->Quantity/$LnItm->ConversionFactor,$LnItm->DecimalPlaces); + $DisplaySupplierQtyRec = number_format($LnItm->QtyReceived/$LnItm->ConversionFactor,$LnItm->DecimalPlaces); $DisplayQtyOrd = number_format($LnItm->Quantity,$LnItm->DecimalPlaces); $DisplayQtyRec = number_format($LnItm->QtyReceived,$LnItm->DecimalPlaces); $DisplayLineTotal = number_format($LineTotal,2); $DisplayPrice = number_format($LnItm->Price,2); - $SupplierUomSQL="SELECT unitsofmeasure.unitname, - conversionfactor, - suppliersuom, - max(effectivefrom) - FROM purchdata - LEFT JOIN unitsofmeasure - ON purchdata.suppliersuom=unitsofmeasure.unitid - WHERE supplierno='".$_SESSION['PO'.$identifier]->SupplierID."' - AND stockid='".$LnItm->StockID."' - GROUP BY unitsofmeasure.unitname"; - $SupplierUOMResult=DB_query($SupplierUomSQL, $db); - if (DB_num_rows($SupplierUOMResult)>0) { - $SupplierUOMRow=DB_fetch_array($SupplierUOMResult); - if (strlen($SupplierUOMRow['unitname'])>0) { - $Uom=$SupplierUOMRow['unitname']; - } else { - $Uom=$LnItm->Units; - } - $ConversionFactor=$SupplierUOMRow['conversionfactor']; - } else { //using our units throughout - $Uom=$LnItm->Units; - $ConversionFactor=1; - } - //Now Display LineItem echo '<td>' . $LnItm->StockID . '</td>'; echo '<td>' . $LnItm->ItemDescription . '</td>'; + echo '<td class=number>' . $DisplaySupplierQtyOrd . '</td>'; + echo '<td>' . $LnItm->SuppliersUnit . '</td>'; + echo '<td class=number>' . $DisplaySupplierQtyRec . '</td>'; + echo '<td class=number>' . $LnItm->ConversionFactor . '</td>'; echo '<td class=number>' . $DisplayQtyOrd . '</td>'; - echo '<td>' . $LnItm->uom . '</td>'; + echo '<td>' . $LnItm->Units . '</td>'; echo '<td class=number>' . $DisplayQtyRec . '</td>'; echo '<td class=number>'; @@ -191,7 +182,7 @@ echo "<script>defaultControl(document.forms[0].RecvQty_$LnItm->LineNo);</script>"; $DisplayTotal = number_format($_SESSION['PO'.$identifier]->Total,2); if ($_SESSION['ShowValueOnGRN']==1) { - echo '<tr><td colspan=7 class=number><b>' . _('Total value of goods received'). '</b></td> + echo '<tr><td colspan="11" class=number><b>' . _('Total value of goods received'). '</b></td> <td class=number><b>'. $DisplayTotal. '</b></td> </tr></table>'; } else { @@ -675,7 +666,7 @@ if ($_SESSION['PO'.$identifier]->AllLinesReceived()==1) { //all lines on the purchase order are now completed - $StatusComment=date($_SESSION['DefaultDateFormat']) .' - ' . _('Order Completed') .'<br />' . $_SESSION['PO'.$identifier]->StatusComment; + $StatusComment=date($_SESSION['DefaultDateFormat']) .' - ' . _('Order Completed') .'<br />' . $_SESSION['PO'.$identifier]->StatusComments; $sql="UPDATE purchorders SET status='Completed', stat_comment='" . $StatusComment . "' Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/PDFGrn.php 2011-01-30 05:16:03 UTC (rev 4479) @@ -2,14 +2,11 @@ /* $Id$*/ -/* $Revision: 1.5 $ */ - -//$PageSecurity = 2; +//$PageSecurity = 2; Now comes from DB - read in from session include('includes/session.inc'); +include('includes/DefinePOClass.php'); -if (isset($_POST['GRNNo'])) { - $GRNNo=$_POST['GRNNo']; -} else if (isset($_GET['GRNNo'])) { +if (isset($_GET['GRNNo'])) { $GRNNo=$_GET['GRNNo']; } else { $GRNNo=''; @@ -29,105 +26,62 @@ $pdf->addInfo('Title', _('Goods Received Note') ); if ($GRNNo=='Preview') { - $ListCount = 1; // UldisN + $ListCount = 1; } else { $sql="SELECT grns.itemcode, grns.grnno, grns.deliverydate, grns.itemdescription, grns.qtyrecd, - grns.supplierid + grns.supplierid, + grns.podetailitem FROM grns WHERE grnbatch='".$GRNNo."'"; - $result=DB_query($sql, $db); - $ListCount = DB_num_rows($result); // UldisN - - include('includes/PDFGrnHeader.inc'); + $GRNResult=DB_query($sql, $db); + $NoOfGRNs = DB_num_rows($GRNResult); + if ($NoOfGRNs>0){ + $_GET['ModifyOrderNumber'] = (int)$_GET['PONo']; + $identifier=date('U'); + include('includes/PO_ReadInOrder.inc'); //Read the PO in + include('includes/PDFGrnHeader.inc'); + } } -$counter=1; +$i=1; $YPos=$FormDesign->Data->y; -while ($counter<=$ListCount) { +while ($i<=$NoOfGRNs) { if ($GRNNo=='Preview') { $StockID=str_pad('',10,'x'); $Date='1/1/1900'; $Description=str_pad('',30,'x'); - $Quantity='XXXXX.XX'; + $SuppliersQuantity='XXXXX.XX'; + $OurUnitsQuantity='XXXXX.XX'; $Supplier=str_pad('',25,'x'); + $Units = str_pad('',10,'x'); + $SupplierUnits =str_pad('',10,'x'); } else { - $sql="SELECT orddate from purchorders WHERE orderno='".$_GET['PONo']."'"; - $purchorderresult=DB_query($sql, $db); - $purchorderdate=DB_fetch_array($purchorderresult); - $myrow=DB_fetch_array($result); - $datesql="SELECT max(effectivefrom) - FROM purchdata - WHERE supplierno='".$myrow['supplierid']."' - AND stockid='".$myrow['itemcode']."' - AND effectivefrom<='".$purchorderdate[0]."'"; - $dateresult=DB_query($datesql, $db); - $date=DB_fetch_row($dateresult); - if ($date[0]!='') { - $sql="SELECT unitsofmeasure.unitname, - suppliers_partno, - conversionfactor - FROM purchdata - LEFT JOIN unitsofmeasure - ON purchdata.suppliersuom=unitsofmeasure.unitid - WHERE supplierno='".$myrow['supplierid']."' - AND stockid='".$myrow['itemcode']."' - AND effectivefrom='".$date[0]."'"; - $purchdataresult=DB_query($sql, $db); - $myrow2=DB_fetch_array($purchdataresult); - } else { - $sql="SELECT units as unitname, - stockid as suppliers_partno, - 1 as conversionfactor - FROM stockmaster - WHERE stockid='".$myrow['itemcode']."'"; - $purchdataresult=DB_query($sql, $db); - $myrow2=DB_fetch_array($purchdataresult); - } - $StockID=$myrow[0]; - $GRNNo=$myrow[1]; - $Date=ConvertSQLDate($myrow[2]); - $Description=$myrow[3]; - $Quantity=$myrow[4]; - $SupplierID=$myrow[5]; - if ($myrow2['unitname']=='') { - $sql="SELECT units - FROM stockmaster - WHERE stockid='".$myrow['itemcode']."'"; - $uomresult=DB_query($sql, $db); - $uomrow=DB_fetch_array($uomresult); - $units=$uomrow['units']; - $myrow2['conversionfactor']=1; - } else { - $units=$myrow2['unitname']; - } - $sql="SELECT units, - decimalplaces - FROM stockmaster - WHERE stockid='".$myrow['itemcode']."'"; - $uomresult=DB_query($sql, $db); - $uomrow=DB_fetch_array($uomresult); - $stockunits=$uomrow['units']; - - $sql="SELECT suppname - FROM suppliers - WHERE supplierid='".$SupplierID."'"; - $supplierresult=DB_query($sql, $db); - $suppliermyrow=DB_fetch_array($supplierresult); - $Supplier=$suppliermyrow[0]; + $myrow = DB_fetch_array($GRNResult); + $LineNo = $_SESSION['PO'.$identifier]->GetLineNoFromPODetailItem($myrow['podetailitem']); + echo '<br />The podetailitem is ' . $myrow['podetailitem'] . '<br />Got the line number it is: ' . $LineNo; + $StockID=$myrow['itemcode']; + $GRNNo=$myrow['grnno']; + $Date=ConvertSQLDate($myrow['deliverydate']); + $Description=$myrow['itemdescription']; + $SuppliersQuantity=number_format($myrow['qtyrecd']/$_SESSION['PO' . $identifier]->LineItems[$LineNo]->ConversionFactor,$_SESSION['PO' . $identifier]->LineItems[$LineNo]->DecimalPlaces); + $OurUnitsQuantity=number_format($myrow['qtyrecd'],$_SESSION['PO' . $identifier]->LineItems[$LineNo]->DecimalPlaces); + $SupplierID=$myrow['supplierid']; + $Units = $_SESSION['PO' . $identifier]->LineItems[$LineNo]->Units; + $SuppliersUnit = $_SESSION['PO' . $identifier]->LineItems[$LineNo]->SuppliersUnit; + $Supplier = $_SESSION['PO' . $identifier]->SupplierName; } - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $StockID); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $Description); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $Date); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, number_format($Quantity,$uomrow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $units, 'left'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, number_format($Quantity*$myrow2['conversionfactor'],$uomrow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column7->x,$Page_Height-$YPos,$FormDesign->Data->Column7->Length,$FormDesign->Data->Column7->FontSize, $stockunits, 'left'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, $SuppliersQuantity, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $SuppliersUnit, 'left'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, $OurUnitsQuantity, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column7->x,$Page_Height-$YPos,$FormDesign->Data->Column7->Length,$FormDesign->Data->Column7->FontSize, $Units, 'left'); $YPos += $line_height; - $counter++; + $i++; if ($YPos >= $FormDesign->LineAboveFooter->starty){ /* We reached the end of the page so finsih off the page and start a newy */ $PageNumber++; @@ -140,10 +94,10 @@ $LeftOvers = $pdf->addText($FormDesign->SignedFor->x,$Page_Height-$FormDesign->SignedFor->y,$FormDesign->SignedFor->FontSize, _('Signed for ').'______________________'); -if ($ListCount == 0) { //UldisN +if ($NoOfGRNs == 0) { $title = _('GRN Error'); include('includes/header.inc'); - prnMsg(_('There were no GRN to print'),'warn'); + prnMsg(_('There were no GRNs to print'),'warn'); echo '<br><a href="'.$rootpath.'/index.php?' . SID . '">'. _('Back to the menu').'</a>'; include('includes/footer.inc'); exit; Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/PO_PDFPurchOrder.php 2011-01-30 05:16:03 UTC (rev 4479) @@ -37,11 +37,13 @@ } $title = _('Print Purchase Order Number').' '. $OrderNo; -if ($_POST['PrintOrEmail']=='Email' AND ! IsEmailAddress($_POST['EmailTo'])){ - include('includes/header.inc'); - prnMsg( _('The email address entered does not appear to be valid. No emails have been sent.'),'warn'); - include('includes/footer.inc'); - exit; +if (isset($_POST['PrintOrEmail']) ){ + if ($_POST['PrintOrEmail'] =='Email' AND ! IsEmailAddress($_POST['EmailTo'])){ + include('includes/header.inc'); + prnMsg( _('The email address entered does not appear to be valid. No emails have been sent.'),'warn'); + include('includes/footer.inc'); + exit; + } } $ViewingOnly = 0; if (isset($_GET['ViewingOnly']) AND $_GET['ViewingOnly']!='') { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/doc/Change.log.html 2011-01-30 05:16:03 UTC (rev 4479) @@ -1,5 +1,7 @@ <p>/<font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>30/1/11: Phil GoodsReceived.php rework for supplier units and conversion factor etc now in PO class</p> +<p>30/1/11: Phil PDFGrn.php rework for supplier units and conversion factor etc now in PO class</p> <p>30/1/11:Exson changed PDFLowGP report remove % from gettext string</p> <p>29/1/11:Tim fix reportwriter with tcpdf using parent::__construct rather than $this->Cpdf( </p> <p>24/1/11:Phil Depreciation fixes - SelectAsset by description fix</p> Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/includes/DefinePOClass.php 2011-01-30 05:16:03 UTC (rev 4479) @@ -226,6 +226,15 @@ return 0; //nowt received } + function GetLineNoFromPODetailItem($PODetailItem){ + foreach ($this->LineItems as $OrderedItems) { + if ($OrderedItems->PODetailRec ==$PODetailItem){ + return $OrderedItems->LineNo; + } + } + return false; //PODetailItem not on the order + } + } /* end of class defintion */ Class LineDetails { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-01-30 05:16:10
|
Revision: 4479 http://web-erp.svn.sourceforge.net/web-erp/?rev=4479&view=rev Author: daintree Date: 2011-01-30 05:16:03 +0000 (Sun, 30 Jan 2011) Log Message: ----------- Purch order stuff goods received etc Modified Paths: -------------- trunk/GoodsReceived.php trunk/PDFGrn.php trunk/PO_PDFPurchOrder.php trunk/doc/Change.log.html trunk/includes/DefinePOClass.php Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/GoodsReceived.php 2011-01-30 05:16:03 UTC (rev 4479) @@ -81,12 +81,21 @@ '"></td></tr></table><br>'; echo '<table cellpadding=2 class=selection> + <tr><th colspan="2"></th> + <th align="centre" colspan="3"><b>' . _('Supplier Units') . '</b></th> + <th></th> + <th align="centre" colspan="5"><b>' . _('Our Units') . '</b></th> + </tr> <tr><th>' . _('Item Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Quantity') . '<br>' . _('Ordered') . '</th> <th>' . _('Units') . '</th> - <th>' . _('Already Received') . '</th> - <th>' . _('This Delivery') . '<br>' . _('Quantity') . '</th>'; + <th>' . _('Already') . '<br />' . _('Received') . '</th> + <th>' . _('Conversion') . '<br />' . _('Factor') . '</th> + <th>' . _('Quantity') . '<br>' . _('Ordered') . '</th> + <th>' . _('Units') . '</th> + <th>' . _('Already') . '<br />' . _('Received') . '</th> + <th>' . _('This Delivery') . '<br />' . _('Quantity') . '</th>'; if ($_SESSION['ShowValueOnGRN']==1) { echo '<th>' . _('Price') . '</th><th>' . _('Total Value') . '<br>' . _('Received') . '</th>'; @@ -125,41 +134,23 @@ $LineTotal = ($LnItm->ReceiveQty * $LnItm->Price ); $_SESSION['PO'.$identifier]->Total = $_SESSION['PO'.$identifier]->Total + $LineTotal; + $DisplaySupplierQtyOrd = number_format($LnItm->Quantity/$LnItm->ConversionFactor,$LnItm->DecimalPlaces); + $DisplaySupplierQtyRec = number_format($LnItm->QtyReceived/$LnItm->ConversionFactor,$LnItm->DecimalPlaces); $DisplayQtyOrd = number_format($LnItm->Quantity,$LnItm->DecimalPlaces); $DisplayQtyRec = number_format($LnItm->QtyReceived,$LnItm->DecimalPlaces); $DisplayLineTotal = number_format($LineTotal,2); $DisplayPrice = number_format($LnItm->Price,2); - $SupplierUomSQL="SELECT unitsofmeasure.unitname, - conversionfactor, - suppliersuom, - max(effectivefrom) - FROM purchdata - LEFT JOIN unitsofmeasure - ON purchdata.suppliersuom=unitsofmeasure.unitid - WHERE supplierno='".$_SESSION['PO'.$identifier]->SupplierID."' - AND stockid='".$LnItm->StockID."' - GROUP BY unitsofmeasure.unitname"; - $SupplierUOMResult=DB_query($SupplierUomSQL, $db); - if (DB_num_rows($SupplierUOMResult)>0) { - $SupplierUOMRow=DB_fetch_array($SupplierUOMResult); - if (strlen($SupplierUOMRow['unitname'])>0) { - $Uom=$SupplierUOMRow['unitname']; - } else { - $Uom=$LnItm->Units; - } - $ConversionFactor=$SupplierUOMRow['conversionfactor']; - } else { //using our units throughout - $Uom=$LnItm->Units; - $ConversionFactor=1; - } - //Now Display LineItem echo '<td>' . $LnItm->StockID . '</td>'; echo '<td>' . $LnItm->ItemDescription . '</td>'; + echo '<td class=number>' . $DisplaySupplierQtyOrd . '</td>'; + echo '<td>' . $LnItm->SuppliersUnit . '</td>'; + echo '<td class=number>' . $DisplaySupplierQtyRec . '</td>'; + echo '<td class=number>' . $LnItm->ConversionFactor . '</td>'; echo '<td class=number>' . $DisplayQtyOrd . '</td>'; - echo '<td>' . $LnItm->uom . '</td>'; + echo '<td>' . $LnItm->Units . '</td>'; echo '<td class=number>' . $DisplayQtyRec . '</td>'; echo '<td class=number>'; @@ -191,7 +182,7 @@ echo "<script>defaultControl(document.forms[0].RecvQty_$LnItm->LineNo);</script>"; $DisplayTotal = number_format($_SESSION['PO'.$identifier]->Total,2); if ($_SESSION['ShowValueOnGRN']==1) { - echo '<tr><td colspan=7 class=number><b>' . _('Total value of goods received'). '</b></td> + echo '<tr><td colspan="11" class=number><b>' . _('Total value of goods received'). '</b></td> <td class=number><b>'. $DisplayTotal. '</b></td> </tr></table>'; } else { @@ -675,7 +666,7 @@ if ($_SESSION['PO'.$identifier]->AllLinesReceived()==1) { //all lines on the purchase order are now completed - $StatusComment=date($_SESSION['DefaultDateFormat']) .' - ' . _('Order Completed') .'<br />' . $_SESSION['PO'.$identifier]->StatusComment; + $StatusComment=date($_SESSION['DefaultDateFormat']) .' - ' . _('Order Completed') .'<br />' . $_SESSION['PO'.$identifier]->StatusComments; $sql="UPDATE purchorders SET status='Completed', stat_comment='" . $StatusComment . "' Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/PDFGrn.php 2011-01-30 05:16:03 UTC (rev 4479) @@ -2,14 +2,11 @@ /* $Id$*/ -/* $Revision: 1.5 $ */ - -//$PageSecurity = 2; +//$PageSecurity = 2; Now comes from DB - read in from session include('includes/session.inc'); +include('includes/DefinePOClass.php'); -if (isset($_POST['GRNNo'])) { - $GRNNo=$_POST['GRNNo']; -} else if (isset($_GET['GRNNo'])) { +if (isset($_GET['GRNNo'])) { $GRNNo=$_GET['GRNNo']; } else { $GRNNo=''; @@ -29,105 +26,62 @@ $pdf->addInfo('Title', _('Goods Received Note') ); if ($GRNNo=='Preview') { - $ListCount = 1; // UldisN + $ListCount = 1; } else { $sql="SELECT grns.itemcode, grns.grnno, grns.deliverydate, grns.itemdescription, grns.qtyrecd, - grns.supplierid + grns.supplierid, + grns.podetailitem FROM grns WHERE grnbatch='".$GRNNo."'"; - $result=DB_query($sql, $db); - $ListCount = DB_num_rows($result); // UldisN - - include('includes/PDFGrnHeader.inc'); + $GRNResult=DB_query($sql, $db); + $NoOfGRNs = DB_num_rows($GRNResult); + if ($NoOfGRNs>0){ + $_GET['ModifyOrderNumber'] = (int)$_GET['PONo']; + $identifier=date('U'); + include('includes/PO_ReadInOrder.inc'); //Read the PO in + include('includes/PDFGrnHeader.inc'); + } } -$counter=1; +$i=1; $YPos=$FormDesign->Data->y; -while ($counter<=$ListCount) { +while ($i<=$NoOfGRNs) { if ($GRNNo=='Preview') { $StockID=str_pad('',10,'x'); $Date='1/1/1900'; $Description=str_pad('',30,'x'); - $Quantity='XXXXX.XX'; + $SuppliersQuantity='XXXXX.XX'; + $OurUnitsQuantity='XXXXX.XX'; $Supplier=str_pad('',25,'x'); + $Units = str_pad('',10,'x'); + $SupplierUnits =str_pad('',10,'x'); } else { - $sql="SELECT orddate from purchorders WHERE orderno='".$_GET['PONo']."'"; - $purchorderresult=DB_query($sql, $db); - $purchorderdate=DB_fetch_array($purchorderresult); - $myrow=DB_fetch_array($result); - $datesql="SELECT max(effectivefrom) - FROM purchdata - WHERE supplierno='".$myrow['supplierid']."' - AND stockid='".$myrow['itemcode']."' - AND effectivefrom<='".$purchorderdate[0]."'"; - $dateresult=DB_query($datesql, $db); - $date=DB_fetch_row($dateresult); - if ($date[0]!='') { - $sql="SELECT unitsofmeasure.unitname, - suppliers_partno, - conversionfactor - FROM purchdata - LEFT JOIN unitsofmeasure - ON purchdata.suppliersuom=unitsofmeasure.unitid - WHERE supplierno='".$myrow['supplierid']."' - AND stockid='".$myrow['itemcode']."' - AND effectivefrom='".$date[0]."'"; - $purchdataresult=DB_query($sql, $db); - $myrow2=DB_fetch_array($purchdataresult); - } else { - $sql="SELECT units as unitname, - stockid as suppliers_partno, - 1 as conversionfactor - FROM stockmaster - WHERE stockid='".$myrow['itemcode']."'"; - $purchdataresult=DB_query($sql, $db); - $myrow2=DB_fetch_array($purchdataresult); - } - $StockID=$myrow[0]; - $GRNNo=$myrow[1]; - $Date=ConvertSQLDate($myrow[2]); - $Description=$myrow[3]; - $Quantity=$myrow[4]; - $SupplierID=$myrow[5]; - if ($myrow2['unitname']=='') { - $sql="SELECT units - FROM stockmaster - WHERE stockid='".$myrow['itemcode']."'"; - $uomresult=DB_query($sql, $db); - $uomrow=DB_fetch_array($uomresult); - $units=$uomrow['units']; - $myrow2['conversionfactor']=1; - } else { - $units=$myrow2['unitname']; - } - $sql="SELECT units, - decimalplaces - FROM stockmaster - WHERE stockid='".$myrow['itemcode']."'"; - $uomresult=DB_query($sql, $db); - $uomrow=DB_fetch_array($uomresult); - $stockunits=$uomrow['units']; - - $sql="SELECT suppname - FROM suppliers - WHERE supplierid='".$SupplierID."'"; - $supplierresult=DB_query($sql, $db); - $suppliermyrow=DB_fetch_array($supplierresult); - $Supplier=$suppliermyrow[0]; + $myrow = DB_fetch_array($GRNResult); + $LineNo = $_SESSION['PO'.$identifier]->GetLineNoFromPODetailItem($myrow['podetailitem']); + echo '<br />The podetailitem is ' . $myrow['podetailitem'] . '<br />Got the line number it is: ' . $LineNo; + $StockID=$myrow['itemcode']; + $GRNNo=$myrow['grnno']; + $Date=ConvertSQLDate($myrow['deliverydate']); + $Description=$myrow['itemdescription']; + $SuppliersQuantity=number_format($myrow['qtyrecd']/$_SESSION['PO' . $identifier]->LineItems[$LineNo]->ConversionFactor,$_SESSION['PO' . $identifier]->LineItems[$LineNo]->DecimalPlaces); + $OurUnitsQuantity=number_format($myrow['qtyrecd'],$_SESSION['PO' . $identifier]->LineItems[$LineNo]->DecimalPlaces); + $SupplierID=$myrow['supplierid']; + $Units = $_SESSION['PO' . $identifier]->LineItems[$LineNo]->Units; + $SuppliersUnit = $_SESSION['PO' . $identifier]->LineItems[$LineNo]->SuppliersUnit; + $Supplier = $_SESSION['PO' . $identifier]->SupplierName; } - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $StockID); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $Description); $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $Date); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, number_format($Quantity,$uomrow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $units, 'left'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, number_format($Quantity*$myrow2['conversionfactor'],$uomrow['decimalplaces']), 'right'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column7->x,$Page_Height-$YPos,$FormDesign->Data->Column7->Length,$FormDesign->Data->Column7->FontSize, $stockunits, 'left'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, $SuppliersQuantity, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $SuppliersUnit, 'left'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, $OurUnitsQuantity, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column7->x,$Page_Height-$YPos,$FormDesign->Data->Column7->Length,$FormDesign->Data->Column7->FontSize, $Units, 'left'); $YPos += $line_height; - $counter++; + $i++; if ($YPos >= $FormDesign->LineAboveFooter->starty){ /* We reached the end of the page so finsih off the page and start a newy */ $PageNumber++; @@ -140,10 +94,10 @@ $LeftOvers = $pdf->addText($FormDesign->SignedFor->x,$Page_Height-$FormDesign->SignedFor->y,$FormDesign->SignedFor->FontSize, _('Signed for ').'______________________'); -if ($ListCount == 0) { //UldisN +if ($NoOfGRNs == 0) { $title = _('GRN Error'); include('includes/header.inc'); - prnMsg(_('There were no GRN to print'),'warn'); + prnMsg(_('There were no GRNs to print'),'warn'); echo '<br><a href="'.$rootpath.'/index.php?' . SID . '">'. _('Back to the menu').'</a>'; include('includes/footer.inc'); exit; Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/PO_PDFPurchOrder.php 2011-01-30 05:16:03 UTC (rev 4479) @@ -37,11 +37,13 @@ } $title = _('Print Purchase Order Number').' '. $OrderNo; -if ($_POST['PrintOrEmail']=='Email' AND ! IsEmailAddress($_POST['EmailTo'])){ - include('includes/header.inc'); - prnMsg( _('The email address entered does not appear to be valid. No emails have been sent.'),'warn'); - include('includes/footer.inc'); - exit; +if (isset($_POST['PrintOrEmail']) ){ + if ($_POST['PrintOrEmail'] =='Email' AND ! IsEmailAddress($_POST['EmailTo'])){ + include('includes/header.inc'); + prnMsg( _('The email address entered does not appear to be valid. No emails have been sent.'),'warn'); + include('includes/footer.inc'); + exit; + } } $ViewingOnly = 0; if (isset($_GET['ViewingOnly']) AND $_GET['ViewingOnly']!='') { Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/doc/Change.log.html 2011-01-30 05:16:03 UTC (rev 4479) @@ -1,5 +1,7 @@ <p>/<font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>30/1/11: Phil GoodsReceived.php rework for supplier units and conversion factor etc now in PO class</p> +<p>30/1/11: Phil PDFGrn.php rework for supplier units and conversion factor etc now in PO class</p> <p>30/1/11:Exson changed PDFLowGP report remove % from gettext string</p> <p>29/1/11:Tim fix reportwriter with tcpdf using parent::__construct rather than $this->Cpdf( </p> <p>24/1/11:Phil Depreciation fixes - SelectAsset by description fix</p> Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-01-30 03:56:30 UTC (rev 4478) +++ trunk/includes/DefinePOClass.php 2011-01-30 05:16:03 UTC (rev 4479) @@ -226,6 +226,15 @@ return 0; //nowt received } + function GetLineNoFromPODetailItem($PODetailItem){ + foreach ($this->LineItems as $OrderedItems) { + if ($OrderedItems->PODetailRec ==$PODetailItem){ + return $OrderedItems->LineNo; + } + } + return false; //PODetailItem not on the order + } + } /* end of class defintion */ Class LineDetails { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-02-02 07:52:28
|
Revision: 4480 http://web-erp.svn.sourceforge.net/web-erp/?rev=4480&view=rev Author: daintree Date: 2011-02-02 07:52:17 +0000 (Wed, 02 Feb 2011) Log Message: ----------- if anything Modified Paths: -------------- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/reportwriter/admin/defaults.php trunk/reportwriter/languages/en_US/reports.php trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-01-30 05:16:03 UTC (rev 4479) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-02-02 07:52:17 UTC (rev 4480) @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-01-05 18:40+0000\n" +"POT-Creation-Date: 2011-01-20 22:26+1200\n" "PO-Revision-Date: 2010-07-25 17:04+0000\n" "Last-Translator: Tim Schofield <ti...@we...>\n" "Language-Team: Czech <cs...@li...>\n" -"Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: cs\n" "X-Launchpad-Export-Date: 2011-01-05 16:36+0000\n" "X-Generator: Launchpad (build 12138)\n" "X-Poedit-Country: CZECH REPUBLIC\n" @@ -26,12 +26,20 @@ msgstr "Účetní skupiny" #: AccountGroups.php:19 -msgid "An error occurred in retrieving the account groups of the parent account group during the check for recursion" -msgstr "Při rekurzivní kontrole došlo k chybě při získávání účetních skupin rodičovské účetní skupiny" +msgid "" +"An error occurred in retrieving the account groups of the parent account " +"group during the check for recursion" +msgstr "" +"Při rekurzivní kontrole došlo k chybě při získávání účetních skupin " +"rodičovské účetní skupiny" #: AccountGroups.php:20 -msgid "The SQL that was used to retrieve the account groups of the parent account group and that failed in the process was" -msgstr "SQL příkaz použitý při získávání účetních skupin rodičovské účetní skupiny byl" +msgid "" +"The SQL that was used to retrieve the account groups of the parent account " +"group and that failed in the process was" +msgstr "" +"SQL příkaz použitý při získávání účetních skupin rodičovské účetní skupiny " +"byl" #: AccountGroups.php:57 AccountGroups.php:94 AccountGroups.php:177 #: AccountGroups.php:187 @@ -60,8 +68,14 @@ msgstr "Název účetní skupiny musí být dlouhý minimálně jeden znak" #: AccountGroups.php:84 -msgid "The parent account group selected appears to result in a recursive account structure - select an alternative parent account group or make this group a top level account group" -msgstr "Mateřské účet vybrané skupiny se objeví na výsledek v rekurzivní strukturu účtu - vyberte alternativní mateřské účet skupiny nebo tuto skupinu na nejvyšší úrovni účtové skupiny" +msgid "" +"The parent account group selected appears to result in a recursive account " +"structure - select an alternative parent account group or make this group a " +"top level account group" +msgstr "" +"Mateřské účet vybrané skupiny se objeví na výsledek v rekurzivní strukturu " +"účtu - vyberte alternativní mateřské účet skupiny nebo tuto skupinu na " +"nejvyšší úrovni účtové skupiny" #: AccountGroups.php:95 msgid "Could not check whether the group is recursive because" @@ -108,19 +122,23 @@ msgstr "Došlo k chybě při získávání informací od skupiny chartmaster" #: AccountGroups.php:181 -msgid "Cannot delete this account group because general ledger accounts have been created using this group" -msgstr "Nelze smazat tento účet skupiny, protože účtů hlavní knihy byly vytvořeny pomocí této skupině" +msgid "" +"Cannot delete this account group because general ledger accounts have been " +"created using this group" +msgstr "" +"Nelze smazat tento účet skupiny, protože účtů hlavní knihy byly vytvořeny " +"pomocí této skupině" #: AccountGroups.php:182 AccountGroups.php:192 AccountSections.php:139 #: Areas.php:117 Areas.php:126 BankAccounts.php:163 CreditStatus.php:126 #: Currencies.php:144 Currencies.php:152 Currencies.php:159 -#: CustomerBranches.php:303 CustomerBranches.php:313 CustomerBranches.php:323 -#: CustomerBranches.php:333 Customers.php:317 Customers.php:326 +#: CustomerBranches.php:296 CustomerBranches.php:306 CustomerBranches.php:316 +#: CustomerBranches.php:326 Customers.php:317 Customers.php:326 #: Customers.php:334 Customers.php:342 CustomerTypes.php:149 #: CustomerTypes.php:159 Factors.php:136 FixedAssetCategories.php:132 -#: GLAccounts.php:95 GLAccounts.php:109 Locations.php:219 Locations.php:227 -#: Locations.php:236 Locations.php:244 Locations.php:252 Locations.php:260 -#: Locations.php:268 Locations.php:276 MRPDemandTypes.php:89 +#: GLAccounts.php:95 GLAccounts.php:109 Locations.php:247 Locations.php:255 +#: Locations.php:264 Locations.php:272 Locations.php:280 Locations.php:288 +#: Locations.php:296 Locations.php:304 MRPDemandTypes.php:89 #: PaymentMethods.php:146 PaymentTerms.php:147 PaymentTerms.php:154 #: PcExpenses.php:119 SalesCategories.php:127 SalesCategories.php:135 #: SalesPeople.php:144 SalesPeople.php:151 SalesTypes.php:147 @@ -143,12 +161,17 @@ msgstr "Došlo k chybě při načítání mateřské skupiny informací" #: AccountGroups.php:191 -msgid "Cannot delete this account group because it is a parent account group of other account group(s)" -msgstr "Nelze smazat tento účet skupiny, protože se jedná o mateřskou účet skupinou dalších účtové skupiny (y)" +msgid "" +"Cannot delete this account group because it is a parent account group of " +"other account group(s)" +msgstr "" +"Nelze smazat tento účet skupiny, protože se jedná o mateřskou účet skupinou " +"dalších účtové skupiny (y)" #: AccountGroups.php:192 msgid "account groups that have this group as its/there parent account group" -msgstr "účet skupiny, které mají tuto skupinu jako jeho / je skupina rodičů účet" +msgstr "" +"účet skupiny, které mají tuto skupinu jako jeho / je skupina rodičů účet" #: AccountGroups.php:195 msgid "An error occurred in deleting the account group" @@ -176,12 +199,12 @@ #: Areas.php:145 AuditTrail.php:13 BOMExtendedQty.php:286 BOMIndented.php:262 #: BOMIndentedReverse.php:257 BOMInquiry.php:165 BOMListing.php:128 #: BOMs.php:214 BOMs.php:793 COGSGLPostings.php:20 CompanyPreferences.php:158 -#: CounterSales.php:1942 CounterSales.php:2064 Credit_Invoice.php:257 +#: CounterSales.php:1941 CounterSales.php:2065 Credit_Invoice.php:257 #: CreditStatus.php:21 Currencies.php:29 CustEDISetup.php:19 #: DailyBankTransactions.php:9 DebtorsAtPeriodEnd.php:138 #: DiscountCategories.php:12 DiscountCategories.php:122 DiscountMatrix.php:18 -#: EDIMessageFormat.php:106 FixedAssetList.php:8 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:232 +#: EDIMessageFormat.php:106 FixedAssetLocations.php:9 +#: FixedAssetRegister.php:13 FixedAssetRegister.php:236 #: FixedAssetTransfer.php:31 FormDesigner.php:132 GLBalanceSheet.php:351 #: GLBudgets.php:30 GLJournal.php:243 InventoryPlanning.php:369 #: InventoryPlanningPrefSupplier.php:474 Labels.php:117 Labels.php:273 @@ -191,14 +214,14 @@ #: PDFStockLocTransfer.php:21 PO_AuthorisationLevels.php:12 POReport.php:61 #: POReport.php:65 POReport.php:69 PO_SelectOSPurchOrder.php:136 #: PricesBasedOnMarkUp.php:11 Prices_Customer.php:45 Prices.php:32 -#: PurchData.php:141 PurchData.php:231 PurchData.php:250 -#: RecurringSalesOrders.php:307 SalesAnalReptCols.php:51 SalesAnalRepts.php:13 +#: PurchData.php:141 PurchData.php:256 PurchData.php:275 +#: RecurringSalesOrders.php:311 SalesAnalReptCols.php:51 SalesAnalRepts.php:13 #: SalesCategories.php:13 SalesGLPostings.php:18 SalesGraph.php:34 #: SalesPeople.php:22 SalesTypes.php:22 SelectAsset.php:44 #: SelectCompletedOrder.php:13 SelectContract.php:81 SelectCreditItems.php:204 #: SelectCreditItems.php:272 SelectCustomer.php:315 SelectGLAccount.php:19 -#: SelectGLAccount.php:79 SelectOrderItems.php:605 SelectOrderItems.php:1436 -#: SelectOrderItems.php:1556 SelectProduct.php:461 SelectSalesOrder.php:155 +#: SelectGLAccount.php:79 SelectOrderItems.php:605 SelectOrderItems.php:1430 +#: SelectOrderItems.php:1554 SelectProduct.php:456 SelectSalesOrder.php:155 #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:11 #: SelectWorkOrder.php:147 ShipmentCosting.php:13 Shipments.php:18 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:10 @@ -208,7 +231,7 @@ #: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:158 #: WorkOrderCosting.php:14 WorkOrderEntry.php:12 WorkOrderIssue.php:22 #: WorkOrderReceive.php:15 WorkOrderStatus.php:43 WWW_Access.php:13 -#: WWW_Users.php:38 Z_BottomUpCosts.php:51 Z_UpgradeDatabase.php:39 +#: WWW_Users.php:38 Z_BottomUpCosts.php:51 msgid "Search" msgstr "Vyhledávání" @@ -241,21 +264,21 @@ #: CompanyPreferences.php:451 CompanyPreferences.php:453 #: CompanyPreferences.php:463 CompanyPreferences.php:465 #: ContractCosting.php:174 CustLoginSetup.php:590 CustLoginSetup.php:592 -#: CustomerBranches.php:427 Customers.php:600 Customers.php:857 +#: CustomerBranches.php:420 Customers.php:600 Customers.php:857 #: Customers.php:864 Customers.php:867 DeliveryDetails.php:1034 #: DeliveryDetails.php:1074 DeliveryDetails.php:1077 GLTransInquiry.php:73 -#: Locations.php:345 MRPCalendar.php:222 MRP.php:530 MRP.php:534 MRP.php:538 +#: Locations.php:373 MRPCalendar.php:222 MRP.php:530 MRP.php:534 MRP.php:538 #: MRP.php:542 PaymentMethods.php:203 PaymentMethods.php:204 #: PaymentMethods.php:264 PaymentMethods.php:270 PDFChequeListing.php:63 #: PDFDeliveryDifferences.php:64 PDFDIFOT.php:67 #: PO_AuthorisationLevels.php:132 PO_AuthorisationLevels.php:137 -#: PO_Header.php:762 PO_PDFPurchOrder.php:367 PO_PDFPurchOrder.php:370 -#: PurchData.php:189 PurchData.php:469 PurchData.php:472 -#: RecurringSalesOrders.php:479 RecurringSalesOrders.php:482 +#: PO_Header.php:758 PO_PDFPurchOrder.php:342 PO_PDFPurchOrder.php:345 +#: PurchData.php:192 PurchData.php:494 PurchData.php:497 +#: RecurringSalesOrders.php:483 RecurringSalesOrders.php:486 #: SalesAnalReptCols.php:279 SalesAnalReptCols.php:401 #: SalesAnalReptCols.php:404 SalesAnalRepts.php:406 SalesAnalRepts.php:409 #: SalesAnalRepts.php:432 SalesAnalRepts.php:435 SalesAnalRepts.php:458 -#: SalesAnalRepts.php:461 SelectProduct.php:356 ShipmentCosting.php:622 +#: SalesAnalRepts.php:461 SelectProduct.php:351 ShipmentCosting.php:622 #: Stocks.php:867 Stocks.php:869 Stocks.php:887 Stocks.php:889 #: SuppContractChgs.php:83 SuppLoginSetup.php:511 SuppLoginSetup.php:513 #: SystemParameters.php:373 SystemParameters.php:405 SystemParameters.php:450 @@ -276,21 +299,21 @@ #: CompanyPreferences.php:450 CompanyPreferences.php:454 #: CompanyPreferences.php:462 CompanyPreferences.php:466 #: ContractCosting.php:172 CustLoginSetup.php:589 CustLoginSetup.php:593 -#: CustomerBranches.php:427 Customers.php:599 Customers.php:855 +#: CustomerBranches.php:420 Customers.php:599 Customers.php:855 #: Customers.php:863 Customers.php:866 DeliveryDetails.php:1035 #: DeliveryDetails.php:1075 DeliveryDetails.php:1078 GLTransInquiry.php:127 -#: Locations.php:347 MRPCalendar.php:224 MRP.php:528 MRP.php:532 MRP.php:536 +#: Locations.php:375 MRPCalendar.php:224 MRP.php:528 MRP.php:532 MRP.php:536 #: MRP.php:540 PaymentMethods.php:203 PaymentMethods.php:204 #: PaymentMethods.php:265 PaymentMethods.php:271 PDFChequeListing.php:62 #: PDFDeliveryDifferences.php:63 PDFDIFOT.php:66 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 -#: PO_Header.php:761 PO_PDFPurchOrder.php:368 PO_PDFPurchOrder.php:371 -#: PurchData.php:192 PurchData.php:470 PurchData.php:473 -#: RecurringSalesOrders.php:478 RecurringSalesOrders.php:481 +#: PO_Header.php:757 PO_PDFPurchOrder.php:343 PO_PDFPurchOrder.php:346 +#: PurchData.php:195 PurchData.php:495 PurchData.php:498 +#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 #: SalesAnalReptCols.php:277 SalesAnalReptCols.php:402 #: SalesAnalReptCols.php:405 SalesAnalRepts.php:405 SalesAnalRepts.php:408 #: SalesAnalRepts.php:431 SalesAnalRepts.php:434 SalesAnalRepts.php:457 -#: SalesAnalRepts.php:460 SelectProduct.php:358 ShipmentCosting.php:623 +#: SalesAnalRepts.php:460 SelectProduct.php:353 ShipmentCosting.php:623 #: Stocks.php:862 Stocks.php:864 Stocks.php:882 Stocks.php:884 #: SuppContractChgs.php:85 SuppLoginSetup.php:510 SuppLoginSetup.php:514 #: SystemParameters.php:374 SystemParameters.php:406 SystemParameters.php:451 @@ -309,15 +332,15 @@ #: AddCustomerNotes.php:125 AddCustomerTypeNotes.php:123 Areas.php:165 #: BankAccounts.php:226 BOMs.php:150 COGSGLPostings.php:113 #: COGSGLPostings.php:218 CreditStatus.php:175 Currencies.php:239 -#: CustLoginSetup.php:312 CustomerBranches.php:431 Customers.php:909 +#: CustLoginSetup.php:312 CustomerBranches.php:424 Customers.php:909 #: Customers.php:941 CustomerTypes.php:205 EDIMessageFormat.php:152 #: Factors.php:208 FixedAssetCategories.php:182 FixedAssetLocations.php:102 #: FreightCosts.php:243 GeocodeSetup.php:169 GLAccounts.php:319 GLTags.php:62 -#: Labels.php:414 Locations.php:354 MRPDemands.php:304 MRPDemandTypes.php:122 +#: Labels.php:414 Locations.php:382 MRPDemands.php:304 MRPDemandTypes.php:122 #: PaymentMethods.php:205 PaymentTerms.php:203 PcAssignCashToTab.php:251 #: PcClaimExpensesFromTab.php:229 PcExpenses.php:176 PcTabs.php:188 #: PcTypeTabs.php:171 PO_AuthorisationLevels.php:148 Prices_Customer.php:283 -#: Prices.php:227 PurchData.php:202 SalesCategories.php:263 +#: Prices.php:227 PurchData.php:207 SalesCategories.php:263 #: SalesGLPostings.php:135 SalesGLPostings.php:247 SalesPeople.php:210 #: SalesTypes.php:206 SelectCustomer.php:607 SelectCustomer.php:623 #: SelectCustomer.php:645 SelectCustomer.php:661 SelectCustomer.php:683 @@ -334,25 +357,25 @@ #: AddCustomerNotes.php:126 AddCustomerTypeNotes.php:124 Areas.php:166 #: BankAccounts.php:227 BOMs.php:152 COGSGLPostings.php:114 #: COGSGLPostings.php:219 ContractBOM.php:272 ContractOtherReqts.php:121 -#: CounterSales.php:743 Credit_Invoice.php:386 CreditStatus.php:176 +#: CounterSales.php:741 Credit_Invoice.php:386 CreditStatus.php:176 #: Currencies.php:242 CustLoginSetup.php:313 CustomerReceipt.php:866 #: Customers.php:942 CustomerTypes.php:206 DiscountCategories.php:204 #: DiscountMatrix.php:178 EDIMessageFormat.php:153 #: FixedAssetCategories.php:183 FreightCosts.php:244 GeocodeSetup.php:170 -#: GLAccounts.php:320 GLJournal.php:403 Labels.php:414 Locations.php:355 +#: GLAccounts.php:320 GLJournal.php:403 Labels.php:414 Locations.php:383 #: MRPDemands.php:305 MRPDemandTypes.php:123 PaymentMethods.php:206 #: Payments.php:961 PaymentTerms.php:204 PcAssignCashToTab.php:255 #: PcClaimExpensesFromTab.php:230 PcExpenses.php:177 PcExpensesTypeTab.php:161 #: PcTabs.php:189 PcTypeTabs.php:172 PO_AuthorisationLevels.php:150 -#: PO_Items.php:978 Prices_Customer.php:284 Prices.php:228 PurchData.php:203 +#: PO_Items.php:715 Prices_Customer.php:284 Prices.php:228 PurchData.php:208 #: SalesAnalReptCols.php:294 SalesAnalRepts.php:305 SalesCategories.php:264 #: SalesGLPostings.php:136 SalesGLPostings.php:248 SalesPeople.php:211 #: SalesTypes.php:207 SelectCreditItems.php:747 SelectCustomer.php:608 #: SelectCustomer.php:624 SelectCustomer.php:646 SelectCustomer.php:662 -#: SelectCustomer.php:684 SelectCustomer.php:700 SelectOrderItems.php:1363 +#: SelectCustomer.php:684 SelectCustomer.php:700 SelectOrderItems.php:1357 #: Shipments.php:424 Shippers.php:145 SpecialOrder.php:590 #: StockCategories.php:245 StockCategories.php:539 SuppContractChgs.php:91 -#: SuppCreditGRNs.php:93 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:135 +#: SuppCreditGRNs.php:93 SuppFixedAssetChgs.php:81 SuppInvGRNs.php:135 #: SupplierContacts.php:154 SupplierTypes.php:194 SuppLoginSetup.php:275 #: SuppShiptChgs.php:86 SuppTransGLAnalysis.php:111 TaxAuthorities.php:174 #: TaxCategories.php:185 TaxGroups.php:180 TaxProvinces.php:179 @@ -371,8 +394,12 @@ msgstr "Došlo k chybě při načítání účtové skupiny informací" #: AccountGroups.php:295 -msgid "The SQL that was used to retrieve the account group and that failed in the process was" -msgstr "SQL, který byl použit k načtení účtové skupiny, a že se nepodařilo v tomto procesu bylo" +msgid "" +"The SQL that was used to retrieve the account group and that failed in the " +"process was" +msgstr "" +"SQL, který byl použit k načtení účtové skupiny, a že se nepodařilo v tomto " +"procesu bylo" #: AccountGroups.php:298 msgid "The account group name does not exist in the database" @@ -402,7 +429,7 @@ #: DiscountMatrix.php:141 EDIMessageFormat.php:249 #: FixedAssetCategories.php:328 FixedAssetLocations.php:148 #: FreightCosts.php:342 GeocodeSetup.php:266 GLAccounts.php:269 -#: Locations.php:522 MRPDemands.php:402 MRPDemandTypes.php:182 +#: Locations.php:553 MRPDemands.php:402 MRPDemandTypes.php:182 #: OffersReceived.php:52 OffersReceived.php:128 PaymentMethods.php:276 #: PaymentTerms.php:282 PO_AuthorisationLevels.php:217 Prices_Customer.php:372 #: SalesAnalReptCols.php:510 SalesAnalRepts.php:496 SalesGLPostings.php:415 @@ -434,8 +461,12 @@ msgstr "Číslo sekce musí být celé kladné číslo" #: AccountSections.php:138 -msgid "Cannot delete this account section because general ledger accounts groups have been created using this section" -msgstr "Nelze smazat tento účet oddílu, protože účtů hlavní knihy skupiny byly vytvořeny pomocí této sekci" +msgid "" +"Cannot delete this account section because general ledger accounts groups " +"have been created using this section" +msgstr "" +"Nelze smazat tento účet oddílu, protože účtů hlavní knihy skupiny byly " +"vytvořeny pomocí této sekci" #: AccountSections.php:139 msgid "general ledger accounts groups that refer to this account section" @@ -503,9 +534,9 @@ #: AddCustomerTypeNotes.php:49 Areas.php:74 CustomerTypes.php:71 #: DeliveryDetails.php:748 Factors.php:117 FixedAssetItems.php:230 #: PcAssignCashToTab.php:73 PcClaimExpensesFromTab.php:61 PcExpenses.php:60 -#: PcTabs.php:60 PcTypeTabs.php:59 PO_Items.php:382 SalesAnalReptCols.php:129 +#: PcTabs.php:60 PcTypeTabs.php:59 PO_Items.php:369 SalesAnalReptCols.php:129 #: SalesPeople.php:94 SalesTypes.php:63 Stocks.php:355 Suppliers.php:514 -#: SupplierTypes.php:69 includes/UpgradeDB_mysql.inc:232 +#: SupplierTypes.php:69 msgid "has been updated" msgstr "byla aktualizována" @@ -518,7 +549,7 @@ msgstr "Kontakt záznam byl odstraněn" #: AddCustomerContacts.php:112 CompanyPreferences.php:229 -#: CustomerBranches.php:384 Customers.php:899 Customers.php:905 +#: CustomerBranches.php:377 Customers.php:899 Customers.php:905 #: Customers.php:971 SalesPeople.php:185 SelectCustomer.php:603 #: StockDispatch.php:186 StockDispatch.php:198 SupplierContacts.php:141 #: SupplierCredit.php:433 SupplierInvoice.php:407 SuppTransGLAnalysis.php:96 @@ -558,10 +589,10 @@ msgid "Contact Name" msgstr "Jméno kontaktní osoby" -#: AddCustomerContacts.php:196 Contracts.php:766 PDFRemittanceAdvice.php:247 -#: PO_Header.php:967 PO_Header.php:1037 SelectCreditItems.php:225 +#: AddCustomerContacts.php:196 Contracts.php:764 PDFRemittanceAdvice.php:247 +#: PO_Header.php:958 PO_Header.php:1028 SelectCreditItems.php:225 #: SelectCustomer.php:461 SelectOrderItems.php:638 -#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:113 +#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:117 #: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" msgstr "Telefon" @@ -608,7 +639,7 @@ #: GLAccountReport.php:369 GLTransInquiry.php:45 MRPCalendar.php:217 #: PaymentAllocations.php:77 PcAssignCashToTab.php:212 #: PcAuthorizeExpenses.php:81 PDFRemittanceAdvice.php:308 -#: PrintCustTrans.php:678 PrintCustTransPortrait.php:860 ReverseGRN.php:378 +#: PrintCustTrans.php:616 PrintCustTransPortrait.php:794 ReverseGRN.php:378 #: ShipmentCosting.php:503 ShipmentCosting.php:574 Shipments.php:467 #: StockDispatch.php:188 StockDispatch.php:200 StockLocMovements.php:85 #: StockMovements.php:98 StockSerialItemResearch.php:79 @@ -616,15 +647,15 @@ #: SupplierAllocations.php:646 SupplierInquiry.php:195 #: SupplierTransInquiry.php:89 includes/PDFQuotationPageHeader.inc:91 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 -#: includes/PDFTransPageHeader.inc:80 +#: includes/PDFTransPageHeader.inc:84 #: includes/PDFTransPageHeaderPortrait.inc:58 msgid "Date" msgstr "Datum" #: AddCustomerNotes.php:107 AddCustomerTypeNotes.php:105 PcReportTab.php:176 -#: Stocks.php:871 UpgradeDatabase.php:105 UpgradeDatabase.php:109 -#: UpgradeDatabase.php:113 UpgradeDatabase.php:117 UpgradeDatabase.php:121 -#: UpgradeDatabase.php:125 UpgradeDatabase.php:129 Z_Upgrade_3.10-3.11.php:62 +#: Stocks.php:871 UpgradeDatabase.php:145 UpgradeDatabase.php:148 +#: UpgradeDatabase.php:151 UpgradeDatabase.php:154 UpgradeDatabase.php:157 +#: UpgradeDatabase.php:160 UpgradeDatabase.php:163 Z_Upgrade_3.10-3.11.php:62 #: Z_Upgrade_3.10-3.11.php:66 Z_Upgrade_3.10-3.11.php:70 #: Z_Upgrade_3.10-3.11.php:74 Z_Upgrade_3.10-3.11.php:78 #: Z_Upgrade_3.11-4.00.php:62 Z_Upgrade_3.11-4.00.php:66 @@ -726,7 +757,7 @@ #: PDFStockCheckComparison.php:61 PDFStockCheckComparison.php:262 #: ReorderLevel.php:59 SelectAsset.php:36 SelectProduct.php:37 #: StockCheck.php:65 StockCheck.php:139 SupplierTenders.php:325 -#: SuppPriceList.php:118 includes/PDFPaymentRun_PymtFooter.php:148 +#: SuppPriceList.php:118 includes/PDFPaymentRun_PymtFooter.php:149 msgid "Problem Report" msgstr "Problém" @@ -762,7 +793,7 @@ #: PDFLowGP.php:63 PDFLowGP.php:75 PDFPriceList.php:124 PDFQuotation.php:237 #: PDFRemittanceAdvice.php:84 PDFStockCheckComparison.php:39 #: PDFStockCheckComparison.php:65 PDFStockCheckComparison.php:266 -#: PDFTopItems.php:123 PO_PDFPurchOrder.php:21 PO_PDFPurchOrder.php:131 +#: PDFTopItems.php:123 PO_PDFPurchOrder.php:30 PO_PDFPurchOrder.php:142 #: PrintCustOrder_generic.php:182 PrintCustOrder.php:198 #: PrintSalesOrder_generic.php:183 ReorderLevel.php:62 ReorderLevel.php:151 #: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:25 StockCheck.php:47 @@ -775,11 +806,11 @@ #: Z_DataExport.php:309 Z_DataExport.php:348 Z_DataExport.php:384 #: Z_DataExport.php:420 Z_DataExport.php:472 Z_poRebuildDefault.php:38 #: includes/PDFPaymentRun_PymtFooter.php:57 -#: includes/PDFPaymentRun_PymtFooter.php:86 -#: includes/PDFPaymentRun_PymtFooter.php:115 -#: includes/PDFPaymentRun_PymtFooter.php:151 -#: includes/PDFPaymentRun_PymtFooter.php:182 -#: includes/PDFPaymentRun_PymtFooter.php:214 +#: includes/PDFPaymentRun_PymtFooter.php:87 +#: includes/PDFPaymentRun_PymtFooter.php:116 +#: includes/PDFPaymentRun_PymtFooter.php:152 +#: includes/PDFPaymentRun_PymtFooter.php:183 +#: includes/PDFPaymentRun_PymtFooter.php:215 #: includes/ConstructSQLForUserDefinedSalesReport.inc:180 #: includes/ConstructSQLForUserDefinedSalesReport.inc:188 #: includes/ConstructSQLForUserDefinedSalesReport.inc:340 @@ -791,22 +822,21 @@ msgstr "Podrobnosti o nesplacených transakcí pro zákazníka" #: AgedDebtors.php:367 AgedSuppliers.php:189 GLAccountCSV.php:169 -#: GLAccountInquiry.php:145 GLAccountReport.php:93 PO_Items.php:533 -#: PO_Items.php:564 PO_Items.php:642 PO_Items.php:805 -#: SalesAnalReptCols.php:356 SpecialOrder.php:369 -#: StockLocTransferReceive.php:373 StockQuantityByDate.php:106 -#: includes/SelectOrderItems_IntoCart.inc:53 +#: GLAccountInquiry.php:145 GLAccountReport.php:93 PO_Items.php:429 +#: PO_Items.php:558 PO_Items.php:585 SalesAnalReptCols.php:356 +#: SpecialOrder.php:369 StockLocTransferReceive.php:373 +#: StockQuantityByDate.php:106 includes/SelectOrderItems_IntoCart.inc:53 msgid "could not be retrieved because" msgstr "se nepodařilo získat, protože" #: AgedDebtors.php:370 AgedSuppliers.php:192 Areas.php:96 -#: ConfirmDispatch_Invoice.php:155 ConfirmDispatch_Invoice.php:962 -#: ConfirmDispatch_Invoice.php:976 Contracts.php:583 CounterSales.php:1282 -#: CounterSales.php:1296 Credit_Invoice.php:707 Credit_Invoice.php:729 +#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:963 +#: ConfirmDispatch_Invoice.php:977 Contracts.php:581 CounterSales.php:1281 +#: CounterSales.php:1295 Credit_Invoice.php:707 Credit_Invoice.php:729 #: CustomerReceipt.php:526 CustomerReceipt.php:658 CustomerReceipt.php:686 #: CustomerTransInquiry.php:79 DeliveryDetails.php:395 GLProfit_Loss.php:578 #: GLTagProfit_Loss.php:490 Payments.php:307 PDFRemittanceAdvice.php:86 -#: PurchData.php:89 PurchData.php:108 PurchData.php:219 ReverseGRN.php:191 +#: PurchData.php:89 PurchData.php:108 PurchData.php:244 ReverseGRN.php:191 #: ReverseGRN.php:205 ReverseGRN.php:366 SelectCreditItems.php:1383 #: StockCheck.php:224 StockCostUpdate.php:79 StockCostUpdate.php:89 #: StockLocStatus.php:142 StockMovements.php:92 StockQuantityByDate.php:82 @@ -815,13 +845,13 @@ #: SupplierInquiry.php:101 SupplierInquiry.php:131 SupplierInquiry.php:177 #: SupplierTransInquiry.php:81 SuppPaymentRun.php:111 SuppPaymentRun.php:186 #: SuppPaymentRun.php:216 WorkOrderCosting.php:393 WorkOrderReceive.php:272 -#: WOSerialNos.php:44 Z_ChangeBranchCode.php:108 Z_ChangeCustomerCode.php:90 +#: WOSerialNos.php:44 Z_ChangeBranchCode.php:108 Z_ChangeCustomerCode.php:92 #: Z_DeleteCreditNote.php:57 Z_DeleteInvoice.php:83 #: includes/PDFPaymentRun_PymtFooter.php:59 -#: includes/PDFPaymentRun_PymtFooter.php:88 -#: includes/PDFPaymentRun_PymtFooter.php:117 -#: includes/PDFPaymentRun_PymtFooter.php:153 -#: includes/PDFPaymentRun_PymtFooter.php:184 includes/ConnectDB_mysqli.inc:83 +#: includes/PDFPaymentRun_PymtFooter.php:89 +#: includes/PDFPaymentRun_PymtFooter.php:118 +#: includes/PDFPaymentRun_PymtFooter.php:154 +#: includes/PDFPaymentRun_PymtFooter.php:185 includes/ConnectDB_mysqli.inc:83 #: includes/ConnectDB_mysql.inc:65 msgid "The SQL that failed was" msgstr "SQL příkaz, který selhal, byl" @@ -886,8 +916,8 @@ #: MRPPlannedWorkOrders.php:344 MRPReschedules.php:166 MRPShortages.php:262 #: OutstandingGRNs.php:185 PDFCustomerList.php:412 PDFLowGP.php:168 #: PDFPriceList.php:301 PDFRemittanceAdvice.php:152 -#: PDFStockCheckComparison.php:379 PrintCustTrans.php:478 -#: PrintCustTransPortrait.php:630 ReorderLevel.php:229 StockDispatch.php:309 +#: PDFStockCheckComparison.php:379 PrintCustTrans.php:416 +#: PrintCustTransPortrait.php:564 ReorderLevel.php:229 StockDispatch.php:309 #: SupplierBalsAtPeriodEnd.php:155 SuppPriceList.php:237 Tax.php:352 msgid "Print PDF" msgstr "Tisknout PDF" @@ -974,8 +1004,7 @@ msgid "New area code" msgstr "Nové předčíslí" -#: Areas.php:88 includes/UpgradeDB_mysql.inc:31 -#: includes/UpgradeDB_mysql.inc:150 +#: Areas.php:88 msgid "has been inserted" msgstr "byl vložen" @@ -984,16 +1013,24 @@ msgstr "Tato oblast by neměla být přidány nebo aktualizovány, protože" #: Areas.php:116 -msgid "Cannot delete this area because customer branches have been created using this area" -msgstr "Nelze smazat tuto oblast, protože zákazník větve byly vytvořeny pomocí této oblasti" +msgid "" +"Cannot delete this area because customer branches have been created using " +"this area" +msgstr "" +"Nelze smazat tuto oblast, protože zákazník větve byly vytvořeny pomocí této " +"oblasti" #: Areas.php:117 msgid "branches using this area code" msgstr "poboček pomocí tohoto kódu oblasti" #: Areas.php:125 -msgid "Cannot delete this area because sal... [truncated message content] |
From: <dai...@us...> - 2011-02-02 07:52:28
|
Revision: 4480 http://web-erp.svn.sourceforge.net/web-erp/?rev=4480&view=rev Author: daintree Date: 2011-02-02 07:52:17 +0000 (Wed, 02 Feb 2011) Log Message: ----------- if anything Modified Paths: -------------- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/reportwriter/admin/defaults.php trunk/reportwriter/languages/en_US/reports.php trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-01-30 05:16:03 UTC (rev 4479) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-02-02 07:52:17 UTC (rev 4480) @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-01-05 18:40+0000\n" +"POT-Creation-Date: 2011-01-20 22:26+1200\n" "PO-Revision-Date: 2010-07-25 17:04+0000\n" "Last-Translator: Tim Schofield <ti...@we...>\n" "Language-Team: Czech <cs...@li...>\n" -"Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: cs\n" "X-Launchpad-Export-Date: 2011-01-05 16:36+0000\n" "X-Generator: Launchpad (build 12138)\n" "X-Poedit-Country: CZECH REPUBLIC\n" @@ -26,12 +26,20 @@ msgstr "Účetní skupiny" #: AccountGroups.php:19 -msgid "An error occurred in retrieving the account groups of the parent account group during the check for recursion" -msgstr "Při rekurzivní kontrole došlo k chybě při získávání účetních skupin rodičovské účetní skupiny" +msgid "" +"An error occurred in retrieving the account groups of the parent account " +"group during the check for recursion" +msgstr "" +"Při rekurzivní kontrole došlo k chybě při získávání účetních skupin " +"rodičovské účetní skupiny" #: AccountGroups.php:20 -msgid "The SQL that was used to retrieve the account groups of the parent account group and that failed in the process was" -msgstr "SQL příkaz použitý při získávání účetních skupin rodičovské účetní skupiny byl" +msgid "" +"The SQL that was used to retrieve the account groups of the parent account " +"group and that failed in the process was" +msgstr "" +"SQL příkaz použitý při získávání účetních skupin rodičovské účetní skupiny " +"byl" #: AccountGroups.php:57 AccountGroups.php:94 AccountGroups.php:177 #: AccountGroups.php:187 @@ -60,8 +68,14 @@ msgstr "Název účetní skupiny musí být dlouhý minimálně jeden znak" #: AccountGroups.php:84 -msgid "The parent account group selected appears to result in a recursive account structure - select an alternative parent account group or make this group a top level account group" -msgstr "Mateřské účet vybrané skupiny se objeví na výsledek v rekurzivní strukturu účtu - vyberte alternativní mateřské účet skupiny nebo tuto skupinu na nejvyšší úrovni účtové skupiny" +msgid "" +"The parent account group selected appears to result in a recursive account " +"structure - select an alternative parent account group or make this group a " +"top level account group" +msgstr "" +"Mateřské účet vybrané skupiny se objeví na výsledek v rekurzivní strukturu " +"účtu - vyberte alternativní mateřské účet skupiny nebo tuto skupinu na " +"nejvyšší úrovni účtové skupiny" #: AccountGroups.php:95 msgid "Could not check whether the group is recursive because" @@ -108,19 +122,23 @@ msgstr "Došlo k chybě při získávání informací od skupiny chartmaster" #: AccountGroups.php:181 -msgid "Cannot delete this account group because general ledger accounts have been created using this group" -msgstr "Nelze smazat tento účet skupiny, protože účtů hlavní knihy byly vytvořeny pomocí této skupině" +msgid "" +"Cannot delete this account group because general ledger accounts have been " +"created using this group" +msgstr "" +"Nelze smazat tento účet skupiny, protože účtů hlavní knihy byly vytvořeny " +"pomocí této skupině" #: AccountGroups.php:182 AccountGroups.php:192 AccountSections.php:139 #: Areas.php:117 Areas.php:126 BankAccounts.php:163 CreditStatus.php:126 #: Currencies.php:144 Currencies.php:152 Currencies.php:159 -#: CustomerBranches.php:303 CustomerBranches.php:313 CustomerBranches.php:323 -#: CustomerBranches.php:333 Customers.php:317 Customers.php:326 +#: CustomerBranches.php:296 CustomerBranches.php:306 CustomerBranches.php:316 +#: CustomerBranches.php:326 Customers.php:317 Customers.php:326 #: Customers.php:334 Customers.php:342 CustomerTypes.php:149 #: CustomerTypes.php:159 Factors.php:136 FixedAssetCategories.php:132 -#: GLAccounts.php:95 GLAccounts.php:109 Locations.php:219 Locations.php:227 -#: Locations.php:236 Locations.php:244 Locations.php:252 Locations.php:260 -#: Locations.php:268 Locations.php:276 MRPDemandTypes.php:89 +#: GLAccounts.php:95 GLAccounts.php:109 Locations.php:247 Locations.php:255 +#: Locations.php:264 Locations.php:272 Locations.php:280 Locations.php:288 +#: Locations.php:296 Locations.php:304 MRPDemandTypes.php:89 #: PaymentMethods.php:146 PaymentTerms.php:147 PaymentTerms.php:154 #: PcExpenses.php:119 SalesCategories.php:127 SalesCategories.php:135 #: SalesPeople.php:144 SalesPeople.php:151 SalesTypes.php:147 @@ -143,12 +161,17 @@ msgstr "Došlo k chybě při načítání mateřské skupiny informací" #: AccountGroups.php:191 -msgid "Cannot delete this account group because it is a parent account group of other account group(s)" -msgstr "Nelze smazat tento účet skupiny, protože se jedná o mateřskou účet skupinou dalších účtové skupiny (y)" +msgid "" +"Cannot delete this account group because it is a parent account group of " +"other account group(s)" +msgstr "" +"Nelze smazat tento účet skupiny, protože se jedná o mateřskou účet skupinou " +"dalších účtové skupiny (y)" #: AccountGroups.php:192 msgid "account groups that have this group as its/there parent account group" -msgstr "účet skupiny, které mají tuto skupinu jako jeho / je skupina rodičů účet" +msgstr "" +"účet skupiny, které mají tuto skupinu jako jeho / je skupina rodičů účet" #: AccountGroups.php:195 msgid "An error occurred in deleting the account group" @@ -176,12 +199,12 @@ #: Areas.php:145 AuditTrail.php:13 BOMExtendedQty.php:286 BOMIndented.php:262 #: BOMIndentedReverse.php:257 BOMInquiry.php:165 BOMListing.php:128 #: BOMs.php:214 BOMs.php:793 COGSGLPostings.php:20 CompanyPreferences.php:158 -#: CounterSales.php:1942 CounterSales.php:2064 Credit_Invoice.php:257 +#: CounterSales.php:1941 CounterSales.php:2065 Credit_Invoice.php:257 #: CreditStatus.php:21 Currencies.php:29 CustEDISetup.php:19 #: DailyBankTransactions.php:9 DebtorsAtPeriodEnd.php:138 #: DiscountCategories.php:12 DiscountCategories.php:122 DiscountMatrix.php:18 -#: EDIMessageFormat.php:106 FixedAssetList.php:8 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:232 +#: EDIMessageFormat.php:106 FixedAssetLocations.php:9 +#: FixedAssetRegister.php:13 FixedAssetRegister.php:236 #: FixedAssetTransfer.php:31 FormDesigner.php:132 GLBalanceSheet.php:351 #: GLBudgets.php:30 GLJournal.php:243 InventoryPlanning.php:369 #: InventoryPlanningPrefSupplier.php:474 Labels.php:117 Labels.php:273 @@ -191,14 +214,14 @@ #: PDFStockLocTransfer.php:21 PO_AuthorisationLevels.php:12 POReport.php:61 #: POReport.php:65 POReport.php:69 PO_SelectOSPurchOrder.php:136 #: PricesBasedOnMarkUp.php:11 Prices_Customer.php:45 Prices.php:32 -#: PurchData.php:141 PurchData.php:231 PurchData.php:250 -#: RecurringSalesOrders.php:307 SalesAnalReptCols.php:51 SalesAnalRepts.php:13 +#: PurchData.php:141 PurchData.php:256 PurchData.php:275 +#: RecurringSalesOrders.php:311 SalesAnalReptCols.php:51 SalesAnalRepts.php:13 #: SalesCategories.php:13 SalesGLPostings.php:18 SalesGraph.php:34 #: SalesPeople.php:22 SalesTypes.php:22 SelectAsset.php:44 #: SelectCompletedOrder.php:13 SelectContract.php:81 SelectCreditItems.php:204 #: SelectCreditItems.php:272 SelectCustomer.php:315 SelectGLAccount.php:19 -#: SelectGLAccount.php:79 SelectOrderItems.php:605 SelectOrderItems.php:1436 -#: SelectOrderItems.php:1556 SelectProduct.php:461 SelectSalesOrder.php:155 +#: SelectGLAccount.php:79 SelectOrderItems.php:605 SelectOrderItems.php:1430 +#: SelectOrderItems.php:1554 SelectProduct.php:456 SelectSalesOrder.php:155 #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:11 #: SelectWorkOrder.php:147 ShipmentCosting.php:13 Shipments.php:18 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:10 @@ -208,7 +231,7 @@ #: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:158 #: WorkOrderCosting.php:14 WorkOrderEntry.php:12 WorkOrderIssue.php:22 #: WorkOrderReceive.php:15 WorkOrderStatus.php:43 WWW_Access.php:13 -#: WWW_Users.php:38 Z_BottomUpCosts.php:51 Z_UpgradeDatabase.php:39 +#: WWW_Users.php:38 Z_BottomUpCosts.php:51 msgid "Search" msgstr "Vyhledávání" @@ -241,21 +264,21 @@ #: CompanyPreferences.php:451 CompanyPreferences.php:453 #: CompanyPreferences.php:463 CompanyPreferences.php:465 #: ContractCosting.php:174 CustLoginSetup.php:590 CustLoginSetup.php:592 -#: CustomerBranches.php:427 Customers.php:600 Customers.php:857 +#: CustomerBranches.php:420 Customers.php:600 Customers.php:857 #: Customers.php:864 Customers.php:867 DeliveryDetails.php:1034 #: DeliveryDetails.php:1074 DeliveryDetails.php:1077 GLTransInquiry.php:73 -#: Locations.php:345 MRPCalendar.php:222 MRP.php:530 MRP.php:534 MRP.php:538 +#: Locations.php:373 MRPCalendar.php:222 MRP.php:530 MRP.php:534 MRP.php:538 #: MRP.php:542 PaymentMethods.php:203 PaymentMethods.php:204 #: PaymentMethods.php:264 PaymentMethods.php:270 PDFChequeListing.php:63 #: PDFDeliveryDifferences.php:64 PDFDIFOT.php:67 #: PO_AuthorisationLevels.php:132 PO_AuthorisationLevels.php:137 -#: PO_Header.php:762 PO_PDFPurchOrder.php:367 PO_PDFPurchOrder.php:370 -#: PurchData.php:189 PurchData.php:469 PurchData.php:472 -#: RecurringSalesOrders.php:479 RecurringSalesOrders.php:482 +#: PO_Header.php:758 PO_PDFPurchOrder.php:342 PO_PDFPurchOrder.php:345 +#: PurchData.php:192 PurchData.php:494 PurchData.php:497 +#: RecurringSalesOrders.php:483 RecurringSalesOrders.php:486 #: SalesAnalReptCols.php:279 SalesAnalReptCols.php:401 #: SalesAnalReptCols.php:404 SalesAnalRepts.php:406 SalesAnalRepts.php:409 #: SalesAnalRepts.php:432 SalesAnalRepts.php:435 SalesAnalRepts.php:458 -#: SalesAnalRepts.php:461 SelectProduct.php:356 ShipmentCosting.php:622 +#: SalesAnalRepts.php:461 SelectProduct.php:351 ShipmentCosting.php:622 #: Stocks.php:867 Stocks.php:869 Stocks.php:887 Stocks.php:889 #: SuppContractChgs.php:83 SuppLoginSetup.php:511 SuppLoginSetup.php:513 #: SystemParameters.php:373 SystemParameters.php:405 SystemParameters.php:450 @@ -276,21 +299,21 @@ #: CompanyPreferences.php:450 CompanyPreferences.php:454 #: CompanyPreferences.php:462 CompanyPreferences.php:466 #: ContractCosting.php:172 CustLoginSetup.php:589 CustLoginSetup.php:593 -#: CustomerBranches.php:427 Customers.php:599 Customers.php:855 +#: CustomerBranches.php:420 Customers.php:599 Customers.php:855 #: Customers.php:863 Customers.php:866 DeliveryDetails.php:1035 #: DeliveryDetails.php:1075 DeliveryDetails.php:1078 GLTransInquiry.php:127 -#: Locations.php:347 MRPCalendar.php:224 MRP.php:528 MRP.php:532 MRP.php:536 +#: Locations.php:375 MRPCalendar.php:224 MRP.php:528 MRP.php:532 MRP.php:536 #: MRP.php:540 PaymentMethods.php:203 PaymentMethods.php:204 #: PaymentMethods.php:265 PaymentMethods.php:271 PDFChequeListing.php:62 #: PDFDeliveryDifferences.php:63 PDFDIFOT.php:66 #: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 -#: PO_Header.php:761 PO_PDFPurchOrder.php:368 PO_PDFPurchOrder.php:371 -#: PurchData.php:192 PurchData.php:470 PurchData.php:473 -#: RecurringSalesOrders.php:478 RecurringSalesOrders.php:481 +#: PO_Header.php:757 PO_PDFPurchOrder.php:343 PO_PDFPurchOrder.php:346 +#: PurchData.php:195 PurchData.php:495 PurchData.php:498 +#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 #: SalesAnalReptCols.php:277 SalesAnalReptCols.php:402 #: SalesAnalReptCols.php:405 SalesAnalRepts.php:405 SalesAnalRepts.php:408 #: SalesAnalRepts.php:431 SalesAnalRepts.php:434 SalesAnalRepts.php:457 -#: SalesAnalRepts.php:460 SelectProduct.php:358 ShipmentCosting.php:623 +#: SalesAnalRepts.php:460 SelectProduct.php:353 ShipmentCosting.php:623 #: Stocks.php:862 Stocks.php:864 Stocks.php:882 Stocks.php:884 #: SuppContractChgs.php:85 SuppLoginSetup.php:510 SuppLoginSetup.php:514 #: SystemParameters.php:374 SystemParameters.php:406 SystemParameters.php:451 @@ -309,15 +332,15 @@ #: AddCustomerNotes.php:125 AddCustomerTypeNotes.php:123 Areas.php:165 #: BankAccounts.php:226 BOMs.php:150 COGSGLPostings.php:113 #: COGSGLPostings.php:218 CreditStatus.php:175 Currencies.php:239 -#: CustLoginSetup.php:312 CustomerBranches.php:431 Customers.php:909 +#: CustLoginSetup.php:312 CustomerBranches.php:424 Customers.php:909 #: Customers.php:941 CustomerTypes.php:205 EDIMessageFormat.php:152 #: Factors.php:208 FixedAssetCategories.php:182 FixedAssetLocations.php:102 #: FreightCosts.php:243 GeocodeSetup.php:169 GLAccounts.php:319 GLTags.php:62 -#: Labels.php:414 Locations.php:354 MRPDemands.php:304 MRPDemandTypes.php:122 +#: Labels.php:414 Locations.php:382 MRPDemands.php:304 MRPDemandTypes.php:122 #: PaymentMethods.php:205 PaymentTerms.php:203 PcAssignCashToTab.php:251 #: PcClaimExpensesFromTab.php:229 PcExpenses.php:176 PcTabs.php:188 #: PcTypeTabs.php:171 PO_AuthorisationLevels.php:148 Prices_Customer.php:283 -#: Prices.php:227 PurchData.php:202 SalesCategories.php:263 +#: Prices.php:227 PurchData.php:207 SalesCategories.php:263 #: SalesGLPostings.php:135 SalesGLPostings.php:247 SalesPeople.php:210 #: SalesTypes.php:206 SelectCustomer.php:607 SelectCustomer.php:623 #: SelectCustomer.php:645 SelectCustomer.php:661 SelectCustomer.php:683 @@ -334,25 +357,25 @@ #: AddCustomerNotes.php:126 AddCustomerTypeNotes.php:124 Areas.php:166 #: BankAccounts.php:227 BOMs.php:152 COGSGLPostings.php:114 #: COGSGLPostings.php:219 ContractBOM.php:272 ContractOtherReqts.php:121 -#: CounterSales.php:743 Credit_Invoice.php:386 CreditStatus.php:176 +#: CounterSales.php:741 Credit_Invoice.php:386 CreditStatus.php:176 #: Currencies.php:242 CustLoginSetup.php:313 CustomerReceipt.php:866 #: Customers.php:942 CustomerTypes.php:206 DiscountCategories.php:204 #: DiscountMatrix.php:178 EDIMessageFormat.php:153 #: FixedAssetCategories.php:183 FreightCosts.php:244 GeocodeSetup.php:170 -#: GLAccounts.php:320 GLJournal.php:403 Labels.php:414 Locations.php:355 +#: GLAccounts.php:320 GLJournal.php:403 Labels.php:414 Locations.php:383 #: MRPDemands.php:305 MRPDemandTypes.php:123 PaymentMethods.php:206 #: Payments.php:961 PaymentTerms.php:204 PcAssignCashToTab.php:255 #: PcClaimExpensesFromTab.php:230 PcExpenses.php:177 PcExpensesTypeTab.php:161 #: PcTabs.php:189 PcTypeTabs.php:172 PO_AuthorisationLevels.php:150 -#: PO_Items.php:978 Prices_Customer.php:284 Prices.php:228 PurchData.php:203 +#: PO_Items.php:715 Prices_Customer.php:284 Prices.php:228 PurchData.php:208 #: SalesAnalReptCols.php:294 SalesAnalRepts.php:305 SalesCategories.php:264 #: SalesGLPostings.php:136 SalesGLPostings.php:248 SalesPeople.php:211 #: SalesTypes.php:207 SelectCreditItems.php:747 SelectCustomer.php:608 #: SelectCustomer.php:624 SelectCustomer.php:646 SelectCustomer.php:662 -#: SelectCustomer.php:684 SelectCustomer.php:700 SelectOrderItems.php:1363 +#: SelectCustomer.php:684 SelectCustomer.php:700 SelectOrderItems.php:1357 #: Shipments.php:424 Shippers.php:145 SpecialOrder.php:590 #: StockCategories.php:245 StockCategories.php:539 SuppContractChgs.php:91 -#: SuppCreditGRNs.php:93 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:135 +#: SuppCreditGRNs.php:93 SuppFixedAssetChgs.php:81 SuppInvGRNs.php:135 #: SupplierContacts.php:154 SupplierTypes.php:194 SuppLoginSetup.php:275 #: SuppShiptChgs.php:86 SuppTransGLAnalysis.php:111 TaxAuthorities.php:174 #: TaxCategories.php:185 TaxGroups.php:180 TaxProvinces.php:179 @@ -371,8 +394,12 @@ msgstr "Došlo k chybě při načítání účtové skupiny informací" #: AccountGroups.php:295 -msgid "The SQL that was used to retrieve the account group and that failed in the process was" -msgstr "SQL, který byl použit k načtení účtové skupiny, a že se nepodařilo v tomto procesu bylo" +msgid "" +"The SQL that was used to retrieve the account group and that failed in the " +"process was" +msgstr "" +"SQL, který byl použit k načtení účtové skupiny, a že se nepodařilo v tomto " +"procesu bylo" #: AccountGroups.php:298 msgid "The account group name does not exist in the database" @@ -402,7 +429,7 @@ #: DiscountMatrix.php:141 EDIMessageFormat.php:249 #: FixedAssetCategories.php:328 FixedAssetLocations.php:148 #: FreightCosts.php:342 GeocodeSetup.php:266 GLAccounts.php:269 -#: Locations.php:522 MRPDemands.php:402 MRPDemandTypes.php:182 +#: Locations.php:553 MRPDemands.php:402 MRPDemandTypes.php:182 #: OffersReceived.php:52 OffersReceived.php:128 PaymentMethods.php:276 #: PaymentTerms.php:282 PO_AuthorisationLevels.php:217 Prices_Customer.php:372 #: SalesAnalReptCols.php:510 SalesAnalRepts.php:496 SalesGLPostings.php:415 @@ -434,8 +461,12 @@ msgstr "Číslo sekce musí být celé kladné číslo" #: AccountSections.php:138 -msgid "Cannot delete this account section because general ledger accounts groups have been created using this section" -msgstr "Nelze smazat tento účet oddílu, protože účtů hlavní knihy skupiny byly vytvořeny pomocí této sekci" +msgid "" +"Cannot delete this account section because general ledger accounts groups " +"have been created using this section" +msgstr "" +"Nelze smazat tento účet oddílu, protože účtů hlavní knihy skupiny byly " +"vytvořeny pomocí této sekci" #: AccountSections.php:139 msgid "general ledger accounts groups that refer to this account section" @@ -503,9 +534,9 @@ #: AddCustomerTypeNotes.php:49 Areas.php:74 CustomerTypes.php:71 #: DeliveryDetails.php:748 Factors.php:117 FixedAssetItems.php:230 #: PcAssignCashToTab.php:73 PcClaimExpensesFromTab.php:61 PcExpenses.php:60 -#: PcTabs.php:60 PcTypeTabs.php:59 PO_Items.php:382 SalesAnalReptCols.php:129 +#: PcTabs.php:60 PcTypeTabs.php:59 PO_Items.php:369 SalesAnalReptCols.php:129 #: SalesPeople.php:94 SalesTypes.php:63 Stocks.php:355 Suppliers.php:514 -#: SupplierTypes.php:69 includes/UpgradeDB_mysql.inc:232 +#: SupplierTypes.php:69 msgid "has been updated" msgstr "byla aktualizována" @@ -518,7 +549,7 @@ msgstr "Kontakt záznam byl odstraněn" #: AddCustomerContacts.php:112 CompanyPreferences.php:229 -#: CustomerBranches.php:384 Customers.php:899 Customers.php:905 +#: CustomerBranches.php:377 Customers.php:899 Customers.php:905 #: Customers.php:971 SalesPeople.php:185 SelectCustomer.php:603 #: StockDispatch.php:186 StockDispatch.php:198 SupplierContacts.php:141 #: SupplierCredit.php:433 SupplierInvoice.php:407 SuppTransGLAnalysis.php:96 @@ -558,10 +589,10 @@ msgid "Contact Name" msgstr "Jméno kontaktní osoby" -#: AddCustomerContacts.php:196 Contracts.php:766 PDFRemittanceAdvice.php:247 -#: PO_Header.php:967 PO_Header.php:1037 SelectCreditItems.php:225 +#: AddCustomerContacts.php:196 Contracts.php:764 PDFRemittanceAdvice.php:247 +#: PO_Header.php:958 PO_Header.php:1028 SelectCreditItems.php:225 #: SelectCustomer.php:461 SelectOrderItems.php:638 -#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:113 +#: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:117 #: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" msgstr "Telefon" @@ -608,7 +639,7 @@ #: GLAccountReport.php:369 GLTransInquiry.php:45 MRPCalendar.php:217 #: PaymentAllocations.php:77 PcAssignCashToTab.php:212 #: PcAuthorizeExpenses.php:81 PDFRemittanceAdvice.php:308 -#: PrintCustTrans.php:678 PrintCustTransPortrait.php:860 ReverseGRN.php:378 +#: PrintCustTrans.php:616 PrintCustTransPortrait.php:794 ReverseGRN.php:378 #: ShipmentCosting.php:503 ShipmentCosting.php:574 Shipments.php:467 #: StockDispatch.php:188 StockDispatch.php:200 StockLocMovements.php:85 #: StockMovements.php:98 StockSerialItemResearch.php:79 @@ -616,15 +647,15 @@ #: SupplierAllocations.php:646 SupplierInquiry.php:195 #: SupplierTransInquiry.php:89 includes/PDFQuotationPageHeader.inc:91 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 -#: includes/PDFTransPageHeader.inc:80 +#: includes/PDFTransPageHeader.inc:84 #: includes/PDFTransPageHeaderPortrait.inc:58 msgid "Date" msgstr "Datum" #: AddCustomerNotes.php:107 AddCustomerTypeNotes.php:105 PcReportTab.php:176 -#: Stocks.php:871 UpgradeDatabase.php:105 UpgradeDatabase.php:109 -#: UpgradeDatabase.php:113 UpgradeDatabase.php:117 UpgradeDatabase.php:121 -#: UpgradeDatabase.php:125 UpgradeDatabase.php:129 Z_Upgrade_3.10-3.11.php:62 +#: Stocks.php:871 UpgradeDatabase.php:145 UpgradeDatabase.php:148 +#: UpgradeDatabase.php:151 UpgradeDatabase.php:154 UpgradeDatabase.php:157 +#: UpgradeDatabase.php:160 UpgradeDatabase.php:163 Z_Upgrade_3.10-3.11.php:62 #: Z_Upgrade_3.10-3.11.php:66 Z_Upgrade_3.10-3.11.php:70 #: Z_Upgrade_3.10-3.11.php:74 Z_Upgrade_3.10-3.11.php:78 #: Z_Upgrade_3.11-4.00.php:62 Z_Upgrade_3.11-4.00.php:66 @@ -726,7 +757,7 @@ #: PDFStockCheckComparison.php:61 PDFStockCheckComparison.php:262 #: ReorderLevel.php:59 SelectAsset.php:36 SelectProduct.php:37 #: StockCheck.php:65 StockCheck.php:139 SupplierTenders.php:325 -#: SuppPriceList.php:118 includes/PDFPaymentRun_PymtFooter.php:148 +#: SuppPriceList.php:118 includes/PDFPaymentRun_PymtFooter.php:149 msgid "Problem Report" msgstr "Problém" @@ -762,7 +793,7 @@ #: PDFLowGP.php:63 PDFLowGP.php:75 PDFPriceList.php:124 PDFQuotation.php:237 #: PDFRemittanceAdvice.php:84 PDFStockCheckComparison.php:39 #: PDFStockCheckComparison.php:65 PDFStockCheckComparison.php:266 -#: PDFTopItems.php:123 PO_PDFPurchOrder.php:21 PO_PDFPurchOrder.php:131 +#: PDFTopItems.php:123 PO_PDFPurchOrder.php:30 PO_PDFPurchOrder.php:142 #: PrintCustOrder_generic.php:182 PrintCustOrder.php:198 #: PrintSalesOrder_generic.php:183 ReorderLevel.php:62 ReorderLevel.php:151 #: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:25 StockCheck.php:47 @@ -775,11 +806,11 @@ #: Z_DataExport.php:309 Z_DataExport.php:348 Z_DataExport.php:384 #: Z_DataExport.php:420 Z_DataExport.php:472 Z_poRebuildDefault.php:38 #: includes/PDFPaymentRun_PymtFooter.php:57 -#: includes/PDFPaymentRun_PymtFooter.php:86 -#: includes/PDFPaymentRun_PymtFooter.php:115 -#: includes/PDFPaymentRun_PymtFooter.php:151 -#: includes/PDFPaymentRun_PymtFooter.php:182 -#: includes/PDFPaymentRun_PymtFooter.php:214 +#: includes/PDFPaymentRun_PymtFooter.php:87 +#: includes/PDFPaymentRun_PymtFooter.php:116 +#: includes/PDFPaymentRun_PymtFooter.php:152 +#: includes/PDFPaymentRun_PymtFooter.php:183 +#: includes/PDFPaymentRun_PymtFooter.php:215 #: includes/ConstructSQLForUserDefinedSalesReport.inc:180 #: includes/ConstructSQLForUserDefinedSalesReport.inc:188 #: includes/ConstructSQLForUserDefinedSalesReport.inc:340 @@ -791,22 +822,21 @@ msgstr "Podrobnosti o nesplacených transakcí pro zákazníka" #: AgedDebtors.php:367 AgedSuppliers.php:189 GLAccountCSV.php:169 -#: GLAccountInquiry.php:145 GLAccountReport.php:93 PO_Items.php:533 -#: PO_Items.php:564 PO_Items.php:642 PO_Items.php:805 -#: SalesAnalReptCols.php:356 SpecialOrder.php:369 -#: StockLocTransferReceive.php:373 StockQuantityByDate.php:106 -#: includes/SelectOrderItems_IntoCart.inc:53 +#: GLAccountInquiry.php:145 GLAccountReport.php:93 PO_Items.php:429 +#: PO_Items.php:558 PO_Items.php:585 SalesAnalReptCols.php:356 +#: SpecialOrder.php:369 StockLocTransferReceive.php:373 +#: StockQuantityByDate.php:106 includes/SelectOrderItems_IntoCart.inc:53 msgid "could not be retrieved because" msgstr "se nepodařilo získat, protože" #: AgedDebtors.php:370 AgedSuppliers.php:192 Areas.php:96 -#: ConfirmDispatch_Invoice.php:155 ConfirmDispatch_Invoice.php:962 -#: ConfirmDispatch_Invoice.php:976 Contracts.php:583 CounterSales.php:1282 -#: CounterSales.php:1296 Credit_Invoice.php:707 Credit_Invoice.php:729 +#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:963 +#: ConfirmDispatch_Invoice.php:977 Contracts.php:581 CounterSales.php:1281 +#: CounterSales.php:1295 Credit_Invoice.php:707 Credit_Invoice.php:729 #: CustomerReceipt.php:526 CustomerReceipt.php:658 CustomerReceipt.php:686 #: CustomerTransInquiry.php:79 DeliveryDetails.php:395 GLProfit_Loss.php:578 #: GLTagProfit_Loss.php:490 Payments.php:307 PDFRemittanceAdvice.php:86 -#: PurchData.php:89 PurchData.php:108 PurchData.php:219 ReverseGRN.php:191 +#: PurchData.php:89 PurchData.php:108 PurchData.php:244 ReverseGRN.php:191 #: ReverseGRN.php:205 ReverseGRN.php:366 SelectCreditItems.php:1383 #: StockCheck.php:224 StockCostUpdate.php:79 StockCostUpdate.php:89 #: StockLocStatus.php:142 StockMovements.php:92 StockQuantityByDate.php:82 @@ -815,13 +845,13 @@ #: SupplierInquiry.php:101 SupplierInquiry.php:131 SupplierInquiry.php:177 #: SupplierTransInquiry.php:81 SuppPaymentRun.php:111 SuppPaymentRun.php:186 #: SuppPaymentRun.php:216 WorkOrderCosting.php:393 WorkOrderReceive.php:272 -#: WOSerialNos.php:44 Z_ChangeBranchCode.php:108 Z_ChangeCustomerCode.php:90 +#: WOSerialNos.php:44 Z_ChangeBranchCode.php:108 Z_ChangeCustomerCode.php:92 #: Z_DeleteCreditNote.php:57 Z_DeleteInvoice.php:83 #: includes/PDFPaymentRun_PymtFooter.php:59 -#: includes/PDFPaymentRun_PymtFooter.php:88 -#: includes/PDFPaymentRun_PymtFooter.php:117 -#: includes/PDFPaymentRun_PymtFooter.php:153 -#: includes/PDFPaymentRun_PymtFooter.php:184 includes/ConnectDB_mysqli.inc:83 +#: includes/PDFPaymentRun_PymtFooter.php:89 +#: includes/PDFPaymentRun_PymtFooter.php:118 +#: includes/PDFPaymentRun_PymtFooter.php:154 +#: includes/PDFPaymentRun_PymtFooter.php:185 includes/ConnectDB_mysqli.inc:83 #: includes/ConnectDB_mysql.inc:65 msgid "The SQL that failed was" msgstr "SQL příkaz, který selhal, byl" @@ -886,8 +916,8 @@ #: MRPPlannedWorkOrders.php:344 MRPReschedules.php:166 MRPShortages.php:262 #: OutstandingGRNs.php:185 PDFCustomerList.php:412 PDFLowGP.php:168 #: PDFPriceList.php:301 PDFRemittanceAdvice.php:152 -#: PDFStockCheckComparison.php:379 PrintCustTrans.php:478 -#: PrintCustTransPortrait.php:630 ReorderLevel.php:229 StockDispatch.php:309 +#: PDFStockCheckComparison.php:379 PrintCustTrans.php:416 +#: PrintCustTransPortrait.php:564 ReorderLevel.php:229 StockDispatch.php:309 #: SupplierBalsAtPeriodEnd.php:155 SuppPriceList.php:237 Tax.php:352 msgid "Print PDF" msgstr "Tisknout PDF" @@ -974,8 +1004,7 @@ msgid "New area code" msgstr "Nové předčíslí" -#: Areas.php:88 includes/UpgradeDB_mysql.inc:31 -#: includes/UpgradeDB_mysql.inc:150 +#: Areas.php:88 msgid "has been inserted" msgstr "byl vložen" @@ -984,16 +1013,24 @@ msgstr "Tato oblast by neměla být přidány nebo aktualizovány, protože" #: Areas.php:116 -msgid "Cannot delete this area because customer branches have been created using this area" -msgstr "Nelze smazat tuto oblast, protože zákazník větve byly vytvořeny pomocí této oblasti" +msgid "" +"Cannot delete this area because customer branches have been created using " +"this area" +msgstr "" +"Nelze smazat tuto oblast, protože zákazník větve byly vytvořeny pomocí této " +"oblasti" #: Areas.php:117 msgid "branches using this area code" msgstr "poboček pomocí tohoto kódu oblasti" #: Areas.php:125 -msgid "Cannot delete this area because sal... [truncated message content] |
From: <dai...@us...> - 2011-02-04 22:50:27
|
Revision: 4481 http://web-erp.svn.sourceforge.net/web-erp/?rev=4481&view=rev Author: daintree Date: 2011-02-04 22:50:18 +0000 (Fri, 04 Feb 2011) Log Message: ----------- various Modified Paths: -------------- trunk/PDFTopItems.php trunk/SelectCustomer.php trunk/StockAdjustments.php trunk/StockAdjustmentsControlled.php trunk/StockCostUpdate.php trunk/TopItems.php trunk/WorkOrderEntry.php trunk/Z_MakeNewCompany.php trunk/doc/Change.log.html trunk/index.php trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po Modified: trunk/PDFTopItems.php =================================================================== --- trunk/PDFTopItems.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/PDFTopItems.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -10,6 +10,8 @@ $line_height = 12; include ('includes/PDFTopItemsHeader.inc'); $FontSize = 10; +$FromDate = FormatDateForSQL(DateAdd(Date($_SESSION['DefaultDateFormat']),'d', -$_POST['NumberOfDays'])); + //the situation if the location and customer type selected "All" if (($_GET["location"] == "All") and ($_GET["customers"] == "All")) { $SQL = "SELECT salesorderdetails.stkcode, @@ -21,7 +23,7 @@ WHERE salesorderdetails.orderno = salesorders.orderno AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) + AND salesorderdetails.ActualDispatchDate >='" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC LIMIT 0," . $_GET['NumberOfTopItems'] ; @@ -37,7 +39,7 @@ AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno AND debtorsmaster.typeid = '" . $_GET["customers"] . "' - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) + AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC LIMIT 0," . $_GET['NumberOfTopItems']; @@ -54,8 +56,8 @@ WHERE salesorderdetails.orderno = salesorders.orderno AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno - AND salesorders.fromstkloc = '" . $_GET["location"] . "' - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) + AND salesorders.fromstkloc = '" . $_GET['location'] . "' + AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC LIMIT 0," . $_GET['NumberOfTopItems']; @@ -71,9 +73,9 @@ WHERE salesorderdetails.orderno = salesorders.orderno AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno - AND salesorders.fromstkloc = '" . $_GET["location"] . "' - AND debtorsmaster.typeid = '" . $_GET["customers"] . "' - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) + AND salesorders.fromstkloc = '" . $_GET['location'] . "' + AND debtorsmaster.typeid = '" . $_GET['customers'] . "' + AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC LIMIT 0," . $_GET['NumberOfTopItems']; Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/SelectCustomer.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -90,29 +90,28 @@ if (isset($_POST['Search'])) { $_POST['PageOffset'] = 1; } - if ($_POST['Keywords'] AND (($_POST['CustCode']) OR ($_POST['CustPhone']) OR ($_POST['CustType']))) { - $msg = _('Search Result: Customer Name has been used in search') . '<br>'; + if (strlen($_POST['Keywords'])>0) { + $msg = _('Search Result: Customer Name has been used in search') . '<br />'; $_POST['Keywords'] = strtoupper($_POST['Keywords']); + } elseif (strlen($_POST['CustCode'])>0) { + $msg = _('Search Result: Customer Code has been used in search') . '<br />'; + } elseif (strlen($_POST['CustPhone'])>0) { + $msg = _('Search Result: Customer Phone has been used in search') . '<br />'; + }elseif (($_POST['CustAdd'])) { + $msg = _('Search Result: Customer Address has been used in search') . '<br />'; + } elseif (isset($_POST['CustType']) AND $_POST['CustType']!='ALL') { + $msg = _('Search Result: Customer Type has been used in search') . '<br />'; + } elseif (isset($_POST['Area']) AND $_POST['Area']!='ALL') { + $msg = _('Search Result: Customer branch area has been used in search') . '<br />'; } - if ($_POST['CustCode'] AND $_POST['CustPhone'] == "" AND isset($_POST['CustType']) AND $_POST['Keywords'] == "") { - $msg = _('Search Result: Customer Code has been used in search') . '<br>'; - } - if (($_POST['CustPhone']) AND ($_POST['CustType'])) { - $msg = _('Search Result: Customer Phone has been used in search') . '<br>'; - } - if (($_POST['CustAdd']) AND ($_POST['CustType'])) { - $msg = _('Search Result: Customer Address has been used in search') . '<br>'; - } - if ($_POST['CustType'] AND $_POST['CustPhone'] == "" AND $_POST['CustCode'] == "" AND $_POST['Keywords'] == "" AND $_POST['CustAdd'] == "") { - $msg = _('Search Result: Customer Type has been used in search') . '<br>'; - } - if (($_POST['Keywords'] == "") AND ($_POST['CustCode'] == "") AND ($_POST['CustPhone'] == "") AND ($_POST['CustType'] == "") AND ($_POST['Area'] == "")) { + if (($_POST['Keywords'] == '') AND ($_POST['CustCode'] == '') AND ($_POST['CustPhone'] == '') AND ($_POST['CustType'] == 'ALL') AND ($_POST['Area'] == 'ALL') AND ($_POST['CustAdd'] == '')) { + //no criteria set then default to all customers $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.branchcode, custbranch.brname, custbranch.contactname, @@ -124,15 +123,16 @@ WHERE debtorsmaster.typeid = debtortype.typeid"; } else { if (strlen($_POST['Keywords']) > 0) { + //using the customer name $_POST['Keywords'] = strtoupper(trim($_POST['Keywords'])); //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.branchcode, custbranch.brname, custbranch.contactname, @@ -148,9 +148,9 @@ $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.branchcode, custbranch.brname, custbranch.contactname, @@ -196,10 +196,13 @@ FROM debtorsmaster LEFT JOIN custbranch ON debtorsmaster.debtorno = custbranch.debtorno, debtortype WHERE debtorsmaster.address1 " . LIKE . " '%" . $_POST['CustAdd'] . "%' + OR debtorsmaster.address2 " . LIKE . " '%" . $_POST['CustAdd'] . "%' + OR debtorsmaster.address3 " . LIKE . " '%" . $_POST['CustAdd'] . "%' + OR debtorsmaster.address4 " . LIKE . " '%" . $_POST['CustAdd'] . "%' AND debtorsmaster.typeid = debtortype.typeid"; // End added search feature. Gilles Deacur - } elseif (strlen($_POST['CustType']) > 0) { + } elseif (strlen($_POST['CustType']) > 0 AND $_POST['CustType']!='ALL') { $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, @@ -216,7 +219,7 @@ ON debtorsmaster.debtorno = custbranch.debtorno, debtortype WHERE debtorsmaster.typeid LIKE debtortype.typeid AND debtortype.typename = '" . $_POST['CustType'] . "'"; - } elseif (strlen($_POST['Area']) > 0) { + } elseif (strlen($_POST['Area']) > 0 AND $_POST['Area']!='ALL') { $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, @@ -240,6 +243,8 @@ } $SQL.= ' ORDER BY debtorsmaster.name'; $ErrMsg = _('The searched customer records requested cannot be retrieved because'); + + $result = DB_query($SQL, $db, $ErrMsg); if (DB_num_rows($result) == 1) { $myrow = DB_fetch_array($result); @@ -247,15 +252,15 @@ unset($result); } elseif (DB_num_rows($result) == 0) { prnMsg(_('No customer records contain the selected text') . ' - ' . _('please alter your search criteria and try again'), 'info'); - echo '<br>'; + echo '<br />'; } } //end of if search if (!isset($_POST['Select'])) { $_POST['Select'] = ""; } $Debtor=explode(' ', $_POST['Select']); -if ($_POST['Select'] != "" or ($_SESSION['CustomerID'] != "" and !isset($_POST['Keywords']) and !isset($_POST['CustCode']) and !isset($_POST['CustType']) and !isset($_POST['CustPhone']))) { - if ($_POST['Select'] != "") { +if ($_POST['Select'] != '' OR ($_SESSION['CustomerID'] != '' AND !isset($_POST['Keywords']) AND !isset($_POST['CustCode']) AND !isset($_POST['CustType']) AND !isset($_POST['CustPhone']))) { + if ($_POST['Select'] != '') { $SQL = "SELECT brname, phoneno FROM custbranch WHERE debtorno='" . $Debtor[0] . "'"; $_SESSION['CustomerID'] = $Debtor[0]; } else { @@ -273,30 +278,30 @@ unset($result); // Adding customer encoding. Not needed for general use. This is not a recommended upgrade submission. Gilles Deacur echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName . ' - ' . $phone . _(' has been selected') . '</p>'; - echo '<div class="page_help_text">' . _('Select a menu option to operate using this customer') . '.</div><br>'; + echo '<div class="page_help_text">' . _('Select a menu option to operate using this customer') . '.</div><br />'; $_POST['Select'] = NULL; echo '<table cellpadding=4 width=90% class=selection><tr><th width=33%>' . _('Customer Inquiries') . '</th> <th width=33%>' . _('Customer Transactions') . '</th> <th width=33%>' . _('Customer Maintenance') . '</th></tr>'; echo '<tr><td valign=top class="select">'; /* Customer Inquiry Options */ - echo '<a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Transaction Inquiries') . '</a><br>'; - echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br>'; - echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br>'; - echo '<a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br>'; + echo '<a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Transaction Inquiries') . '</a><br />'; + echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br />'; + echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br />'; + echo '<a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br />'; wikiLink('Customer', $_SESSION['CustomerID']); echo '</td><td valign=top class="select">'; - echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br>'; - echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br>'; + echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br />'; + echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br />'; echo '</td><td valign=top class=select>'; - echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>'; - echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Modify Customer Details') . '</a><br>'; - echo '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add/Modify/Delete Customer Branches') . '</a><br>'; - echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Special Customer Prices') . '</a><br>'; - echo '<a href="' . $rootpath . '/CustEDISetup.php">' . _('Customer EDI Configuration') . '</a><br>'; + echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br />'; + echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Modify Customer Details') . '</a><br />'; + echo '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add/Modify/Delete Customer Branches') . '</a><br />'; + echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Special Customer Prices') . '</a><br />'; + echo '<a href="' . $rootpath . '/CustEDISetup.php">' . _('Customer EDI Configuration') . '</a><br />'; echo '<a href="' . $rootpath . '/CustLoginSetup.php">' . _('Customer Login Configuration') . '</a>'; echo '</td>'; - echo '</tr></table><br>'; + echo '</tr></table><br />'; } else { echo "<table width=90%><tr><th width=33%>" . _('Customer Inquiries') . "</th> <th width=33%>" . _('Customer Transactions') . "</th> @@ -305,13 +310,13 @@ echo '</td><td class="select">'; echo '</td><td class="select">'; if (!isset($_SESSION['SalesmanLogin']) or $_SESSION['SalesmanLogin'] == '') { - echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>'; + echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br />'; } echo '</td></tr></table>'; } echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo "<b><div class='centre'>" . $msg . "</div></b>"; +prnMsg($msg,'info'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Customers').'</p>'; echo "<table cellpadding=3 colspan=4 class=selection>"; echo "<tr><td colspan=2>" . _('Enter a partial Name') . ":</td><td>"; @@ -333,11 +338,6 @@ echo '<input type="Text" name="CustPhone" size=15 maxlength=18>'; } echo '</td>'; -/* Added an option to search by address. This will work okay if you select the CSV Format then you can search though the -* address1 field. I would like to extend this to all 4 address fields. This needs implementation into the warnings and -* other scripts in this page for full effect. I don't plan on doing this but hope somebody else can take over from here -* . Gilles Deacur -*/ echo '<td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Enter part of the Address') . ':</td><td>'; if (isset($_POST['CustAdd'])) { echo '<input type="Text" name="CustAdd" value="' . $_POST['CustAdd'] . '" size=20 maxlength=25>'; @@ -358,12 +358,12 @@ } else { // If OK show select box with option selected echo '<select name="CustType">'; - echo "<option value=''>" . _('Any'); + echo '<option value="ALL">' . _('Any') . '</option>'; while ($myrow = DB_fetch_array($result2)) { if ($_POST['CustType'] == $myrow['typename']) { - echo "<option selected value='" . $myrow['typename'] . "'>" . $myrow['typename']; + echo '<option selected value="' . $myrow['typename'] . '">' . $myrow['typename'] . '</option>'; } else { - echo "<option value='" . $myrow['typename'] . "'>" . $myrow['typename']; + echo '<option value="' . $myrow['typename'] . '">' . $myrow['typename'] . '</option>'; } } //end while loop DB_data_seek($result2, 0); @@ -380,9 +380,9 @@ } else { // if OK show select box with available options to choose echo '<select name="CustType">'; - echo "<option value=''>" . _('Any'); + echo '<option value="ALL">' . _('Any'). '</option>'; while ($myrow = DB_fetch_array($result2)) { - echo "<option value='" . $myrow['typename'] . "'>" . $myrow['typename']; + echo '<option value="' . $myrow['typename'] . '">' . $myrow['typename'] . '</option>'; } //end while loop DB_data_seek($result2, 0); echo '</select></td>'; @@ -400,19 +400,19 @@ } else { // if OK show select box with available options to choose echo '<select name="Area">'; - echo "<option value=''>" . _('Any'); + echo '<option value="ALL">' . _('Any') . '</option>'; while ($myrow = DB_fetch_array($result2)) { if (isset($_POST['Area']) and $_POST['Area']==$myrow['areacode']) { - echo "<option selected value='" . $myrow['areacode'] . "'>" . $myrow['areadescription']; + echo '<option selected value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } else { - echo "<option value='" . $myrow['areacode'] . "'>" . $myrow['areadescription']; + echo '<option value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } } //end while loop DB_data_seek($result2, 0); echo '</select></td></tr>'; } -echo "</td></tr></table><br />"; +echo '</td></tr></table><br />'; echo '<div class="centre"><input type=submit name="Search" value="' . _('Search Now') . '"><input type=submit name="CSV" value="' . _('CSV Format') . '"></div>'; if (isset($_SESSION['SalesmanLogin']) and $_SESSION['SalesmanLogin'] != '') { prnMsg(_('Your account enables you to see only customers allocated to you'), 'warn', _('Note: Sales-person Login')); @@ -451,7 +451,7 @@ <input type=submit name="Next" value="' . _('Next') . '">'; echo '</div>'; } - echo '<br><table cellpadding=2 colspan=7 class=selection>'; + echo '<br /><table cellpadding=2 colspan=7 class=selection>'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Customer Name') . '</th> @@ -469,7 +469,7 @@ if (DB_num_rows($result) <> 0) { if (isset($_POST['CSV'])) { $FileName = $_SESSION['reports_dir'] . '/Customer_Listing_' . Date('Y-m-d') . '.csv'; - echo '<br><p class="page_title_text"><a href="' . $FileName . '">' . _('Click to view the csv Search Result') . '</p>'; + echo '<br /><p class="page_title_text"><a href="' . $FileName . '">' . _('Click to view the csv Search Result') . '</p>'; $fp = fopen($FileName, 'w'); while ($myrow2 = DB_fetch_array($result)) { fwrite($fp, $myrow2['debtorno'] . ',' . str_replace(',', '', $myrow2['name']) . ',' . str_replace(',', '', $myrow2['address1']) . ',' . str_replace(',', '', $myrow2['address2']) . ',' . str_replace(',', '', $myrow2['address3']) . ',' . str_replace(',', '', $myrow2['address4']) . ',' . str_replace(',', '', $myrow2['contactname']) . ',' . str_replace(',', '', $myrow2['typename']) . ',' . $myrow2['phoneno'] . ',' . $myrow2['faxno'] . "\n"); @@ -532,7 +532,7 @@ // Only display the geocode map if the integration is turned on, and there is a latitude/longitude to display if (isset($_SESSION['CustomerID']) and $_SESSION['CustomerID'] != "") { if ($_SESSION['geocode_integration'] == 1) { - echo '<br>'; + echo '<br />'; if ($lat == 0) { echo '<div class="centre">' . _('Mapping is enabled, but no Mapping data to display for this Customer.') . '</div>'; } else { @@ -541,7 +541,7 @@ echo "<tr><th width=33%>" . _('Customer Mapping') . "</th></tr>"; echo '</td><td valign=TOp>'; /* Mapping */ echo '<div class="centre"' . _('Mapping is enabled, Map will display below.') . '</div>'; - echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br>'; + echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br />'; echo "</th></tr></table>"; } } @@ -558,7 +558,7 @@ $CustomerType = $myrow['typeid']; $CustomerTypeName = $myrow['typename']; // Customer Data - echo '<br>'; + echo '<br />'; // Select some basic data about the Customer $SQL = "SELECT debtorsmaster.clientsince, (TO_DAYS(date(now())) - TO_DAYS(date(debtorsmaster.clientsince))) as customersincedays, @@ -576,7 +576,7 @@ echo '<table width=45% colspan=2 cellpadding=4>'; echo "<tr><th width=33% colspan=3>" . _('Customer Data') . "</th></tr>"; echo '<tr><td valign=top class=select>'; /* Customer Data */ - //echo _('Distance to this customer:') . '<b>TBA</b><br>'; + //echo _('Distance to this customer:') . '<b>TBA</b><br />'; if ($myrow['lastpaiddate'] == 0) { echo _('No receipts from this customer.') . '</td><td class=select></td><td class=select></td></tr>'; } else { @@ -598,7 +598,7 @@ $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { echo '<table width=45%>'; - echo '<br><th colspan=7><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="">' . ' ' . _('Customer Contacts') . '</th>'; + echo '<br /><th colspan=7><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="">' . ' ' . _('Customer Contacts') . '</th>'; echo '<tr> <th>' . _('Name') . '</th> <th>' . _('Role') . '</th> @@ -627,7 +627,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; } } // Customer Notes @@ -635,7 +635,7 @@ $sql = 'SELECT * FROM custnotes where debtorno="' . $_SESSION['CustomerID'] . '" ORDER BY date DESC'; $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br />'; echo '<table width=45%>'; echo '<tr> <th>' . _('date') . '</th> @@ -665,7 +665,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; } } // Custome Type Notes @@ -673,7 +673,7 @@ $sql = 'SELECT * FROM debtortypenotes where typeid="' . $CustomerType . '" ORDER BY date DESC'; $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br />'; echo '<table width=45%>'; echo '<tr> <th>' . _('date') . '</th> @@ -703,7 +703,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br />'; } } } Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/StockAdjustments.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -26,10 +26,16 @@ if (isset($_GET['StockID'])){ $StockID = trim(strtoupper($_GET['StockID'])); $_SESSION['Adjustment']->StockID = trim(strtoupper($StockID)); - $_SESSION['Adjustment']->ItemDescription = trim(strtoupper($_GET['Description'])); - $result = DB_query("SELECT controlled FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); - $myrow = DB_fetch_row($result); - $_SESSION['Adjustment']->Controlled = $myrow[0]; + $result = DB_query("SELECT description, controlled, serialised, decimalplaces FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); + $myrow = DB_fetch_array($result); + $_SESSION['Adjustment']->ItemDescription = $myrow['description']; + $_SESSION['Adjustment']->Controlled = $myrow['controlled']; + $_SESSION['Adjustment']->Serialised = $myrow['serialised']; + $_SESSION['Adjustment']->DecimalPlaces = $myrow['decimalplaces']; + $_SESSION['Adjustment']->SerialItems = array(); + if (!isset($_SESSION['Adjustment']->Quantity)or !is_numeric($_SESSION['Adjustment']->Quantity)){ + $_SESSION['Adjustment']->Quantity=0; + } $NewAdjustment = true; } elseif (isset($_POST['StockID'])){ if(isset($_POST['StockID']) and $_POST['StockID'] != $_SESSION['Adjustment']->StockID){ @@ -357,7 +363,7 @@ } echo '</select></td></tr>'; -if (!isset($_SESSION['Adjustment']->Narrative)) { +if (isset($_SESSION['Adjustment']) and !isset($_SESSION['Adjustment']->Narrative)) { $_SESSION['Adjustment']->Narrative = ''; } @@ -368,14 +374,13 @@ echo '<td>'; if ($Controlled==1){ - if ($_SESSION['Adjustment']->StockLocation != ''){ - echo '<input type="HIDDEN" name="Quantity" Value="' . $_SESSION['Adjustment']->Quantity . '"> + if ($_SESSION['Adjustment']->StockLocation == ''){ + $_SESSION['Adjustment']->StockLocation = $_SESSION['UserStockLocation']; + } + echo '<input type="HIDDEN" name="Quantity" Value="' . $_SESSION['Adjustment']->Quantity . '"> '.$_SESSION['Adjustment']->Quantity.' [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=REMOVE&' . SID . '">'._('Remove').'</a>] [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=ADD&' . SID . '">'._('Add').'</a>]'; - } else { - prnMsg( _('Please select a location and press') . ' "' . _('Enter Stock Adjustment') . '" ' . _('below to enter Controlled Items'), 'info'); - } } else { echo '<input type=TEXT class="number" name="Quantity" size=12 maxlength=12 Value="' . $Quantity . '">'; } Modified: trunk/StockAdjustmentsControlled.php =================================================================== --- trunk/StockAdjustmentsControlled.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/StockAdjustmentsControlled.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -26,7 +26,7 @@ } /*Save some typing by referring to the line item class object in short form */ -$LineItem = &$_SESSION['Adjustment']; +$LineItem = $_SESSION['Adjustment']; //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/StockCostUpdate.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -4,7 +4,7 @@ //$PageSecurity = 9; /*viewing possible with inquiries but not mods */ -//$UpdateSecurity =10; +$UpdateSecurity =10; include('includes/session.inc'); $title = _('Stock Cost Update'); @@ -148,29 +148,29 @@ echo '<input type=hidden name="QOH" VALUE=' . $myrow['totalqoh'] .'>'; echo '<tr><td>' . _('Last Cost') .':</td><td class=number>' . number_format($myrow['lastcost'],2) . '</td></tr>'; -if (! in_array($UpdateSecurity,$_SESSION['AllowedPageSecurityTokens']) OR !isset($UpdateSecurity)){ +if (! in_array($UpdateSecurity,$_SESSION['AllowedPageSecurityTokens'])){ echo '<tr><td>' . _('Cost') . ':</td><td class=number>' . number_format($myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost'],2) . '</td></tr></table>'; } else { if ($myrow['mbflag']=='M'){ echo '<input type=hidden name="MaterialCost" VALUE=' . $myrow['materialcost'] . '>'; echo '<tr... [truncated message content] |
From: <dai...@us...> - 2011-02-04 22:50:28
|
Revision: 4481 http://web-erp.svn.sourceforge.net/web-erp/?rev=4481&view=rev Author: daintree Date: 2011-02-04 22:50:18 +0000 (Fri, 04 Feb 2011) Log Message: ----------- various Modified Paths: -------------- trunk/PDFTopItems.php trunk/SelectCustomer.php trunk/StockAdjustments.php trunk/StockAdjustmentsControlled.php trunk/StockCostUpdate.php trunk/TopItems.php trunk/WorkOrderEntry.php trunk/Z_MakeNewCompany.php trunk/doc/Change.log.html trunk/index.php trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po Modified: trunk/PDFTopItems.php =================================================================== --- trunk/PDFTopItems.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/PDFTopItems.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -10,6 +10,8 @@ $line_height = 12; include ('includes/PDFTopItemsHeader.inc'); $FontSize = 10; +$FromDate = FormatDateForSQL(DateAdd(Date($_SESSION['DefaultDateFormat']),'d', -$_POST['NumberOfDays'])); + //the situation if the location and customer type selected "All" if (($_GET["location"] == "All") and ($_GET["customers"] == "All")) { $SQL = "SELECT salesorderdetails.stkcode, @@ -21,7 +23,7 @@ WHERE salesorderdetails.orderno = salesorders.orderno AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) + AND salesorderdetails.ActualDispatchDate >='" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC LIMIT 0," . $_GET['NumberOfTopItems'] ; @@ -37,7 +39,7 @@ AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno AND debtorsmaster.typeid = '" . $_GET["customers"] . "' - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) + AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC LIMIT 0," . $_GET['NumberOfTopItems']; @@ -54,8 +56,8 @@ WHERE salesorderdetails.orderno = salesorders.orderno AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno - AND salesorders.fromstkloc = '" . $_GET["location"] . "' - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) + AND salesorders.fromstkloc = '" . $_GET['location'] . "' + AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC LIMIT 0," . $_GET['NumberOfTopItems']; @@ -71,9 +73,9 @@ WHERE salesorderdetails.orderno = salesorders.orderno AND salesorderdetails.stkcode = stockmaster.stockid AND salesorders.debtorno = debtorsmaster.debtorno - AND salesorders.fromstkloc = '" . $_GET["location"] . "' - AND debtorsmaster.typeid = '" . $_GET["customers"] . "' - AND salesorderdetails.ActualDispatchDate >= DATE_SUB(CURDATE(), INTERVAL " . $_GET["numberofdays"] . " DAY) + AND salesorders.fromstkloc = '" . $_GET['location'] . "' + AND debtorsmaster.typeid = '" . $_GET['customers'] . "' + AND salesorderdetails.ActualDispatchDate >= '" . $FromDate . "' GROUP BY salesorderdetails.stkcode ORDER BY '" . $_GET['order'] . "' DESC LIMIT 0," . $_GET['NumberOfTopItems']; Modified: trunk/SelectCustomer.php =================================================================== --- trunk/SelectCustomer.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/SelectCustomer.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -90,29 +90,28 @@ if (isset($_POST['Search'])) { $_POST['PageOffset'] = 1; } - if ($_POST['Keywords'] AND (($_POST['CustCode']) OR ($_POST['CustPhone']) OR ($_POST['CustType']))) { - $msg = _('Search Result: Customer Name has been used in search') . '<br>'; + if (strlen($_POST['Keywords'])>0) { + $msg = _('Search Result: Customer Name has been used in search') . '<br />'; $_POST['Keywords'] = strtoupper($_POST['Keywords']); + } elseif (strlen($_POST['CustCode'])>0) { + $msg = _('Search Result: Customer Code has been used in search') . '<br />'; + } elseif (strlen($_POST['CustPhone'])>0) { + $msg = _('Search Result: Customer Phone has been used in search') . '<br />'; + }elseif (($_POST['CustAdd'])) { + $msg = _('Search Result: Customer Address has been used in search') . '<br />'; + } elseif (isset($_POST['CustType']) AND $_POST['CustType']!='ALL') { + $msg = _('Search Result: Customer Type has been used in search') . '<br />'; + } elseif (isset($_POST['Area']) AND $_POST['Area']!='ALL') { + $msg = _('Search Result: Customer branch area has been used in search') . '<br />'; } - if ($_POST['CustCode'] AND $_POST['CustPhone'] == "" AND isset($_POST['CustType']) AND $_POST['Keywords'] == "") { - $msg = _('Search Result: Customer Code has been used in search') . '<br>'; - } - if (($_POST['CustPhone']) AND ($_POST['CustType'])) { - $msg = _('Search Result: Customer Phone has been used in search') . '<br>'; - } - if (($_POST['CustAdd']) AND ($_POST['CustType'])) { - $msg = _('Search Result: Customer Address has been used in search') . '<br>'; - } - if ($_POST['CustType'] AND $_POST['CustPhone'] == "" AND $_POST['CustCode'] == "" AND $_POST['Keywords'] == "" AND $_POST['CustAdd'] == "") { - $msg = _('Search Result: Customer Type has been used in search') . '<br>'; - } - if (($_POST['Keywords'] == "") AND ($_POST['CustCode'] == "") AND ($_POST['CustPhone'] == "") AND ($_POST['CustType'] == "") AND ($_POST['Area'] == "")) { + if (($_POST['Keywords'] == '') AND ($_POST['CustCode'] == '') AND ($_POST['CustPhone'] == '') AND ($_POST['CustType'] == 'ALL') AND ($_POST['Area'] == 'ALL') AND ($_POST['CustAdd'] == '')) { + //no criteria set then default to all customers $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.branchcode, custbranch.brname, custbranch.contactname, @@ -124,15 +123,16 @@ WHERE debtorsmaster.typeid = debtortype.typeid"; } else { if (strlen($_POST['Keywords']) > 0) { + //using the customer name $_POST['Keywords'] = strtoupper(trim($_POST['Keywords'])); //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.branchcode, custbranch.brname, custbranch.contactname, @@ -148,9 +148,9 @@ $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, - debtorsmaster.address2, - debtorsmaster.address3, - debtorsmaster.address4, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, custbranch.branchcode, custbranch.brname, custbranch.contactname, @@ -196,10 +196,13 @@ FROM debtorsmaster LEFT JOIN custbranch ON debtorsmaster.debtorno = custbranch.debtorno, debtortype WHERE debtorsmaster.address1 " . LIKE . " '%" . $_POST['CustAdd'] . "%' + OR debtorsmaster.address2 " . LIKE . " '%" . $_POST['CustAdd'] . "%' + OR debtorsmaster.address3 " . LIKE . " '%" . $_POST['CustAdd'] . "%' + OR debtorsmaster.address4 " . LIKE . " '%" . $_POST['CustAdd'] . "%' AND debtorsmaster.typeid = debtortype.typeid"; // End added search feature. Gilles Deacur - } elseif (strlen($_POST['CustType']) > 0) { + } elseif (strlen($_POST['CustType']) > 0 AND $_POST['CustType']!='ALL') { $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, @@ -216,7 +219,7 @@ ON debtorsmaster.debtorno = custbranch.debtorno, debtortype WHERE debtorsmaster.typeid LIKE debtortype.typeid AND debtortype.typename = '" . $_POST['CustType'] . "'"; - } elseif (strlen($_POST['Area']) > 0) { + } elseif (strlen($_POST['Area']) > 0 AND $_POST['Area']!='ALL') { $SQL = "SELECT debtorsmaster.debtorno, debtorsmaster.name, debtorsmaster.address1, @@ -240,6 +243,8 @@ } $SQL.= ' ORDER BY debtorsmaster.name'; $ErrMsg = _('The searched customer records requested cannot be retrieved because'); + + $result = DB_query($SQL, $db, $ErrMsg); if (DB_num_rows($result) == 1) { $myrow = DB_fetch_array($result); @@ -247,15 +252,15 @@ unset($result); } elseif (DB_num_rows($result) == 0) { prnMsg(_('No customer records contain the selected text') . ' - ' . _('please alter your search criteria and try again'), 'info'); - echo '<br>'; + echo '<br />'; } } //end of if search if (!isset($_POST['Select'])) { $_POST['Select'] = ""; } $Debtor=explode(' ', $_POST['Select']); -if ($_POST['Select'] != "" or ($_SESSION['CustomerID'] != "" and !isset($_POST['Keywords']) and !isset($_POST['CustCode']) and !isset($_POST['CustType']) and !isset($_POST['CustPhone']))) { - if ($_POST['Select'] != "") { +if ($_POST['Select'] != '' OR ($_SESSION['CustomerID'] != '' AND !isset($_POST['Keywords']) AND !isset($_POST['CustCode']) AND !isset($_POST['CustType']) AND !isset($_POST['CustPhone']))) { + if ($_POST['Select'] != '') { $SQL = "SELECT brname, phoneno FROM custbranch WHERE debtorno='" . $Debtor[0] . "'"; $_SESSION['CustomerID'] = $Debtor[0]; } else { @@ -273,30 +278,30 @@ unset($result); // Adding customer encoding. Not needed for general use. This is not a recommended upgrade submission. Gilles Deacur echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer') . ' : ' . $_SESSION['CustomerID'] . ' - ' . $CustomerName . ' - ' . $phone . _(' has been selected') . '</p>'; - echo '<div class="page_help_text">' . _('Select a menu option to operate using this customer') . '.</div><br>'; + echo '<div class="page_help_text">' . _('Select a menu option to operate using this customer') . '.</div><br />'; $_POST['Select'] = NULL; echo '<table cellpadding=4 width=90% class=selection><tr><th width=33%>' . _('Customer Inquiries') . '</th> <th width=33%>' . _('Customer Transactions') . '</th> <th width=33%>' . _('Customer Maintenance') . '</th></tr>'; echo '<tr><td valign=top class="select">'; /* Customer Inquiry Options */ - echo '<a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Transaction Inquiries') . '</a><br>'; - echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br>'; - echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br>'; - echo '<a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br>'; + echo '<a href="' . $rootpath . '/CustomerInquiry.php?CustomerID=' . $_SESSION['CustomerID'] . '">' . _('Customer Transaction Inquiries') . '</a><br />'; + echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '&Modify=No">' . _('View Customer Details') . '</a><br />'; + echo '<a href="' . $rootpath . '/PrintCustStatements.php?FromCust=' . $_SESSION['CustomerID'] . '&ToCust=' . $_SESSION['CustomerID'] . '&PrintPDF=Yes">' . _('Print Customer Statement') . '</a><br />'; + echo '<a href="' . $rootpath . '/SelectCompletedOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Order Inquiries') . '</a><br />'; wikiLink('Customer', $_SESSION['CustomerID']); echo '</td><td valign=top class="select">'; - echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br>'; - echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br>'; + echo '<a href="' . $rootpath . '/SelectSalesOrder.php?SelectedCustomer=' . $_SESSION['CustomerID'] . '">' . _('Modify Outstanding Sales Orders') . '</a><br />'; + echo '<a href="' . $rootpath . '/CustomerAllocations.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Allocate Receipts or Credit Notes') . '</a><br />'; echo '</td><td valign=top class=select>'; - echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>'; - echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Modify Customer Details') . '</a><br>'; - echo '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add/Modify/Delete Customer Branches') . '</a><br>'; - echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Special Customer Prices') . '</a><br>'; - echo '<a href="' . $rootpath . '/CustEDISetup.php">' . _('Customer EDI Configuration') . '</a><br>'; + echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br />'; + echo '<a href="' . $rootpath . '/Customers.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Modify Customer Details') . '</a><br />'; + echo '<a href="' . $rootpath . '/CustomerBranches.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . _('Add/Modify/Delete Customer Branches') . '</a><br />'; + echo '<a href="' . $rootpath . '/SelectProduct.php">' . _('Special Customer Prices') . '</a><br />'; + echo '<a href="' . $rootpath . '/CustEDISetup.php">' . _('Customer EDI Configuration') . '</a><br />'; echo '<a href="' . $rootpath . '/CustLoginSetup.php">' . _('Customer Login Configuration') . '</a>'; echo '</td>'; - echo '</tr></table><br>'; + echo '</tr></table><br />'; } else { echo "<table width=90%><tr><th width=33%>" . _('Customer Inquiries') . "</th> <th width=33%>" . _('Customer Transactions') . "</th> @@ -305,13 +310,13 @@ echo '</td><td class="select">'; echo '</td><td class="select">'; if (!isset($_SESSION['SalesmanLogin']) or $_SESSION['SalesmanLogin'] == '') { - echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br>'; + echo '<a href="' . $rootpath . '/Customers.php?">' . _('Add a New Customer') . '</a><br />'; } echo '</td></tr></table>'; } echo '<form action="' . $_SERVER['PHP_SELF'] . '?' . SID . '" method=post>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; -echo "<b><div class='centre'>" . $msg . "</div></b>"; +prnMsg($msg,'info'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . _('Search for Customers').'</p>'; echo "<table cellpadding=3 colspan=4 class=selection>"; echo "<tr><td colspan=2>" . _('Enter a partial Name') . ":</td><td>"; @@ -333,11 +338,6 @@ echo '<input type="Text" name="CustPhone" size=15 maxlength=18>'; } echo '</td>'; -/* Added an option to search by address. This will work okay if you select the CSV Format then you can search though the -* address1 field. I would like to extend this to all 4 address fields. This needs implementation into the warnings and -* other scripts in this page for full effect. I don't plan on doing this but hope somebody else can take over from here -* . Gilles Deacur -*/ echo '<td><font size=3><b>' . _('OR') . '</b></font></td><td>' . _('Enter part of the Address') . ':</td><td>'; if (isset($_POST['CustAdd'])) { echo '<input type="Text" name="CustAdd" value="' . $_POST['CustAdd'] . '" size=20 maxlength=25>'; @@ -358,12 +358,12 @@ } else { // If OK show select box with option selected echo '<select name="CustType">'; - echo "<option value=''>" . _('Any'); + echo '<option value="ALL">' . _('Any') . '</option>'; while ($myrow = DB_fetch_array($result2)) { if ($_POST['CustType'] == $myrow['typename']) { - echo "<option selected value='" . $myrow['typename'] . "'>" . $myrow['typename']; + echo '<option selected value="' . $myrow['typename'] . '">' . $myrow['typename'] . '</option>'; } else { - echo "<option value='" . $myrow['typename'] . "'>" . $myrow['typename']; + echo '<option value="' . $myrow['typename'] . '">' . $myrow['typename'] . '</option>'; } } //end while loop DB_data_seek($result2, 0); @@ -380,9 +380,9 @@ } else { // if OK show select box with available options to choose echo '<select name="CustType">'; - echo "<option value=''>" . _('Any'); + echo '<option value="ALL">' . _('Any'). '</option>'; while ($myrow = DB_fetch_array($result2)) { - echo "<option value='" . $myrow['typename'] . "'>" . $myrow['typename']; + echo '<option value="' . $myrow['typename'] . '">' . $myrow['typename'] . '</option>'; } //end while loop DB_data_seek($result2, 0); echo '</select></td>'; @@ -400,19 +400,19 @@ } else { // if OK show select box with available options to choose echo '<select name="Area">'; - echo "<option value=''>" . _('Any'); + echo '<option value="ALL">' . _('Any') . '</option>'; while ($myrow = DB_fetch_array($result2)) { if (isset($_POST['Area']) and $_POST['Area']==$myrow['areacode']) { - echo "<option selected value='" . $myrow['areacode'] . "'>" . $myrow['areadescription']; + echo '<option selected value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } else { - echo "<option value='" . $myrow['areacode'] . "'>" . $myrow['areadescription']; + echo '<option value="' . $myrow['areacode'] . '">' . $myrow['areadescription'] . '</option>'; } } //end while loop DB_data_seek($result2, 0); echo '</select></td></tr>'; } -echo "</td></tr></table><br />"; +echo '</td></tr></table><br />'; echo '<div class="centre"><input type=submit name="Search" value="' . _('Search Now') . '"><input type=submit name="CSV" value="' . _('CSV Format') . '"></div>'; if (isset($_SESSION['SalesmanLogin']) and $_SESSION['SalesmanLogin'] != '') { prnMsg(_('Your account enables you to see only customers allocated to you'), 'warn', _('Note: Sales-person Login')); @@ -451,7 +451,7 @@ <input type=submit name="Next" value="' . _('Next') . '">'; echo '</div>'; } - echo '<br><table cellpadding=2 colspan=7 class=selection>'; + echo '<br /><table cellpadding=2 colspan=7 class=selection>'; $TableHeader = '<tr> <th>' . _('Code') . '</th> <th>' . _('Customer Name') . '</th> @@ -469,7 +469,7 @@ if (DB_num_rows($result) <> 0) { if (isset($_POST['CSV'])) { $FileName = $_SESSION['reports_dir'] . '/Customer_Listing_' . Date('Y-m-d') . '.csv'; - echo '<br><p class="page_title_text"><a href="' . $FileName . '">' . _('Click to view the csv Search Result') . '</p>'; + echo '<br /><p class="page_title_text"><a href="' . $FileName . '">' . _('Click to view the csv Search Result') . '</p>'; $fp = fopen($FileName, 'w'); while ($myrow2 = DB_fetch_array($result)) { fwrite($fp, $myrow2['debtorno'] . ',' . str_replace(',', '', $myrow2['name']) . ',' . str_replace(',', '', $myrow2['address1']) . ',' . str_replace(',', '', $myrow2['address2']) . ',' . str_replace(',', '', $myrow2['address3']) . ',' . str_replace(',', '', $myrow2['address4']) . ',' . str_replace(',', '', $myrow2['contactname']) . ',' . str_replace(',', '', $myrow2['typename']) . ',' . $myrow2['phoneno'] . ',' . $myrow2['faxno'] . "\n"); @@ -532,7 +532,7 @@ // Only display the geocode map if the integration is turned on, and there is a latitude/longitude to display if (isset($_SESSION['CustomerID']) and $_SESSION['CustomerID'] != "") { if ($_SESSION['geocode_integration'] == 1) { - echo '<br>'; + echo '<br />'; if ($lat == 0) { echo '<div class="centre">' . _('Mapping is enabled, but no Mapping data to display for this Customer.') . '</div>'; } else { @@ -541,7 +541,7 @@ echo "<tr><th width=33%>" . _('Customer Mapping') . "</th></tr>"; echo '</td><td valign=TOp>'; /* Mapping */ echo '<div class="centre"' . _('Mapping is enabled, Map will display below.') . '</div>'; - echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br>'; + echo '<div align="center" id="map" style="width: ' . $map_width . 'px; height: ' . $map_height . 'px"></div><br />'; echo "</th></tr></table>"; } } @@ -558,7 +558,7 @@ $CustomerType = $myrow['typeid']; $CustomerTypeName = $myrow['typename']; // Customer Data - echo '<br>'; + echo '<br />'; // Select some basic data about the Customer $SQL = "SELECT debtorsmaster.clientsince, (TO_DAYS(date(now())) - TO_DAYS(date(debtorsmaster.clientsince))) as customersincedays, @@ -576,7 +576,7 @@ echo '<table width=45% colspan=2 cellpadding=4>'; echo "<tr><th width=33% colspan=3>" . _('Customer Data') . "</th></tr>"; echo '<tr><td valign=top class=select>'; /* Customer Data */ - //echo _('Distance to this customer:') . '<b>TBA</b><br>'; + //echo _('Distance to this customer:') . '<b>TBA</b><br />'; if ($myrow['lastpaiddate'] == 0) { echo _('No receipts from this customer.') . '</td><td class=select></td><td class=select></td></tr>'; } else { @@ -598,7 +598,7 @@ $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { echo '<table width=45%>'; - echo '<br><th colspan=7><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="">' . ' ' . _('Customer Contacts') . '</th>'; + echo '<br /><th colspan=7><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt="">' . ' ' . _('Customer Contacts') . '</th>'; echo '<tr> <th>' . _('Name') . '</th> <th>' . _('Role') . '</th> @@ -627,7 +627,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/group_add.png" title="' . _('Customer Contacts') . '" alt=""><a href="AddCustomerContacts.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Contact') . '</a></div>'; } } // Customer Notes @@ -635,7 +635,7 @@ $sql = 'SELECT * FROM custnotes where debtorno="' . $_SESSION['CustomerID'] . '" ORDER BY date DESC'; $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt="">' . ' ' . _('Customer Notes') . '</div><br />'; echo '<table width=45%>'; echo '<tr> <th>' . _('date') . '</th> @@ -665,7 +665,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/note_add.png" title="' . _('Customer Notes') . '" alt=""><a href="AddCustomerNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Note for this Customer') . '</a></div>'; } } // Custome Type Notes @@ -673,7 +673,7 @@ $sql = 'SELECT * FROM debtortypenotes where typeid="' . $CustomerType . '" ORDER BY date DESC'; $result = DB_query($sql, $db); if (DB_num_rows($result) <> 0) { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Type (Group) Notes') . '" alt="">' . ' ' . _('Customer Type (Group) Notes for:' . '<b> ' . $CustomerTypeName . '</b>') . '</div><br />'; echo '<table width=45%>'; echo '<tr> <th>' . _('date') . '</th> @@ -703,7 +703,7 @@ echo '</table>'; } else { if ($_SESSION['CustomerID'] != "") { - echo '<br><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br>'; + echo '<br /><div class="centre"><img src="' . $rootpath . '/css/' . $theme . '/images/folder_add.png" title="' . _('Customer Group Notes') . '" alt=""><a href="AddCustomerTypeNotes.php?DebtorNo=' . $_SESSION['CustomerID'] . '">' . ' ' . _('Add New Group Note') . '</a></div><br />'; } } } Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/StockAdjustments.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -26,10 +26,16 @@ if (isset($_GET['StockID'])){ $StockID = trim(strtoupper($_GET['StockID'])); $_SESSION['Adjustment']->StockID = trim(strtoupper($StockID)); - $_SESSION['Adjustment']->ItemDescription = trim(strtoupper($_GET['Description'])); - $result = DB_query("SELECT controlled FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); - $myrow = DB_fetch_row($result); - $_SESSION['Adjustment']->Controlled = $myrow[0]; + $result = DB_query("SELECT description, controlled, serialised, decimalplaces FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); + $myrow = DB_fetch_array($result); + $_SESSION['Adjustment']->ItemDescription = $myrow['description']; + $_SESSION['Adjustment']->Controlled = $myrow['controlled']; + $_SESSION['Adjustment']->Serialised = $myrow['serialised']; + $_SESSION['Adjustment']->DecimalPlaces = $myrow['decimalplaces']; + $_SESSION['Adjustment']->SerialItems = array(); + if (!isset($_SESSION['Adjustment']->Quantity)or !is_numeric($_SESSION['Adjustment']->Quantity)){ + $_SESSION['Adjustment']->Quantity=0; + } $NewAdjustment = true; } elseif (isset($_POST['StockID'])){ if(isset($_POST['StockID']) and $_POST['StockID'] != $_SESSION['Adjustment']->StockID){ @@ -357,7 +363,7 @@ } echo '</select></td></tr>'; -if (!isset($_SESSION['Adjustment']->Narrative)) { +if (isset($_SESSION['Adjustment']) and !isset($_SESSION['Adjustment']->Narrative)) { $_SESSION['Adjustment']->Narrative = ''; } @@ -368,14 +374,13 @@ echo '<td>'; if ($Controlled==1){ - if ($_SESSION['Adjustment']->StockLocation != ''){ - echo '<input type="HIDDEN" name="Quantity" Value="' . $_SESSION['Adjustment']->Quantity . '"> + if ($_SESSION['Adjustment']->StockLocation == ''){ + $_SESSION['Adjustment']->StockLocation = $_SESSION['UserStockLocation']; + } + echo '<input type="HIDDEN" name="Quantity" Value="' . $_SESSION['Adjustment']->Quantity . '"> '.$_SESSION['Adjustment']->Quantity.' [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=REMOVE&' . SID . '">'._('Remove').'</a>] [<a href="'.$rootpath.'/StockAdjustmentsControlled.php?AdjType=ADD&' . SID . '">'._('Add').'</a>]'; - } else { - prnMsg( _('Please select a location and press') . ' "' . _('Enter Stock Adjustment') . '" ' . _('below to enter Controlled Items'), 'info'); - } } else { echo '<input type=TEXT class="number" name="Quantity" size=12 maxlength=12 Value="' . $Quantity . '">'; } Modified: trunk/StockAdjustmentsControlled.php =================================================================== --- trunk/StockAdjustmentsControlled.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/StockAdjustmentsControlled.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -26,7 +26,7 @@ } /*Save some typing by referring to the line item class object in short form */ -$LineItem = &$_SESSION['Adjustment']; +$LineItem = $_SESSION['Adjustment']; //Make sure this item is really controlled if ( $LineItem->Controlled != 1 ){ Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2011-02-02 07:52:17 UTC (rev 4480) +++ trunk/StockCostUpdate.php 2011-02-04 22:50:18 UTC (rev 4481) @@ -4,7 +4,7 @@ //$PageSecurity = 9; /*viewing possible with inquiries but not mods */ -//$UpdateSecurity =10; +$UpdateSecurity =10; include('includes/session.inc'); $title = _('Stock Cost Update'); @@ -148,29 +148,29 @@ echo '<input type=hidden name="QOH" VALUE=' . $myrow['totalqoh'] .'>'; echo '<tr><td>' . _('Last Cost') .':</td><td class=number>' . number_format($myrow['lastcost'],2) . '</td></tr>'; -if (! in_array($UpdateSecurity,$_SESSION['AllowedPageSecurityTokens']) OR !isset($UpdateSecurity)){ +if (! in_array($UpdateSecurity,$_SESSION['AllowedPageSecurityTokens'])){ echo '<tr><td>' . _('Cost') . ':</td><td class=number>' . number_format($myrow['materialcost']+$myrow['labourcost']+$myrow['overheadcost'],2) . '</td></tr></table>'; } else { if ($myrow['mbflag']=='M'){ echo '<input type=hidden name="MaterialCost" VALUE=' . $myrow['materialcost'] . '>'; echo '<tr... [truncated message content] |
From: <dai...@us...> - 2011-02-06 04:29:40
|
Revision: 4482 http://web-erp.svn.sourceforge.net/web-erp/?rev=4482&view=rev Author: daintree Date: 2011-02-06 04:29:33 +0000 (Sun, 06 Feb 2011) Log Message: ----------- PO stuff Modified Paths: -------------- trunk/PDFGrn.php trunk/PO_Items.php trunk/SystemParameters.php trunk/UpgradeDatabase.php trunk/doc/Change.log.html trunk/includes/ConnectDB.inc trunk/includes/DateFunctions.inc trunk/includes/DefinePOClass.php trunk/includes/PDFGrnHeader.inc trunk/sql/mysql/upgrade3.11.1-4.00.sql Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/PDFGrn.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -4,7 +4,6 @@ //$PageSecurity = 2; Now comes from DB - read in from session include('includes/session.inc'); -include('includes/DefinePOClass.php'); if (isset($_GET['GRNNo'])) { $GRNNo=$_GET['GRNNo']; @@ -12,11 +11,7 @@ $GRNNo=''; } -if ($GRNNo=='Preview') { - $FormDesign = simplexml_load_file(sys_get_temp_dir().'/GoodsReceived.xml'); -} else { - $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/GoodsReceived.xml'); -} +$FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/GoodsReceived.xml'); // Set the paper size/orintation $PaperSize = $FormDesign->PaperSize; @@ -25,84 +20,83 @@ include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Goods Received Note') ); -if ($GRNNo=='Preview') { - $ListCount = 1; -} else { - $sql="SELECT grns.itemcode, - grns.grnno, - grns.deliverydate, - grns.itemdescription, - grns.qtyrecd, - grns.supplierid, - grns.podetailitem - FROM grns - WHERE grnbatch='".$GRNNo."'"; - $GRNResult=DB_query($sql, $db); - $NoOfGRNs = DB_num_rows($GRNResult); - if ($NoOfGRNs>0){ - $_GET['ModifyOrderNumber'] = (int)$_GET['PONo']; - $identifier=date('U'); - include('includes/PO_ReadInOrder.inc'); //Read the PO in - include('includes/PDFGrnHeader.inc'); - } -} -$i=1; -$YPos=$FormDesign->Data->y; -while ($i<=$NoOfGRNs) { - if ($GRNNo=='Preview') { - $StockID=str_pad('',10,'x'); - $Date='1/1/1900'; - $Description=str_pad('',30,'x'); - $SuppliersQuantity='XXXXX.XX'; - $OurUnitsQuantity='XXXXX.XX'; - $Supplier=str_pad('',25,'x'); - $Units = str_pad('',10,'x'); - $SupplierUnits =str_pad('',10,'x'); - } else { - $myrow = DB_fetch_array($GRNResult); - $LineNo = $_SESSION['PO'.$identifier]->GetLineNoFromPODetailItem($myrow['podetailitem']); - echo '<br />The podetailitem is ' . $myrow['podetailitem'] . '<br />Got the line number it is: ' . $LineNo; - $StockID=$myrow['itemcode']; - $GRNNo=$myrow['grnno']; - $Date=ConvertSQLDate($myrow['deliverydate']); - $Description=$myrow['itemdescription']; - $SuppliersQuantity=number_format($myrow['qtyrecd']/$_SESSION['PO' . $identifier]->LineItems[$LineNo]->ConversionFactor,$_SESSION['PO' . $identifier]->LineItems[$LineNo]->DecimalPlaces); - $OurUnitsQuantity=number_format($myrow['qtyrecd'],$_SESSION['PO' . $identifier]->LineItems[$LineNo]->DecimalPlaces); - $SupplierID=$myrow['supplierid']; - $Units = $_SESSION['PO' . $identifier]->LineItems[$LineNo]->Units; - $SuppliersUnit = $_SESSION['PO' . $identifier]->LineItems[$LineNo]->SuppliersUnit; - $Supplier = $_SESSION['PO' . $identifier]->SupplierName; - } - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $StockID); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $Description); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $Date); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, $SuppliersQuantity, 'right'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $SuppliersUnit, 'left'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, $OurUnitsQuantity, 'right'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column7->x,$Page_Height-$YPos,$FormDesign->Data->Column7->Length,$FormDesign->Data->Column7->FontSize, $Units, 'left'); - $YPos += $line_height; - $i++; - if ($YPos >= $FormDesign->LineAboveFooter->starty){ - /* We reached the end of the page so finsih off the page and start a newy */ - $PageNumber++; - $YPos=$FormDesign->Data->y; - include ('includes/PDFGrnHeader.inc'); - } //end if need a new page headed up -} +$sql="SELECT grns.itemcode, + grns.grnno, + grns.deliverydate, + grns.itemdescription, + grns.qtyrecd, + grns.supplierid, + purchorderdetails.suppliersunit, + purchorderdetails.conversionfactor, + stockmaster.units, + stockmaster.decimalplaces + FROM grns INNER JOIN purchorderdetails + ON grns.podetailitem=purchorderdetails.podetailitem + LEFT JOIN stockmaster + ON grns.itemcode=stockmaster.stockid + WHERE grnbatch='".$GRNNo."'"; -$LeftOvers = $pdf->addText($FormDesign->ReceiptDate->x,$Page_Height-$FormDesign->ReceiptDate->y,$FormDesign->ReceiptDate->FontSize, _('Date of Receipt: ').$Date); +$GRNResult=DB_query($sql, $db); -$LeftOvers = $pdf->addText($FormDesign->SignedFor->x,$Page_Height-$FormDesign->SignedFor->y,$FormDesign->SignedFor->FontSize, _('Signed for ').'______________________'); +if(DB_num_rows($GRNResult)>0) { //there are GRNs to print + + $sql = "SELECT suppliers.suppname, + suppliers.address1, + suppliers.address2 , + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6 + FROM grns INNER JOIN suppliers + ON grns.supplierid=suppliers.supplierid + WHERE grnbatch='".$GRNNo."'"; + $SuppResult = DB_query($sql,$db,_('Could not get the supplier of the selected GRN')); + $SuppRow = DB_fetch_array($SuppResult); + + include ('includes/PDFGrnHeader.inc'); //head up the page + + $YPos=$FormDesign->Data->y; + while ($myrow = DB_fetch_array($GRNResult)) { -if ($NoOfGRNs == 0) { - $title = _('GRN Error'); + if (is_numeric($myrow['decimalplaces'])){ + $DecimalPlaces=$myrow['decimalplaces']; + } else { + $DecimalPlaces=2; + } + if (is_numeric($myrow['conversionfactor']) AND $myrow['conversionfactor'] !=0){ + $SuppliersQuantity=number_format($myrow['qtyrecd']/$myrow['conversionfactor'],$DecimalPlaces); + } else { + $SuppliersQuantity=number_format($myrow['qtyrecd'],$DecimalPlaces); + } + $OurUnitsQuantity=number_format($myrow['qtyrecd'],$DecimalPlaces); + $DeliveryDate = ConvertSQLDate($myrow['deliverydate']); + + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $myrow['itemcode']); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $myrow['itemdescription']); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $DeliveryDate); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, $SuppliersQuantity, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $myrow['suppliersunit'], 'left'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, $OurUnitsQuantity, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column7->x,$Page_Height-$YPos,$FormDesign->Data->Column7->Length,$FormDesign->Data->Column7->FontSize, $myrow['units'], 'left'); + $YPos += $line_height; + + if ($YPos >= $FormDesign->LineAboveFooter->starty){ + /* We reached the end of the page so finsih off the page and start a newy */ + $PageNumber++; + $YPos=$FormDesign->Data->y; + include ('includes/PDFGrnHeader.inc'); + } //end if need a new page headed up + } //end of loop around GRNs to print + + $LeftOvers = $pdf->addText($FormDesign->ReceiptDate->x,$Page_Height-$FormDesign->ReceiptDate->y,$FormDesign->ReceiptDate->FontSize, _('Date of Receipt: ') . $DeliveryDate); + $LeftOvers = $pdf->addText($FormDesign->SignedFor->x,$Page_Height-$FormDesign->SignedFor->y,$FormDesign->SignedFor->FontSize, _('Signed for ').'______________________'); + $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN + $pdf->__destruct(); //UldisN +} else { //there were not GRNs to print + $title = _('GRN Error'); include('includes/header.inc'); prnMsg(_('There were no GRNs to print'),'warn'); echo '<br><a href="'.$rootpath.'/index.php?' . SID . '">'. _('Back to the menu').'</a>'; include('includes/footer.inc'); - exit; -} else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN - $pdf->__destruct(); //UldisN } ?> \ No newline at end of file Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/PO_Items.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -20,7 +20,7 @@ */ if (!isset($_SESSION['PO'.$identifier])){ - header('Location:' . $rootpath . '/PO_Header.php?' . SID); + header('Location:' . $rootpath . '/PO_Header.php'); exit; } //end if (!isset($_SESSION['PO'.$identifier])) @@ -29,7 +29,7 @@ $Maximum_Number_Of_Parts_To_Show=50; if (!isset($_POST['Commit'])) { - echo '<a href="'.$rootpath.'/PO_Header.php?' . SID . 'identifier=' . $identifier. '">' ._('Back To Purchase Order Header') . '</a><br />'; + echo '<a href="'.$rootpath.'/PO_Header.php?identifier=' . $identifier. '">' ._('Back To Purchase Order Header') . '</a><br />'; } if (isset($_POST['UpdateLines']) OR isset($_POST['Commit'])) { @@ -80,11 +80,52 @@ $result = DB_Txn_Begin($db); + /*figure out what status to set the order to */ + if (IsEmailAddress($_SESSION['UserEmail'])){ + $UserDetails = ' <a href="mailto:' . $_SESSION['UserEmail'] . '">' . $_SESSION['UsersRealName']. '</a>'; + } else { + $UserDetails = ' ' . $_SESSION['UsersRealName'] . ' '; + } + if ($_SESSION['AutoAuthorisePO']==1) { //if the user has authority to authorise the PO then it will automatically be authorised + $AuthSQL ="SELECT authlevel + FROM purchorderauth + WHERE userid='".$_SESSION['UserID']."' + AND currabrev='".$_SESSION['PO'.$identifier]->CurrCode."'"; + + $AuthResult=DB_query($AuthSQL,$db); + $AuthRow=DB_fetch_array($AuthResult); + + if (DB_num_rows($AuthResult) > 0 AND $AuthRow['authlevel'] > $_SESSION['PO'.$identifier]->Order_Value()) { //user has authority to authrorise as well as create the order + $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . $UserDetails . ' - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; + $_SESSION['PO'.$identifier]->AllowPrintPO=1; + $_SESSION['PO'.$identifier]->Status = 'Authorised'; + } else { // no authority to authorise this order + if (DB_num_rows($AuthResult) ==0){ + $AuthMessage = _('Your authority to approve purchase orders in') . ' ' . $_SESSION['PO'.$identifier]->CurrCode . ' ' . _('has not yet been set up') . '<br />'; + } else { + $AuthMessage = _('You can only authorise up to').' '.$_SESSION['PO'.$identifier]->CurrCode.' '.$AuthorityLevel.'.<br />'; + } + + prnMsg( _('You do not have permission to authorise this purchase order').'.<br />'. _('This order is for').' '. + $_SESSION['PO'.$identifier]->CurrCode . ' '. $_SESSION['PO'.$identifier]->Order_Value() .'. '. + $AuthMessage . + _('If you think this is a mistake please contact the systems administrator') . '<br />'. + _('The order will be created with a status of pending and will require authorisation'), 'warn'); + + $_SESSION['PO'.$identifier]->AllowPrintPO=0; + $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . $UserDetails . ' - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; + $_SESSION['PO'.$identifier]->Status = 'Pending'; + } + } else { //auto authorise is set to off + $_SESSION['PO'.$identifier]->AllowPrintPO=0; + $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . $UserDetails . ' - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; + $_SESSION['PO'.$identifier]->Status = 'Pending'; + } + if ($_SESSION['ExistingOrder']==0){ /*its a new order to be inserted */ //Do we need to check authorisation to create - no because already trapped when new PO session started - $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . ' <a href="mailto:'. $_SESSION['UserEmail'] .'">' . $_SESSION['PO'.$identifier]->Initiator . '</a> - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; - + /*Get the order number */ $_SESSION['PO'.$identifier]->OrderNo = GetNextTransNo(18, $db); @@ -119,7 +160,8 @@ status, stat_comment, deliverydate, - paymentterms) + paymentterms, + allowprint) VALUES( '" . $_SESSION['PO'.$identifier]->OrderNo . "', '" . $_SESSION['PO'.$identifier]->SupplierID . "', '" . $_SESSION['PO'.$identifier]->Comments . "', @@ -147,10 +189,11 @@ '" . $_SESSION['PO'.$identifier]->Version . "', '" . Date('Y-m-d') . "', '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', - 'Pending', + '" . $_SESSION['PO'.$identifier]->Status . "', '" . $StatusComment . "', '" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', - '" . $_SESSION['PO'.$identifier]->PaymentTerms. "' + '" . $_SESSION['PO'.$identifier]->PaymentTerms. "', + '" . $_SESSION['PO'.$identifier]->AllowPrintPO . "' )"; $ErrMsg = _('The purchase order header record could not be inserted into the database because'); @@ -245,7 +288,7 @@ contact='" . $_SESSION['PO'.$identifier]->Contact . "', paymentterms='" . $_SESSION['PO'.$identifier]->PaymentTerms . "', allowprint='" . $_SESSION['PO'.$identifier]->AllowPrintPO . "', - status = 'Pending' + status = '" . $_SESSION['PO'.$identifier]->Status . "' WHERE orderno = '" . $_SESSION['PO'.$identifier]->OrderNo ."'"; $ErrMsg = _('The purchase order could not be updated because'); @@ -474,7 +517,7 @@ } if ($AllowUpdate == true){ - + //adding the non-stock item $_SESSION['PO'.$identifier]->add_to_order ($_SESSION['PO'.$identifier]->LinesOnOrder+1, '', 0, /*Serialised */ @@ -482,35 +525,35 @@ $_POST['Qty'], $_POST['ItemDescription'], $_POST['Price'], - $_POST['uom'], + $_POST['SuppliersUnit'], $_POST['GLCode'], $_POST['ReqDelDate'], - $_POST['ShiptRef'], + '', 0, - $_POST['JobRef'], + '', 0, 0, $GLAccountName, - $_POST['DecimalPlaces'], - $_POST['ItemNo'], - $_POST['SuppliersUOM'], - $_POST['ConversionFactor'], - $_POST['LeadTime'], - $_POST['Suppliers_PartNo'], - $_POST['SubTotal_Amount'], - $_POST['Package'], - $_POST['PcUnit'], - $_POST['NetWeight'], - $_POST['KGs'], - $_POST['CuFt'], - $_POST['Total_Quantity'], - $_POST['Total_Amount'], + 2, + '', + $_POST['SuppliersUnit'], + 1, + '', + '', + ($_POST['Qty']*$_POST['Price']), + '', + '', + '', + '', + '', + $_POST['Qty'], + ($_POST['Qty']*$_POST['Price']), $_POST['AssetID']); include ('includes/PO_UnsetFormVbls.php'); } } - /*end if Enter line button was hit */ + /*end if Enter line button was hit - adding non stock items */ if (isset($_POST['NewItem'])){ @@ -759,9 +802,11 @@ echo'</select><a href="FixedAssetItems.php" target=_blank>'. _('New Fixed Asset') . '</a></td> <tr><td>'._('Quantity to purchase').'</td> - <td><input type="text" class="number" name="Qty" size=10></td></tr> + <td><input type="text" class="number" name="Qty" size="10" value="1"></td></tr> <tr><td>'._('Price per item').'</td> - <td><input type="text" class="number" name="Price" size=10></td></tr> + <td><input type="text" class="number" name="Price" size="10"></td></tr> + <tr><td>'._('Unit').'</td> + <td><input type="text" name="SuppliersUnit" size="10" value="' . _('each') . '"></td></tr> <tr><td>'._('Delivery Date').'</td> <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ReqDelDate" size=11 value="'.$_SESSION['PO'.$identifier]->DeliveryDate .'"></td></tr>'; echo '</table>'; Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/SystemParameters.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -282,6 +282,9 @@ if ($_SESSION['FrequentlyOrderedItems'] != $_POST['X_FrequentlyOrderedItems']){ $sql[] = "UPDATE config SET confvalue='" . $_POST['X_FrequentlyOrderedItems'] . "' WHERE confname='FrequentlyOrderedItems'"; } + if ($_SESSION['AutoAuthorisePO'] != $_POST['X_AutoAuthorisePO']){ + $sql[] = "UPDATE config SET confvalue='" . $_POST['X_AutoAuthorisePO'] . "' WHERE confname='AutoAuthorisePO'"; + } $ErrMsg = _('The system configuration could not be updated because'); if (sizeof($sql) > 1 ) { $result = DB_Txn_Begin($db); @@ -390,6 +393,13 @@ <td><input type="Text" class="number" Name="X_FrequentlyOrderedItems" value="' . $_SESSION['FrequentlyOrderedItems'] . '" size=3 maxlength=2></td> <td>' . _('To show the most frequently ordered items enter the number of frequently ordered items you wish to display from 1 to 99. If you do not wish to display the frequently ordered item list enter 0.') . '</td></tr>'; +// SO_AllowSameItemMultipleTimes +echo '<tr style="outline: 1px solid"><td>' . _('Sales Order Allows Same Item Multiple Times') . ':</td> + <td><select Name="X_SO_AllowSameItemMultipleTimes"> + <option '.($_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes').' + <option '.(!$_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No').' + </select></td><td> </td></tr>'; + //'AllowOrderLineItemNarrative' echo '<tr style="outline: 1px solid"><td>' . _('Order Entry allows Line Item Narrative') . ':</td> <td><select Name="X_AllowOrderLineItemNarrative"> @@ -444,16 +454,6 @@ <td>' . _('Customer branches can be set by default not to print packing slips with the company logo and address. This is useful for companies that ship to customers customers and to show the source of the shipment would be inappropriate. There is an option on the setup of customer branches to ship blind, this setting is the default applied to all new customer branches') . '</td> </tr>'; -//Show values on GRN -echo '<tr style="outline: 1px solid"><td>' . _('Show order values on GRN') . ':</td> - <td><select Name="X_ShowValueOnGRN"> - <option '.($_SESSION['ShowValueOnGRN']?'selected ':'').'value="1">'._('Yes').' - <option '.(!$_SESSION['ShowValueOnGRN']?'selected ':'').'value="0">'._('No').' - </select></td> - <td>' . _('Should the value of the purchased stock be shown on the GRN screen') . '</td> - </tr>'; - - // DispatchCutOffTime echo '<tr style="outline: 1px solid"><td>' . _('Dispatch Cut-Off Time') . ':</td> <td><select Name="X_DispatchCutOffTime">'; @@ -583,6 +583,15 @@ echo '<option '.($_SESSION['NumberOfPeriodsOfStockUsage'] == $i?'selected ':'').'value="'.$i.'">'.$i; echo '</select></td><td>' . _('In stock usage inquiries this determines how many periods of stock usage to show. An average is calculated over this many periods') .'</td></tr>'; +//Show values on GRN +echo '<tr style="outline: 1px solid"><td>' . _('Show order values on GRN') . ':</td> + <td><select Name="X_ShowValueOnGRN"> + <option '.($_SESSION['ShowValueOnGRN']?'selected ':'').'value="1">'._('Yes').' + <option '.(!$_SESSION['ShowValueOnGRN']?'selected ':'').'value="0">'._('No').' + </select></td> + <td>' . _('Should the value of the purchased stock be shown on the GRN screen') . '</td> + </tr>'; + // Check_Qty_Charged_vs_Del_Qty echo '<tr style="outline: 1px solid"><td>' . _('Check Quantity Charged vs Deliver Qty') . ':</td> <td><select Name="X_Check_Qty_Charged_vs_Del_Qty"> @@ -612,17 +621,18 @@ // PO_AllowSameItemMultipleTimes echo '<tr style="outline: 1px solid"><td>' . _('Purchase Order Allows Same Item Multiple Times') . ':</td> <td><select Name="X_PO_AllowSameItemMultipleTimes"> - <option '.($_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes').' - <option '.(!$_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No').' + <option '.($_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes') . '</option> + <option '.(!$_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No') . '</option> </select></td> <td></td></tr>'; -// SO_AllowSameItemMultipleTimes -echo '<tr style="outline: 1px solid"><td>' . _('Sales Order Allows Same Item Multiple Times') . ':</td> - <td><select Name="X_SO_AllowSameItemMultipleTimes"> - <option '.($_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes').' - <option '.(!$_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No').' - </select></td><td> </td></tr>'; +// AutoAuthorisePO +echo '<tr style="outline: 1px solid"><td>' . _('Automatically authorise purchase orders if user has authority') . ':</td> + <td><select Name="X_AutoAuthorisePO"> + <option '.($_SESSION['AutoAuthorisePO'] ?'selected ':'').'value="1">'._('Yes').' + <option '.(!$_SESSION['AutoAuthorisePO'] ?'selected ':'').'value="0">'._('No').' + </select></td>' . _('If the user changing an existing purchase order or adding a new puchase order is set up to authorise purchase orders and the order is within their limit, then the purchase order status is automatically set to authorised') . '<td></td></tr>'; + echo '<tr><th colspan=3>' . _('General Settings') . '</th></tr>'; echo $TableHeader; Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/UpgradeDatabase.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -1,6 +1,8 @@ <?php -/* $Id: $*/ -$PageSecurity = 15; +/* $Id UpgradeDatabase.php 4183 2010-12-14 09:30:20Z daintree $ */ + +$PageSecurity = 15; //hard coded in case database is old and PageSecurity stuff cannot be retrieved + include('includes/session.inc'); $title = _('Upgrade webERP Database'); include('includes/header.inc'); @@ -144,6 +146,9 @@ case 1050: echo '<td bgcolor="yellow">'._('Note').' - '. _('Table has already been created').'</td></tr>'; break; + case 1054: + echo '<td bgcolor="yellow">'._('Note').' - '. _('Column has already been changed').'</td></tr>'; + break; case 1060: echo '<td bgcolor="yellow">'._('Note').' - '. _('Column has already been created').'</td></tr>'; break; @@ -166,7 +171,7 @@ echo '<td bgcolor="red">'._('Failure').' - '. _('Error number').' - '.DB_error_no($db) .' ' . DB_error_msg($db) . '</td></tr>'; break; } - unset($sql); + $sql=''; } } //end if its a valid sql line not a comment } //end of for loop around the lines of the sql script Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/doc/Change.log.html 2011-02-06 04:29:33 UTC (rev 4482) @@ -1,5 +1,10 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>5/2/11: Phil: SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> +<p>5/2/11: Phil: PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> +<p>5/2/11: PDFGrn.php rewrote - preview never used - confused logic fixed<p> +<p>4/2/11: Tim CostUpdate.php </p> +<p>4/2/11: Phil SelectCustomer.php rejig selection options in more logical way. Used non-specific SQL to search by any part of the address</p> <p>2/2/11: Phil PDFTopItems.php and TopItems.php removed mysql specific SQL</p> <p>30/1/11: Phil GoodsReceived.php rework for supplier units and conversion factor etc now in PO class</p> <p>30/1/11: Phil PDFGrn.php rework for supplier units and conversion factor etc now in PO class</p> Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/includes/ConnectDB.inc 2011-02-06 04:29:33 UTC (rev 4482) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='3.12.31'; //must update manually every time there is a DB change +$Version='3.12.32'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/includes/DateFunctions.inc 2011-02-06 04:29:33 UTC (rev 4482) @@ -160,6 +160,22 @@ $Date_Array = explode('-',$DateEntry); } elseif (strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); + } else { + prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error'); + switch ($_SESSION['DefaultDateFormat']) { + case 'd/m/Y': + return '0/0/000'; + break; + case 'd.m.Y': + return '0.0.000'; + break; + case 'm/d/Y': + return '0/0/0000'; + break; + case 'Y/m/d': + return '0000/0/0'; + break; + } } if (strlen($Date_Array[2])>4) { /*chop off the time stuff */ Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/includes/DefinePOClass.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -226,15 +226,6 @@ return 0; //nowt received } - function GetLineNoFromPODetailItem($PODetailItem){ - foreach ($this->LineItems as $OrderedItems) { - if ($OrderedItems->PODetailRec ==$PODetailItem){ - return $OrderedItems->LineNo; - } - } - return false; //PODetailItem not on the order - } - } /* end of class defintion */ Class LineDetails { Modified: trunk/includes/PDFGrnHeader.inc =================================================================== --- trunk/includes/PDFGrnHeader.inc 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/includes/PDFGrnHeader.inc 2011-02-06 04:29:33 UTC (rev 4482) @@ -5,30 +5,15 @@ $pdf->newPage(); } -$sql="SELECT suppliers.supplierid, - suppname, - address1, - address2 , - address3, - address4, - address5, - address6 - FROM suppliers - LEFT JOIN grns - ON grns.supplierid=suppliers.supplierid - WHERE grnbatch='".$GRNNo."'"; -$supplierresult=DB_query($sql, $db); -$supplierrow=DB_fetch_array($supplierresult); - $pdf->addJpegFromFile($_SESSION['LogoFile'] ,$FormDesign->logo->x,$Page_Height-$FormDesign->logo->y,$FormDesign->logo->width,$FormDesign->logo->height); -$LeftOvers = $pdf->addText($FormDesign->SupplierName->x,$Page_Height-$FormDesign->SupplierName->y,$FormDesign->SupplierName->FontSize,$supplierrow['suppname']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress1->x,$Page_Height-$FormDesign->SupplierAddress1->y,$FormDesign->SupplierAddress1->FontSize,$supplierrow['address1']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress2->x,$Page_Height-$FormDesign->SupplierAddress2->y,$FormDesign->SupplierAddress2->FontSize,$supplierrow['address2']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress3->x,$Page_Height-$FormDesign->SupplierAddress3->y,$FormDesign->SupplierAddress3->FontSize,$supplierrow['address3']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress4->x,$Page_Height-$FormDesign->SupplierAddress4->y,$FormDesign->SupplierAddress4->FontSize,$supplierrow['address4']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress5->x,$Page_Height-$FormDesign->SupplierAddress5->y,$FormDesign->SupplierAddress5->FontSize,$su... [truncated message content] |
From: <dai...@us...> - 2011-02-06 04:29:40
|
Revision: 4482 http://web-erp.svn.sourceforge.net/web-erp/?rev=4482&view=rev Author: daintree Date: 2011-02-06 04:29:33 +0000 (Sun, 06 Feb 2011) Log Message: ----------- PO stuff Modified Paths: -------------- trunk/PDFGrn.php trunk/PO_Items.php trunk/SystemParameters.php trunk/UpgradeDatabase.php trunk/doc/Change.log.html trunk/includes/ConnectDB.inc trunk/includes/DateFunctions.inc trunk/includes/DefinePOClass.php trunk/includes/PDFGrnHeader.inc trunk/sql/mysql/upgrade3.11.1-4.00.sql Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/PDFGrn.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -4,7 +4,6 @@ //$PageSecurity = 2; Now comes from DB - read in from session include('includes/session.inc'); -include('includes/DefinePOClass.php'); if (isset($_GET['GRNNo'])) { $GRNNo=$_GET['GRNNo']; @@ -12,11 +11,7 @@ $GRNNo=''; } -if ($GRNNo=='Preview') { - $FormDesign = simplexml_load_file(sys_get_temp_dir().'/GoodsReceived.xml'); -} else { - $FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/GoodsReceived.xml'); -} +$FormDesign = simplexml_load_file($PathPrefix.'companies/'.$_SESSION['DatabaseName'].'/FormDesigns/GoodsReceived.xml'); // Set the paper size/orintation $PaperSize = $FormDesign->PaperSize; @@ -25,84 +20,83 @@ include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Goods Received Note') ); -if ($GRNNo=='Preview') { - $ListCount = 1; -} else { - $sql="SELECT grns.itemcode, - grns.grnno, - grns.deliverydate, - grns.itemdescription, - grns.qtyrecd, - grns.supplierid, - grns.podetailitem - FROM grns - WHERE grnbatch='".$GRNNo."'"; - $GRNResult=DB_query($sql, $db); - $NoOfGRNs = DB_num_rows($GRNResult); - if ($NoOfGRNs>0){ - $_GET['ModifyOrderNumber'] = (int)$_GET['PONo']; - $identifier=date('U'); - include('includes/PO_ReadInOrder.inc'); //Read the PO in - include('includes/PDFGrnHeader.inc'); - } -} -$i=1; -$YPos=$FormDesign->Data->y; -while ($i<=$NoOfGRNs) { - if ($GRNNo=='Preview') { - $StockID=str_pad('',10,'x'); - $Date='1/1/1900'; - $Description=str_pad('',30,'x'); - $SuppliersQuantity='XXXXX.XX'; - $OurUnitsQuantity='XXXXX.XX'; - $Supplier=str_pad('',25,'x'); - $Units = str_pad('',10,'x'); - $SupplierUnits =str_pad('',10,'x'); - } else { - $myrow = DB_fetch_array($GRNResult); - $LineNo = $_SESSION['PO'.$identifier]->GetLineNoFromPODetailItem($myrow['podetailitem']); - echo '<br />The podetailitem is ' . $myrow['podetailitem'] . '<br />Got the line number it is: ' . $LineNo; - $StockID=$myrow['itemcode']; - $GRNNo=$myrow['grnno']; - $Date=ConvertSQLDate($myrow['deliverydate']); - $Description=$myrow['itemdescription']; - $SuppliersQuantity=number_format($myrow['qtyrecd']/$_SESSION['PO' . $identifier]->LineItems[$LineNo]->ConversionFactor,$_SESSION['PO' . $identifier]->LineItems[$LineNo]->DecimalPlaces); - $OurUnitsQuantity=number_format($myrow['qtyrecd'],$_SESSION['PO' . $identifier]->LineItems[$LineNo]->DecimalPlaces); - $SupplierID=$myrow['supplierid']; - $Units = $_SESSION['PO' . $identifier]->LineItems[$LineNo]->Units; - $SuppliersUnit = $_SESSION['PO' . $identifier]->LineItems[$LineNo]->SuppliersUnit; - $Supplier = $_SESSION['PO' . $identifier]->SupplierName; - } - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $StockID); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $Description); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $Date); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, $SuppliersQuantity, 'right'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $SuppliersUnit, 'left'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, $OurUnitsQuantity, 'right'); - $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column7->x,$Page_Height-$YPos,$FormDesign->Data->Column7->Length,$FormDesign->Data->Column7->FontSize, $Units, 'left'); - $YPos += $line_height; - $i++; - if ($YPos >= $FormDesign->LineAboveFooter->starty){ - /* We reached the end of the page so finsih off the page and start a newy */ - $PageNumber++; - $YPos=$FormDesign->Data->y; - include ('includes/PDFGrnHeader.inc'); - } //end if need a new page headed up -} +$sql="SELECT grns.itemcode, + grns.grnno, + grns.deliverydate, + grns.itemdescription, + grns.qtyrecd, + grns.supplierid, + purchorderdetails.suppliersunit, + purchorderdetails.conversionfactor, + stockmaster.units, + stockmaster.decimalplaces + FROM grns INNER JOIN purchorderdetails + ON grns.podetailitem=purchorderdetails.podetailitem + LEFT JOIN stockmaster + ON grns.itemcode=stockmaster.stockid + WHERE grnbatch='".$GRNNo."'"; -$LeftOvers = $pdf->addText($FormDesign->ReceiptDate->x,$Page_Height-$FormDesign->ReceiptDate->y,$FormDesign->ReceiptDate->FontSize, _('Date of Receipt: ').$Date); +$GRNResult=DB_query($sql, $db); -$LeftOvers = $pdf->addText($FormDesign->SignedFor->x,$Page_Height-$FormDesign->SignedFor->y,$FormDesign->SignedFor->FontSize, _('Signed for ').'______________________'); +if(DB_num_rows($GRNResult)>0) { //there are GRNs to print + + $sql = "SELECT suppliers.suppname, + suppliers.address1, + suppliers.address2 , + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6 + FROM grns INNER JOIN suppliers + ON grns.supplierid=suppliers.supplierid + WHERE grnbatch='".$GRNNo."'"; + $SuppResult = DB_query($sql,$db,_('Could not get the supplier of the selected GRN')); + $SuppRow = DB_fetch_array($SuppResult); + + include ('includes/PDFGrnHeader.inc'); //head up the page + + $YPos=$FormDesign->Data->y; + while ($myrow = DB_fetch_array($GRNResult)) { -if ($NoOfGRNs == 0) { - $title = _('GRN Error'); + if (is_numeric($myrow['decimalplaces'])){ + $DecimalPlaces=$myrow['decimalplaces']; + } else { + $DecimalPlaces=2; + } + if (is_numeric($myrow['conversionfactor']) AND $myrow['conversionfactor'] !=0){ + $SuppliersQuantity=number_format($myrow['qtyrecd']/$myrow['conversionfactor'],$DecimalPlaces); + } else { + $SuppliersQuantity=number_format($myrow['qtyrecd'],$DecimalPlaces); + } + $OurUnitsQuantity=number_format($myrow['qtyrecd'],$DecimalPlaces); + $DeliveryDate = ConvertSQLDate($myrow['deliverydate']); + + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column1->x,$Page_Height-$YPos,$FormDesign->Data->Column1->Length,$FormDesign->Data->Column1->FontSize, $myrow['itemcode']); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column2->x,$Page_Height-$YPos,$FormDesign->Data->Column2->Length,$FormDesign->Data->Column2->FontSize, $myrow['itemdescription']); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column3->x,$Page_Height-$YPos,$FormDesign->Data->Column3->Length,$FormDesign->Data->Column3->FontSize, $DeliveryDate); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column4->x,$Page_Height-$YPos,$FormDesign->Data->Column4->Length,$FormDesign->Data->Column4->FontSize, $SuppliersQuantity, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column5->x,$Page_Height-$YPos,$FormDesign->Data->Column5->Length,$FormDesign->Data->Column5->FontSize, $myrow['suppliersunit'], 'left'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column6->x,$Page_Height-$YPos,$FormDesign->Data->Column6->Length,$FormDesign->Data->Column6->FontSize, $OurUnitsQuantity, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Data->Column7->x,$Page_Height-$YPos,$FormDesign->Data->Column7->Length,$FormDesign->Data->Column7->FontSize, $myrow['units'], 'left'); + $YPos += $line_height; + + if ($YPos >= $FormDesign->LineAboveFooter->starty){ + /* We reached the end of the page so finsih off the page and start a newy */ + $PageNumber++; + $YPos=$FormDesign->Data->y; + include ('includes/PDFGrnHeader.inc'); + } //end if need a new page headed up + } //end of loop around GRNs to print + + $LeftOvers = $pdf->addText($FormDesign->ReceiptDate->x,$Page_Height-$FormDesign->ReceiptDate->y,$FormDesign->ReceiptDate->FontSize, _('Date of Receipt: ') . $DeliveryDate); + $LeftOvers = $pdf->addText($FormDesign->SignedFor->x,$Page_Height-$FormDesign->SignedFor->y,$FormDesign->SignedFor->FontSize, _('Signed for ').'______________________'); + $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN + $pdf->__destruct(); //UldisN +} else { //there were not GRNs to print + $title = _('GRN Error'); include('includes/header.inc'); prnMsg(_('There were no GRNs to print'),'warn'); echo '<br><a href="'.$rootpath.'/index.php?' . SID . '">'. _('Back to the menu').'</a>'; include('includes/footer.inc'); - exit; -} else { - $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN - $pdf->__destruct(); //UldisN } ?> \ No newline at end of file Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/PO_Items.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -20,7 +20,7 @@ */ if (!isset($_SESSION['PO'.$identifier])){ - header('Location:' . $rootpath . '/PO_Header.php?' . SID); + header('Location:' . $rootpath . '/PO_Header.php'); exit; } //end if (!isset($_SESSION['PO'.$identifier])) @@ -29,7 +29,7 @@ $Maximum_Number_Of_Parts_To_Show=50; if (!isset($_POST['Commit'])) { - echo '<a href="'.$rootpath.'/PO_Header.php?' . SID . 'identifier=' . $identifier. '">' ._('Back To Purchase Order Header') . '</a><br />'; + echo '<a href="'.$rootpath.'/PO_Header.php?identifier=' . $identifier. '">' ._('Back To Purchase Order Header') . '</a><br />'; } if (isset($_POST['UpdateLines']) OR isset($_POST['Commit'])) { @@ -80,11 +80,52 @@ $result = DB_Txn_Begin($db); + /*figure out what status to set the order to */ + if (IsEmailAddress($_SESSION['UserEmail'])){ + $UserDetails = ' <a href="mailto:' . $_SESSION['UserEmail'] . '">' . $_SESSION['UsersRealName']. '</a>'; + } else { + $UserDetails = ' ' . $_SESSION['UsersRealName'] . ' '; + } + if ($_SESSION['AutoAuthorisePO']==1) { //if the user has authority to authorise the PO then it will automatically be authorised + $AuthSQL ="SELECT authlevel + FROM purchorderauth + WHERE userid='".$_SESSION['UserID']."' + AND currabrev='".$_SESSION['PO'.$identifier]->CurrCode."'"; + + $AuthResult=DB_query($AuthSQL,$db); + $AuthRow=DB_fetch_array($AuthResult); + + if (DB_num_rows($AuthResult) > 0 AND $AuthRow['authlevel'] > $_SESSION['PO'.$identifier]->Order_Value()) { //user has authority to authrorise as well as create the order + $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created and Authorised by') . $UserDetails . ' - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; + $_SESSION['PO'.$identifier]->AllowPrintPO=1; + $_SESSION['PO'.$identifier]->Status = 'Authorised'; + } else { // no authority to authorise this order + if (DB_num_rows($AuthResult) ==0){ + $AuthMessage = _('Your authority to approve purchase orders in') . ' ' . $_SESSION['PO'.$identifier]->CurrCode . ' ' . _('has not yet been set up') . '<br />'; + } else { + $AuthMessage = _('You can only authorise up to').' '.$_SESSION['PO'.$identifier]->CurrCode.' '.$AuthorityLevel.'.<br />'; + } + + prnMsg( _('You do not have permission to authorise this purchase order').'.<br />'. _('This order is for').' '. + $_SESSION['PO'.$identifier]->CurrCode . ' '. $_SESSION['PO'.$identifier]->Order_Value() .'. '. + $AuthMessage . + _('If you think this is a mistake please contact the systems administrator') . '<br />'. + _('The order will be created with a status of pending and will require authorisation'), 'warn'); + + $_SESSION['PO'.$identifier]->AllowPrintPO=0; + $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . $UserDetails . ' - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; + $_SESSION['PO'.$identifier]->Status = 'Pending'; + } + } else { //auto authorise is set to off + $_SESSION['PO'.$identifier]->AllowPrintPO=0; + $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . $UserDetails . ' - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; + $_SESSION['PO'.$identifier]->Status = 'Pending'; + } + if ($_SESSION['ExistingOrder']==0){ /*its a new order to be inserted */ //Do we need to check authorisation to create - no because already trapped when new PO session started - $StatusComment=date($_SESSION['DefaultDateFormat']).' - ' . _('Order Created by') . ' <a href="mailto:'. $_SESSION['UserEmail'] .'">' . $_SESSION['PO'.$identifier]->Initiator . '</a> - '.$_SESSION['PO'.$identifier]->StatusMessage.'<br />'; - + /*Get the order number */ $_SESSION['PO'.$identifier]->OrderNo = GetNextTransNo(18, $db); @@ -119,7 +160,8 @@ status, stat_comment, deliverydate, - paymentterms) + paymentterms, + allowprint) VALUES( '" . $_SESSION['PO'.$identifier]->OrderNo . "', '" . $_SESSION['PO'.$identifier]->SupplierID . "', '" . $_SESSION['PO'.$identifier]->Comments . "', @@ -147,10 +189,11 @@ '" . $_SESSION['PO'.$identifier]->Version . "', '" . Date('Y-m-d') . "', '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', - 'Pending', + '" . $_SESSION['PO'.$identifier]->Status . "', '" . $StatusComment . "', '" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', - '" . $_SESSION['PO'.$identifier]->PaymentTerms. "' + '" . $_SESSION['PO'.$identifier]->PaymentTerms. "', + '" . $_SESSION['PO'.$identifier]->AllowPrintPO . "' )"; $ErrMsg = _('The purchase order header record could not be inserted into the database because'); @@ -245,7 +288,7 @@ contact='" . $_SESSION['PO'.$identifier]->Contact . "', paymentterms='" . $_SESSION['PO'.$identifier]->PaymentTerms . "', allowprint='" . $_SESSION['PO'.$identifier]->AllowPrintPO . "', - status = 'Pending' + status = '" . $_SESSION['PO'.$identifier]->Status . "' WHERE orderno = '" . $_SESSION['PO'.$identifier]->OrderNo ."'"; $ErrMsg = _('The purchase order could not be updated because'); @@ -474,7 +517,7 @@ } if ($AllowUpdate == true){ - + //adding the non-stock item $_SESSION['PO'.$identifier]->add_to_order ($_SESSION['PO'.$identifier]->LinesOnOrder+1, '', 0, /*Serialised */ @@ -482,35 +525,35 @@ $_POST['Qty'], $_POST['ItemDescription'], $_POST['Price'], - $_POST['uom'], + $_POST['SuppliersUnit'], $_POST['GLCode'], $_POST['ReqDelDate'], - $_POST['ShiptRef'], + '', 0, - $_POST['JobRef'], + '', 0, 0, $GLAccountName, - $_POST['DecimalPlaces'], - $_POST['ItemNo'], - $_POST['SuppliersUOM'], - $_POST['ConversionFactor'], - $_POST['LeadTime'], - $_POST['Suppliers_PartNo'], - $_POST['SubTotal_Amount'], - $_POST['Package'], - $_POST['PcUnit'], - $_POST['NetWeight'], - $_POST['KGs'], - $_POST['CuFt'], - $_POST['Total_Quantity'], - $_POST['Total_Amount'], + 2, + '', + $_POST['SuppliersUnit'], + 1, + '', + '', + ($_POST['Qty']*$_POST['Price']), + '', + '', + '', + '', + '', + $_POST['Qty'], + ($_POST['Qty']*$_POST['Price']), $_POST['AssetID']); include ('includes/PO_UnsetFormVbls.php'); } } - /*end if Enter line button was hit */ + /*end if Enter line button was hit - adding non stock items */ if (isset($_POST['NewItem'])){ @@ -759,9 +802,11 @@ echo'</select><a href="FixedAssetItems.php" target=_blank>'. _('New Fixed Asset') . '</a></td> <tr><td>'._('Quantity to purchase').'</td> - <td><input type="text" class="number" name="Qty" size=10></td></tr> + <td><input type="text" class="number" name="Qty" size="10" value="1"></td></tr> <tr><td>'._('Price per item').'</td> - <td><input type="text" class="number" name="Price" size=10></td></tr> + <td><input type="text" class="number" name="Price" size="10"></td></tr> + <tr><td>'._('Unit').'</td> + <td><input type="text" name="SuppliersUnit" size="10" value="' . _('each') . '"></td></tr> <tr><td>'._('Delivery Date').'</td> <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ReqDelDate" size=11 value="'.$_SESSION['PO'.$identifier]->DeliveryDate .'"></td></tr>'; echo '</table>'; Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/SystemParameters.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -282,6 +282,9 @@ if ($_SESSION['FrequentlyOrderedItems'] != $_POST['X_FrequentlyOrderedItems']){ $sql[] = "UPDATE config SET confvalue='" . $_POST['X_FrequentlyOrderedItems'] . "' WHERE confname='FrequentlyOrderedItems'"; } + if ($_SESSION['AutoAuthorisePO'] != $_POST['X_AutoAuthorisePO']){ + $sql[] = "UPDATE config SET confvalue='" . $_POST['X_AutoAuthorisePO'] . "' WHERE confname='AutoAuthorisePO'"; + } $ErrMsg = _('The system configuration could not be updated because'); if (sizeof($sql) > 1 ) { $result = DB_Txn_Begin($db); @@ -390,6 +393,13 @@ <td><input type="Text" class="number" Name="X_FrequentlyOrderedItems" value="' . $_SESSION['FrequentlyOrderedItems'] . '" size=3 maxlength=2></td> <td>' . _('To show the most frequently ordered items enter the number of frequently ordered items you wish to display from 1 to 99. If you do not wish to display the frequently ordered item list enter 0.') . '</td></tr>'; +// SO_AllowSameItemMultipleTimes +echo '<tr style="outline: 1px solid"><td>' . _('Sales Order Allows Same Item Multiple Times') . ':</td> + <td><select Name="X_SO_AllowSameItemMultipleTimes"> + <option '.($_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes').' + <option '.(!$_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No').' + </select></td><td> </td></tr>'; + //'AllowOrderLineItemNarrative' echo '<tr style="outline: 1px solid"><td>' . _('Order Entry allows Line Item Narrative') . ':</td> <td><select Name="X_AllowOrderLineItemNarrative"> @@ -444,16 +454,6 @@ <td>' . _('Customer branches can be set by default not to print packing slips with the company logo and address. This is useful for companies that ship to customers customers and to show the source of the shipment would be inappropriate. There is an option on the setup of customer branches to ship blind, this setting is the default applied to all new customer branches') . '</td> </tr>'; -//Show values on GRN -echo '<tr style="outline: 1px solid"><td>' . _('Show order values on GRN') . ':</td> - <td><select Name="X_ShowValueOnGRN"> - <option '.($_SESSION['ShowValueOnGRN']?'selected ':'').'value="1">'._('Yes').' - <option '.(!$_SESSION['ShowValueOnGRN']?'selected ':'').'value="0">'._('No').' - </select></td> - <td>' . _('Should the value of the purchased stock be shown on the GRN screen') . '</td> - </tr>'; - - // DispatchCutOffTime echo '<tr style="outline: 1px solid"><td>' . _('Dispatch Cut-Off Time') . ':</td> <td><select Name="X_DispatchCutOffTime">'; @@ -583,6 +583,15 @@ echo '<option '.($_SESSION['NumberOfPeriodsOfStockUsage'] == $i?'selected ':'').'value="'.$i.'">'.$i; echo '</select></td><td>' . _('In stock usage inquiries this determines how many periods of stock usage to show. An average is calculated over this many periods') .'</td></tr>'; +//Show values on GRN +echo '<tr style="outline: 1px solid"><td>' . _('Show order values on GRN') . ':</td> + <td><select Name="X_ShowValueOnGRN"> + <option '.($_SESSION['ShowValueOnGRN']?'selected ':'').'value="1">'._('Yes').' + <option '.(!$_SESSION['ShowValueOnGRN']?'selected ':'').'value="0">'._('No').' + </select></td> + <td>' . _('Should the value of the purchased stock be shown on the GRN screen') . '</td> + </tr>'; + // Check_Qty_Charged_vs_Del_Qty echo '<tr style="outline: 1px solid"><td>' . _('Check Quantity Charged vs Deliver Qty') . ':</td> <td><select Name="X_Check_Qty_Charged_vs_Del_Qty"> @@ -612,17 +621,18 @@ // PO_AllowSameItemMultipleTimes echo '<tr style="outline: 1px solid"><td>' . _('Purchase Order Allows Same Item Multiple Times') . ':</td> <td><select Name="X_PO_AllowSameItemMultipleTimes"> - <option '.($_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes').' - <option '.(!$_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No').' + <option '.($_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes') . '</option> + <option '.(!$_SESSION['PO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No') . '</option> </select></td> <td></td></tr>'; -// SO_AllowSameItemMultipleTimes -echo '<tr style="outline: 1px solid"><td>' . _('Sales Order Allows Same Item Multiple Times') . ':</td> - <td><select Name="X_SO_AllowSameItemMultipleTimes"> - <option '.($_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="1">'._('Yes').' - <option '.(!$_SESSION['SO_AllowSameItemMultipleTimes']?'selected ':'').'value="0">'._('No').' - </select></td><td> </td></tr>'; +// AutoAuthorisePO +echo '<tr style="outline: 1px solid"><td>' . _('Automatically authorise purchase orders if user has authority') . ':</td> + <td><select Name="X_AutoAuthorisePO"> + <option '.($_SESSION['AutoAuthorisePO'] ?'selected ':'').'value="1">'._('Yes').' + <option '.(!$_SESSION['AutoAuthorisePO'] ?'selected ':'').'value="0">'._('No').' + </select></td>' . _('If the user changing an existing purchase order or adding a new puchase order is set up to authorise purchase orders and the order is within their limit, then the purchase order status is automatically set to authorised') . '<td></td></tr>'; + echo '<tr><th colspan=3>' . _('General Settings') . '</th></tr>'; echo $TableHeader; Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/UpgradeDatabase.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -1,6 +1,8 @@ <?php -/* $Id: $*/ -$PageSecurity = 15; +/* $Id UpgradeDatabase.php 4183 2010-12-14 09:30:20Z daintree $ */ + +$PageSecurity = 15; //hard coded in case database is old and PageSecurity stuff cannot be retrieved + include('includes/session.inc'); $title = _('Upgrade webERP Database'); include('includes/header.inc'); @@ -144,6 +146,9 @@ case 1050: echo '<td bgcolor="yellow">'._('Note').' - '. _('Table has already been created').'</td></tr>'; break; + case 1054: + echo '<td bgcolor="yellow">'._('Note').' - '. _('Column has already been changed').'</td></tr>'; + break; case 1060: echo '<td bgcolor="yellow">'._('Note').' - '. _('Column has already been created').'</td></tr>'; break; @@ -166,7 +171,7 @@ echo '<td bgcolor="red">'._('Failure').' - '. _('Error number').' - '.DB_error_no($db) .' ' . DB_error_msg($db) . '</td></tr>'; break; } - unset($sql); + $sql=''; } } //end if its a valid sql line not a comment } //end of for loop around the lines of the sql script Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/doc/Change.log.html 2011-02-06 04:29:33 UTC (rev 4482) @@ -1,5 +1,10 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>5/2/11: Phil: SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> +<p>5/2/11: Phil: PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> +<p>5/2/11: PDFGrn.php rewrote - preview never used - confused logic fixed<p> +<p>4/2/11: Tim CostUpdate.php </p> +<p>4/2/11: Phil SelectCustomer.php rejig selection options in more logical way. Used non-specific SQL to search by any part of the address</p> <p>2/2/11: Phil PDFTopItems.php and TopItems.php removed mysql specific SQL</p> <p>30/1/11: Phil GoodsReceived.php rework for supplier units and conversion factor etc now in PO class</p> <p>30/1/11: Phil PDFGrn.php rework for supplier units and conversion factor etc now in PO class</p> Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/includes/ConnectDB.inc 2011-02-06 04:29:33 UTC (rev 4482) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='3.12.31'; //must update manually every time there is a DB change +$Version='3.12.32'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/includes/DateFunctions.inc 2011-02-06 04:29:33 UTC (rev 4482) @@ -160,6 +160,22 @@ $Date_Array = explode('-',$DateEntry); } elseif (strpos ($DateEntry,'.')) { $Date_Array = explode('.',$DateEntry); + } else { + prnMsg(_('The date does not appear to be in a valid format. The date being converted from SQL format was:') . ' ' . $DateEntry,'error'); + switch ($_SESSION['DefaultDateFormat']) { + case 'd/m/Y': + return '0/0/000'; + break; + case 'd.m.Y': + return '0.0.000'; + break; + case 'm/d/Y': + return '0/0/0000'; + break; + case 'Y/m/d': + return '0000/0/0'; + break; + } } if (strlen($Date_Array[2])>4) { /*chop off the time stuff */ Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/includes/DefinePOClass.php 2011-02-06 04:29:33 UTC (rev 4482) @@ -226,15 +226,6 @@ return 0; //nowt received } - function GetLineNoFromPODetailItem($PODetailItem){ - foreach ($this->LineItems as $OrderedItems) { - if ($OrderedItems->PODetailRec ==$PODetailItem){ - return $OrderedItems->LineNo; - } - } - return false; //PODetailItem not on the order - } - } /* end of class defintion */ Class LineDetails { Modified: trunk/includes/PDFGrnHeader.inc =================================================================== --- trunk/includes/PDFGrnHeader.inc 2011-02-04 22:50:18 UTC (rev 4481) +++ trunk/includes/PDFGrnHeader.inc 2011-02-06 04:29:33 UTC (rev 4482) @@ -5,30 +5,15 @@ $pdf->newPage(); } -$sql="SELECT suppliers.supplierid, - suppname, - address1, - address2 , - address3, - address4, - address5, - address6 - FROM suppliers - LEFT JOIN grns - ON grns.supplierid=suppliers.supplierid - WHERE grnbatch='".$GRNNo."'"; -$supplierresult=DB_query($sql, $db); -$supplierrow=DB_fetch_array($supplierresult); - $pdf->addJpegFromFile($_SESSION['LogoFile'] ,$FormDesign->logo->x,$Page_Height-$FormDesign->logo->y,$FormDesign->logo->width,$FormDesign->logo->height); -$LeftOvers = $pdf->addText($FormDesign->SupplierName->x,$Page_Height-$FormDesign->SupplierName->y,$FormDesign->SupplierName->FontSize,$supplierrow['suppname']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress1->x,$Page_Height-$FormDesign->SupplierAddress1->y,$FormDesign->SupplierAddress1->FontSize,$supplierrow['address1']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress2->x,$Page_Height-$FormDesign->SupplierAddress2->y,$FormDesign->SupplierAddress2->FontSize,$supplierrow['address2']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress3->x,$Page_Height-$FormDesign->SupplierAddress3->y,$FormDesign->SupplierAddress3->FontSize,$supplierrow['address3']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress4->x,$Page_Height-$FormDesign->SupplierAddress4->y,$FormDesign->SupplierAddress4->FontSize,$supplierrow['address4']); -$LeftOvers = $pdf->addText($FormDesign->SupplierAddress5->x,$Page_Height-$FormDesign->SupplierAddress5->y,$FormDesign->SupplierAddress5->FontSize,$su... [truncated message content] |
From: <dai...@us...> - 2011-02-06 07:58:34
|
Revision: 4483 http://web-erp.svn.sourceforge.net/web-erp/?rev=4483&view=rev Author: daintree Date: 2011-02-06 07:58:27 +0000 (Sun, 06 Feb 2011) Log Message: ----------- FixedAssetDepn typo Modified Paths: -------------- trunk/FixedAssetDepreciation.php trunk/doc/Change.log.html Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-02-06 04:29:33 UTC (rev 4482) +++ trunk/FixedAssetDepreciation.php 2011-02-06 07:58:27 UTC (rev 4483) @@ -1,10 +1,8 @@ <?php -/* $Revision: 1.1 $ */ +/* $Id: FixedAssetDepreciation.php 4213 2010-12-22 14:33:20Z tim_schofield $*/ -include('includes/DefineJournalClass.php'); - -//$PageSecurity = 10; +//$PageSecurity = 10; Now from DB include('includes/session.inc'); $title = _('Depreciation Journal Entry'); @@ -23,8 +21,6 @@ $LastDepnRun = DB_fetch_row($result); -//echo '<BR>LastRun period = ' . $LastDepnRun[1] . ' Last date in period = ' . $LastDepnRun[0]; - $AllowUserEnteredProcessDate = true; if (DB_num_rows($result)==0) { //then depn has never been run yet? @@ -42,8 +38,6 @@ } else { //depn calc has been run previously $AllowUserEnteredProcessDate = false; - prnMsg('LastDepnRun[0] = ' . $LastDepnRun[0] . '<br />ConvertSQLDate($LastDepnRun[0]) = ' . ConvertSQLDate($LastDepnRun[0]) . '<br />DateAdd(ConvertSQLDate($LastDepnRun[0]),d,28) = ' . DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28), 'info'); - $_POST['ProcessDate'] = LastDayOfMonth(DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28)); } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-06 04:29:33 UTC (rev 4482) +++ trunk/doc/Change.log.html 2011-02-06 07:58:27 UTC (rev 4483) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>6/2/11:sotandeka Fix typos left debug comments prnMsg in</p> <p>5/2/11: Phil: SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> <p>5/2/11: Phil: PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> <p>5/2/11: PDFGrn.php rewrote - preview never used - confused logic fixed<p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-02-06 07:58:34
|
Revision: 4483 http://web-erp.svn.sourceforge.net/web-erp/?rev=4483&view=rev Author: daintree Date: 2011-02-06 07:58:27 +0000 (Sun, 06 Feb 2011) Log Message: ----------- FixedAssetDepn typo Modified Paths: -------------- trunk/FixedAssetDepreciation.php trunk/doc/Change.log.html Modified: trunk/FixedAssetDepreciation.php =================================================================== --- trunk/FixedAssetDepreciation.php 2011-02-06 04:29:33 UTC (rev 4482) +++ trunk/FixedAssetDepreciation.php 2011-02-06 07:58:27 UTC (rev 4483) @@ -1,10 +1,8 @@ <?php -/* $Revision: 1.1 $ */ +/* $Id: FixedAssetDepreciation.php 4213 2010-12-22 14:33:20Z tim_schofield $*/ -include('includes/DefineJournalClass.php'); - -//$PageSecurity = 10; +//$PageSecurity = 10; Now from DB include('includes/session.inc'); $title = _('Depreciation Journal Entry'); @@ -23,8 +21,6 @@ $LastDepnRun = DB_fetch_row($result); -//echo '<BR>LastRun period = ' . $LastDepnRun[1] . ' Last date in period = ' . $LastDepnRun[0]; - $AllowUserEnteredProcessDate = true; if (DB_num_rows($result)==0) { //then depn has never been run yet? @@ -42,8 +38,6 @@ } else { //depn calc has been run previously $AllowUserEnteredProcessDate = false; - prnMsg('LastDepnRun[0] = ' . $LastDepnRun[0] . '<br />ConvertSQLDate($LastDepnRun[0]) = ' . ConvertSQLDate($LastDepnRun[0]) . '<br />DateAdd(ConvertSQLDate($LastDepnRun[0]),d,28) = ' . DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28), 'info'); - $_POST['ProcessDate'] = LastDayOfMonth(DateAdd(ConvertSQLDate($LastDepnRun[0]),'d',28)); } Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-06 04:29:33 UTC (rev 4482) +++ trunk/doc/Change.log.html 2011-02-06 07:58:27 UTC (rev 4483) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>6/2/11:sotandeka Fix typos left debug comments prnMsg in</p> <p>5/2/11: Phil: SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> <p>5/2/11: Phil: PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> <p>5/2/11: PDFGrn.php rewrote - preview never used - confused logic fixed<p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-02-07 08:51:42
|
Revision: 4485 http://web-erp.svn.sourceforge.net/web-erp/?rev=4485&view=rev Author: daintree Date: 2011-02-07 08:51:36 +0000 (Mon, 07 Feb 2011) Log Message: ----------- not finished Modified Paths: -------------- trunk/PDFGrn.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/doc/Change.log.html trunk/index.php Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/PDFGrn.php 2011-02-07 08:51:36 UTC (rev 4485) @@ -20,39 +20,57 @@ include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Goods Received Note') ); -$sql="SELECT grns.itemcode, - grns.grnno, - grns.deliverydate, - grns.itemdescription, - grns.qtyrecd, - grns.supplierid, - purchorderdetails.suppliersunit, - purchorderdetails.conversionfactor, - stockmaster.units, - stockmaster.decimalplaces - FROM grns INNER JOIN purchorderdetails - ON grns.podetailitem=purchorderdetails.podetailitem - LEFT JOIN stockmaster - ON grns.itemcode=stockmaster.stockid - WHERE grnbatch='".$GRNNo."'"; - -$GRNResult=DB_query($sql, $db); - -if(DB_num_rows($GRNResult)>0) { //there are GRNs to print +if ($GRNNo == 'Preview'){ + $myrow['itemcode'] = strpad('', 15,'x'); + $myrow['deliverydate'] = '0000-00-00'; + $myrow['itemdescription'] = strpad('', 30,'x'); + $myrow['qtyrecd'] = 99999.99; + $myrow['supplierid'] = strpad('', 10,'x'); + $myrow['suppliersunit'] = strpad('', 10,'x'); + $myrow['units'] = strpad('', 10,'x'); + $SuppRow['suppname'] = strpad('', 30,'x'); + $SuppRow['address1'] = strpad('', 30,'x'); + $SuppRow['address2'] = strpad('', 30,'x'); + $SuppRow['address3'] = strpad('', 20,'x'); + $SuppRow['address4'] = strpad('', 20,'x'); + $SuppRow['address5'] = strpad('', 10,'x'); + $SuppRow['address6'] = strpad('', 10,'x'); +} else { //NOT PREVIEW + + $sql="SELECT grns.itemcode, + grns.grnno, + grns.deliverydate, + grns.itemdescription, + grns.qtyrecd, + grns.supplierid, + purchorderdetails.suppliersunit, + purchorderdetails.conversionfactor, + stockmaster.units, + stockmaster.decimalplaces + FROM grns INNER JOIN purchorderdetails + ON grns.podetailitem=purchorderdetails.podetailitem + LEFT JOIN stockmaster + ON grns.itemcode=stockmaster.stockid + WHERE grnbatch='".$GRNNo."'"; - $sql = "SELECT suppliers.suppname, - suppliers.address1, - suppliers.address2 , - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6 - FROM grns INNER JOIN suppliers - ON grns.supplierid=suppliers.supplierid - WHERE grnbatch='".$GRNNo."'"; - $SuppResult = DB_query($sql,$db,_('Could not get the supplier of the selected GRN')); - $SuppRow = DB_fetch_array($SuppResult); + $GRNResult=DB_query($sql, $db); + if(DB_num_rows($GRNResult)>0) { //there are GRNs to print + + $sql = "SELECT suppliers.suppname, + suppliers.address1, + suppliers.address2 , + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6 + FROM grns INNER JOIN suppliers + ON grns.supplierid=suppliers.supplierid + WHERE grnbatch='".$GRNNo."'"; + $SuppResult = DB_query($sql,$db,_('Could not get the supplier of the selected GRN')); + $SuppRow = DB_fetch_array($SuppResult); + } +} // get data to print include ('includes/PDFGrnHeader.inc'); //head up the page $YPos=$FormDesign->Data->y; Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/PricesBasedOnMarkUp.php 2011-02-07 08:51:36 UTC (rev 4485) @@ -5,13 +5,13 @@ include('includes/session.inc'); -$title=_('Update Pricing From Costs'); +$title=_('Update Pricing'); include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . $title.'</p>'; -echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 1000 would mean that prices would be a minimum of 1000 and other prices would be expressed as multiples of 1000.') . '</div><br /><div class="centre">'; +echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data or from another price list. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 5 would mean that prices would be a minimum of 5 and other prices would be expressed as multiples of 5.') . '</div><br /><div class="centre">'; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/PricesByCost.php 2011-02-07 08:51:36 UTC (rev 4485) @@ -1,21 +1,21 @@ <?php /* $Id$ */ -// PricesByCost.php - -//$PageSecurity = 11; + +//$PageSecurity = 11; Now from DB include ('includes/session.inc'); -$title = _('Update of Prices By Cost'); +$title = _('Update of Prices By A Multiple Of Cost'); include ('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Update Price By Cost') . '</p>'; if (isset($_POST['submit']) or isset($_POST['update'])) { - if ($_POST['Margin'] == "") { + if ($_POST['Margin'] == '') { header('Location: PricesByCost.php'); } if ($_POST['Comparator'] == 1) { - $Comparator = "<="; + $Comparator = '<='; } else { - $Comparator = ">="; + $Comparator = '>='; } /*end of else Comparator */ if ($_POST['StockCat'] != 'all') { $Category = " AND stockmaster.categoryid = '" . $_POST['StockCat'] . "'"; @@ -47,7 +47,7 @@ while ($myrow = DB_fetch_array($result)) { //update database if update pressed $SQLUpdate = "UPDATE prices SET price = '" . $_POST['Price_' . $PriceCounter] . "' - WHERE `prices`.`stockid` = '" . $_POST['StockID_' . $PriceCounter] . "' + WHERE stockid = '" . $_POST['StockID_' . $PriceCounter] . "' AND prices.typeabbrev ='" . $_POST['SalesType'] . "' AND prices.currabrev ='" . $_POST['CurrCode'] . "' AND prices.debtorno ='" . $_POST['DebtorNo_' . $PriceCounter] . "' @@ -217,9 +217,9 @@ <td><select name='SalesType'>"; while ($myrow = DB_fetch_array($result)) { if ($_POST['SalesType'] == $myrow['typeabbrev']) { - echo "<option selected value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type']; + echo "<option selected value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type'] . '</option>'; } else { - echo "<option value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type']; + echo "<option value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type'] . '</option>'; } } //end while loop DB_data_seek($result, 0); @@ -229,9 +229,9 @@ <td><select name='CurrCode'>"; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['CurrCode']) and $_POST['CurrCode'] == $myrow['currabrev']) { - echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } } //end while loop DB_data_seek($result, 0); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/doc/Change.log.html 2011-02-07 08:51:36 UTC (rev 4485) @@ -1,10 +1,11 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> -<p>6/2/11:sotandeka Fix typos left debug comments prnMsg in</p> -<p>5/2/11: Phil: SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> -<p>5/2/11: Phil: PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> -<p>5/2/11: PDFGrn.php rewrote - preview never used - confused logic fixed<p> -<p>4/2/11: Tim: CostUpdate.php allow cost update with appropriate permissions token 10 hard coded</p> +<p>7/2/11: Phil PDFGrn.php turns out preview is used from the form modification script doh! Over simplificaton reversed to reinstate preview mode<p> +<p>6/2/11: Otandeka Removed debug prnMsg in FixedAssetDepreciation</p> +<p>5/2/11: Phil SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> +<p>5/2/11: Phil PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> +<p>5/2/11: Phil PDFGrn.php rewrote - preview never used - simplified<p> +<p>4/2/11: Tim CostUpdate.php allow cost update with appropriate permissions token 10 hard coded</p> <p>4/2/11: Phil SelectCustomer.php rejig selection options in more logical way. Used non-specific SQL to search by any part of the address</p> <p>2/2/11: Phil PDFTopItems.php and TopItems.php removed mysql specific SQL</p> <p>30/1/11: Phil GoodsReceived.php rework for supplier units and conversion factor etc now in PO class</p> @@ -13,7 +14,7 @@ <p>29/1/11:Tim fix reportwriter with tcpdf using parent::__construct rather than $this->Cpdf( </p> <p>24/1/11:Phil Depreciation fixes - SelectAsset by description fix</p> <p>23/1/11:Peter Otandeka: PDFTopItems.php SQL quoting fixes</p> -<p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> +<p>23/1/11: Phil Fix Depreciation posting and dates of end of periods</p> <p>23/1/11:Phil changed back references throughout several MRP scripts from is_date to Is_Date - as Is_Date is used throughout the code and much bigger job to change all references to is_date</p> <p>20/1/11: Tim changed back addinfo calls to addInfo on PDF reports - Zhigio originally thought to be an issue with Turkish utf-8 pdfs but turned out to be a red herring. class.pdf call changed back to addInfo too - most of calls had not been changed to lower case info</p> <p>20/1/11: Tim changed PricesBasedOnMarkUp to have end date day before new prices effective from</p> Modified: trunk/index.php =================================================================== --- trunk/index.php 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/index.php 2011-02-07 08:51:36 UTC (rev 4485) @@ -725,7 +725,7 @@ </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PricesBasedOnMarkUp.php?' . SID . '">' . _('Add or Update Prices Based On Costs') . '</a></p>'; ?> + <?php echo '<p>• <a href="' . $rootpath . '/PricesBasedOnMarkUp.php?' . SID . '">' . _('Add or Update Prices Based On Costs Or Other Price List') . '</a></p>'; ?> </td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-02-07 08:51:42
|
Revision: 4485 http://web-erp.svn.sourceforge.net/web-erp/?rev=4485&view=rev Author: daintree Date: 2011-02-07 08:51:36 +0000 (Mon, 07 Feb 2011) Log Message: ----------- not finished Modified Paths: -------------- trunk/PDFGrn.php trunk/PricesBasedOnMarkUp.php trunk/PricesByCost.php trunk/doc/Change.log.html trunk/index.php Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/PDFGrn.php 2011-02-07 08:51:36 UTC (rev 4485) @@ -20,39 +20,57 @@ include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Goods Received Note') ); -$sql="SELECT grns.itemcode, - grns.grnno, - grns.deliverydate, - grns.itemdescription, - grns.qtyrecd, - grns.supplierid, - purchorderdetails.suppliersunit, - purchorderdetails.conversionfactor, - stockmaster.units, - stockmaster.decimalplaces - FROM grns INNER JOIN purchorderdetails - ON grns.podetailitem=purchorderdetails.podetailitem - LEFT JOIN stockmaster - ON grns.itemcode=stockmaster.stockid - WHERE grnbatch='".$GRNNo."'"; - -$GRNResult=DB_query($sql, $db); - -if(DB_num_rows($GRNResult)>0) { //there are GRNs to print +if ($GRNNo == 'Preview'){ + $myrow['itemcode'] = strpad('', 15,'x'); + $myrow['deliverydate'] = '0000-00-00'; + $myrow['itemdescription'] = strpad('', 30,'x'); + $myrow['qtyrecd'] = 99999.99; + $myrow['supplierid'] = strpad('', 10,'x'); + $myrow['suppliersunit'] = strpad('', 10,'x'); + $myrow['units'] = strpad('', 10,'x'); + $SuppRow['suppname'] = strpad('', 30,'x'); + $SuppRow['address1'] = strpad('', 30,'x'); + $SuppRow['address2'] = strpad('', 30,'x'); + $SuppRow['address3'] = strpad('', 20,'x'); + $SuppRow['address4'] = strpad('', 20,'x'); + $SuppRow['address5'] = strpad('', 10,'x'); + $SuppRow['address6'] = strpad('', 10,'x'); +} else { //NOT PREVIEW + + $sql="SELECT grns.itemcode, + grns.grnno, + grns.deliverydate, + grns.itemdescription, + grns.qtyrecd, + grns.supplierid, + purchorderdetails.suppliersunit, + purchorderdetails.conversionfactor, + stockmaster.units, + stockmaster.decimalplaces + FROM grns INNER JOIN purchorderdetails + ON grns.podetailitem=purchorderdetails.podetailitem + LEFT JOIN stockmaster + ON grns.itemcode=stockmaster.stockid + WHERE grnbatch='".$GRNNo."'"; - $sql = "SELECT suppliers.suppname, - suppliers.address1, - suppliers.address2 , - suppliers.address3, - suppliers.address4, - suppliers.address5, - suppliers.address6 - FROM grns INNER JOIN suppliers - ON grns.supplierid=suppliers.supplierid - WHERE grnbatch='".$GRNNo."'"; - $SuppResult = DB_query($sql,$db,_('Could not get the supplier of the selected GRN')); - $SuppRow = DB_fetch_array($SuppResult); + $GRNResult=DB_query($sql, $db); + if(DB_num_rows($GRNResult)>0) { //there are GRNs to print + + $sql = "SELECT suppliers.suppname, + suppliers.address1, + suppliers.address2 , + suppliers.address3, + suppliers.address4, + suppliers.address5, + suppliers.address6 + FROM grns INNER JOIN suppliers + ON grns.supplierid=suppliers.supplierid + WHERE grnbatch='".$GRNNo."'"; + $SuppResult = DB_query($sql,$db,_('Could not get the supplier of the selected GRN')); + $SuppRow = DB_fetch_array($SuppResult); + } +} // get data to print include ('includes/PDFGrnHeader.inc'); //head up the page $YPos=$FormDesign->Data->y; Modified: trunk/PricesBasedOnMarkUp.php =================================================================== --- trunk/PricesBasedOnMarkUp.php 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/PricesBasedOnMarkUp.php 2011-02-07 08:51:36 UTC (rev 4485) @@ -5,13 +5,13 @@ include('includes/session.inc'); -$title=_('Update Pricing From Costs'); +$title=_('Update Pricing'); include('includes/header.inc'); echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/money_add.png" title="' . _('Search') . '" alt="" />' . $title.'</p>'; -echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 1000 would mean that prices would be a minimum of 1000 and other prices would be expressed as multiples of 1000.') . '</div><br /><div class="centre">'; +echo '<br /><div class="page_help_text">' . _('This page adds new prices or updates already existing prices for a specified sales type (price list) and currency for the stock category selected - based on a percentage mark up from cost prices or from preferred supplier cost data or from another price list. The rounding factor ensures that prices are at least this amount or a multiple of it. A rounding factor of 5 would mean that prices would be a minimum of 5 and other prices would be expressed as multiples of 5.') . '</div><br /><div class="centre">'; echo '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?' . SID . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; Modified: trunk/PricesByCost.php =================================================================== --- trunk/PricesByCost.php 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/PricesByCost.php 2011-02-07 08:51:36 UTC (rev 4485) @@ -1,21 +1,21 @@ <?php /* $Id$ */ -// PricesByCost.php - -//$PageSecurity = 11; + +//$PageSecurity = 11; Now from DB include ('includes/session.inc'); -$title = _('Update of Prices By Cost'); +$title = _('Update of Prices By A Multiple Of Cost'); include ('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/inventory.png" title="' . _('Inventory') . '" alt="" />' . ' ' . _('Update Price By Cost') . '</p>'; if (isset($_POST['submit']) or isset($_POST['update'])) { - if ($_POST['Margin'] == "") { + if ($_POST['Margin'] == '') { header('Location: PricesByCost.php'); } if ($_POST['Comparator'] == 1) { - $Comparator = "<="; + $Comparator = '<='; } else { - $Comparator = ">="; + $Comparator = '>='; } /*end of else Comparator */ if ($_POST['StockCat'] != 'all') { $Category = " AND stockmaster.categoryid = '" . $_POST['StockCat'] . "'"; @@ -47,7 +47,7 @@ while ($myrow = DB_fetch_array($result)) { //update database if update pressed $SQLUpdate = "UPDATE prices SET price = '" . $_POST['Price_' . $PriceCounter] . "' - WHERE `prices`.`stockid` = '" . $_POST['StockID_' . $PriceCounter] . "' + WHERE stockid = '" . $_POST['StockID_' . $PriceCounter] . "' AND prices.typeabbrev ='" . $_POST['SalesType'] . "' AND prices.currabrev ='" . $_POST['CurrCode'] . "' AND prices.debtorno ='" . $_POST['DebtorNo_' . $PriceCounter] . "' @@ -217,9 +217,9 @@ <td><select name='SalesType'>"; while ($myrow = DB_fetch_array($result)) { if ($_POST['SalesType'] == $myrow['typeabbrev']) { - echo "<option selected value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type']; + echo "<option selected value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type'] . '</option>'; } else { - echo "<option value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type']; + echo "<option value='" . $myrow['typeabbrev'] . "'>" . $myrow['sales_type'] . '</option>'; } } //end while loop DB_data_seek($result, 0); @@ -229,9 +229,9 @@ <td><select name='CurrCode'>"; while ($myrow = DB_fetch_array($result)) { if (isset($_POST['CurrCode']) and $_POST['CurrCode'] == $myrow['currabrev']) { - echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option selected value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } else { - echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency']; + echo '<option value=' . $myrow['currabrev'] . '>' . $myrow['currency'] . '</option>'; } } //end while loop DB_data_seek($result, 0); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/doc/Change.log.html 2011-02-07 08:51:36 UTC (rev 4485) @@ -1,10 +1,11 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> -<p>6/2/11:sotandeka Fix typos left debug comments prnMsg in</p> -<p>5/2/11: Phil: SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> -<p>5/2/11: Phil: PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> -<p>5/2/11: PDFGrn.php rewrote - preview never used - confused logic fixed<p> -<p>4/2/11: Tim: CostUpdate.php allow cost update with appropriate permissions token 10 hard coded</p> +<p>7/2/11: Phil PDFGrn.php turns out preview is used from the form modification script doh! Over simplificaton reversed to reinstate preview mode<p> +<p>6/2/11: Otandeka Removed debug prnMsg in FixedAssetDepreciation</p> +<p>5/2/11: Phil SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> +<p>5/2/11: Phil PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> +<p>5/2/11: Phil PDFGrn.php rewrote - preview never used - simplified<p> +<p>4/2/11: Tim CostUpdate.php allow cost update with appropriate permissions token 10 hard coded</p> <p>4/2/11: Phil SelectCustomer.php rejig selection options in more logical way. Used non-specific SQL to search by any part of the address</p> <p>2/2/11: Phil PDFTopItems.php and TopItems.php removed mysql specific SQL</p> <p>30/1/11: Phil GoodsReceived.php rework for supplier units and conversion factor etc now in PO class</p> @@ -13,7 +14,7 @@ <p>29/1/11:Tim fix reportwriter with tcpdf using parent::__construct rather than $this->Cpdf( </p> <p>24/1/11:Phil Depreciation fixes - SelectAsset by description fix</p> <p>23/1/11:Peter Otandeka: PDFTopItems.php SQL quoting fixes</p> -<p>23/1/11: phil Fix Depreciation posting and dates of end of periods</p> +<p>23/1/11: Phil Fix Depreciation posting and dates of end of periods</p> <p>23/1/11:Phil changed back references throughout several MRP scripts from is_date to Is_Date - as Is_Date is used throughout the code and much bigger job to change all references to is_date</p> <p>20/1/11: Tim changed back addinfo calls to addInfo on PDF reports - Zhigio originally thought to be an issue with Turkish utf-8 pdfs but turned out to be a red herring. class.pdf call changed back to addInfo too - most of calls had not been changed to lower case info</p> <p>20/1/11: Tim changed PricesBasedOnMarkUp to have end date day before new prices effective from</p> Modified: trunk/index.php =================================================================== --- trunk/index.php 2011-02-06 07:59:50 UTC (rev 4484) +++ trunk/index.php 2011-02-07 08:51:36 UTC (rev 4485) @@ -725,7 +725,7 @@ </tr> <tr> <td class="menu_group_item"> - <?php echo '<p>• <a href="' . $rootpath . '/PricesBasedOnMarkUp.php?' . SID . '">' . _('Add or Update Prices Based On Costs') . '</a></p>'; ?> + <?php echo '<p>• <a href="' . $rootpath . '/PricesBasedOnMarkUp.php?' . SID . '">' . _('Add or Update Prices Based On Costs Or Other Price List') . '</a></p>'; ?> </td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-02-08 09:20:57
|
Revision: 4486 http://web-erp.svn.sourceforge.net/web-erp/?rev=4486&view=rev Author: daintree Date: 2011-02-08 09:20:50 +0000 (Tue, 08 Feb 2011) Log Message: ----------- PDFQuotation - Ricards multi-line issue on narrative Modified Paths: -------------- trunk/PDFGrn.php trunk/PDFQuotation.php trunk/Payments.php trunk/StockLocTransfer.php trunk/doc/Change.log.html trunk/includes/PDFQuotationPageHeader.inc trunk/includes/class.pdf.php trunk/javascripts/MiscFunctions.js Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/PDFGrn.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -21,20 +21,24 @@ $pdf->addInfo('Title', _('Goods Received Note') ); if ($GRNNo == 'Preview'){ - $myrow['itemcode'] = strpad('', 15,'x'); + $myrow['itemcode'] = str_pad('', 15,'x'); $myrow['deliverydate'] = '0000-00-00'; - $myrow['itemdescription'] = strpad('', 30,'x'); - $myrow['qtyrecd'] = 99999.99; - $myrow['supplierid'] = strpad('', 10,'x'); - $myrow['suppliersunit'] = strpad('', 10,'x'); - $myrow['units'] = strpad('', 10,'x'); - $SuppRow['suppname'] = strpad('', 30,'x'); - $SuppRow['address1'] = strpad('', 30,'x'); - $SuppRow['address2'] = strpad('', 30,'x'); - $SuppRow['address3'] = strpad('', 20,'x'); - $SuppRow['address4'] = strpad('', 20,'x'); - $SuppRow['address5'] = strpad('', 10,'x'); - $SuppRow['address6'] = strpad('', 10,'x'); + $myrow['itemdescription'] = str_pad('', 30,'x'); + $myrow['qtyrecd'] = 99999999.99; + $myrow['decimalplaces'] =2; + $myrow['conversionfactor']=1; + $myrow['supplierid'] = str_pad('', 10,'x'); + $myrow['suppliersunit'] = str_pad('', 10,'x'); + $myrow['units'] = str_pad('', 10,'x'); + + $SuppRow['suppname'] = str_pad('', 30,'x'); + $SuppRow['address1'] = str_pad('', 30,'x'); + $SuppRow['address2'] = str_pad('', 30,'x'); + $SuppRow['address3'] = str_pad('', 30,'x'); + $SuppRow['address4'] = str_pad('', 20,'x'); + $SuppRow['address5'] = str_pad('', 10,'x'); + $SuppRow['address6'] = str_pad('', 10,'x'); + $NoOfGRNs =1; } else { //NOT PREVIEW $sql="SELECT grns.itemcode, @@ -54,8 +58,8 @@ WHERE grnbatch='".$GRNNo."'"; $GRNResult=DB_query($sql, $db); - - if(DB_num_rows($GRNResult)>0) { //there are GRNs to print + $NoOfGRNs = DB_num_rows($GRNResult); + if($NoOfGRNs>0) { //there are GRNs to print $sql = "SELECT suppliers.suppname, suppliers.address1, @@ -71,11 +75,14 @@ $SuppRow = DB_fetch_array($SuppResult); } } // get data to print +if ($NoOfGRNs >0){ include ('includes/PDFGrnHeader.inc'); //head up the page $YPos=$FormDesign->Data->y; - while ($myrow = DB_fetch_array($GRNResult)) { - + for ($i=1;$i<=$NoOfGRNs;$i++) { + if ($GRNNo!='Preview'){ + $myrow = DB_fetch_array($GRNResult); + } if (is_numeric($myrow['decimalplaces'])){ $DecimalPlaces=$myrow['decimalplaces']; } else { @@ -111,7 +118,7 @@ $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { //there were not GRNs to print - $title = _('GRN Error'); + $title = _('GRN Error'); include('includes/header.inc'); prnMsg(_('There were no GRNs to print'),'warn'); echo '<br><a href="'.$rootpath.'/index.php?' . SID . '">'. _('Back to the menu').'</a>'; Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/PDFQuotation.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -86,7 +86,7 @@ $pdf->addInfo('Subject', _('Quotation') . ' ' . $_GET['QuotationNo']); $FontSize=12; $PageNumber = 1; -$line_height=24; +$line_height=15; // $pdf->selectFont('./fonts/Helvetica.afm'); /* Now ... Has the order got any line items still outstanding to be invoiced */ @@ -171,11 +171,11 @@ $LeftOvers = $pdf->addTextWrap(650,$YPos,85,$FontSize,$DisplayTaxAmount,'right'); $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,$DisplayTotal,'right'); if (strlen($myrow2['narrative'])>1){ - $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,750,10,$myrow2['narrative']); - if (strlen($LeftOvers>1)){ - $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,750,10,$LeftOvers); + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$myrow2['narrative']); + if (strlen($LeftOvers) >1){ + $YPos -= 11; + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$LeftOvers); } } $QuotationTotal +=$LineTotal; @@ -186,13 +186,13 @@ $YPos -= ($line_height); } //end while there are line items to print out + if ((strlen($myrow['comments']) >200 AND $YPos-$line_height <= 75) OR (strlen($myrow['comments']) >1 AND $YPos-$line_height <= 62) OR $YPos-$line_height <= 50){ - /* We reached the end of the page so finsih off the page and start a newy */ + /* We reached the end of the page so finish off the page and start a newy */ $PageNumber++; include ('includes/PDFQuotationPageHeader.inc'); - } //end if need a new page headed up $LeftOvers = $pdf->addTextWrap($XPos,$YPos-80,200,10,_('Notes:')); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/Payments.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -870,12 +870,12 @@ ORDER BY tagref'; $result=DB_query($SQL,$db); - echo '<option value=0></option'; + echo '<option value=0></option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow["tagref"]){ - echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { - echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } echo '</select></td></tr>'; @@ -884,13 +884,10 @@ /*now set up a GLCode field to select from avaialble GL accounts */ if (isset($_POST['GLManualCode'])) { echo '<tr><td>' . _('Enter GL Account Manually') . ':</td> - <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, this.value, GLCode.options,'. - "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . - ' value='. $_POST['GLManualCode'] .' ></td></tr>'; + <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . ' value='. $_POST['GLManualCode'] .' ></td></tr>'; } else { echo '<tr><td>' . _('Enter GL Account Manually') . ':</td> - <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, this.value, GLCode.options,'. - "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"></td></tr>'; + <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"></td></tr>'; } echo '<tr><td>' . _('Select GL Account') . ':</td> <td><select name="GLCode" onChange="return assignComboToInput(this,'.'GLManualCode'.')">'; Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/StockLocTransfer.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -47,12 +47,12 @@ $ErrorMessage .= _('The quantity entered for').' '. $_POST['StockID' . $i] . ' ' . _('is less than or equal to 0') . '. ' . _('Please correct this or remove the item').'<br>'; } - // Only if stock exist at this location + // Only if stock exists at this location $result = DB_query("SELECT quantity FROM locstock WHERE stockid='" . $_POST['StockID' . $i] . "' and loccode='".$_POST['FromStockLocation']."'",$db); $myrow = DB_fetch_row($result); - if ($myrow[0] <= $_POST['StockQTY' . $i]){ + if ($myrow[0] < $_POST['StockQTY' . $i]){ $InputError = True; - $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('does not have enough stock available for transfer.') . '.<br>'; + $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('does not have enough stock available for transfer.') . '.<br />'; $_POST['LinesCounter'] -= 10; } DB_free_result( $result ); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/doc/Change.log.html 2011-02-08 09:20:50 UTC (rev 4486) @@ -1,6 +1,9 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> -<p>7/2/11: Phil PDFGrn.php turns out preview is used from the form modification script doh! Over simplificaton reversed to reinstate preview mode<p> +<p>8/2/11: Phil Fix incorrect layout of narrative on multiple lines of PDFQuotation.php as reported by Ricard Andreu</p> +<p>8/2/11: Tim/Ricard StockLocTransfer.php can now transfer the same amount as on hand in the location - previously checked to see that the transfer was less than the quantity on hand (when checking for negative stock)</p> +<p>8/2/11: Tim Payments.php and javascripts/MiscFunctions.js corrections to javascript</p> +<p>8/2/11: Phil PDFGrn.php turns out preview is used from the form modification script doh! Over simplificaton reversed to reinstate preview mode<p> <p>6/2/11: Otandeka Removed debug prnMsg in FixedAssetDepreciation</p> <p>5/2/11: Phil SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> <p>5/2/11: Phil PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> Modified: trunk/includes/PDFQuotationPageHeader.inc =================================================================== --- trunk/includes/PDFQuotationPageHeader.inc 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/includes/PDFQuotationPageHeader.inc 2011-02-08 09:20:50 UTC (rev 4486) @@ -14,7 +14,7 @@ $FontSize=18; $pdf->addText($XPos, 500,$FontSize, _('Quotation')); $FontSize=14; -$YPos = 480; +$YPos = 482; $pdf->addText($XPos, $YPos,$FontSize, $_SESSION['CompanyRecord']['coyname']); $FontSize =10; $pdf->addText($XPos, $YPos-12,$FontSize, $_SESSION['CompanyRecord']['regoffice1']); @@ -44,7 +44,7 @@ $XPos= 50; -$YPos += 25; +$YPos += 12; /*draw a nice curved corner box around the delivery details */ /*from the top right */ $pdf->partEllipse($XPos+225,$YPos+60,0,90,10,10); @@ -106,32 +106,28 @@ $LeftOvers = $pdf->addTextWrap(650,$YPos,85,$FontSize, _('Tax Amount'),'right'); $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize, _('Total'),'right'); - /*draw a box with nice round corner for entering line items */ /*90 degree arc at top right of box 0 degrees starts a bottom */ -$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+370,0,90,10,10); +$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+350,0,90,10,10); /*line to the top left */ -$pdf->line($Page_Width-$Right_Margin-10, $Bottom_Margin+380,$Left_Margin+10, $Bottom_Margin+380); +$pdf->line($Page_Width-$Right_Margin-10, $Bottom_Margin+360,$Left_Margin+10, $Bottom_Margin+360); /*line under headings to top left */ -$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+355,$Left_Margin, $Bottom_Margin+355); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+335,$Left_Margin, $Bottom_Margin+335); /*Dow top left corner */ -$pdf->partEllipse($Left_Margin+10, $Bottom_Margin+370,90,180,10,10); +$pdf->partEllipse($Left_Margin+10, $Bottom_Margin+350,90,180,10,10); /*Do a line to the bottom left corner */ -$pdf->line($Left_Margin, $Bottom_Margin+370,$Left_Margin, $Bottom_Margin+10); +$pdf->line($Left_Margin, $Bottom_Margin+350,$Left_Margin, $Bottom_Margin+10); /*Now do the bottom left corner 180 - 270 coming back west*/ $pdf->partEllipse($Left_Margin+10, $Bottom_Margin+10,180,270,10,10); /*Now a line to the bottom right */ $pdf->line($Left_Margin+10, $Bottom_Margin,$Page_Width-$Right_Margin-10, $Bottom_Margin); /*Now do the bottom right corner */ -$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+10,270,360,10,10); +$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+10,270,350,10,10); /*Finally join up to the top right corner where started */ -$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+10,$Page_Width-$Right_Margin, $Bottom_Margin+370); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+10,$Page_Width-$Right_Margin, $Bottom_Margin+350); -$YPos -= $line_height; - -$FontSize =12; - +$YPos -= (2*$line_height); ?> Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/includes/class.pdf.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -18,311 +18,311 @@ require_once(dirname(__FILE__).'/tcpdf/tcpdf.php'); if (!class_exists('Cpdf', false)) { - -class Cpdf extends TCPDF { - - public function __construct($DocOrientation='P', $DocUnits='mm', $DocPaper='A4') { - - parent::__construct($DocOrientation, $DocUnits, $DocPaper, true, 'utf-8', false); - - $this->setuserpdffont(); - } - - protected function setuserpdffont() { - - if (session_id()=='') { - session_start(); + + class Cpdf extends TCPDF { + + public function __construct($DocOrientation='P', $DocUnits='mm', $DocPaper='A4') { + + parent::__construct($DocOrientation, $DocUnits, $DocPaper, true, 'utf-8', false); + + $this->setuserpdffont(); } - - if (isset($_SESSION['PDFLanguage'])) { - - $UserPdfLang = $_SESSION['PDFLanguage']; - - switch ($UserPdfLang) { - case 0: $UserPdfFont = 'times'; break; - case 1: $UserPdfFont = 'javierjp'; break; - case 2: $UserPdfFont = 'javiergb'; break; + + protected function setuserpdffont() { + + if (session_id()=='') { + session_start(); } - - } else { - $UserPdfFont = 'helvetica'; + + if (isset($_SESSION['PDFLanguage'])) { + + $UserPdfLang = $_SESSION['PDFLanguage']; + + switch ($UserPdfLang) { + case 0: $UserPdfFont = 'times'; break; + case 1: $UserPdfFont = 'javierjp'; break; + case 2: $UserPdfFont = 'javiergb'; break; + } + + } else { + $UserPdfFont = 'helvetica'; + } + + $this->SetFont($UserPdfFont, '', 11); + // SetFont($family, $style='', $size=0, $fontfile='') } - - $this->SetFont($UserPdfFont, '', 11); - // SetFont($family, $style='', $size=0, $fontfile='') - } - - - function newPage() { -/* Javier: $this->setPrintHeader(false); This is not a removed call but added in. */ - $this->AddPage(); - } - - function line($x1,$y1,$x2,$y2,$style=array()) { -// Javier FPDF::line($x1, $this->h-$y1, $x2, $this->h-$y2); -// Javier: width, color and style might be edited - TCPDF::Line ($x1,$this->h-$y1,$x2,$this->h-$y2,$style); - } - - function addText($xb,$yb,$size,$text)//,$angle=0,$wordSpaceAdjust=0) - { -// Javier $text = html_entity_decode($text); - $this->SetFontSize($size); - $this->Text($xb, $this->h-$yb, $text); - } - - function addInfo($label, $value) { - if ($label == 'Creator') { - -/* Javier: Some scripts set the creator to be WebERP like this - $pdf->addInfo('Creator', 'WebERP http://www.weberp.org'); - But the Creator is TCPDF by Nicola Asuni, PDF_CREATOR is defined as 'TCPDF' in tcpdf/config/tcpdfconfig.php -*/ $this->SetCreator(PDF_CREATOR); + + + function newPage() { + /* Javier: $this->setPrintHeader(false); This is not a removed call but added in. */ + $this->AddPage(); } - if ($label == 'Author') { -/* Javier: Many scripts set the author to be WebERP like this - $pdf->addInfo('Author', 'WebERP ' . $Version); - But the Author might be set to be the user or make it constant here. -*/ $this->SetAuthor( $value ); + + function line($x1,$y1,$x2,$y2,$style=array()) { + // Javier FPDF::line($x1, $this->h-$y1, $x2, $this->h-$y2); + // Javier: width, color and style might be edited + TCPDF::Line ($x1,$this->h-$y1,$x2,$this->h-$y2,$style); } - if ($label == 'Title') { - $this->SetTitle( $value ); + + function addText($xb,$yb,$size,$text)//,$angle=0,$wordSpaceAdjust=0) + { + // Javier $text = html_entity_decode($text); + $this->SetFontSize($size); + $this->Text($xb, $this->h-$yb, $text); } - if ($label == 'Subject') { - $this->SetSubject( $value ); + + function addInfo($label, $value) { + if ($label == 'Creator') { + + /* Javier: Some scripts set the creator to be WebERP like this + $pdf->addInfo('Creator', 'WebERP http://www.weberp.org'); + But the Creator is TCPDF by Nicola Asuni, PDF_CREATOR is defined as 'TCPDF' in tcpdf/config/tcpdfconfig.php + */ $this->SetCreator(PDF_CREATOR); + } + if ($label == 'Author') { + /* Javier: Many scripts set the author to be WebERP like this + $pdf->addInfo('Author', 'WebERP ' . $Version); + But the Author might be set to be the user or make it constant here. + */ $this->SetAuthor( $value ); + } + if ($label == 'Title') { + $this->SetTitle( $value ); + } + if ($label == 'Subject') { + $this->SetSubject( $value ); + } + if ($label == 'Keywords') { + $this->SetKeywords( $value ); + } } - if ($label == 'Keywords') { - $this->SetKeywords( $value ); + + + function addJpegFromFile($img,$x,$y,$w=0,$h=0){ + $this->Image($img, $x, $this->h-$y-$h, $w, $h); } - } - - - function addJpegFromFile($img,$x,$y,$w=0,$h=0){ - $this->Image($img, $x, $this->h-$y-$h, $w, $h); - } - - /* - * Next Two functions are adopted from R&OS pdf class - */ - - /** - * draw a part of an ellipse - */ - function partEllipse($x0,$y0,$astart,$afinish,$r1,$r2=0,$angle=0,$nSeg=8) { - $this->ellipse($x0,$y0,$r1,$r2,$angle,$nSeg,$astart,$afinish,0); - } - - /** - * draw an ellipse - * note that the part and filled ellipse are just special cases of this function - * - * draws an ellipse in the current line style - * centered at $x0,$y0, radii $r1,$r2 - * if $r2 is not set, then a circle is drawn - * nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a - * pretty crappy shape at 2, as we are approximating with bezier curves. - */ - function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0,$fill_color=array(),$nc=8) { - - if ($r1==0){ - return; + + /* + * Next Two functions are adopted from R&OS pdf class + */ + + /** + * draw a part of an ellipse + */ + function partEllipse($x0,$y0,$astart,$afinish,$r1,$r2=0,$angle=0,$nSeg=8) { + $this->ellipse($x0,$y0,$r1,$r2,$angle,$nSeg,$astart,$afinish,0); } - if ($r2==0){ - $r2=$r1; + + /** + * draw an ellipse + * note that the part and filled ellipse are just special cases of this function + * + * draws an ellipse in the current line style + * centered at $x0,$y0, radii $r1,$r2 + * if $r2 is not set, then a circle is drawn + * nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a + * pretty crappy shape at 2, as we are approximating with bezier curves. + */ + function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0,$fill_color=array(),$nc=8) { + + if ($r1==0){ + return; + } + if ($r2==0){ + $r2=$r1; + } + if ($nSeg<2){ + $nSeg=2; + } + + $astart = deg2rad((float)$astart); + $afinish = deg2rad((float)$afinish); + $totalAngle =$afinish-$astart; + + $dt = $totalAngle/$nSeg; + $dtm = $dt/3; + + if ($angle != 0){ + $a = -1*deg2rad((float)$angle); + $tmp = "\n q "; + $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; + $tmp .= sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' cm'; + $x0=0; + $y0=0; + } else { + $tmp=''; + } + + $t1 = $astart; + $a0 = $x0+$r1*cos($t1); + $b0 = $y0+$r2*sin($t1); + $c0 = -$r1*sin($t1); + $d0 = $r2*cos($t1); + + $tmp.="\n".sprintf('%.3f',$a0).' '.sprintf('%.3f',$b0).' m '; + for ($i=1;$i<=$nSeg;$i++){ + // draw this bit of the total curve + $t1 = $i*$dt+$astart; + $a1 = $x0+$r1*cos($t1); + $b1 = $y0+$r2*sin($t1); + $c1 = -$r1*sin($t1); + $d1 = $r2*cos($t1); + $tmp.="\n".sprintf('%.3f',($a0+$c0*$dtm)).' '.sprintf('%.3f',($b0+$d0*$dtm)); + $tmp.= ' '.sprintf('%.3f',($a1-$c1*$dtm)).' '.sprintf('%.3f',($b1-$d1*$dtm)).' '.sprintf('%.3f',$a1).' '.sprintf('%.3f',$b1).' c'; + $a0=$a1; + $b0=$b1; + $c0=$c1; + $d0=$d1; + } + if ($fill){ + //$this->objects[$this->currentContents]['c'] + $tmp.=' f'; + } else { + if ($close){ + $tmp.=' s'; // small 's' signifies closing the path as well + } else { + $tmp.=' S'; + } + } + if ($angle !=0) { + $tmp .=' Q'; + } + $this->_out($tmp); } - if ($nSeg<2){ - $nSeg=2; + + /* Javier: + A file's name is needed if we don't want file extension to be .php + TCPDF has a different behaviour than FPDF, the recursive scripts needs D. + The admin/user may change I to D to force all pdf to be downloaded or open in a desktop app instead the browser plugin, but not vice-versa. + The admin/user may change I and D to F to save all pdf in the server for Document Management. + */ + + function OutputI($DocumentFilename = 'Document.pdf') { + if (($DocumentFilename == null) or ($DocumentFilename == '')) { + $DocumentFilename = _('Document.pdf'); + } + $this->Output($DocumentFilename,'I'); } - - $astart = deg2rad((float)$astart); - $afinish = deg2rad((float)$afinish); - $totalAngle =$afinish-$astart; - - $dt = $totalAngle/$nSeg; - $dtm = $dt/3; - - if ($angle != 0){ - $a = -1*deg2rad((float)$angle); - $tmp = "\n q "; - $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; - $tmp .= sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' cm'; - $x0=0; - $y0=0; - } else { - $tmp=''; + + function OutputD($DocumentFilename = 'Document.pdf') { + if (($DocumentFilename == null) or ($DocumentFilename == '')) { + $DocumentFilename = _('Document.pdf'); + } + $this->Output($DocumentFilename,'D'); } - - $t1 = $astart; - $a0 = $x0+$r1*cos($t1); - $b0 = $y0+$r2*sin($t1); - $c0 = -$r1*sin($t1); - $d0 = $r2*cos($t1); - - $tmp.="\n".sprintf('%.3f',$a0).' '.sprintf('%.3f',$b0).' m '; - for ($i=1;$i<=$nSeg;$i++){ - // draw this bit of the total curve - $t1 = $i*$dt+$astart; - $a1 = $x0+$r1*cos($t1); - $b1 = $y0+$r2*sin($t1); - $c1 = -$r1*sin($t1); - $d1 = $r2*cos($t1); - $tmp.="\n".sprintf('%.3f',($a0+$c0*$dtm)).' '.sprintf('%.3f',($b0+$d0*$dtm)); - $tmp.= ' '.sprintf('%.3f',($a1-$c1*$dtm)).' '.sprintf('%.3f',($b1-$d1*$dtm)).' '.sprintf('%.3f',$a1).' '.sprintf('%.3f',$b1).' c'; - $a0=$a1; - $b0=$b1; - $c0=$c1; - $d0=$d1; + + function RoundRectangle($XPos, $YPos, $Width, $Height, $Radius) { + /*from the top right */ + $this->partEllipse($XPos+$Width,$YPos,0,90,$Radius,$Radius); + /*line to the top left */ + $this->line($XPos+$Width, $YPos+$Radius,$XPos+$Radius, $YPos+$Radius); + /*Do top left corner */ + $this->partEllipse($XPos+$Radius, $YPos,90,180,$Radius,$Radius); + /*Do a line to the bottom left corner */ + $this->line($XPos+$Radius, $YPos-$Height-$Radius,$XPos+$Width, $YPos-$Height-$Radius); + /*Now do the bottom left corner 180 - 270 coming back west*/ + $this->partEllipse($XPos+$Radius, $YPos-$Height,180,270,$Radius,$Radius); + /*Now a line to the bottom right */ + $this->line($XPos, $YPos-$Height,$XPos, $YPos); + /*Now do the bottom right corner */ + $this->partEllipse($XPos+$Width, $YPos-$Height,270,360,$Radius,$Radius); + /*Finally join up to the top right corner where started */ + $this->line($XPos+$Width+$Radius, $YPos-$Height,$XPos+$Width+$Radius, $YPos); } - if ($fill){ - //$this->objects[$this->currentContents]['c'] - $tmp.=' f'; - } else { - if ($close){ - $tmp.=' s'; // small 's' signifies closing the path as well - } else { - $tmp.=' S'; + + function Rectangle($XPos, $YPos, $Width, $Height) { + $this->line($XPos, $YPos, $XPos+$Width, $YPos); + $this->line($XPos+$Width, $YPos, $XPos+$Width, $YPos-$Height); + $this->line($XPos+$Width, $YPos-$Height, $XPos, $YPos-$Height); + $this->line($XPos, $YPos-$Height, $XPos, $YPos); } - } - if ($angle !=0) { - $tmp .=' Q'; - } - $this->_out($tmp); - } - -/* Javier: - A file's name is needed if we don't want file extension to be .php - TCPDF has a different behaviour than FPDF, the recursive scripts needs D. - The admin/user may change I to D to force all pdf to be downloaded or open in a desktop app instead the browser plugin, but not vice-versa. - The admin/user may change I and D to F to save all pdf in the server for Document Management. -*/ - - function OutputI($DocumentFilename = 'Document.pdf') { - if (($DocumentFilename == null) or ($DocumentFilename == '')) { - $DocumentFilename = _('Document.pdf'); - } - $this->Output($DocumentFilename,'I'); - } - - function OutputD($DocumentFilename = 'Document.pdf') { - if (($DocumentFilename == null) or ($DocumentFilename == '')) { - $DocumentFilename = _('Document.pdf'); - } - $this->Output($DocumentFilename,'D'); - } - - function RoundRectangle($XPos, $YPos, $Width, $Height, $Radius) { - /*from the top right */ - $this->partEllipse($XPos+$Width,$YPos,0,90,$Radius,$Radius); - /*line to the top left */ - $this->line($XPos+$Width, $YPos+$Radius,$XPos+$Radius, $YPos+$Radius); - /*Do top left corner */ - $this->partEllipse($XPos+$Radius, $YPos,90,180,$Radius,$Radius); - /*Do a line to the bottom left corner */ - $this->line($XPos+$Radius, $YPos-$Height-$Radius,$XPos+$Width, $YPos-$Height-$Radius); - /*Now do the bottom left corner 180 - 270 coming back west*/ - $this->partEllipse($XPos+$Radius, $YPos-$Height,180,270,$Radius,$Radius); - /*Now a line to the bottom right */ - $this->line($XPos, $YPos-$Height,$XPos, $YPos); - /*Now do the bottom right corner */ - $this->partEllipse($XPos+$Width, $YPos-$Height,270,360,$Radius,$Radius); - /*Finally join up to the top right corner where started */ - $this->line($XPos+$Width+$Radius, $YPos-$Height,$XPos+$Width+$Radius, $YPos); - } - - function Rectangle($XPos, $YPos, $Width, $Height) { - $this->line($XPos, $YPos, $XPos+$Width, $YPos); - $this->line($XPos+$Width, $YPos, $XPos+$Width, $YPos-$Height); - $this->line($XPos+$Width, $YPos-$Height, $XPos, $YPos-$Height); - $this->line($XPos, $YPos-$Height, $XPos, $YPos); - } - - function addTextWrap($xb, $yb, $w, $h, $txt, $align='J', $border=0, $fill=0) { - - //$txt = html_entity_decode($txt); - - //some special characters are html encoded - //this code serves to make them appear human readable in pdf file - $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8'); - - $this->x = $xb; - $this->y = $this->h - $yb - $h; - - switch($align) { - case 'right': - $align = 'R'; break; - case 'center': - $align = 'C'; break; - default: - $align = 'L'; - - } - $this->SetFontSize($h); - $cw=&$this->CurrentFont['cw']; - if($w==0) { - $w=$this->w-$this->rMargin-$this->x; - } - $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; - $s=str_replace("\r",'',$txt); - $s=str_replace("\n",' ',$s); - $s = trim($s).' '; - $nb=strlen($s); - $b=0; - if ($border) { - if ($border==1) { - $border='LTRB'; - $b='LRT'; - $b2='LR'; - } else { - $b2=''; - if(is_int(strpos($border,'L'))) { - $b2.='L'; + + function addTextWrap($x, $yb, $w, $h, $txt, $align='J', $border=0, $fill=0) { + + //$txt = html_entity_decode($txt); + + //some special characters are html encoded + //this code serves to make them appear human readable in pdf file + $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8'); + + $this->x = $x; + $this->y = $this->h - $yb - $h; + + switch($align) { + case 'right': + $align = 'R'; break; + case 'center': + $align = 'C'; break; + default: + $align = 'L'; + + } + $this->SetFontSize($h); + $cw=&$this->CurrentFont['cw']; + if($w==0) { + $w=$this->w-$this->rMargin-$this->x; + } + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $s=str_replace("\n",' ',$s); + $s = trim($s).' '; + $nb=strlen($s); + $b=0; + if ($border) { + if ($border==1) { + $border='LTRB'; + $b='LRT'; + $b2='LR'; + } else { + $b2=''; + if(is_int(strpos($border,'L'))) { + $b2.='L'; + } + if(is_int(strpos($border,'R'))) { + $b2.='R'; + } + $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; } - if(is_int(strpos($border,'R'))) { - $b2.='R'; + } + $sep=-1; + $i=0; + $l= $ls=0; + $ns=0; + while($i<$nb) { + $c=$s{$i}; + if($c==' ' AND $i>0) { + $sep=$i; + $ls=$l; + $ns++; } - $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; + $l += $cw[$i]; + if($l>$wmax){ + break; + } else { + $i++; + } } - } - $sep=-1; - $i=0; - $l= $ls=0; - $ns=0; - while($i<$nb) { - - $c=$s{$i}; - - if($c==' ' AND $i>0) { - $sep=$i; - $ls=$l; - $ns++; + if($sep==-1) { + if($i==0) { + $i++; + } + + if(isset($this->ws) and $this->ws>0) { + $this->ws=0; + $this->_out('0 Tw'); + } + $sep = $i; + } else { + if($align=='J') { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; + $this->_out(sprintf('%.3f Tw',$this->ws*$this->k)); + } } - $l+=$cw[$i]; - if($l>$wmax) - break; - else - $i++; - } - if($sep==-1) { - if($i==0) $i++; - - if(isset($this->ws) and $this->ws>0) { - $this->ws=0; - $this->_out('0 Tw'); - } - $sep = $i; - } else { - if($align=='J') { - $this->ws=($ns>1) ? ($wmax-$ls)/1000*$th... [truncated message content] |
From: <dai...@us...> - 2011-02-08 09:20:57
|
Revision: 4486 http://web-erp.svn.sourceforge.net/web-erp/?rev=4486&view=rev Author: daintree Date: 2011-02-08 09:20:50 +0000 (Tue, 08 Feb 2011) Log Message: ----------- PDFQuotation - Ricards multi-line issue on narrative Modified Paths: -------------- trunk/PDFGrn.php trunk/PDFQuotation.php trunk/Payments.php trunk/StockLocTransfer.php trunk/doc/Change.log.html trunk/includes/PDFQuotationPageHeader.inc trunk/includes/class.pdf.php trunk/javascripts/MiscFunctions.js Modified: trunk/PDFGrn.php =================================================================== --- trunk/PDFGrn.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/PDFGrn.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -21,20 +21,24 @@ $pdf->addInfo('Title', _('Goods Received Note') ); if ($GRNNo == 'Preview'){ - $myrow['itemcode'] = strpad('', 15,'x'); + $myrow['itemcode'] = str_pad('', 15,'x'); $myrow['deliverydate'] = '0000-00-00'; - $myrow['itemdescription'] = strpad('', 30,'x'); - $myrow['qtyrecd'] = 99999.99; - $myrow['supplierid'] = strpad('', 10,'x'); - $myrow['suppliersunit'] = strpad('', 10,'x'); - $myrow['units'] = strpad('', 10,'x'); - $SuppRow['suppname'] = strpad('', 30,'x'); - $SuppRow['address1'] = strpad('', 30,'x'); - $SuppRow['address2'] = strpad('', 30,'x'); - $SuppRow['address3'] = strpad('', 20,'x'); - $SuppRow['address4'] = strpad('', 20,'x'); - $SuppRow['address5'] = strpad('', 10,'x'); - $SuppRow['address6'] = strpad('', 10,'x'); + $myrow['itemdescription'] = str_pad('', 30,'x'); + $myrow['qtyrecd'] = 99999999.99; + $myrow['decimalplaces'] =2; + $myrow['conversionfactor']=1; + $myrow['supplierid'] = str_pad('', 10,'x'); + $myrow['suppliersunit'] = str_pad('', 10,'x'); + $myrow['units'] = str_pad('', 10,'x'); + + $SuppRow['suppname'] = str_pad('', 30,'x'); + $SuppRow['address1'] = str_pad('', 30,'x'); + $SuppRow['address2'] = str_pad('', 30,'x'); + $SuppRow['address3'] = str_pad('', 30,'x'); + $SuppRow['address4'] = str_pad('', 20,'x'); + $SuppRow['address5'] = str_pad('', 10,'x'); + $SuppRow['address6'] = str_pad('', 10,'x'); + $NoOfGRNs =1; } else { //NOT PREVIEW $sql="SELECT grns.itemcode, @@ -54,8 +58,8 @@ WHERE grnbatch='".$GRNNo."'"; $GRNResult=DB_query($sql, $db); - - if(DB_num_rows($GRNResult)>0) { //there are GRNs to print + $NoOfGRNs = DB_num_rows($GRNResult); + if($NoOfGRNs>0) { //there are GRNs to print $sql = "SELECT suppliers.suppname, suppliers.address1, @@ -71,11 +75,14 @@ $SuppRow = DB_fetch_array($SuppResult); } } // get data to print +if ($NoOfGRNs >0){ include ('includes/PDFGrnHeader.inc'); //head up the page $YPos=$FormDesign->Data->y; - while ($myrow = DB_fetch_array($GRNResult)) { - + for ($i=1;$i<=$NoOfGRNs;$i++) { + if ($GRNNo!='Preview'){ + $myrow = DB_fetch_array($GRNResult); + } if (is_numeric($myrow['decimalplaces'])){ $DecimalPlaces=$myrow['decimalplaces']; } else { @@ -111,7 +118,7 @@ $pdf->OutputD($_SESSION['DatabaseName'] . '_GRN_' . date('Y-m-d').'.pdf');//UldisN $pdf->__destruct(); //UldisN } else { //there were not GRNs to print - $title = _('GRN Error'); + $title = _('GRN Error'); include('includes/header.inc'); prnMsg(_('There were no GRNs to print'),'warn'); echo '<br><a href="'.$rootpath.'/index.php?' . SID . '">'. _('Back to the menu').'</a>'; Modified: trunk/PDFQuotation.php =================================================================== --- trunk/PDFQuotation.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/PDFQuotation.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -86,7 +86,7 @@ $pdf->addInfo('Subject', _('Quotation') . ' ' . $_GET['QuotationNo']); $FontSize=12; $PageNumber = 1; -$line_height=24; +$line_height=15; // $pdf->selectFont('./fonts/Helvetica.afm'); /* Now ... Has the order got any line items still outstanding to be invoiced */ @@ -171,11 +171,11 @@ $LeftOvers = $pdf->addTextWrap(650,$YPos,85,$FontSize,$DisplayTaxAmount,'right'); $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize,$DisplayTotal,'right'); if (strlen($myrow2['narrative'])>1){ - $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,750,10,$myrow2['narrative']); - if (strlen($LeftOvers>1)){ - $YPos -= 10; - $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,750,10,$LeftOvers); + $YPos -= ($line_height); + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$myrow2['narrative']); + if (strlen($LeftOvers) >1){ + $YPos -= 11; + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,800,$FontSize,$LeftOvers); } } $QuotationTotal +=$LineTotal; @@ -186,13 +186,13 @@ $YPos -= ($line_height); } //end while there are line items to print out + if ((strlen($myrow['comments']) >200 AND $YPos-$line_height <= 75) OR (strlen($myrow['comments']) >1 AND $YPos-$line_height <= 62) OR $YPos-$line_height <= 50){ - /* We reached the end of the page so finsih off the page and start a newy */ + /* We reached the end of the page so finish off the page and start a newy */ $PageNumber++; include ('includes/PDFQuotationPageHeader.inc'); - } //end if need a new page headed up $LeftOvers = $pdf->addTextWrap($XPos,$YPos-80,200,10,_('Notes:')); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/Payments.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -870,12 +870,12 @@ ORDER BY tagref'; $result=DB_query($SQL,$db); - echo '<option value=0></option'; + echo '<option value=0></option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow["tagref"]){ - echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { - echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription']; + echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } } echo '</select></td></tr>'; @@ -884,13 +884,10 @@ /*now set up a GLCode field to select from avaialble GL accounts */ if (isset($_POST['GLManualCode'])) { echo '<tr><td>' . _('Enter GL Account Manually') . ':</td> - <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, this.value, GLCode.options,'. - "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . - ' value='. $_POST['GLManualCode'] .' ></td></tr>'; + <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"' . ' value='. $_POST['GLManualCode'] .' ></td></tr>'; } else { echo '<tr><td>' . _('Enter GL Account Manually') . ':</td> - <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, this.value, GLCode.options,'. - "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"></td></tr>'; + <td><input type=Text class="number" Name="GLManualCode" Maxlength=12 size=12 onChange="return inArray(this, GLCode.options,'. "'".'The account code '."'".'+ this.value+ '."'".' doesnt exist'."'".')"></td></tr>'; } echo '<tr><td>' . _('Select GL Account') . ':</td> <td><select name="GLCode" onChange="return assignComboToInput(this,'.'GLManualCode'.')">'; Modified: trunk/StockLocTransfer.php =================================================================== --- trunk/StockLocTransfer.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/StockLocTransfer.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -47,12 +47,12 @@ $ErrorMessage .= _('The quantity entered for').' '. $_POST['StockID' . $i] . ' ' . _('is less than or equal to 0') . '. ' . _('Please correct this or remove the item').'<br>'; } - // Only if stock exist at this location + // Only if stock exists at this location $result = DB_query("SELECT quantity FROM locstock WHERE stockid='" . $_POST['StockID' . $i] . "' and loccode='".$_POST['FromStockLocation']."'",$db); $myrow = DB_fetch_row($result); - if ($myrow[0] <= $_POST['StockQTY' . $i]){ + if ($myrow[0] < $_POST['StockQTY' . $i]){ $InputError = True; - $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('does not have enough stock available for transfer.') . '.<br>'; + $ErrorMessage .= _('The part code entered of'). ' ' . $_POST['StockID' . $i] . ' '. _('does not have enough stock available for transfer.') . '.<br />'; $_POST['LinesCounter'] -= 10; } DB_free_result( $result ); Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/doc/Change.log.html 2011-02-08 09:20:50 UTC (rev 4486) @@ -1,6 +1,9 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> -<p>7/2/11: Phil PDFGrn.php turns out preview is used from the form modification script doh! Over simplificaton reversed to reinstate preview mode<p> +<p>8/2/11: Phil Fix incorrect layout of narrative on multiple lines of PDFQuotation.php as reported by Ricard Andreu</p> +<p>8/2/11: Tim/Ricard StockLocTransfer.php can now transfer the same amount as on hand in the location - previously checked to see that the transfer was less than the quantity on hand (when checking for negative stock)</p> +<p>8/2/11: Tim Payments.php and javascripts/MiscFunctions.js corrections to javascript</p> +<p>8/2/11: Phil PDFGrn.php turns out preview is used from the form modification script doh! Over simplificaton reversed to reinstate preview mode<p> <p>6/2/11: Otandeka Removed debug prnMsg in FixedAssetDepreciation</p> <p>5/2/11: Phil SystemParameters.php new option to AutoAuthorisePO when the user has authority to do so</p> <p>5/2/11: Phil PO_Items.php fixed non-existant variables on Enter nominal line. Added option to automatically authorise when user is an authoriser as well as a creator</p> Modified: trunk/includes/PDFQuotationPageHeader.inc =================================================================== --- trunk/includes/PDFQuotationPageHeader.inc 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/includes/PDFQuotationPageHeader.inc 2011-02-08 09:20:50 UTC (rev 4486) @@ -14,7 +14,7 @@ $FontSize=18; $pdf->addText($XPos, 500,$FontSize, _('Quotation')); $FontSize=14; -$YPos = 480; +$YPos = 482; $pdf->addText($XPos, $YPos,$FontSize, $_SESSION['CompanyRecord']['coyname']); $FontSize =10; $pdf->addText($XPos, $YPos-12,$FontSize, $_SESSION['CompanyRecord']['regoffice1']); @@ -44,7 +44,7 @@ $XPos= 50; -$YPos += 25; +$YPos += 12; /*draw a nice curved corner box around the delivery details */ /*from the top right */ $pdf->partEllipse($XPos+225,$YPos+60,0,90,10,10); @@ -106,32 +106,28 @@ $LeftOvers = $pdf->addTextWrap(650,$YPos,85,$FontSize, _('Tax Amount'),'right'); $LeftOvers = $pdf->addTextWrap(700,$YPos,90,$FontSize, _('Total'),'right'); - /*draw a box with nice round corner for entering line items */ /*90 degree arc at top right of box 0 degrees starts a bottom */ -$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+370,0,90,10,10); +$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+350,0,90,10,10); /*line to the top left */ -$pdf->line($Page_Width-$Right_Margin-10, $Bottom_Margin+380,$Left_Margin+10, $Bottom_Margin+380); +$pdf->line($Page_Width-$Right_Margin-10, $Bottom_Margin+360,$Left_Margin+10, $Bottom_Margin+360); /*line under headings to top left */ -$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+355,$Left_Margin, $Bottom_Margin+355); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+335,$Left_Margin, $Bottom_Margin+335); /*Dow top left corner */ -$pdf->partEllipse($Left_Margin+10, $Bottom_Margin+370,90,180,10,10); +$pdf->partEllipse($Left_Margin+10, $Bottom_Margin+350,90,180,10,10); /*Do a line to the bottom left corner */ -$pdf->line($Left_Margin, $Bottom_Margin+370,$Left_Margin, $Bottom_Margin+10); +$pdf->line($Left_Margin, $Bottom_Margin+350,$Left_Margin, $Bottom_Margin+10); /*Now do the bottom left corner 180 - 270 coming back west*/ $pdf->partEllipse($Left_Margin+10, $Bottom_Margin+10,180,270,10,10); /*Now a line to the bottom right */ $pdf->line($Left_Margin+10, $Bottom_Margin,$Page_Width-$Right_Margin-10, $Bottom_Margin); /*Now do the bottom right corner */ -$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+10,270,360,10,10); +$pdf->partEllipse($Page_Width-$Right_Margin-10, $Bottom_Margin+10,270,350,10,10); /*Finally join up to the top right corner where started */ -$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+10,$Page_Width-$Right_Margin, $Bottom_Margin+370); +$pdf->line($Page_Width-$Right_Margin, $Bottom_Margin+10,$Page_Width-$Right_Margin, $Bottom_Margin+350); -$YPos -= $line_height; - -$FontSize =12; - +$YPos -= (2*$line_height); ?> Modified: trunk/includes/class.pdf.php =================================================================== --- trunk/includes/class.pdf.php 2011-02-07 08:51:36 UTC (rev 4485) +++ trunk/includes/class.pdf.php 2011-02-08 09:20:50 UTC (rev 4486) @@ -18,311 +18,311 @@ require_once(dirname(__FILE__).'/tcpdf/tcpdf.php'); if (!class_exists('Cpdf', false)) { - -class Cpdf extends TCPDF { - - public function __construct($DocOrientation='P', $DocUnits='mm', $DocPaper='A4') { - - parent::__construct($DocOrientation, $DocUnits, $DocPaper, true, 'utf-8', false); - - $this->setuserpdffont(); - } - - protected function setuserpdffont() { - - if (session_id()=='') { - session_start(); + + class Cpdf extends TCPDF { + + public function __construct($DocOrientation='P', $DocUnits='mm', $DocPaper='A4') { + + parent::__construct($DocOrientation, $DocUnits, $DocPaper, true, 'utf-8', false); + + $this->setuserpdffont(); } - - if (isset($_SESSION['PDFLanguage'])) { - - $UserPdfLang = $_SESSION['PDFLanguage']; - - switch ($UserPdfLang) { - case 0: $UserPdfFont = 'times'; break; - case 1: $UserPdfFont = 'javierjp'; break; - case 2: $UserPdfFont = 'javiergb'; break; + + protected function setuserpdffont() { + + if (session_id()=='') { + session_start(); } - - } else { - $UserPdfFont = 'helvetica'; + + if (isset($_SESSION['PDFLanguage'])) { + + $UserPdfLang = $_SESSION['PDFLanguage']; + + switch ($UserPdfLang) { + case 0: $UserPdfFont = 'times'; break; + case 1: $UserPdfFont = 'javierjp'; break; + case 2: $UserPdfFont = 'javiergb'; break; + } + + } else { + $UserPdfFont = 'helvetica'; + } + + $this->SetFont($UserPdfFont, '', 11); + // SetFont($family, $style='', $size=0, $fontfile='') } - - $this->SetFont($UserPdfFont, '', 11); - // SetFont($family, $style='', $size=0, $fontfile='') - } - - - function newPage() { -/* Javier: $this->setPrintHeader(false); This is not a removed call but added in. */ - $this->AddPage(); - } - - function line($x1,$y1,$x2,$y2,$style=array()) { -// Javier FPDF::line($x1, $this->h-$y1, $x2, $this->h-$y2); -// Javier: width, color and style might be edited - TCPDF::Line ($x1,$this->h-$y1,$x2,$this->h-$y2,$style); - } - - function addText($xb,$yb,$size,$text)//,$angle=0,$wordSpaceAdjust=0) - { -// Javier $text = html_entity_decode($text); - $this->SetFontSize($size); - $this->Text($xb, $this->h-$yb, $text); - } - - function addInfo($label, $value) { - if ($label == 'Creator') { - -/* Javier: Some scripts set the creator to be WebERP like this - $pdf->addInfo('Creator', 'WebERP http://www.weberp.org'); - But the Creator is TCPDF by Nicola Asuni, PDF_CREATOR is defined as 'TCPDF' in tcpdf/config/tcpdfconfig.php -*/ $this->SetCreator(PDF_CREATOR); + + + function newPage() { + /* Javier: $this->setPrintHeader(false); This is not a removed call but added in. */ + $this->AddPage(); } - if ($label == 'Author') { -/* Javier: Many scripts set the author to be WebERP like this - $pdf->addInfo('Author', 'WebERP ' . $Version); - But the Author might be set to be the user or make it constant here. -*/ $this->SetAuthor( $value ); + + function line($x1,$y1,$x2,$y2,$style=array()) { + // Javier FPDF::line($x1, $this->h-$y1, $x2, $this->h-$y2); + // Javier: width, color and style might be edited + TCPDF::Line ($x1,$this->h-$y1,$x2,$this->h-$y2,$style); } - if ($label == 'Title') { - $this->SetTitle( $value ); + + function addText($xb,$yb,$size,$text)//,$angle=0,$wordSpaceAdjust=0) + { + // Javier $text = html_entity_decode($text); + $this->SetFontSize($size); + $this->Text($xb, $this->h-$yb, $text); } - if ($label == 'Subject') { - $this->SetSubject( $value ); + + function addInfo($label, $value) { + if ($label == 'Creator') { + + /* Javier: Some scripts set the creator to be WebERP like this + $pdf->addInfo('Creator', 'WebERP http://www.weberp.org'); + But the Creator is TCPDF by Nicola Asuni, PDF_CREATOR is defined as 'TCPDF' in tcpdf/config/tcpdfconfig.php + */ $this->SetCreator(PDF_CREATOR); + } + if ($label == 'Author') { + /* Javier: Many scripts set the author to be WebERP like this + $pdf->addInfo('Author', 'WebERP ' . $Version); + But the Author might be set to be the user or make it constant here. + */ $this->SetAuthor( $value ); + } + if ($label == 'Title') { + $this->SetTitle( $value ); + } + if ($label == 'Subject') { + $this->SetSubject( $value ); + } + if ($label == 'Keywords') { + $this->SetKeywords( $value ); + } } - if ($label == 'Keywords') { - $this->SetKeywords( $value ); + + + function addJpegFromFile($img,$x,$y,$w=0,$h=0){ + $this->Image($img, $x, $this->h-$y-$h, $w, $h); } - } - - - function addJpegFromFile($img,$x,$y,$w=0,$h=0){ - $this->Image($img, $x, $this->h-$y-$h, $w, $h); - } - - /* - * Next Two functions are adopted from R&OS pdf class - */ - - /** - * draw a part of an ellipse - */ - function partEllipse($x0,$y0,$astart,$afinish,$r1,$r2=0,$angle=0,$nSeg=8) { - $this->ellipse($x0,$y0,$r1,$r2,$angle,$nSeg,$astart,$afinish,0); - } - - /** - * draw an ellipse - * note that the part and filled ellipse are just special cases of this function - * - * draws an ellipse in the current line style - * centered at $x0,$y0, radii $r1,$r2 - * if $r2 is not set, then a circle is drawn - * nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a - * pretty crappy shape at 2, as we are approximating with bezier curves. - */ - function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0,$fill_color=array(),$nc=8) { - - if ($r1==0){ - return; + + /* + * Next Two functions are adopted from R&OS pdf class + */ + + /** + * draw a part of an ellipse + */ + function partEllipse($x0,$y0,$astart,$afinish,$r1,$r2=0,$angle=0,$nSeg=8) { + $this->ellipse($x0,$y0,$r1,$r2,$angle,$nSeg,$astart,$afinish,0); } - if ($r2==0){ - $r2=$r1; + + /** + * draw an ellipse + * note that the part and filled ellipse are just special cases of this function + * + * draws an ellipse in the current line style + * centered at $x0,$y0, radii $r1,$r2 + * if $r2 is not set, then a circle is drawn + * nSeg is not allowed to be less than 2, as this will simply draw a line (and will even draw a + * pretty crappy shape at 2, as we are approximating with bezier curves. + */ + function ellipse($x0,$y0,$r1,$r2=0,$angle=0,$nSeg=8,$astart=0,$afinish=360,$close=1,$fill=0,$fill_color=array(),$nc=8) { + + if ($r1==0){ + return; + } + if ($r2==0){ + $r2=$r1; + } + if ($nSeg<2){ + $nSeg=2; + } + + $astart = deg2rad((float)$astart); + $afinish = deg2rad((float)$afinish); + $totalAngle =$afinish-$astart; + + $dt = $totalAngle/$nSeg; + $dtm = $dt/3; + + if ($angle != 0){ + $a = -1*deg2rad((float)$angle); + $tmp = "\n q "; + $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; + $tmp .= sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' cm'; + $x0=0; + $y0=0; + } else { + $tmp=''; + } + + $t1 = $astart; + $a0 = $x0+$r1*cos($t1); + $b0 = $y0+$r2*sin($t1); + $c0 = -$r1*sin($t1); + $d0 = $r2*cos($t1); + + $tmp.="\n".sprintf('%.3f',$a0).' '.sprintf('%.3f',$b0).' m '; + for ($i=1;$i<=$nSeg;$i++){ + // draw this bit of the total curve + $t1 = $i*$dt+$astart; + $a1 = $x0+$r1*cos($t1); + $b1 = $y0+$r2*sin($t1); + $c1 = -$r1*sin($t1); + $d1 = $r2*cos($t1); + $tmp.="\n".sprintf('%.3f',($a0+$c0*$dtm)).' '.sprintf('%.3f',($b0+$d0*$dtm)); + $tmp.= ' '.sprintf('%.3f',($a1-$c1*$dtm)).' '.sprintf('%.3f',($b1-$d1*$dtm)).' '.sprintf('%.3f',$a1).' '.sprintf('%.3f',$b1).' c'; + $a0=$a1; + $b0=$b1; + $c0=$c1; + $d0=$d1; + } + if ($fill){ + //$this->objects[$this->currentContents]['c'] + $tmp.=' f'; + } else { + if ($close){ + $tmp.=' s'; // small 's' signifies closing the path as well + } else { + $tmp.=' S'; + } + } + if ($angle !=0) { + $tmp .=' Q'; + } + $this->_out($tmp); } - if ($nSeg<2){ - $nSeg=2; + + /* Javier: + A file's name is needed if we don't want file extension to be .php + TCPDF has a different behaviour than FPDF, the recursive scripts needs D. + The admin/user may change I to D to force all pdf to be downloaded or open in a desktop app instead the browser plugin, but not vice-versa. + The admin/user may change I and D to F to save all pdf in the server for Document Management. + */ + + function OutputI($DocumentFilename = 'Document.pdf') { + if (($DocumentFilename == null) or ($DocumentFilename == '')) { + $DocumentFilename = _('Document.pdf'); + } + $this->Output($DocumentFilename,'I'); } - - $astart = deg2rad((float)$astart); - $afinish = deg2rad((float)$afinish); - $totalAngle =$afinish-$astart; - - $dt = $totalAngle/$nSeg; - $dtm = $dt/3; - - if ($angle != 0){ - $a = -1*deg2rad((float)$angle); - $tmp = "\n q "; - $tmp .= sprintf('%.3f',cos($a)).' '.sprintf('%.3f',(-1.0*sin($a))).' '.sprintf('%.3f',sin($a)).' '.sprintf('%.3f',cos($a)).' '; - $tmp .= sprintf('%.3f',$x0).' '.sprintf('%.3f',$y0).' cm'; - $x0=0; - $y0=0; - } else { - $tmp=''; + + function OutputD($DocumentFilename = 'Document.pdf') { + if (($DocumentFilename == null) or ($DocumentFilename == '')) { + $DocumentFilename = _('Document.pdf'); + } + $this->Output($DocumentFilename,'D'); } - - $t1 = $astart; - $a0 = $x0+$r1*cos($t1); - $b0 = $y0+$r2*sin($t1); - $c0 = -$r1*sin($t1); - $d0 = $r2*cos($t1); - - $tmp.="\n".sprintf('%.3f',$a0).' '.sprintf('%.3f',$b0).' m '; - for ($i=1;$i<=$nSeg;$i++){ - // draw this bit of the total curve - $t1 = $i*$dt+$astart; - $a1 = $x0+$r1*cos($t1); - $b1 = $y0+$r2*sin($t1); - $c1 = -$r1*sin($t1); - $d1 = $r2*cos($t1); - $tmp.="\n".sprintf('%.3f',($a0+$c0*$dtm)).' '.sprintf('%.3f',($b0+$d0*$dtm)); - $tmp.= ' '.sprintf('%.3f',($a1-$c1*$dtm)).' '.sprintf('%.3f',($b1-$d1*$dtm)).' '.sprintf('%.3f',$a1).' '.sprintf('%.3f',$b1).' c'; - $a0=$a1; - $b0=$b1; - $c0=$c1; - $d0=$d1; + + function RoundRectangle($XPos, $YPos, $Width, $Height, $Radius) { + /*from the top right */ + $this->partEllipse($XPos+$Width,$YPos,0,90,$Radius,$Radius); + /*line to the top left */ + $this->line($XPos+$Width, $YPos+$Radius,$XPos+$Radius, $YPos+$Radius); + /*Do top left corner */ + $this->partEllipse($XPos+$Radius, $YPos,90,180,$Radius,$Radius); + /*Do a line to the bottom left corner */ + $this->line($XPos+$Radius, $YPos-$Height-$Radius,$XPos+$Width, $YPos-$Height-$Radius); + /*Now do the bottom left corner 180 - 270 coming back west*/ + $this->partEllipse($XPos+$Radius, $YPos-$Height,180,270,$Radius,$Radius); + /*Now a line to the bottom right */ + $this->line($XPos, $YPos-$Height,$XPos, $YPos); + /*Now do the bottom right corner */ + $this->partEllipse($XPos+$Width, $YPos-$Height,270,360,$Radius,$Radius); + /*Finally join up to the top right corner where started */ + $this->line($XPos+$Width+$Radius, $YPos-$Height,$XPos+$Width+$Radius, $YPos); } - if ($fill){ - //$this->objects[$this->currentContents]['c'] - $tmp.=' f'; - } else { - if ($close){ - $tmp.=' s'; // small 's' signifies closing the path as well - } else { - $tmp.=' S'; + + function Rectangle($XPos, $YPos, $Width, $Height) { + $this->line($XPos, $YPos, $XPos+$Width, $YPos); + $this->line($XPos+$Width, $YPos, $XPos+$Width, $YPos-$Height); + $this->line($XPos+$Width, $YPos-$Height, $XPos, $YPos-$Height); + $this->line($XPos, $YPos-$Height, $XPos, $YPos); } - } - if ($angle !=0) { - $tmp .=' Q'; - } - $this->_out($tmp); - } - -/* Javier: - A file's name is needed if we don't want file extension to be .php - TCPDF has a different behaviour than FPDF, the recursive scripts needs D. - The admin/user may change I to D to force all pdf to be downloaded or open in a desktop app instead the browser plugin, but not vice-versa. - The admin/user may change I and D to F to save all pdf in the server for Document Management. -*/ - - function OutputI($DocumentFilename = 'Document.pdf') { - if (($DocumentFilename == null) or ($DocumentFilename == '')) { - $DocumentFilename = _('Document.pdf'); - } - $this->Output($DocumentFilename,'I'); - } - - function OutputD($DocumentFilename = 'Document.pdf') { - if (($DocumentFilename == null) or ($DocumentFilename == '')) { - $DocumentFilename = _('Document.pdf'); - } - $this->Output($DocumentFilename,'D'); - } - - function RoundRectangle($XPos, $YPos, $Width, $Height, $Radius) { - /*from the top right */ - $this->partEllipse($XPos+$Width,$YPos,0,90,$Radius,$Radius); - /*line to the top left */ - $this->line($XPos+$Width, $YPos+$Radius,$XPos+$Radius, $YPos+$Radius); - /*Do top left corner */ - $this->partEllipse($XPos+$Radius, $YPos,90,180,$Radius,$Radius); - /*Do a line to the bottom left corner */ - $this->line($XPos+$Radius, $YPos-$Height-$Radius,$XPos+$Width, $YPos-$Height-$Radius); - /*Now do the bottom left corner 180 - 270 coming back west*/ - $this->partEllipse($XPos+$Radius, $YPos-$Height,180,270,$Radius,$Radius); - /*Now a line to the bottom right */ - $this->line($XPos, $YPos-$Height,$XPos, $YPos); - /*Now do the bottom right corner */ - $this->partEllipse($XPos+$Width, $YPos-$Height,270,360,$Radius,$Radius); - /*Finally join up to the top right corner where started */ - $this->line($XPos+$Width+$Radius, $YPos-$Height,$XPos+$Width+$Radius, $YPos); - } - - function Rectangle($XPos, $YPos, $Width, $Height) { - $this->line($XPos, $YPos, $XPos+$Width, $YPos); - $this->line($XPos+$Width, $YPos, $XPos+$Width, $YPos-$Height); - $this->line($XPos+$Width, $YPos-$Height, $XPos, $YPos-$Height); - $this->line($XPos, $YPos-$Height, $XPos, $YPos); - } - - function addTextWrap($xb, $yb, $w, $h, $txt, $align='J', $border=0, $fill=0) { - - //$txt = html_entity_decode($txt); - - //some special characters are html encoded - //this code serves to make them appear human readable in pdf file - $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8'); - - $this->x = $xb; - $this->y = $this->h - $yb - $h; - - switch($align) { - case 'right': - $align = 'R'; break; - case 'center': - $align = 'C'; break; - default: - $align = 'L'; - - } - $this->SetFontSize($h); - $cw=&$this->CurrentFont['cw']; - if($w==0) { - $w=$this->w-$this->rMargin-$this->x; - } - $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; - $s=str_replace("\r",'',$txt); - $s=str_replace("\n",' ',$s); - $s = trim($s).' '; - $nb=strlen($s); - $b=0; - if ($border) { - if ($border==1) { - $border='LTRB'; - $b='LRT'; - $b2='LR'; - } else { - $b2=''; - if(is_int(strpos($border,'L'))) { - $b2.='L'; + + function addTextWrap($x, $yb, $w, $h, $txt, $align='J', $border=0, $fill=0) { + + //$txt = html_entity_decode($txt); + + //some special characters are html encoded + //this code serves to make them appear human readable in pdf file + $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8'); + + $this->x = $x; + $this->y = $this->h - $yb - $h; + + switch($align) { + case 'right': + $align = 'R'; break; + case 'center': + $align = 'C'; break; + default: + $align = 'L'; + + } + $this->SetFontSize($h); + $cw=&$this->CurrentFont['cw']; + if($w==0) { + $w=$this->w-$this->rMargin-$this->x; + } + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $s=str_replace("\n",' ',$s); + $s = trim($s).' '; + $nb=strlen($s); + $b=0; + if ($border) { + if ($border==1) { + $border='LTRB'; + $b='LRT'; + $b2='LR'; + } else { + $b2=''; + if(is_int(strpos($border,'L'))) { + $b2.='L'; + } + if(is_int(strpos($border,'R'))) { + $b2.='R'; + } + $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; } - if(is_int(strpos($border,'R'))) { - $b2.='R'; + } + $sep=-1; + $i=0; + $l= $ls=0; + $ns=0; + while($i<$nb) { + $c=$s{$i}; + if($c==' ' AND $i>0) { + $sep=$i; + $ls=$l; + $ns++; } - $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2; + $l += $cw[$i]; + if($l>$wmax){ + break; + } else { + $i++; + } } - } - $sep=-1; - $i=0; - $l= $ls=0; - $ns=0; - while($i<$nb) { - - $c=$s{$i}; - - if($c==' ' AND $i>0) { - $sep=$i; - $ls=$l; - $ns++; + if($sep==-1) { + if($i==0) { + $i++; + } + + if(isset($this->ws) and $this->ws>0) { + $this->ws=0; + $this->_out('0 Tw'); + } + $sep = $i; + } else { + if($align=='J') { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; + $this->_out(sprintf('%.3f Tw',$this->ws*$this->k)); + } } - $l+=$cw[$i]; - if($l>$wmax) - break; - else - $i++; - } - if($sep==-1) { - if($i==0) $i++; - - if(isset($this->ws) and $this->ws>0) { - $this->ws=0; - $this->_out('0 Tw'); - } - $sep = $i; - } else { - if($align=='J') { - $this->ws=($ns>1) ? ($wmax-$ls)/1000*$th... [truncated message content] |
From: <dai...@us...> - 2011-02-08 09:42:04
|
Revision: 4487 http://web-erp.svn.sourceforge.net/web-erp/?rev=4487&view=rev Author: daintree Date: 2011-02-08 09:41:58 +0000 (Tue, 08 Feb 2011) Log Message: ----------- InventoryPlanning and InventoryPlanningPrefSupplier now excludes quotation sales order demand Modified Paths: -------------- trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/doc/Change.log.html Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2011-02-08 09:20:50 UTC (rev 4486) +++ trunk/InventoryPlanning.php 2011-02-08 09:41:58 UTC (rev 4487) @@ -187,19 +187,19 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails, - salesorders - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0"; + FROM salesorderdetails INNER JOIN salesorders + ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' + AND salesorderdetails.completed = 0 + AND salesorders.quotation=0"; } else { $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails, - salesorders - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorders.fromstkloc ='" . $_POST['Location'] . "' + FROM salesorderdetails INNER JOIN salesorders + ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' AND salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0"; + AND salesorderdetails.completed = 0 + AND salesorders.quotation=0"; } $DemandResult = DB_query($SQL, $db, '', '', false , false); @@ -221,29 +221,34 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails, - bom, - stockmaster - WHERE salesorderdetails.stkcode=bom.parent + FROM salesorderdetails INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent + INNER JOIN stockmaster + ON stockmaster.stockid=bom.parent + INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $InventoryPlan['stockid'] . "' - AND stockmaster.stockid=bom.parent AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0"; + AND salesorderdetails.completed=0 + AND salesorders.quotation=0"; } else { $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails, - salesorders, - bom, - stockmaster - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorderdetails.stkcode=bom.parent + FROM salesorderdetails INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent + INNER JOIN stockmaster + ON stockmaster.stockid=bom.parent + INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $InventoryPlan['stockid'] . "' AND stockmaster.stockid=bom.parent AND salesorders.fromstkloc ='" . $_POST['Location'] . "' AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0"; + AND salesorderdetails.completed=0 + AND salesorders.quotation=0"; } $BOMDemandResult = DB_query($SQL,$db,'','',false,false); Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2011-02-08 09:20:50 UTC (rev 4486) +++ trunk/InventoryPlanningPrefSupplier.php 2011-02-08 09:41:58 UTC (rev 4487) @@ -288,19 +288,19 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails, - salesorders - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0"; + FROM salesorderdetails INNER JOIN salesorders + ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' + AND salesorderdetails.completed = 0 + AND salesorders.quotation=0"; } else { $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails, - salesorders - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorders.fromstkloc ='" . $_POST['Location'] . "' + FROM salesorderdetails INNER JOIN salesorders + ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' AND salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0"; + AND salesorderdetails.completed = 0 + AND salesorders.quotation=0"; } $DemandResult = DB_query($SQL, $db, '', '', false, false); @@ -322,29 +322,31 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails, - bom, - stockmaster - WHERE salesorderdetails.stkcode=bom.parent - AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 + FROM salesorderdetails INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent + INNER JOIN stockmaster + ON stockmaster.stockid=bom.parent + INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $InventoryPlan['stockid'] . "' - AND stockmaster.stockid=bom.parent AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0"; + AND salesorderdetails.completed=0 + AND salesorders.quotation=0"; } else { $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails, - salesorders, - bom, - stockmaster - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorderdetails.stkcode=bom.parent - AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 + FROM salesorderdetails INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent + INNER JOIN stockmaster + ON stockmaster.stockid=bom.parent + INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $InventoryPlan['stockid'] . "' - AND stockmaster.stockid=bom.parent AND salesorders.fromstkloc ='" . $_POST['Location'] . "' AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0"; + AND salesorderdetails.completed=0 + AND salesorders.quotation=0"; } $BOMDemandResult = DB_query($SQL,$db,'','',false,false); @@ -362,8 +364,7 @@ } if ($_POST['Location']=='All'){ - $SQL = "SELECT SUM(purchorderdetails.quantityord*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END) - - purchorderdetails.quantityrecd*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END)) as qtyonorder + $SQL = "SELECT SUM(purchorderdetails.quantityord- purchorderdetails.quantityrecd) as qtyonorder FROM purchorderdetails LEFT JOIN purchorders ON purchorderdetails.orderno = purchorders.orderno @@ -376,8 +377,7 @@ AND purchorders.status <> 'Rejected' AND purchorders.status <> 'Pending'"; } else { - $SQL = "SELECT SUM(purchorderdetails.quantityord*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END) - - purchorderdetails.quantityrecd*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END)) as qtyonorder + $SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder FROM purchorderdetails LEFT JOIN purchorders ON purchorderdetails.orderno = purchorders.orderno Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-08 09:20:50 UTC (rev 4486) +++ trunk/doc/Change.log.html 2011-02-08 09:41:58 UTC (rev 4487) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>8/2/11: Phil Fix InventoryPlanning and InventoryPlanningPrefSupplier to only show sales order demand - excluding quotations. Also fixed for conversionfactor as now all purchase order quantities are in our normal stock units</p> <p>8/2/11: Phil Fix incorrect layout of narrative on multiple lines of PDFQuotation.php as reported by Ricard Andreu</p> <p>8/2/11: Tim/Ricard StockLocTransfer.php can now transfer the same amount as on hand in the location - previously checked to see that the transfer was less than the quantity on hand (when checking for negative stock)</p> <p>8/2/11: Tim Payments.php and javascripts/MiscFunctions.js corrections to javascript</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-02-08 09:42:04
|
Revision: 4487 http://web-erp.svn.sourceforge.net/web-erp/?rev=4487&view=rev Author: daintree Date: 2011-02-08 09:41:58 +0000 (Tue, 08 Feb 2011) Log Message: ----------- InventoryPlanning and InventoryPlanningPrefSupplier now excludes quotation sales order demand Modified Paths: -------------- trunk/InventoryPlanning.php trunk/InventoryPlanningPrefSupplier.php trunk/doc/Change.log.html Modified: trunk/InventoryPlanning.php =================================================================== --- trunk/InventoryPlanning.php 2011-02-08 09:20:50 UTC (rev 4486) +++ trunk/InventoryPlanning.php 2011-02-08 09:41:58 UTC (rev 4487) @@ -187,19 +187,19 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails, - salesorders - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0"; + FROM salesorderdetails INNER JOIN salesorders + ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' + AND salesorderdetails.completed = 0 + AND salesorders.quotation=0"; } else { $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails, - salesorders - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorders.fromstkloc ='" . $_POST['Location'] . "' + FROM salesorderdetails INNER JOIN salesorders + ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' AND salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0"; + AND salesorderdetails.completed = 0 + AND salesorders.quotation=0"; } $DemandResult = DB_query($SQL, $db, '', '', false , false); @@ -221,29 +221,34 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails, - bom, - stockmaster - WHERE salesorderdetails.stkcode=bom.parent + FROM salesorderdetails INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent + INNER JOIN stockmaster + ON stockmaster.stockid=bom.parent + INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $InventoryPlan['stockid'] . "' - AND stockmaster.stockid=bom.parent AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0"; + AND salesorderdetails.completed=0 + AND salesorders.quotation=0"; } else { $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails, - salesorders, - bom, - stockmaster - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorderdetails.stkcode=bom.parent + FROM salesorderdetails INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent + INNER JOIN stockmaster + ON stockmaster.stockid=bom.parent + INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $InventoryPlan['stockid'] . "' AND stockmaster.stockid=bom.parent AND salesorders.fromstkloc ='" . $_POST['Location'] . "' AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0"; + AND salesorderdetails.completed=0 + AND salesorders.quotation=0"; } $BOMDemandResult = DB_query($SQL,$db,'','',false,false); Modified: trunk/InventoryPlanningPrefSupplier.php =================================================================== --- trunk/InventoryPlanningPrefSupplier.php 2011-02-08 09:20:50 UTC (rev 4486) +++ trunk/InventoryPlanningPrefSupplier.php 2011-02-08 09:41:58 UTC (rev 4487) @@ -288,19 +288,19 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails, - salesorders - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0"; + FROM salesorderdetails INNER JOIN salesorders + ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' + AND salesorderdetails.completed = 0 + AND salesorders.quotation=0"; } else { $SQL = "SELECT SUM(salesorderdetails.quantity - salesorderdetails.qtyinvoiced) AS qtydemand - FROM salesorderdetails, - salesorders - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorders.fromstkloc ='" . $_POST['Location'] . "' + FROM salesorderdetails INNER JOIN salesorders + ON salesorderdetails.orderno=salesorders.orderno + WHERE salesorders.fromstkloc ='" . $_POST['Location'] . "' AND salesorderdetails.stkcode = '" . $InventoryPlan['stockid'] . "' - AND salesorderdetails.completed = 0"; + AND salesorderdetails.completed = 0 + AND salesorders.quotation=0"; } $DemandResult = DB_query($SQL, $db, '', '', false, false); @@ -322,29 +322,31 @@ if ($_POST['Location']=='All'){ $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails, - bom, - stockmaster - WHERE salesorderdetails.stkcode=bom.parent - AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 + FROM salesorderdetails INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent + INNER JOIN stockmaster + ON stockmaster.stockid=bom.parent + INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $InventoryPlan['stockid'] . "' - AND stockmaster.stockid=bom.parent AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0"; + AND salesorderdetails.completed=0 + AND salesorders.quotation=0"; } else { $SQL = "SELECT SUM((salesorderdetails.quantity-salesorderdetails.qtyinvoiced)*bom.quantity) AS dem - FROM salesorderdetails, - salesorders, - bom, - stockmaster - WHERE salesorderdetails.orderno=salesorders.orderno - AND salesorderdetails.stkcode=bom.parent - AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 + FROM salesorderdetails INNER JOIN bom + ON salesorderdetails.stkcode=bom.parent + INNER JOIN stockmaster + ON stockmaster.stockid=bom.parent + INNER JOIN salesorders + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND bom.component='" . $InventoryPlan['stockid'] . "' - AND stockmaster.stockid=bom.parent AND salesorders.fromstkloc ='" . $_POST['Location'] . "' AND stockmaster.mbflag='A' - AND salesorderdetails.completed=0"; + AND salesorderdetails.completed=0 + AND salesorders.quotation=0"; } $BOMDemandResult = DB_query($SQL,$db,'','',false,false); @@ -362,8 +364,7 @@ } if ($_POST['Location']=='All'){ - $SQL = "SELECT SUM(purchorderdetails.quantityord*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END) - - purchorderdetails.quantityrecd*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END)) as qtyonorder + $SQL = "SELECT SUM(purchorderdetails.quantityord- purchorderdetails.quantityrecd) as qtyonorder FROM purchorderdetails LEFT JOIN purchorders ON purchorderdetails.orderno = purchorders.orderno @@ -376,8 +377,7 @@ AND purchorders.status <> 'Rejected' AND purchorders.status <> 'Pending'"; } else { - $SQL = "SELECT SUM(purchorderdetails.quantityord*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END) - - purchorderdetails.quantityrecd*(CASE WHEN purchdata.conversionfactor IS NULL THEN 1 ELSE purchdata.conversionfactor END)) as qtyonorder + $SQL = "SELECT SUM(purchorderdetails.quantityord - purchorderdetails.quantityrecd) as qtyonorder FROM purchorderdetails LEFT JOIN purchorders ON purchorderdetails.orderno = purchorders.orderno Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-08 09:20:50 UTC (rev 4486) +++ trunk/doc/Change.log.html 2011-02-08 09:41:58 UTC (rev 4487) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>8/2/11: Phil Fix InventoryPlanning and InventoryPlanningPrefSupplier to only show sales order demand - excluding quotations. Also fixed for conversionfactor as now all purchase order quantities are in our normal stock units</p> <p>8/2/11: Phil Fix incorrect layout of narrative on multiple lines of PDFQuotation.php as reported by Ricard Andreu</p> <p>8/2/11: Tim/Ricard StockLocTransfer.php can now transfer the same amount as on hand in the location - previously checked to see that the transfer was less than the quantity on hand (when checking for negative stock)</p> <p>8/2/11: Tim Payments.php and javascripts/MiscFunctions.js corrections to javascript</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2011-02-08 15:48:08
|
Revision: 4488 http://web-erp.svn.sourceforge.net/web-erp/?rev=4488&view=rev Author: tim_schofield Date: 2011-02-08 15:48:02 +0000 (Tue, 08 Feb 2011) Log Message: ----------- Rework CounterSales.php so that it is now possible to sell items that have sales/purchasing tax Modified Paths: -------------- trunk/CounterSales.php trunk/doc/Change.log.html trunk/includes/DefineCartClass.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-02-08 09:41:58 UTC (rev 4487) +++ trunk/CounterSales.php 2011-02-08 15:48:02 UTC (rev 4488) @@ -455,7 +455,6 @@ unset($NewItem); } /* end of if quick entry */ - /*Now do non-quick entry delete/edits/adds */ if ((isset($_SESSION['Items'.$identifier])) OR isset($NewItem)) { @@ -513,7 +512,47 @@ } } +if (isset($_POST['Recalculate'])) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { + $NewItem=$OrderLine->StockID; + $sql = "SELECT stockmaster.mbflag, stockmaster.controlled + FROM stockmaster + WHERE stockmaster.stockid='". $OrderLine->StockID."'"; + $ErrMsg = _('Could not determine if the part being ordered was a kitset or not because'); + $DbgMsg = _('The sql that was used to determine if the part being ordered was a kitset or not was '); + $KitResult = DB_query($sql, $db,$ErrMsg,$DbgMsg); + if ($myrow=DB_fetch_array($KitResult)){ + if ($myrow['mbflag']=='K'){ /*It is a kit set item */ + $sql = "SELECT bom.component, + bom.quantity + FROM bom + WHERE bom.parent='" . $OrderLine->StockID. "' + AND bom.effectiveto > '" . Date('Y-m-d') . "' + AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; + + $ErrMsg = _('Could not retrieve kitset components from the database because'); + $KitResult = DB_query($sql,$db,$ErrMsg); + + $ParentQty = $NewItemQty; + while ($KitParts = DB_fetch_array($KitResult,$db)){ + $NewItem = $KitParts['component']; + $NewItemQty = $KitParts['quantity'] * $ParentQty; + $NewPOLine = 0; + $NewItemDue = date($_SESSION['DefaultDateFormat']); + $_SESSION['Items'.$identifier]->GetTaxes($OrderLine->LineNumber); + } + + } else { /*Its not a kit set item*/ + $NewItemDue = date($_SESSION['DefaultDateFormat']); + $NewPOLine = 0; + $_SESSION['Items'.$identifier]->GetTaxes($OrderLine->LineNumber); + } + } + unset($NewItem); + } /* end of if its a new item */ +} + if (isset($NewItem)){ /* get the item details from the database and hold them in the cart object make the quantity 1 by default then add it to the cart Now figure out if the item is a kit set - the field MBFlag='K' @@ -735,7 +774,8 @@ } $TaxTotal += $TaxLineTotal; - + $_SESSION['Items'.$identifier]->TaxTotals=$TaxTotals; + $_SESSION['Items'.$identifier]->TaxGLCodes=$TaxGLCodes; echo '<td class="number">' . number_format($TaxLineTotal ,2) . '</td>'; echo '<td class="number">' . number_format($SubTotal + $TaxLineTotal ,2) . '</td>'; echo '<td><a href="' . $_SERVER['PHP_SELF'] . '?' . SID .'&identifier='.$identifier . '&Delete=' . $OrderLine->LineNumber . '" onclick="return confirm(\'' . _('Are You Sure?') . '\');">' . _('Delete') . '</a></td></tr>'; @@ -759,6 +799,7 @@ <td class="number">' . number_format(($_SESSION['Items'.$identifier]->total+$TaxTotal),2) . '</td> </tr> </table>'; + echo '<input type="hidden" name="TaxTotal" value="'.$TaxTotal.'" />'; echo '<table><tr><td>'; //nested table echo '<table><tr> @@ -784,7 +825,7 @@ echo '</td><th valign="bottom">'; //for the master table echo '<table class="selection">'; // a new nested table in the second column of master table //now the payment stuff in this column - $PaymentMethodsResult = DB_query('SELECT paymentid, paymentname FROM paymentmethods',$db); + $PaymentMethodsResult = DB_query("SELECT paymentid, paymentname FROM paymentmethods",$db); echo '<tr><td>' . _('Payment Type') . ':</td><td><select name="PaymentMethod">'; while ($PaymentMethodRow = DB_fetch_array($PaymentMethodsResult)){ @@ -796,7 +837,7 @@ } echo '</select></td></tr>'; - $BankAccountsResult = DB_query('SELECT bankaccountname, accountcode FROM bankaccounts',$db); + $BankAccountsResult = DB_query("SELECT bankaccountname, accountcode FROM bankaccounts",$db); echo '<tr><td>' . _('Banked to') . ':</td><td><select name="BankAccount">'; while ($BankAccountsRow = DB_fetch_array($BankAccountsResult)){ @@ -817,6 +858,7 @@ echo '</th></tr></table>'; //end of column/row/master table echo '<br /><div class="centre"><input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> <input type="submit" name="ProcessSale" value="' . _('Process The Sale') . '" /></div><hr />'; + } # end of if lines /* ********************************** @@ -831,7 +873,7 @@ prnMsg(_('There are no lines on this sale. Please enter lines to invoice first'),'error'); $InputError = true; } - if (abs($_POST['AmountPaid'] -($_SESSION['Items'.$identifier]->total+$TaxTotal))>=0.01) { + if (abs($_POST['AmountPaid'] -($_SESSION['Items'.$identifier]->total+$_POST['TaxTotal']))>=0.01) { prnMsg(_('The amount entered as payment does not equal the amount of the invoice. Please ensure the customer has paid the correct amount and re-enter'),'error'); $InputError = true; } @@ -963,7 +1005,7 @@ $ErrMsg = _('The order cannot be added because'); $InsertQryResult = DB_query($HeaderSQL,$db,$ErrMsg); - $StartOf_LineItemsSQL = 'INSERT INTO salesorderdetails (orderlineno, + $StartOf_LineItemsSQL = "INSERT INTO salesorderdetails (orderlineno, orderno, stkcode, unitprice, @@ -974,7 +1016,7 @@ actualdispatchdate, qtyinvoiced, completed) - VALUES ('; + VALUES ("; $DbgMsg = _('Trouble inserting a line of a sales order. The SQL that failed was'); foreach ($_SESSION['Items'.$identifier]->LineItems as $StockItem) { @@ -1103,7 +1145,7 @@ WoRealRequirements($db, $WONo, $_SESSION['DefaultFactoryLocation'], $StockItem->StockID); $FactoryManagerEmail = _('A new work order has been created for') . - ":\n" . $StockItem->StockID . ' - ' . $StockItem->Descr . ' x ' . $WOQuantity . ' ' . $StockItem->UOM . + ":\n" . $StockItem->StockID . ' - ' . $StockItem->ItemDescription . ' x ' . $WOQuantity . ' ' . $StockItem->Units . "\n" . _('These are for') . ' ' . $_SESSION['Items'.$identifier]->CustomerName . ' ' . _('there order ref') . ': ' . $_SESSION['Items'.$identifier]->CustRef . ' ' ._('our order number') . ': ' . $OrderNo; if ($StockItem->Serialised AND $StockItem->NextSerialNo>0){ @@ -1199,11 +1241,11 @@ '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $OrderNo . "', '" . $_SESSION['Items'.$identifier]->total . "', - '" . $TaxTotal . "', + '" . $_POST['TaxTotal'] . "', '" . $ExRate . "', '" . $_SESSION['Items'.$identifier]->Comments . "', '" . $_SESSION['Items'.$identifier]->ShipVia . "', - '" . ($_SESSION['Items'.$identifier]->total + $TaxTotal) . "')"; + '" . ($_SESSION['Items'.$identifier]->total + $_POST['TaxTotal']) . "')"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction record could not be inserted because'); $DbgMsg = _('The following SQL to insert the debtor transaction record was used'); @@ -1212,7 +1254,7 @@ $DebtorTransID = DB_Last_Insert_ID($db,'debtortrans','id'); /* Insert the tax totals for each tax authority where tax was charged on the invoice */ - foreach ($TaxTotals AS $TaxAuthID => $TaxAmount) { + foreach ($_SESSION['Items'.$identifier]->TaxTotals AS $TaxAuthID => $TaxAmount) { $SQL = "INSERT INTO debtortranstaxes (debtortransid, taxauthid, @@ -1691,7 +1733,7 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post debtors transaction to GL debit debtors, credit freight re-charged and credit sales */ - if (($_SESSION['Items'.$identifier]->total + $TaxTotal) !=0) { + if (($_SESSION['Items'.$identifier]->total + $_POST['TaxTotal']) !=0) { $SQL = "INSERT INTO gltrans ( type, typeno, trandate, @@ -1705,7 +1747,7 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . (($_SESSION['Items'.$identifier]->total + $TaxTotal)/$ExRate) . "')"; + '" . (($_SESSION['Items'.$identifier]->total + $_POST['TaxTotal'])/$ExRate) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1713,7 +1755,7 @@ } - foreach ( $TaxTotals as $TaxAuthID => $TaxAmount){ + foreach ( $_SESSION['Items'.$identifier]->TaxTotals as $TaxAuthID => $TaxAmount){ if ($TaxAmount !=0 ){ $SQL = "INSERT INTO gltrans ( type, typeno, @@ -1726,7 +1768,7 @@ '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', - '" . $TaxGLCodes[$TaxAuthID] . "', + '" . $_SESSION['Items'.$identifier]->TaxGLCodes[$TaxAuthID] . "', '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . (-$TaxAmount/$ExRate) . "')"; @@ -1993,7 +2035,7 @@ AND purchorders.status<>'Cancelled' AND purchorders.status<>'Rejected' AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'"; - + $ErrMsg = _('The order details for this product cannot be retrieved because'); $PurchResult = db_query($sql,$db,$ErrMsg); @@ -2140,7 +2182,7 @@ $QOHSql = "SELECT sum(quantity) AS QOH, stockmaster.decimalplaces FROM locstock INNER JOIN stockmaster - WHERE locstock.stockid='" .$myrow['stockid'] . "' + WHERE locstock.stockid='" .$myrow['stockid'] . "' AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $QOHResult = DB_query($QOHSql,$db); $QOHRow = DB_fetch_array($QOHResult); @@ -2149,10 +2191,10 @@ // Find the quantity on outstanding sales orders $sql = "SELECT SUM(salesorderdetails.quantity-salesorderdetails.qtyinvoiced) AS dem FROM salesorderdetails INNER JOIN salesorders - ON salesorders.orderno = salesorderdetails.orderno - WHERE salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "' - AND salesorderdetails.completed=0 - AND salesorders.quotation=0 + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorders.fromstkloc='" . $_SESSION['Items'.$identifier]->Location . "' + AND salesorderdetails.completed=0 + AND salesorders.quotation=0 AND salesorderdetails.stkcode='" . $myrow['stockid'] . "'"; $ErrMsg = _('The demand for this product from') . ' ' . $_SESSION['Items'.$identifier]->Location . ' ' . _('cannot be retrieved because'); @@ -2168,7 +2210,7 @@ // Find the quantity on purchase orders $sql = "SELECT SUM(purchorderdetails.quantityord-purchorderdetails.quantityrecd) AS QOO FROM purchorderdetails INNER JOIN purchorders - WHERE purchorderdetails.completed=0 + WHERE purchorderdetails.completed=0 AND purchorders.status <>'Cancelled' AND purchorders.status <>'Rejected' AND purchorderdetails.itemcode='" . $myrow['stockid'] . "'"; @@ -2288,4 +2330,4 @@ } echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2011-02-08 09:41:58 UTC (rev 4487) +++ trunk/doc/Change.log.html 2011-02-08 15:48:02 UTC (rev 4488) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p <p></p> +<p>8/2/11: Tim Rework CounterSales.php so that it is now possible to sell items that have sales/purchasing tax</p> <p>8/2/11: Phil Fix InventoryPlanning and InventoryPlanningPrefSupplier to only show sales order demand - excluding quotations. Also fixed for conversionfactor as now all purchase order quantities are in our normal stock units</p> <p>8/2/11: Phil Fix incorrect layout of narrative on multiple lines of PDFQuotation.php as reported by Ricard Andreu</p> <p>8/2/11: Tim/Ricard StockLocTransfer.php can now transfer the same amount as on hand in the location - previously checked to see that the transfer was less than the quantity on hand (when checking for negative stock)</p> Modified: trunk/includes/DefineCartClass.php =================================================================== --- trunk/includes/DefineCartClass.php 2011-02-08 09:41:58 UTC (rev 4487) +++ trunk/includes/DefineCartClass.php 2011-02-08 15:48:02 UTC (rev 4488) @@ -56,6 +56,8 @@ VAR $vtigerProductID; Var $DefaultPOLine; Var $DeliveryDays; + var $TaxTotals; + var $TaxGLCodes; function Cart(){ /*Constructor function initialises a new shopping cart */ @@ -338,7 +340,7 @@ $ErrMsg = _('The taxes and rates for this item could not be retrieved because'); $GetTaxRatesResult = DB_query($SQL,$db,$ErrMsg); - + unset($this->LineItems[$LineNumber]->Taxes); while ($myrow = DB_fetch_array($GetTaxRatesResult)){ $this->LineItems[$LineNumber]->Taxes[$myrow['calculationorder']] = new Tax($myrow['calculationorder'], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |