From: <tu...@us...> - 2017-12-20 19:25:21
|
Revision: 7895 http://sourceforge.net/p/web-erp/reponame/7895 Author: turbopt Date: 2017-12-20 19:25:18 +0000 (Wed, 20 Dec 2017) Log Message: ----------- FormMaker.php, ReportMaker.php, WriteForm.inc: A few more PHP 7.1 array compatibility changes. Modified Paths: -------------- trunk/doc/Change.log trunk/reportwriter/FormMaker.php trunk/reportwriter/ReportMaker.php trunk/reportwriter/WriteForm.inc Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2017-12-20 18:36:08 UTC (rev 7894) +++ trunk/doc/Change.log 2017-12-20 19:25:18 UTC (rev 7895) @@ -1,5 +1,6 @@ webERP Change Log +20/12/17 PaulT: FormMaker.php, ReportMaker.php, WriteForm.inc: A few more PHP 7.1 array compatibility changes. 20/12/17 PaulT: RCFunctions.inc, FormMaker.php: PHP 7.1 array compatibility change. 19/12/17 PaulT: PDFOrderStatus.php: Remove redundant ConnectDB.inc include reference. (already included by session.php at the top of the file) 19/12/17 PaulT: Change.log: Correct my Day/Month entry references over the last few days. Modified: trunk/reportwriter/FormMaker.php =================================================================== --- trunk/reportwriter/FormMaker.php 2017-12-20 18:36:08 UTC (rev 7894) +++ trunk/reportwriter/FormMaker.php 2017-12-20 19:25:18 UTC (rev 7895) @@ -18,7 +18,7 @@ require('languages/'.$ReportLanguage.'/reports.php'); // include translation before defaults.php require('admin/defaults.php'); // load default values -$usrMsg = ''; // setup array for return messages +$usrMsg = array(); // setup array for return messages $GoBackURL = $RootPath.'/index.php'; // set the return path to the index.php page if (isset($_GET['id'])) { // then entered with form group requested @@ -218,7 +218,7 @@ function RetrieveFields($ReportID, $EntryType) { global $db; - $FieldListings = ''; + $FieldListings = array(); $sql= "SELECT * FROM ".DBRptFields." WHERE reportid = '".$ReportID."' AND entrytype = '".$EntryType."' Modified: trunk/reportwriter/ReportMaker.php =================================================================== --- trunk/reportwriter/ReportMaker.php 2017-12-20 18:36:08 UTC (rev 7894) +++ trunk/reportwriter/ReportMaker.php 2017-12-20 19:25:18 UTC (rev 7895) @@ -18,7 +18,7 @@ require('languages/'.$ReportLanguage.'/reports.php'); // include translation before defaults.php require('admin/defaults.php'); // load default values -$usrMsg = ''; // setup array for return messages +$usrMsg = array(); // setup array for return messages if (isset($_GET['reportid'])) { // then entered with report id requested, fix variable to show filter form $_POST['todo'] = RPT_BTN_CONT; // fake the code to think the continue button was pressed $_POST['ReportID'] = (int) $_GET['reportid']; // convert Report ID to a POST variable @@ -240,7 +240,7 @@ function RetrieveFields($ReportID, $EntryType) { global $db; - $FieldListings = ''; + $FieldListings = array(); $sql= "SELECT * FROM ".DBRptFields." WHERE reportid = '".$ReportID."' AND entrytype = '".$EntryType."' ORDER BY seqnum"; Modified: trunk/reportwriter/WriteForm.inc =================================================================== --- trunk/reportwriter/WriteForm.inc 2017-12-20 18:36:08 UTC (rev 7894) +++ trunk/reportwriter/WriteForm.inc 2017-12-20 19:25:18 UTC (rev 7895) @@ -567,7 +567,7 @@ } // Build the sql $tblField = ''; - $tblHeading = ''; + $tblHeading = array(); foreach ($SingleObject['params']['Seq'] as $TableField) { $tblField .= $TableField['TblField'].', '; $tblHeading[] = $TableField['TblDesc']; |
From: <dai...@us...> - 2017-12-22 06:04:15
|
Revision: 7896 http://sourceforge.net/p/web-erp/reponame/7896 Author: daintree Date: 2017-12-22 06:04:09 +0000 (Fri, 22 Dec 2017) Log Message: ----------- fixes to rebuild of language files using no-wrap as per forum thread from Paul Becker Modified Paths: -------------- trunk/build/make_release.sh trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.mo trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_CA.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/ko_KR.utf8/LC_MESSAGES/messages.mo trunk/locale/ko_KR.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/mr_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/mr_IN.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.mo trunk/locale/vi_VN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_CN.utf8/LC_MESSAGES/messages.po trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_HK.utf8/LC_MESSAGES/messages.po trunk/locale/zh_TW.utf8/LC_MESSAGES/messages.mo trunk/locale/zh_TW.utf8/LC_MESSAGES/messages.po trunk/sql/mysql/country_sql/default.sql trunk/sql/mysql/country_sql/demo.sql Modified: trunk/build/make_release.sh =================================================================== --- trunk/build/make_release.sh 2017-12-20 19:25:18 UTC (rev 7895) +++ trunk/build/make_release.sh 2017-12-22 06:04:09 UTC (rev 7896) @@ -9,39 +9,39 @@ xgettext --no-wrap --from-code=utf-8 --language=PHP -o locale/en_GB.utf8/LC_MESSAGES/messages.pot *php includes/*.php includes/*.inc reportwriter/*.php reportwriter/*.inc reportwriter/forms/*.html reportwriter/admin/*.php reportwriter/admin/*.inc reportwriter/admin/forms/*.html api/*.php install/*.php ../webSHOP/*.php ../webSHOP/includes/*.php -msgmerge -U -N --backup=off locale/ar_EG.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/cs_CZ.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/de_DE.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/en_US.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/el_GR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/es_ES.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/et_EE.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/fa_IR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/fr_CA.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/fr_FR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/hi_IN.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/hr_HR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/hu_HU.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/id_ID.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/it_IT.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/ja_JP.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/ko_KR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/lv_LV.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/mr_IN.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/nl_NL.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/pl_PL.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/pt_BR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/pt_PT.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/ru_RU.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/ro_RO.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/sq_AL.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/sv_SE.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/sw_KE.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/tr_TR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/zh_CN.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/zh_HK.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/zh_TW.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot -msgmerge -U -N --backup=off locale/vi_VN.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/ar_EG.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/cs_CZ.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/de_DE.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/en_US.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/el_GR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/es_ES.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/et_EE.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/fa_IR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/fr_CA.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/fr_FR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/hi_IN.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/hr_HR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/hu_HU.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/id_ID.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/it_IT.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/ja_JP.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/ko_KR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/lv_LV.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/mr_IN.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/nl_NL.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/pl_PL.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/pt_BR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/pt_PT.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/ru_RU.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/ro_RO.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/sq_AL.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/sv_SE.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/sw_KE.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/tr_TR.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/zh_CN.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/zh_HK.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/zh_TW.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot +msgmerge -U -N --backup=off --no-wrap locale/vi_VN.utf8/LC_MESSAGES/messages.po locale/en_GB.utf8/LC_MESSAGES/messages.pot msgfmt -o locale/ar_EG.utf8/LC_MESSAGES/messages.mo locale/ar_EG.utf8/LC_MESSAGES/messages.po Modified: trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po 2017-12-20 19:25:18 UTC (rev 7895) +++ trunk/locale/ar_EG.utf8/LC_MESSAGES/messages.po 2017-12-22 06:04:09 UTC (rev 7896) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 4.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-12-12 17:19-0600\n" +"POT-Creation-Date: 2017-12-22 18:59+1300\n" "PO-Revision-Date: 2017-10-02 10:22-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: Arabic <ar...@li...>\n" @@ -23,17 +23,11 @@ msgstr "مجموعات العضوية" #: AccountGroups.php:19 -msgid "" -"An error occurred in retrieving the account groups of the parent account " -"group during the check for recursion" -msgstr "" -"لقد حدث خطأ فى استرجاع بيانات مجموعات العضو الخاصة باعضوية الأب اثناء " -"االتحقق من وجود استدعاء ذاتي" +msgid "An error occurred in retrieving the account groups of the parent account group during the check for recursion" +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" +msgid "The SQL that was used to retrieve the account groups of the parent account group and that failed in the process was" msgstr "" #: AccountGroups.php:45 @@ -82,10 +76,7 @@ msgstr "اسم المجموعة يجب ان يحتوي علي الأقل علي حرف واحد" #: AccountGroups.php:95 -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" +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 "" #: AccountGroups.php:106 @@ -93,12 +84,7 @@ msgstr "لم أستطيع التخقق اذا كانت المجموعة ذاتيى الأسترجاع لأن" #: AccountGroups.php:114 -msgid "" -"Since this account group is a child group, the sequence in the trial " -"balance, the section in the accounts and whether or not the account group " -"appears in the balance sheet or profit and loss account are all properties " -"inherited from the parent account group. Any changes made to these fields " -"will have no effect." +msgid "Since this account group is a child group, the sequence in the trial balance, the section in the accounts and whether or not the account group appears in the balance sheet or profit and loss account are all properties inherited from the parent account group. Any changes made to these fields will have no effect." msgstr "" #: AccountGroups.php:119 @@ -150,9 +136,7 @@ msgstr "" #: AccountGroups.php:211 -msgid "" -"Cannot delete this account group because general ledger accounts have been " -"created using this group" +msgid "Cannot delete this account group because general ledger accounts have been created using this group" msgstr "" #: AccountGroups.php:212 AccountGroups.php:247 AccountSections.php:130 @@ -196,9 +180,7 @@ msgstr "" #: AccountGroups.php:246 -msgid "" -"Cannot delete this account group because it is a parent account group of " -"other account group(s)" +msgid "Cannot delete this account group because it is a parent account group of other account group(s)" msgstr "" #: AccountGroups.php:247 @@ -227,12 +209,14 @@ #: AccountGroups.php:281 AddCustomerContacts.php:28 AddCustomerContacts.php:30 #: AddCustomerNotes.php:101 AddCustomerTypeNotes.php:94 AgedDebtors.php:454 -#: AgedSuppliers.php:276 Areas.php:144 AuditTrail.php:11 BOMExtendedQty.php:256 -#: BOMIndented.php:249 BOMIndentedReverse.php:236 BOMInquiry.php:186 -#: BOMListing.php:110 BOMs.php:285 BOMs.php:997 CollectiveWorkOrderCost.php:281 -#: CompanyPreferences.php:100 CounterReturns.php:1625 CounterSales.php:2107 -#: CounterSales.php:2203 Credit_Invoice.php:286 CreditStatus.php:21 -#: CustEDISetup.php:17 CustItem.php:120 CustItem.php:210 CustItem.php:238 +#: AgedSuppliers.php:276 Areas.php:144 AuditTrail.php:11 +#: BOMExtendedQty.php:256 BOMIndented.php:251 BOMIndentedReverse.php:239 +#: BOMInquiry.php:186 BOMListing.php:112 BOMs.php:285 BOMs.php:997 +#: BOMs_SingleLevel.php:231 BOMs_SingleLevel.php:881 +#: CollectiveWorkOrderCost.php:281 CompanyPreferences.php:100 +#: CounterReturns.php:1625 CounterSales.php:2107 CounterSales.php:2203 +#: Credit_Invoice.php:286 CreditStatus.php:21 CustEDISetup.php:17 +#: CustItem.php:120 CustItem.php:210 CustItem.php:238 #: DebtorsAtPeriodEnd.php:129 DiscountCategories.php:12 #: DiscountCategories.php:149 DiscountMatrix.php:16 EDIMessageFormat.php:105 #: FixedAssetLocations.php:13 FixedAssetRegister.php:16 @@ -261,14 +245,15 @@ #: SelectWorkOrder.php:9 SelectWorkOrder.php:174 SellThroughSupport.php:229 #: ShipmentCosting.php:11 Shipments.php:17 Shippers.php:123 Shippers.php:160 #: Shipt_Select.php:8 StockLocMovements.php:14 StockSerialItemResearch.php:30 -#: SupplierPriceList.php:14 SupplierPriceList.php:229 SupplierPriceList.php:399 -#: SupplierPriceList.php:458 SupplierPriceList.php:503 Suppliers.php:304 -#: SupplierTenderCreate.php:556 SupplierTenderCreate.php:664 -#: SupplierTenders.php:322 SupplierTenders.php:388 SupplierTransInquiry.php:10 -#: TestPlanResults.php:27 TopItems.php:118 UnitsOfMeasure.php:10 -#: WhereUsedInquiry.php:18 WorkCentres.php:113 WorkOrderCosting.php:22 -#: WorkOrderIssue.php:22 WorkOrderReceive.php:34 WorkOrderStatus.php:58 -#: Z_BottomUpCosts.php:57 ../webSHOP/includes/header.php:218 +#: SupplierPriceList.php:14 SupplierPriceList.php:229 +#: SupplierPriceList.php:399 SupplierPriceList.php:458 +#: SupplierPriceList.php:503 Suppliers.php:304 SupplierTenderCreate.php:556 +#: SupplierTenderCreate.php:664 SupplierTenders.php:322 +#: SupplierTenders.php:388 SupplierTransInquiry.php:10 TestPlanResults.php:27 +#: TopItems.php:118 UnitsOfMeasure.php:10 WhereUsedInquiry.php:18 +#: WorkCentres.php:113 WorkOrderCosting.php:22 WorkOrderIssue.php:22 +#: WorkOrderReceive.php:34 WorkOrderStatus.php:58 Z_BottomUpCosts.php:57 +#: ../webSHOP/includes/header.php:218 msgid "Search" msgstr "إبحث" @@ -294,6 +279,7 @@ #: AccountGroups.php:476 AddCustomerContacts.php:165 #: AddCustomerContacts.php:275 AddCustomerContacts.php:279 #: AddCustomerContacts.php:282 BOMs.php:140 BOMs.php:903 BOMs.php:905 +#: BOMs_SingleLevel.php:125 BOMs_SingleLevel.php:793 BOMs_SingleLevel.php:795 #: CompanyPreferences.php:423 CompanyPreferences.php:425 #: CompanyPreferences.php:438 CompanyPreferences.php:440 #: CompanyPreferences.php:453 CompanyPreferences.php:455 @@ -322,54 +308,56 @@ #: QATests.php:293 QATests.php:295 QATests.php:306 QATests.php:308 #: QATests.php:319 QATests.php:321 QATests.php:332 QATests.php:334 #: QATests.php:345 QATests.php:347 QATests.php:414 QATests.php:419 -#: QATests.php:424 QATests.php:429 QATests.php:434 RecurringSalesOrders.php:493 -#: RecurringSalesOrders.php:496 SalesAnalReptCols.php:284 -#: SalesAnalReptCols.php:419 SalesAnalReptCols.php:422 SalesAnalRepts.php:420 -#: SalesAnalRepts.php:423 SalesAnalRepts.php:448 SalesAnalRepts.php:451 -#: SalesAnalRepts.php:476 SalesAnalRepts.php:479 SalesCategories.php:297 -#: SalesCategories.php:384 SalesCategories.php:388 SalesPeople.php:227 -#: SalesPeople.php:367 SalesPeople.php:369 SelectCustomer.php:757 -#: SelectProduct.php:251 SelectProduct.php:390 SelectQASamples.php:424 -#: SelectQASamples.php:518 SelectQASamples.php:520 SelectQASamples.php:574 -#: SelectQASamples.php:576 SelectQASamples.php:588 SelectQASamples.php:590 -#: ShipmentCosting.php:667 ShopParameters.php:289 ShopParameters.php:293 -#: ShopParameters.php:337 ShopParameters.php:341 ShopParameters.php:391 -#: ShopParameters.php:395 ShopParameters.php:413 ShopParameters.php:417 -#: ShopParameters.php:495 ShopParameters.php:499 StockClone.php:938 -#: StockClone.php:940 StockClone.php:963 StockClone.php:965 Stocks.php:1266 -#: Stocks.php:1268 Stocks.php:1291 Stocks.php:1293 SuppContractChgs.php:90 +#: QATests.php:424 QATests.php:429 QATests.php:434 +#: RecurringSalesOrders.php:493 RecurringSalesOrders.php:496 +#: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 +#: SalesAnalReptCols.php:422 SalesAnalRepts.php:420 SalesAnalRepts.php:423 +#: SalesAnalRepts.php:448 SalesAnalRepts.php:451 SalesAnalRepts.php:476 +#: SalesAnalRepts.php:479 SalesCategories.php:297 SalesCategories.php:384 +#: SalesCategories.php:388 SalesPeople.php:227 SalesPeople.php:367 +#: SalesPeople.php:369 SelectCustomer.php:757 SelectProduct.php:251 +#: SelectProduct.php:390 SelectQASamples.php:424 SelectQASamples.php:518 +#: SelectQASamples.php:520 SelectQASamples.php:574 SelectQASamples.php:576 +#: SelectQASamples.php:588 SelectQASamples.php:590 ShipmentCosting.php:667 +#: ShopParameters.php:289 ShopParameters.php:293 ShopParameters.php:337 +#: ShopParameters.php:341 ShopParameters.php:391 ShopParameters.php:395 +#: ShopParameters.php:413 ShopParameters.php:417 ShopParameters.php:495 +#: ShopParameters.php:499 StockClone.php:938 StockClone.php:940 +#: StockClone.php:963 StockClone.php:965 Stocks.php:1266 Stocks.php:1268 +#: Stocks.php:1291 Stocks.php:1293 SuppContractChgs.php:90 #: SystemParameters.php:479 SystemParameters.php:502 SystemParameters.php:543 #: SystemParameters.php:624 SystemParameters.php:632 SystemParameters.php:672 #: SystemParameters.php:763 SystemParameters.php:772 SystemParameters.php:780 #: SystemParameters.php:798 SystemParameters.php:805 SystemParameters.php:849 -#: SystemParameters.php:945 SystemParameters.php:1088 SystemParameters.php:1090 -#: SystemParameters.php:1100 SystemParameters.php:1102 -#: SystemParameters.php:1156 SystemParameters.php:1168 -#: SystemParameters.php:1170 SystemParameters.php:1208 -#: SystemParameters.php:1210 SystemParameters.php:1232 -#: SystemParameters.php:1234 TaxGroups.php:311 TaxGroups.php:314 -#: TaxGroups.php:365 TestPlanResults.php:304 TestPlanResults.php:532 -#: TestPlanResults.php:747 TestPlanResults.php:864 TestPlanResults.php:924 -#: TestPlanResults.php:928 UserGLAccounts.php:187 UserGLAccounts.php:196 -#: UserSettings.php:209 UserSettings.php:212 UserSettings.php:224 -#: UserSettings.php:227 WWW_Users.php:547 WWW_Users.php:549 WWW_Users.php:718 -#: WWW_Users.php:721 WWW_Users.php:734 WWW_Users.php:737 WWW_Users.php:749 -#: WWW_Users.php:752 WWW_Users.php:764 WWW_Users.php:767 -#: reportwriter/languages/en_US/reports.php:114 +#: SystemParameters.php:945 SystemParameters.php:1088 +#: SystemParameters.php:1090 SystemParameters.php:1100 +#: SystemParameters.php:1102 SystemParameters.php:1156 +#: SystemParameters.php:1168 SystemParameters.php:1170 +#: SystemParameters.php:1208 SystemParameters.php:1210 +#: SystemParameters.php:1232 SystemParameters.php:1234 TaxGroups.php:311 +#: TaxGroups.php:314 TaxGroups.php:365 TestPlanResults.php:304 +#: TestPlanResults.php:532 TestPlanResults.php:747 TestPlanResults.php:864 +#: TestPlanResults.php:924 TestPlanResults.php:928 UserGLAccounts.php:187 +#: UserGLAccounts.php:196 UserSettings.php:209 UserSettings.php:212 +#: UserSettings.php:224 UserSettings.php:227 WWW_Users.php:547 +#: WWW_Users.php:549 WWW_Users.php:718 WWW_Users.php:721 WWW_Users.php:734 +#: WWW_Users.php:737 WWW_Users.php:749 WWW_Users.php:752 WWW_Users.php:764 +#: WWW_Users.php:767 msgid "Yes" msgstr "موافق" #: AccountGroups.php:312 AccountGroups.php:472 AccountGroups.php:475 #: AddCustomerContacts.php:165 AddCustomerContacts.php:274 -#: AddCustomerContacts.php:278 AddCustomerContacts.php:281 BankAccounts.php:218 -#: BankAccounts.php:412 BankAccounts.php:414 BankAccounts.php:418 -#: BankAccounts.php:426 BOMs.php:142 BOMs.php:902 BOMs.php:906 -#: CompanyPreferences.php:422 CompanyPreferences.php:426 -#: CompanyPreferences.php:437 CompanyPreferences.php:441 -#: CompanyPreferences.php:452 CompanyPreferences.php:456 -#: ContractCosting.php:200 Currencies.php:344 Currencies.php:525 -#: Currencies.php:527 CustomerBranches.php:445 Customers.php:658 -#: Customers.php:1047 Customers.php:1054 Customers.php:1057 +#: AddCustomerContacts.php:278 AddCustomerContacts.php:281 +#: BankAccounts.php:218 BankAccounts.php:412 BankAccounts.php:414 +#: BankAccounts.php:418 BankAccounts.php:426 BOMs.php:142 BOMs.php:902 +#: BOMs.php:906 BOMs_SingleLevel.php:127 BOMs_SingleLevel.php:792 +#: BOMs_SingleLevel.php:796 CompanyPreferences.php:422 +#: CompanyPreferences.php:426 CompanyPreferences.php:437 +#: CompanyPreferences.php:441 CompanyPreferences.php:452 +#: CompanyPreferences.php:456 ContractCosting.php:200 Currencies.php:344 +#: Currencies.php:525 Currencies.php:527 CustomerBranches.php:445 +#: Customers.php:658 Customers.php:1047 Customers.php:1054 Customers.php:1057 #: DailyBankTransactions.php:217 DeliveryDetails.php:1159 #: DeliveryDetails.php:1200 DeliveryDetails.php:1203 FormDesigner.php:99 #: GLAccountUsers.php:183 GLAccountUsers.php:193 GLTransInquiry.php:93 @@ -380,65 +368,64 @@ #: MRP.php:564 MRP.php:568 NoSalesItems.php:191 PaymentMethods.php:227 #: PaymentMethods.php:228 PaymentMethods.php:229 PaymentMethods.php:230 #: PaymentMethods.php:302 PaymentMethods.php:309 PaymentMethods.php:316 -#: PaymentMethods.php:323 PDFChequeListing.php:64 PDFDeliveryDifferences.php:75 -#: PDFDIFOT.php:79 PDFWOPrint.php:609 PDFWOPrint.php:613 -#: PO_AuthorisationLevels.php:141 PO_AuthorisationLevels.php:146 -#: PO_Header.php:808 PO_PDFPurchOrder.php:414 PO_PDFPurchOrder.php:417 -#: ProductSpecs.php:191 ProductSpecs.php:411 ProductSpecs.php:417 -#: ProductSpecs.php:422 ProductSpecs.php:427 ProductSpecs.php:432 -#: ProductSpecs.php:613 ProductSpecs.php:615 ProductSpecs.php:626 -#: ProductSpecs.php:628 ProductSpecs.php:639 ProductSpecs.php:641 -#: ProductSpecs.php:652 ProductSpecs.php:654 PurchData.php:299 -#: PurchData.php:668 PurchData.php:671 QATests.php:298 QATests.php:300 -#: QATests.php:311 QATests.php:313 QATests.php:324 QATests.php:326 -#: QATests.php:337 QATests.php:339 QATests.php:350 QATests.php:352 -#: QATests.php:416 QATests.php:421 QATests.php:426 QATests.php:431 -#: QATests.php:436 RecurringSalesOrders.php:492 RecurringSalesOrders.php:495 -#: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 -#: SalesAnalReptCols.php:423 SalesAnalRepts.php:419 SalesAnalRepts.php:422 -#: SalesAnalRepts.php:447 SalesAnalRepts.php:450 SalesAnalRepts.php:475 -#: SalesAnalRepts.php:478 SalesCategories.php:299 SalesCategories.php:385 -#: SalesCategories.php:387 SalesPeople.php:229 SalesPeople.php:372 -#: SalesPeople.php:374 SelectCustomer.php:757 SelectProduct.php:253 -#: SelectProduct.php:392 SelectQASamples.php:426 SelectQASamples.php:523 -#: SelectQASamples.php:525 SelectQASamples.php:579 SelectQASamples.php:581 -#: SelectQASamples.php:593 SelectQASamples.php:595 ShipmentCosting.php:668 -#: ShopParameters.php:290 ShopParameters.php:292 ShopParameters.php:338 -#: ShopParameters.php:340 ShopParameters.php:392 ShopParameters.php:394 -#: ShopParameters.php:414 ShopParameters.php:416 ShopParameters.php:496 -#: ShopParameters.php:498 StockClone.php:933 StockClone.php:935 -#: StockClone.php:958 StockClone.php:960 Stocks.php:1261 Stocks.php:1263 -#: Stocks.php:1286 Stocks.php:1288 SuppContractChgs.php:92 +#: PaymentMethods.php:323 PDFChequeListing.php:64 +#: PDFDeliveryDifferences.php:75 PDFDIFOT.php:79 PDFWOPrint.php:609 +#: PDFWOPrint.php:613 PO_AuthorisationLevels.php:141 +#: PO_AuthorisationLevels.php:146 PO_Header.php:808 PO_PDFPurchOrder.php:414 +#: PO_PDFPurchOrder.php:417 ProductSpecs.php:191 ProductSpecs.php:411 +#: ProductSpecs.php:417 ProductSpecs.php:422 ProductSpecs.php:427 +#: ProductSpecs.php:432 ProductSpecs.php:613 ProductSpecs.php:615 +#: ProductSpecs.php:626 ProductSpecs.php:628 ProductSpecs.php:639 +#: ProductSpecs.php:641 ProductSpecs.php:652 ProductSpecs.php:654 +#: PurchData.php:299 PurchData.php:668 PurchData.php:671 QATests.php:298 +#: QATests.php:300 QATests.php:311 QATests.php:313 QATests.php:324 +#: QATests.php:326 QATests.php:337 QATests.php:339 QATests.php:350 +#: QATests.php:352 QATests.php:416 QATests.php:421 QATests.php:426 +#: QATests.php:431 QATests.php:436 RecurringSalesOrders.php:492 +#: RecurringSalesOrders.php:495 SalesAnalReptCols.php:282 +#: SalesAnalReptCols.php:420 SalesAnalReptCols.php:423 SalesAnalRepts.php:419 +#: SalesAnalRepts.php:422 SalesAnalRepts.php:447 SalesAnalRepts.php:450 +#: SalesAnalRepts.php:475 SalesAnalRepts.php:478 SalesCategories.php:299 +#: SalesCategories.php:385 SalesCategories.php:387 SalesPeople.php:229 +#: SalesPeople.php:372 SalesPeople.php:374 SelectCustomer.php:757 +#: SelectProduct.php:253 SelectProduct.php:392 SelectQASamples.php:426 +#: SelectQASamples.php:523 SelectQASamples.php:525 SelectQASamples.php:579 +#: SelectQASamples.php:581 SelectQASamples.php:593 SelectQASamples.php:595 +#: ShipmentCosting.php:668 ShopParameters.php:290 ShopParameters.php:292 +#: ShopParameters.php:338 ShopParameters.php:340 ShopParameters.php:392 +#: ShopParameters.php:394 ShopParameters.php:414 ShopParameters.php:416 +#: ShopParameters.php:496 ShopParameters.php:498 StockClone.php:933 +#: StockClone.php:935 StockClone.php:958 StockClone.php:960 Stocks.php:1261 +#: Stocks.php:1263 Stocks.php:1286 Stocks.php:1288 SuppContractChgs.php:92 #: SystemParameters.php:480 SystemParameters.php:503 SystemParameters.php:544 #: SystemParameters.php:625 SystemParameters.php:633 SystemParameters.php:673 #: SystemParameters.php:764 SystemParameters.php:773 SystemParameters.php:781 #: SystemParameters.php:799 SystemParameters.php:806 SystemParameters.php:850 -#: SystemParameters.php:946 SystemParameters.php:1087 SystemParameters.php:1091 -#: SystemParameters.php:1099 SystemParameters.php:1103 -#: SystemParameters.php:1157 SystemParameters.php:1167 -#: SystemParameters.php:1171 SystemParameters.php:1207 -#: SystemParameters.php:1211 SystemParameters.php:1231 -#: SystemParameters.php:1235 TaxGroups.php:312 TaxGroups.php:315 -#: TaxGroups.php:367 TestPlanResults.php:306 TestPlanResults.php:535 -#: TestPlanResults.php:749 TestPlanResults.php:866 TestPlanResults.php:925 -#: TestPlanResults.php:927 UserGLAccounts.php:189 UserGLAccounts.php:199 -#: UserSettings.php:208 UserSettings.php:211 UserSettings.php:223 -#: UserSettings.php:226 WWW_Users.php:546 WWW_Users.php:550 WWW_Users.php:717 -#: WWW_Users.php:720 WWW_Users.php:733 WWW_Users.php:736 WWW_Users.php:748 -#: WWW_Users.php:751 WWW_Users.php:763 WWW_Users.php:766 -#: includes/PDFLowGPPageHeader.inc:44 -#: reportwriter/languages/en_US/reports.php:82 +#: SystemParameters.php:946 SystemParameters.php:1087 +#: SystemParameters.php:1091 SystemParameters.php:1099 +#: SystemParameters.php:1103 SystemParameters.php:1157 +#: SystemParameters.php:1167 SystemParameters.php:1171 +#: SystemParameters.php:1207 SystemParameters.php:1211 +#: SystemParameters.php:1231 SystemParameters.php:1235 TaxGroups.php:312 +#: TaxGroups.php:315 TaxGroups.php:367 TestPlanResults.php:306 +#: TestPlanResults.php:535 TestPlanResults.php:749 TestPlanResults.php:866 +#: TestPlanResults.php:925 TestPlanResults.php:927 UserGLAccounts.php:189 +#: UserGLAccounts.php:199 UserSettings.php:208 UserSettings.php:211 +#: UserSettings.php:223 UserSettings.php:226 WWW_Users.php:546 +#: WWW_Users.php:550 WWW_Users.php:717 WWW_Users.php:720 WWW_Users.php:733 +#: WWW_Users.php:736 WWW_Users.php:748 WWW_Users.php:751 WWW_Users.php:763 +#: WWW_Users.php:766 includes/PDFLowGPPageHeader.inc:44 msgid "No" msgstr "ﻻ" #: AccountGroups.php:321 AccountSections.php:196 AddCustomerContacts.php:158 #: AddCustomerNotes.php:137 AddCustomerTypeNotes.php:131 Areas.php:164 -#: BankAccounts.php:243 BOMs.php:198 COGSGLPostings.php:115 -#: COGSGLPostings.php:222 CreditStatus.php:175 Currencies.php:374 -#: Currencies.php:391 CustItem.php:166 CustomerBranches.php:449 -#: Customers.php:1131 Customers.php:1165 CustomerTypes.php:205 -#: Departments.php:186 EDIMessageFormat.php:150 Factors.php:334 -#: FixedAssetCategories.php:190 FixedAssetLocations.php:111 +#: BankAccounts.php:243 BOMs.php:198 BOMs_SingleLevel.php:153 +#: COGSGLPostings.php:115 COGSGLPostings.php:222 CreditStatus.php:175 +#: Currencies.php:374 Currencies.php:391 CustItem.php:166 +#: CustomerBranches.php:449 Customers.php:1131 Customers.php:1165 +#: CustomerTypes.php:205 Departments.php:186 EDIMessageFormat.php:150 +#: Factors.php:334 FixedAssetCategories.php:190 FixedAssetLocations.php:111 #: FreightCosts.php:253 GeocodeSetup.php:173 GLAccounts.php:335 GLTags.php:96 #: ImportBankTransAnalysis.php:223 InternalStockRequest.php:297 Labels.php:333 #: Labels.php:358 Locations.php:439 MailingGroupMaintenance.php:178 @@ -459,7 +446,6 @@ #: TaxGroups.php:191 TaxProvinces.php:179 UnitsOfMeasure.php:185 #: WorkCentres.php:145 WWW_Access.php:132 WWW_Users.php:391 #: includes/InputSerialItems.php:110 includes/OutputSerialItems.php:20 -#: reportwriter/languages/en_US/reports.php:143 #, php-format msgid "Edit" msgstr "تحرير" @@ -470,14 +456,15 @@ #: AccountGroups.php:322 AccountSections.php:201 AddCustomerContacts.php:159 #: AddCustomerNotes.php:138 AddCustomerTypeNotes.php:132 Areas.php:165 -#: BankAccounts.php:244 BOMs.php:200 COGSGLPostings.php:116 -#: COGSGLPostings.php:223 ContractBOM.php:271 ContractOtherReqts.php:123 -#: CounterReturns.php:740 CounterSales.php:836 Credit_Invoice.php:429 -#: CreditStatus.php:176 Currencies.php:377 CustItem.php:167 -#: CustomerReceipt.php:1021 Customers.php:1166 CustomerTypes.php:206 -#: Departments.php:187 DiscountCategories.php:238 DiscountMatrix.php:183 -#: EDIMessageFormat.php:151 FixedAssetCategories.php:191 FreightCosts.php:254 -#: GeocodeSetup.php:174 GLAccounts.php:336 GLJournal.php:431 GLTags.php:97 +#: BankAccounts.php:244 BOMs.php:200 BOMs_SingleLevel.php:154 +#: COGSGLPostings.php:116 COGSGLPostings.php:223 ContractBOM.php:271 +#: ContractOtherReqts.php:123 CounterReturns.php:740 CounterSales.php:836 +#: Credit_Invoice.php:429 CreditStatus.php:176 Currencies.php:377 +#: CustItem.php:167 CustomerReceipt.php:1024 Customers.php:1166 +#: CustomerTypes.php:206 Departments.php:187 DiscountCategories.php:238 +#: DiscountMatrix.php:183 EDIMessageFormat.php:151 +#: FixedAssetCategories.php:191 FreightCosts.php:254 GeocodeSetup.php:174 +#: GLAccounts.php:336 GLJournal.php:431 GLTags.php:97 #: ImportBankTransAnalysis.php:224 InternalStockCategoriesByRole.php:184 #: InternalStockRequest.php:298 Labels.php:334 Labels.php:359 Labels.php:612 #: Locations.php:440 MailingGroupMaintenance.php:179 MaintenanceTasks.php:119 @@ -494,18 +481,18 @@ #: SalesTypes.php:207 SecurityTokens.php:117 SelectCreditItems.php:776 #: SelectCustomer.php:734 SelectCustomer.php:760 SelectCustomer.php:815 #: SelectCustomer.php:833 SelectCustomer.php:857 SelectCustomer.php:874 -#: SelectOrderItems.php:1434 SelectQASamples.php:418 SellThroughSupport.php:299 -#: Shipments.php:438 Shippers.php:145 SpecialOrder.php:667 -#: StockCategories.php:297 StockCategories.php:626 StockLocTransfer.php:325 -#: SuppContractChgs.php:99 SuppCreditGRNs.php:117 SuppFixedAssetChgs.php:86 -#: SuppInvGRNs.php:151 SupplierContacts.php:166 SupplierTenderCreate.php:422 -#: SupplierTenderCreate.php:452 SupplierTypes.php:172 SuppShiptChgs.php:90 -#: SuppTransGLAnalysis.php:127 TaxAuthorities.php:173 TaxCategories.php:186 -#: TaxGroups.php:192 TaxProvinces.php:180 TestPlanResults.php:920 -#: UnitsOfMeasure.php:186 WorkCentres.php:146 WorkOrderEntry.php:865 -#: WOSerialNos.php:335 WWW_Access.php:133 WWW_Users.php:392 -#: includes/InputSerialItemsKeyed.php:60 includes/OutputSerialItems.php:99 -#: reportwriter/languages/en_US/reports.php:141 +#: SelectOrderItems.php:1434 SelectQASamples.php:418 +#: SellThroughSupport.php:299 Shipments.php:438 Shippers.php:145 +#: SpecialOrder.php:667 StockCategories.php:297 StockCategories.php:626 +#: StockLocTransfer.php:325 SuppContractChgs.php:99 SuppCreditGRNs.php:117 +#: SuppFixedAssetChgs.php:86 SuppInvGRNs.php:151 SupplierContacts.php:166 +#: SupplierTenderCreate.php:422 SupplierTenderCreate.php:452 +#: SupplierTypes.php:172 SuppShiptChgs.php:90 SuppTransGLAnalysis.php:127 +#: TaxAuthorities.php:173 TaxCategories.php:186 TaxGroups.php:192 +#: TaxProvinces.php:180 TestPlanResults.php:920 UnitsOfMeasure.php:186 +#: WorkCentres.php:146 WorkOrderEntry.php:865 WOSerialNos.php:335 +#: WWW_Access.php:133 WWW_Users.php:392 includes/InputSerialItemsKeyed.php:60 +#: includes/OutputSerialItems.php:99 #, php-format msgid "Delete" msgstr "حذف" @@ -515,9 +502,7 @@ msgstr "" #: AccountGroups.php:351 -msgid "" -"The SQL that was used to retrieve the account group and that failed in the " -"process was" +msgid "The SQL that was used to retrieve the account group and that failed in the process was" msgstr "" #: AccountGroups.php:354 @@ -546,19 +531,20 @@ #: ShopParameters.php:610 SMTPServer.php:126 StockCostUpdate.php:196 #: StockReorderLevel.php:111 Stocks.php:1452 SystemParameters.php:1246 #: UserGLAccounts.php:159 UserLocations.php:178 WorkOrderEntry.php:887 -#: WOSerialNos.php:345 reportwriter/languages/en_US/reports.php:156 +#: WOSerialNos.php:345 msgid "Update" msgstr "" -#: AccountGroups.php:378 AccountGroups.php:418 AnalysisHorizontalIncome.php:125 -#: AnalysisHorizontalIncome.php:526 AnalysisHorizontalPosition.php:79 -#: AnalysisHorizontalPosition.php:362 DailyBankTransactions.php:256 -#: GLAccountUsers.php:253 GLBalanceSheet.php:720 GLCashFlowsIndirect.php:749 -#: GLCashFlowsIndirect.php:782 GLCashFlowsSetup.php:178 GLProfit_Loss.php:1317 -#: GLTrialBalance.php:740 InternalStockRequestInquiry.php:263 -#: PurchasesReport.php:231 PurchasesReport.php:253 SecurityTokens.php:140 -#: SecurityTokens.php:156 UserGLAccounts.php:259 -#: Z_GLAccountUsersCopyAuthority.php:96 includes/Login.php:8 +#: AccountGroups.php:378 AccountGroups.php:418 +#: AnalysisHorizontalIncome.php:125 AnalysisHorizontalIncome.php:526 +#: AnalysisHorizontalPosition.php:79 AnalysisHorizontalPosition.php:362 +#: DailyBankTransactions.php:256 GLAccountUsers.php:253 GLBalanceSheet.php:720 +#: GLCashFlowsIndirect.php:749 GLCashFlowsIndirect.php:782 +#: GLCashFlowsSetup.php:178 GLProfit_Loss.php:1317 GLTrialBalance.php:740 +#: InternalStockRequestInquiry.php:263 PurchasesReport.php:231 +#: PurchasesReport.php:253 SecurityTokens.php:140 SecurityTokens.php:156 +#: UserGLAccounts.php:259 Z_GLAccountUsersCopyAuthority.php:96 +#: includes/Login.php:8 msgid "Return" msgstr "" @@ -581,10 +567,7 @@ msgstr "" #: AccountGroups.php:429 -msgid "" -"A unique name for the account group must be entered - at least 3 characters " -"long and less than 30 characters long. Only alpha numeric characters can be " -"used." +msgid "A unique name for the account group must be entered - at least 3 characters long and less than 30 characters long. Only alpha numeric characters can be used." msgstr "" #: AccountGroups.php:438 @@ -596,16 +579,11 @@ msgstr "" #: AccountGroups.php:470 -msgid "" -"Select YES if this account group will contain accounts that will consist of " -"only profit and loss accounts or NO if the group will contain balance sheet " -"account" +msgid "Select YES if this account group will contain accounts that will consist of only profit and loss accounts or NO if the group will contain balance sheet account" msgstr "" #: AccountGroups.php:482 -msgid "" -"Enter the sequence number that this account group and its child general " -"ledger accounts should display in the trial balance" +msgid "Enter the sequence number that this account group and its child general ledger accounts should display in the trial balance" msgstr "" #: AccountSections.php:6 AccountSections.php:172 AccountSections.php:173 @@ -630,9 +608,7 @@ msgstr "قسم الرقم يجب ان يكون عدد صحيح" #: AccountSections.php:128 -msgid "" -"Cannot delete this account section because general ledger accounts groups " -"have been created using this section" +msgid "Cannot delete this account section because general ledger accounts groups have been created using this section" msgstr "" #: AccountSections.php:130 @@ -675,8 +651,9 @@ msgid "New Account Section Details" msgstr "" -#: AccountSections.php:285 AddCustomerContacts.php:297 AddCustomerNotes.php:242 -#: AddCustomerTypeNotes.php:221 Areas.php:229 BankAccounts.php:433 BOMs.php:923 +#: AccountSections.php:285 AddCustomerContacts.php:297 +#: AddCustomerNotes.php:242 AddCustomerTypeNotes.php:221 Areas.php:229 +#: BankAccounts.php:433 BOMs.php:923 BOMs_SingleLevel.php:809 #: COGSGLPostings.php:371 CreditStatus.php:259 Currencies.php:537 #: CustLoginSetup.php:273 Departments.php:258 DiscountMatrix.php:142 #: EDIMessageFormat.php:248 FixedAssetCategories.php:350 @@ -736,7 +713,8 @@ #: PcClaimExpensesFromTab.php:73 PcExpenses.php:65 PcTabs.php:78 #: PcTypeTabs.php:40 PO_Items.php:380 ProductSpecs.php:315 QATests.php:76 #: SalesAnalReptCols.php:129 SalesPeople.php:105 SalesTypes.php:66 -#: SelectQASamples.php:85 Stocks.php:594 Suppliers.php:524 SupplierTypes.php:68 +#: SelectQASamples.php:85 Stocks.php:594 Suppliers.php:524 +#: SupplierTypes.php:68 msgid "has been updated" msgstr "" @@ -780,13 +758,14 @@ #: EmailCustTrans.php:65 Factors.php:246 Factors.php:297 Locations.php:639 #: OrderDetails.php:127 PDFRemittanceAdvice.php:251 PDFWOPrint.php:599 #: PDFWOPrint.php:602 PDFWOPrint.php:682 PDFWOPrint.php:685 -#: PO_PDFPurchOrder.php:400 PO_PDFPurchOrder.php:403 PrintCustStatements.php:99 -#: PrintCustTrans.php:762 PrintCustTransPortrait.php:787 -#: PrintCustTransPortrait.php:1033 PrintCustTransPortrait.php:1089 -#: SelectCustomer.php:408 SelectCustomer.php:730 SelectSupplier.php:301 -#: SupplierContacts.php:156 SupplierContacts.php:277 UserSettings.php:184 -#: WWW_Users.php:333 includes/PDFPickingListHeader.inc:25 -#: includes/PDFStatementPageHeader.inc:76 includes/PDFTransPageHeader.inc:85 +#: PO_PDFPurchOrder.php:400 PO_PDFPurchOrder.php:403 +#: PrintCustStatements.php:99 PrintCustTrans.php:762 +#: PrintCustTransPortrait.php:787 PrintCustTransPortrait.php:1033 +#: PrintCustTransPortrait.php:1089 SelectCustomer.php:408 +#: SelectCustomer.php:730 SelectSupplier.php:301 SupplierContacts.php:156 +#: SupplierContacts.php:277 UserSettings.php:184 WWW_Users.php:333 +#: includes/PDFPickingListHeader.inc:25 includes/PDFStatementPageHeader.inc:76 +#: includes/PDFTransPageHeader.inc:85 #: includes/PDFTransPageHeaderPortrait.inc:113 includes/PDFWOPageHeader.inc:19 #: includes/PO_PDFOrderPageHeader.inc:29 ../webSHOP/Checkout.php:443 #: ../webSHOP/Register.php:607 @@ -803,12 +782,12 @@ #: Customers.php:1122 Customers.php:1130 GLCashFlowsIndirect.php:130 #: GLCashFlowsIndirect.php:450 PcAssignCashTabToTab.php:284 #: PcAssignCashTabToTab.php:427 PcAssignCashToTab.php:232 -#: PcAssignCashToTab.php:380 PcAuthorizeCash.php:96 PcAuthorizeExpenses.php:100 -#: PcClaimExpensesFromTab.php:377 PcClaimExpensesFromTab.php:675 -#: PcReportExpense.php:145 PcReportTab.php:222 PcReportTab.php:472 -#: PDFQuotation.php:252 PDFQuotationPortrait.php:249 PurchasesReport.php:56 -#: SelectCustomer.php:732 ShopParameters.php:198 SystemParameters.php:411 -#: WOSerialNos.php:306 WOSerialNos.php:312 +#: PcAssignCashToTab.php:380 PcAuthorizeCash.php:96 +#: PcAuthorizeExpenses.php:100 PcClaimExpensesFromTab.php:377 +#: PcClaimExpensesFromTab.php:675 PcReportExpense.php:145 PcReportTab.php:222 +#: PcReportTab.php:472 PDFQuotation.php:252 PDFQuotationPortrait.php:249 +#: PurchasesReport.php:56 SelectCustomer.php:732 ShopParameters.php:198 +#: SystemParameters.php:411 WOSerialNos.php:306 WOSerialNos.php:312 msgid "Notes" msgstr "" @@ -840,8 +819,9 @@ #: AddCustomerContacts.php:254 Contracts.php:788 PDFRemittanceAdvice.php:247 #: PO_Header.php:1028 PO_Header.php:1113 SelectCreditItems.php:246 -#: SelectCustomer.php:406 SelectOrderItems.php:632 SupplierTenderCreate.php:395 -#: includes/PDFStatementPageHeader.inc:72 includes/PDFTransPageHeader.inc:84 +#: SelectCustomer.php:406 SelectOrderItems.php:632 +#: SupplierTenderCreate.php:395 includes/PDFStatementPageHeader.inc:72 +#: includes/PDFTransPageHeader.inc:84 #: includes/PDFTransPageHeaderPortrait.inc:109 ../webSHOP/Checkout.php:537 #: ../webSHOP/Register.php:260 ../webSHOP/Register.php:735 msgid "Phone" @@ -852,9 +832,7 @@ msgstr "" #: AddCustomerContacts.php:272 -msgid "" -"This flag identifies the contact as one who should receive an email " -"cusstomer statement" +msgid "This flag identifies the contact as one who should receive an email cusstomer statement" msgstr "" #: AddCustomerNotes.php:6 AddCustomerNotes.php:51 SelectCustomer.php:807 @@ -900,13 +878,14 @@ #: GLTransInquiry.php:47 GoodsReceived.php:130 MRPCalendar.php:219 #: PaymentAllocations.php:67 Payments.php:974 Payments.php:1337 #: PcAssignCashTabToTab.php:281 PcAssignCashToTab.php:229 -#: PcAuthorizeCash.php:93 PDFOrdersInvoiced.php:378 PDFRemittanceAdvice.php:308 -#: PDFWOPrint.php:456 PrintCustTrans.php:844 PrintCustTransPortrait.php:901 -#: PrintWOItemSlip.php:186 PrintWOItemSlip.php:197 PrintWOItemSlip.php:208 -#: PurchasesReport.php:67 ReverseGRN.php:405 SelectCustomer.php:810 -#: SelectCustomer.php:852 ShipmentCosting.php:538 ShipmentCosting.php:615 -#: Shipments.php:489 StockDispatch.php:279 StockDispatch.php:290 -#: StockDispatch.php:301 StockLocMovements.php:92 StockMovements.php:105 +#: PcAuthorizeCash.php:93 PDFOrdersInvoiced.php:378 +#: PDFRemittanceAdvice.php:308 PDFWOPrint.php:456 PrintCustTrans.php:844 +#: PrintCustTransPortrait.php:901 PrintWOItemSlip.php:186 +#: PrintWOItemSlip.php:197 PrintWOItemSlip.php:208 PurchasesReport.php:67 +#: ReverseGRN.php:405 SelectCustomer.php:810 SelectCustomer.php:852 +#: ShipmentCosting.php:538 ShipmentCosting.php:615 Shipments.php:489 +#: StockDispatch.php:279 StockDispatch.php:290 StockDispatch.php:301 +#: StockLocMovements.php:92 StockMovements.php:105 #: StockSerialItemResearch.php:82 SupplierAllocations.php:458 #: SupplierAllocations.php:572 SupplierAllocations.php:647 #: SupplierInquiry.php:204 SupplierTransInquiry.php:111 SuppWhereAlloc.php:132 @@ -915,20 +894,20 @@ #: includes/PDFQuotationPortraitPageHeader.inc:80 #: includes/PDFStatementPageHeader.inc:164 includes/PDFTransPageHeader.inc:51 #: includes/PDFTransPageHeaderPortrait.inc:62 -#: reportwriter/languages/en_US/reports.php:64 msgid "Date" msgstr "" -#: AddCustomerNotes.php:118 AddCustomerTypeNotes.php:112 SelectCustomer.php:811 -#: SelectCustomer.php:853 StockClone.php:942 Stocks.php:1270 -#: UpgradeDatabase.php:253 UpgradeDatabase.php:256 UpgradeDatabase.php:259 -#: UpgradeDatabase.php:262 UpgradeDatabase.php:265 UpgradeDatabase.php:268 -#: UpgradeDatabase.php:271 UpgradeDatabase.php:274 UpgradeDatabase.php:277 -#: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 -#: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 -#: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 -#: Z_Upgrade_3.11-4.00.php:66 Z_Upgrade_3.11-4.00.php:70 -#: Z_Upgrade_3.11-4.00.php:74 Z_Upgrade_3.11-4.00.php:78 +#: AddCustomerNotes.php:118 AddCustomerTypeNotes.php:112 +#: SelectCustomer.php:811 SelectCustomer.php:853 StockClone.php:942 +#: Stocks.php:1270 UpgradeDatabase.php:253 UpgradeDatabase.php:256 +#: UpgradeDatabase.php:259 UpgradeDatabase.php:262 UpgradeDatabase.php:265 +#: UpgradeDatabase.php:268 UpgradeDatabase.php:271 UpgradeDatabase.php:274 +#: UpgradeDatabase.php:277 Z_Upgrade_3.10-3.11.php:62 +#: Z_Upgrade_3.10-3.11.php:66 Z_Upgrade_3.10-3.11.php:70 +#: Z_Upgrade_3.10-3.11.php:74 Z_Upgrade_3.10-3.11.php:78 +#: Z_Upgrade_3.11-4.00.php:62 Z_Upgrade_3.11-4.00.php:66 +#: Z_Upgrade_3.11-4.00.php:70 Z_Upgrade_3.11-4.00.php:74 +#: Z_Upgrade_3.11-4.00.php:78 msgid "Note" msgstr "" @@ -1018,14 +997,14 @@ #: AgedControlledInventory.php:12 GLCashFlowsSetup.php:109 #: InventoryQuantities.php:155 InventoryValuation.php:217 Locations.php:12 #: MRPCalendar.php:21 MRPCreateDemands.php:193 MRPDemands.php:27 -#: MRPDemandTypes.php:17 MRP.php:542 MRPPlannedPurchaseOrders.php:264 -#: MRPPlannedWorkOrders.php:245 MRPPlannedWorkOrders.php:319 PricesByCost.php:8 -#: ReorderLevelLocation.php:12 ReorderLevel.php:183 StockDispatch.php:321 -#: StockMovements.php:22 StockQties_csv.php:8 StockQuantityByDate.php:10 -#: StockReorderLevel.php:20 StockSerialItemResearch.php:9 -#: StockSerialItems.php:9 StockStatus.php:45 StockTransferControlled.php:14 -#: SuppLoginSetup.php:24 WWW_Users.php:28 includes/MainMenuLinksArray.php:24 -#: reportwriter/languages/en_US/reports.php:243 +#: MRPDemandTypes.php:17 MRP.php:542 MRPPlannedPurchaseOrders.php:272 +#: MRPPlannedWorkOrders.php:243 MRPPlannedWorkOrders.php:317 +#: PricesByCost.php:8 ReorderLevelLocation.php:12 ReorderLevel.php:183 +#: StockDispatch.php:321 StockMovements.php:22 StockQties_csv.php:8 +#: StockQuantityByDate.php:10 StockReorderLevel.php:20 +#: StockSerialItemResearch.php:9 StockSerialItems.php:9 StockStatus.php:45 +#: StockTransferControlled.php:14 SuppLoginSetup.php:24 WWW_Users.php:28 +#: includes/MainMenuLinksArray.php:24 msgid "Inventory" msgstr "" @@ -1034,21 +1013,23 @@ msgstr "" #: AgedControlledInventory.php:42 MRPReschedules.php:124 MRPShortages.php:260 -#: StockClone.php:53 Stocks.php:63 reportwriter/languages/en_US/reports.php:103 +#: StockClone.php:53 Stocks.php:63 msgid "Stock" msgstr "" #: AgedControlledInventory.php:43 AutomaticTranslationDescriptions.php:37 -#: BOMIndented.php:315 BOMIndentedReverse.php:293 BOMInquiry.php:109 -#: BOMInquiry.php:198 BOMs.php:663 BOMs.php:1021 CollectiveWorkOrderCost.php:53 +#: BOMIndented.php:317 BOMIndentedReverse.php:295 BOMInquiry.php:109 +#: BOMInquiry.php:198 BOMs.php:663 BOMs.php:1021 BOMs_SingleLevel.php:558 +#: BOMs_SingleLevel.php:905 CollectiveWorkOrderCost.php:53 #: CollectiveWorkOrderCost.php:325 ContractBOM.php:241 ContractBOM.php:353 #: ContractOtherReqts.php:97 CounterReturns.php:1688 CounterSales.php:2112 #: CounterSales.php:2266 CreditStatus.php:152 CreditStatus.php:243 -#: CustomerPurchases.php:81 EmailConfirmation.php:219 EmailConfirmation.php:349 -#: FixedAssetCategories.php:167 FixedAssetDepreciation.php:91 -#: FixedAssetRegister.php:87 FixedAssetRegister.php:388 -#: FixedAssetTransfer.php:60 FixedAssetTransfer.php:162 GLTags.php:63 -#: GLTags.php:82 GLTransInquiry.php:49 GoodsReceived.php:122 +#: CustomerPurchases.php:81 EmailConfirmation.php:219 +#: EmailConfirmation.php:349 FixedAssetCategories.php:167 +#: FixedAssetDepreciation.php:91 FixedAssetRegister.php:87 +#: FixedAssetRegister.php:388 FixedAssetTransfer.php:60 +#: FixedAssetTransfer.php:162 GLTags.php:63 GLTags.php:82 +#: GLTransInquiry.php:49 GoodsReceived.php:122 #: InternalStockCategoriesByRole.php:168 InternalStockRequestInquiry.php:221 #: InternalStockRequestInquiry.php:267 InternalStockRequestInquiry.php:406 #: InternalStockRequest.php:350 InternalStockRequest.php:564 @@ -1056,11 +1037,11 @@ #: InventoryQuantities.php:246 InventoryValuation.php:197 Labels.php:290 #: MaintenanceTasks.php:95 MaintenanceUserSchedule.php:50 #: MaterialsNotUsed.php:35 MRPDemands.php:92 MRPDemands.php:295 -#: MRPDemandTypes.php:113 MRPPlannedWorkOrders.php:256 MRPReport.php:563 +#: MRPDemandTypes.php:113 MRPPlannedWorkOrders.php:254 MRPReport.php:563 #: MRPReport.php:777 MRPReschedules.php:190 MRPShortages.php:349 #: NoSalesItems.php:194 PaymentTerms.php:182 PcExpenses.php:143 #: PcExpenses.php:231 PcExpensesTypeTab.php:145 PcTypeTabs.php:113 -#: PDFCOA.php:64 PDFOrdersInvoiced.php:335 PDFOrderStatus.php:337 +#: PDFCOA.php:64 PDFOrdersInvoiced.php:335 PDFOrderStatus.php:336 #: PDFSalesBySalesperson.php:86 PDFWeeklyOrders.php:82 PO_Items.php:716 #: PO_Items.php:1194 PO_SelectOSPurchOrder.php:302 PO_SelectPurchOrder.php:214 #: PricesByCost.php:153 RelatedItemsUpdate.php:160 ReorderLevelLocation.php:73 @@ -1078,19 +1059,20 @@ #: SupplierInvoice.php:675 SupplierInvoice.php:759 SupplierPriceList.php:44 #: SupplierPriceList.php:276 SupplierPriceList.php:542 #: SupplierTenderCreate.php:434 SupplierTenderCreate.php:695 -#: SupplierTenderCreate.php:853 SupplierTenders.php:326 SupplierTenders.php:421 -#: SupplierTenders.php:687 SuppPriceList.php:214 SuppPriceList.php:346 -#: TestPlanResults.php:177 TestPlanResults.php:280 TopItems.php:170 -#: WorkCentres.php:130 WorkOrderCosting.php:98 WorkOrderCosting.php:130 -#: WorkOrderEntry.php:973 WorkOrderIssue.php:1009 Z_ItemsWithoutPicture.php:35 -#: api/api_xml-rpc.php:3489 includes/PDFGrnHeader.inc:30 +#: SupplierTenderCreate.php:853 SupplierTenders.php:326 +#: SupplierTenders.php:421 SupplierTenders.php:687 SuppPriceList.php:214 +#: SuppPriceList.php:346 TestPlanResults.php:177 TestPlanResults.php:280 +#: TopItems.php:170 WorkCentres.php:130 WorkOrderCosting.php:98 +#: WorkOrderCosting.php:130 WorkOrderEntry.php:973 WorkOrderIssue.php:1009 +#: Z_ItemsWithoutPicture.php:35 includes/DefineLabelClass.php:12 +#: includes/DefineLabelClass.php:45 includes/PDFGrnHeader.inc:30 #: includes/PDFInventoryPlanPageHeader.inc:50 #: includes/PDFOstdgGRNsPageHeader.inc:38 #: includes/PDFStockLocTransferHeader.inc:65 #: includes/PDFStockTransferHeader.inc:36 includes/PDFTopItemsHeader.inc:50 #: includes/PDFTransPageHeader.inc:211 -#: includes/PDFTransPageHeaderPortrait.inc:256 includes/DefineLabelClass.php:12 -#: includes/DefineLabelClass.php:45 ../webSHOP/includes/PlaceOrder.php:250 +#: includes/PDFTransPageHeaderPortrait.inc:256 api/api_xml-rpc.php:3489 +#: ../webSHOP/includes/PlaceOrder.php:250 msgid "Description" msgstr "" @@ -1129,16 +1111,15 @@ #: SalesByTypePeriodInquiry.php:395 SalesByTypePeriodInquiry.php:430 #: SalesByTypePeriodInquiry.php:465 SalesByTypePeriodInquiry.php:500 #: SalesByTypePeriodInquiry.php:561 SelectCreditItems.php:693 -#: SelectCreditItems.php:697 SelectOrderItems.php:1371 SuppContractChgs.php:107 -#: SuppFixedAssetChgs.php:93 SupplierAllocations.php:460 -#: SupplierAllocations.php:573 SupplierAllocations.php:648 -#: SupplierCredit.php:407 SupplierInquiry.php:209 SuppShiptChgs.php:97 -#: SuppTransGLAnalysis.php:140 Tax.php:303 Z_CheckDebtorsControl.php:149 -#: api/api_debtortransactions.php:1271 api/api_debtortransactions.php:1284 -#: api/api_debtortransactions.php:1581 includes/PDFQuotationPageHeader.inc:119 +#: SelectCreditItems.php:697 SelectOrderItems.php:1371 +#: SuppContractChgs.php:107 SuppFixedAssetChgs.php:93 +#: SupplierAllocations.php:460 SupplierAllocations.php:573 +#: SupplierAllocations.php:648 SupplierCredit.php:407 SupplierInquiry.php:209 +#: SuppShiptChgs.php:97 SuppTransGLAnalysis.php:140 Tax.php:303 +#: Z_CheckDebtorsControl.php:149 includes/PDFQuotationPageHeader.inc:119 #: includes/PDFQuotationPortraitPageHeader.inc:100 -#: includes/PO_PDFOrderPageHeader.inc:81 -#: reportwriter/languages/en_US/reports.php:107 +#: includes/PO_PDFOrderPageHeader.inc:81 api/api_debtortransactions.php:1271 +#: api/api_debtortransactions.php:1284 api/api_debtortransactions.php:1581 #: ../webSHOP/includes/DisplayShoppingCart.php:8 #: ../webSHOP/includes/PlaceOrder.php:299 #, php-format @@ -1159,7 +1140,7 @@ #: AgedDebtors.php:268 AgedDebtors.php:370 AgedDebtors.php:434 #: AgedSuppliers.php:108 BOMExtendedQty.php:154 BOMIndented.php:153 -#: BOMIndentedReverse.php:140 BOMListing.php:42 BOMListing.php:53 +#: BOMIndentedReverse.php:140 BOMListing.php:43 BOMListing.php:54 #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:112 #: GLBalanceSheet.php:152 GLProfit_Loss.php:188 GLTagProfit_Loss.php:195 #: GLTrialBalance.php:167 InternalStockRequestInquiry.php:250 @@ -1196,55 +1177,53 @@ #: AgedDebtors.php:271 AgedDebtors.php:373 AgedDebtors.php:437 #: AgedSuppliers.php:111 AgedSuppliers.php:198 BOMExtendedQty.php:157 -#: BOMExtendedQty.php:244 BOMIndented.php:156 BOMIndented.php:237 -#: BOMIndentedReverse.php:144 BOMIndentedReverse.php:222 BOMListing.php:45 -#: Credit_Invoice.php:201 Dashboard.php:158 Dashboard.php:247 Dashboard.php:400 -#: DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 FTP_RadioBeacon.php:187 -#: GetStockImage.php:143 GLBalanceSheet.php:116 GLBalanceSheet.php:155 -#: GLBalanceSheet.php:334 GLProfit_Loss.php:191 GLProfit_Loss.php:203 -#: GLTagProfit_Loss.php:199 GLTagProfit_Loss.php:212 GLTrialBalance.php:170 -#: GLTrialBalance.php:182 InventoryPlanning.php:102 InventoryPlanning.php:180 -#: InventoryPlanning.php:217 InventoryPlanning.php:266 -#: InventoryPlanning.php:341 InventoryPlanningPrefSupplier.php:186 -#: InventoryPlanningPrefSupplier.php:244 InventoryPlanningPrefSupplier.php:271 -#: InventoryPlanningPrefSupplier.php:304 InventoryPlanningPrefSupplier.php:372 -#: InventoryQuantities.php:87 InventoryQuantities.php:98 -#: InventoryValuation.php:67 InventoryValuation.php:92 -#: MailInventoryValuation.php:123 MailInventoryValuation.php:219 -#: MailInventoryValuation.php:243 MailInventoryValuation.php:251 -#: MRPPlannedPurchaseOrders.php:116 MRPPlannedPurchaseOrders.php:127 -#: MRPPlannedWorkOrders.php:107 MRPPlannedWorkOrders.php:118 -#: MRPPlannedWorkOrders.php:309 MRPReport.php:38 MRPReport.php:49 -#: MRPReport.php:149 MRPReschedules.php:46 MRPReschedules.php:58 -#: MRPShortages.php:157 MRPShortages.php:169 OutstandingGRNs.php:49 -#: OutstandingGRNs.php:62 PDFCustomerList.php:235 PDFCustomerList.php:247 -#: PDFFGLabel.php:217 PDFGLJournalCN.php:148 PDFGLJournal.php:108 -#: PDFGrn.php:180 PDFLowGP.php:59 PDFLowGP.php:71 PDFPriceList.php:147 -#: PDFPrintLabel.php:42 PDFQALabel.php:116 PDFQuotation.php:276 -#: PDFQuotationPortrait.php:268 PDFRemittanceAdvice.php:83 -#: PDFSalesBySalesperson.php:160 PDFSalesBySalesperson.php:168 -#: PDFSellThroughSupportClaim.php:74 PDFSellThroughSupportClaim.php:86 -#: PDFStockCheckComparison.php:37 PDFStockCheckComparison.php:63 -#: PDFStockCheckComparison.php:271 PDFWeeklyOrders.php:209 -#: PDFWeeklyOrders.php:217 PDFWOPrint.php:109 PO_PDFPurchOrder.php:31 -#: PO_PDFPurchOrder.php:156 PrintCustOrder_generic.php:256 -#: PrintCustOrder.php:238 PrintWOItemSlip.php:122 -#: PurchaseByPrefSupplier.php:402 PurchaseByPrefSupplier.php:450 -#: PurchaseByPrefSupplier.php:474 PurchaseByPrefSupplier.php:503 -#: PurchaseByPrefSupplier.php:534 ReorderLevel.php:63 ReorderLevel.php:171 -#: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:32 StockCheck.php:42 -#: StockCheck.php:63 StockCheck.php:93 StockCheck.php:135 StockCheck.php:146 -#: StockCheck.php:188 StockDispatch.php:128 StockDispatch.php:141 -#: SupplierBalsAtPeriodEnd.php:54 SupplierBalsAtPeriodEnd.php:65 -#: SuppPaymentRun.php:112 SuppPaymentRun.php:122 SuppPaymentRun.php:186 -#: SuppPaymentRun.php:217 SuppPriceList.php:142 Tax.php:49 Tax.php:154 -#: Tax.php:183 Tax.php:342 Z_DataExport.php:72 Z_DataExport.php:168 -#: Z_DataExport.php:259 Z_DataExport.php:308 Z_DataExport.php:347 -#: Z_DataExport.php:383 Z_DataExport.php:419 Z_DataExport.php:471 -#: Z_poRebuildDefault.php:41 -#: includes/ConstructSQLForUserDefinedSalesReport.inc:180 -#: includes/ConstructSQLForUserDefinedSalesReport.inc:188 -#: includes/ConstructSQLForUserDefinedSalesReport.inc:343 +#: BOMExtendedQty.php:244 BOMIndented.php:156 BOMIndented.php:239 +#: BOMIndentedReverse.php:144 BOMIndentedReverse.php:225 BOMListing.php:46 +#: Credit_Invoice.php:201 Dashboard.php:158 Dashboard.php:247 +#: Dashboard.php:400 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 +#: FTP_RadioBeacon.php:187 GetStockImage.php:143 GLBalanceSheet.php:116 +#: GLBalanceSheet.php:155 GLBalanceSheet.php:334 GLProfit_Loss.php:191 +#: GLProfit_Loss.php:203 GLTagProfit_Loss.php:199 GLTagProfit_Loss.php:212 +#: GLTrialBalance.php:170 GLTrialBalance.php:182 InventoryPlanning.php:102 +#: InventoryPlanning.php:180 InventoryPlanning.php:217 +#: InventoryPlanning.php:266 InventoryPlanning.php:341 +#: InventoryPlanningPrefSupplier.php:186 InventoryPlanningPrefSupplier.php:244 +#: InventoryPlanningPrefSupplier.php:271 InventoryPlanningPrefSupplier.php:304 +#: InventoryPlanningPrefSupplier.php:372 InventoryQuantities.php:87 +#: InventoryQuantities.php:98 InventoryValuation.php:67 +#: InventoryValuation.php:92 MailInventoryValuation.php:123 +#: MailInventoryValuation.php:219 MailInventoryValuation.php:243 +#: MailInventoryValuation.php:251 MRPPlannedPurc... [truncated message content] |
From: <tu...@us...> - 2018-01-02 05:27:02
|
Revision: 7898 http://sourceforge.net/p/web-erp/reponame/7898 Author: turbopt Date: 2018-01-02 05:27:00 +0000 (Tue, 02 Jan 2018) Log Message: ----------- css/default/default.css: Add text alignment in a couple of styles to match the same use as other CSS files to avoid formatting issues when the default theme is used. Also, converted several property names to lowercase. Modified Paths: -------------- trunk/css/default/default.css trunk/doc/Change.log Modified: trunk/css/default/default.css =================================================================== --- trunk/css/default/default.css 2017-12-22 21:45:32 UTC (rev 7897) +++ trunk/css/default/default.css 2018-01-02 05:27:00 UTC (rev 7898) @@ -159,15 +159,15 @@ } div.warn { -background-color:#f5dbfd; -color:maroon; -border:1px solid maroon; + background-color:#f5dbfd; + color:maroon; + border:1px solid maroon; } div.success { -background-color:#b9ecb4; -color:darkgreen; -border:1px solid darkgreen; + background-color:#b9ecb4; + color:darkgreen; + border:1px solid darkgreen; } div.info { @@ -176,33 +176,33 @@ border:1px solid navy; } -DIV.page_help_text { +div.page_help_text { background:lightgrey url(images/help.png) top left no-repeat; - BORDER:#a52a2a 1px solid; + border:#a52a2a 1px solid; padding-top:2px; padding-bottom:2px; - PADDING-LEFT:10px; - Z-INDEX:1; + padding-left:10px; + z-index:1; width:80%; - FLOAT:none; - VISIBILITY:visible; - MARGIN:0 auto; - POSITION:static; + float:none; + visibility:visible; + margin:0 auto; + position:static; font-family:Arial, Verdana, Helvetica, sans-serif; font-weight:normal; color:black; - TEXT-ALIGN:center; + text-align:center; } -DIV.system_check { - BORDER:#a52a2a 1px solid; - PADDING-LEFT:3px; - Z-INDEX:1; +div.system_check { + border:#a52a2a 1px solid; + padding-left:3px; + z-index:1; width:40%; - FLOAT:none; - VISIBILITY:visible; - MARGIN:0 auto; - POSITION:static; + float:none; + visibility:visible; + margin:0 auto; + position:static; background:lightgray; font-family:Arial, Verdana, Helvetica, sans-serif; padding-top:1px; @@ -209,7 +209,7 @@ padding-bottom:1px; font-weight:normal; color:black; - TEXT-ALIGN:left; + text-align:left; } .dpTbl { /* date picker background */ @@ -250,16 +250,6 @@ margin:0 auto; } -/* Table type is used for UI tables type 2 */ -/*.table2 { -width:90%; -background:#eee; -border:0px 0px 2px 2px #222 solid; -margin:0 auto; -} - -*/ - .tableheader { font-weight:normal; background-color:#800000; @@ -369,12 +359,13 @@ #BodyDiv { clear:both; + text-align:center; } #BodyWrapDiv { background:#CCCCCC; /*border:thin solid #ccc;*/ - clear:both; + /*clear:both;*/ } /*** BODY - MAIN MENU ***/ @@ -425,6 +416,7 @@ display:table; float:right; overflow:hidden; + text-align:left; width:88.5%; } @@ -470,7 +462,7 @@ .menu_group_item p { color:#00f; /* This is the color for bullets, I like it to be the same as the anchor color, but it's up to you */ text-indent:-12px; /* this makes the bullet to appear as the li tag previously used */ - margin:0 0 0 12px; /* One thing that I didn´t like of the li was that it had no left margin applied */ + margin:0 0 0 12px; /* One thing that I didn't like of the li was that it had no left margin applied */ } #InquiriesDiv div { /* header for standard reports/forms, custom reports */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2017-12-22 21:45:32 UTC (rev 7897) +++ trunk/doc/Change.log 2018-01-02 05:27:00 UTC (rev 7898) @@ -1,5 +1,6 @@ webERP Change Log +2/1/18: PaulT: css/default/default.css: Add text alignment in a couple of styles to match the same use in other CSS to avoid formatting issues when the default theme is used. Also, set several property names to lowercase. 20/12/17 PaulT: FormMaker.php, ReportMaker.php, WriteForm.inc: A few more PHP 7.1 array compatibility changes. 20/12/17 PaulT: RCFunctions.inc, FormMaker.php: PHP 7.1 array compatibility change. 19/12/17 PaulT: PDFOrderStatus.php: Remove redundant ConnectDB.inc include reference. (already included by session.php at the top of the file) |
From: <tu...@us...> - 2018-01-02 19:18:58
|
Revision: 7899 http://sourceforge.net/p/web-erp/reponame/7899 Author: turbopt Date: 2018-01-02 19:18:56 +0000 (Tue, 02 Jan 2018) Log Message: ----------- SelectSalesOrder.php: Move handling for URL Quotations parameter to top of file to avoid potential page error(s). [Reported in forums by Paul Becker] Handling move reduces code within some conditional checks. This change also includes minor whitespace improvements and removes an unused global reference. Modified Paths: -------------- trunk/SelectSalesOrder.php trunk/doc/Change.log Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2018-01-02 05:27:00 UTC (rev 7898) +++ trunk/SelectSalesOrder.php 2018-01-02 19:18:56 UTC (rev 7899) @@ -29,6 +29,13 @@ unset($SelectedCustomer); } +if ( isset($_GET['Quotations']) ) { + $_POST['Quotations'] = $_GET['Quotations']; +} +else { + $_POST['Quotations'] = ''; +} + if (isset($_POST['PlacePO'])){ /*user hit button to place PO for selected orders */ /*Note the button would not have been displayed if the user had no authority to create purchase orders */ @@ -505,15 +512,11 @@ echo '</select></td> <td><select name="Quotations">'; - if (isset($_GET['Quotations']) AND $_GET['Quotations']=='Quotes_Only'){ - $_POST['Quotations']='Quotes_Only'; - } - - if (isset($_POST['Quotations']) AND $_POST['Quotations']=='Quotes_Only'){ + if ( $_POST['Quotations'] == 'Quotes_Only' ){ echo '<option selected="selected" value="Quotes_Only">' . _('Quotations Only') . '</option>'; echo '<option value="Orders_Only">' . _('Orders Only') . '</option>'; echo '<option value="Overdue_Only">' . _('Overdue Only') . '</option>'; - } elseif (isset($_POST['Quotations']) AND $_POST['Quotations'] == 'Overdue_Only'){ + } elseif ( $_POST['Quotations'] == 'Overdue_Only' ){ echo '<option selected="selected" value="Overdue_Only">' . _('Overdue Only') . '</option>'; echo '<option value="Quotes_Only">' . _('Quotations Only') . '</option>'; echo '<option value="Orders_Only">' . _('Orders Only') . '</option>'; @@ -522,6 +525,7 @@ echo '<option value="Quotes_Only">' . _('Quotations Only') . '</option>'; echo '<option value="Overdue_Only">' . _('Overdue Only') . '</option>'; } + if (!isset($_POST['DueDateFrom'])) { $_POST['DueDateFrom'] = ''; } @@ -643,15 +647,14 @@ } //figure out the SQL required from the inputs available - if (isset($_POST['Quotations']) AND $_POST['Quotations']=='Orders_Only'){ - $Quotations = 0; - } elseif(isset($_POST['Quotations']) AND $_POST['Quotations'] == 'Quotes_Only') { - $Quotations =1; - } elseif(isset($_POST['Quotations']) AND $_POST['Quotations'] == 'Overdue_Only') { + if( $_POST['Quotations'] == 'Quotes_Only' ) { + $Quotations = 1; + } elseif( $_POST['Quotations'] == 'Overdue_Only' ) { $Quotations = "0 AND itemdue<'" . Date('Y-m-d') . "'"; } else { $Quotations = 0; } + if (isset($_POST['DueDateFrom']) AND is_date($_POST['DueDateFrom'])) { $DueDateFrom = " AND itemdue>='" . FormatDateForSQL($_POST['DueDateFrom']) . "' "; } else { @@ -777,8 +780,7 @@ $SQL .= " AND salesorders.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; } - if (isset($OrderNumber) - AND $OrderNumber !='') { + if (isset($OrderNumber) AND $OrderNumber !='') { $SQL .= "AND salesorders.orderno=". $OrderNumber ." AND salesorders.quotation=" .$Quotations; @@ -788,7 +790,6 @@ AND salesorders.quotation=" . $Quotations; } else { - /* $DateAfterCriteria = FormatDateforSQL($OrdersAfterDate); */ if (isset($SelectedCustomer)) { @@ -847,7 +848,7 @@ echo '<table cellpadding="2" width="95%" class="selection">'; - if (isset($_POST['Quotations']) AND ($_POST['Quotations']=='Orders_Only' OR $_POST['Quotations'] == 'Overdue_Only')){ + if ( $_POST['Quotations'] == 'Orders_Only' OR $_POST['Quotations'] == 'Overdue_Only' ){ $TableHeader = '<tr> <th class="ascending" >' . _('Modify') . '</th> <th>' . _('Invoice') . '</th> @@ -1012,13 +1013,16 @@ </tr> </tfoot>'; } - echo '<tfoot><tr><td colspan="9" class="number">'; + + echo '<tfoot><tr><td colspan="9" class="number"><b>'; + if ($_POST['Quotations']=='Orders_Only'){ - echo '<b>' . _('Total Order(s) Value in'); + echo _('Total Order(s) Value in'); } else { - echo '<b>' . _('Total Quotation(s) Value in'); + echo _('Total Quotation(s) Value in'); } - echo ' ' . $_SESSION['CompanyRecord']['currencydefault'] . ' :</b></td> + + echo ' ' . $_SESSION['CompanyRecord']['currencydefault'] . ':</b></td> <td class="number"><b>' . locale_number_format($OrdersTotal,$_SESSION['CompanyRecord']['decimalplaces']) . '</b></td> </tr></tfoot> </table>'; @@ -1031,11 +1035,13 @@ } //end StockID already selected include('includes/footer.php'); + function GetSearchItems ($SQLConstraint='') { - global $db; + if ($_POST['Keywords'] AND $_POST['StockCode']) { echo _('Stock description keywords have been used in preference to the Stock code extract entered'); } + $SQL = "SELECT stockmaster.stockid, stockmaster.description, stockmaster.decimalplaces, @@ -1045,6 +1051,7 @@ ON salesorderdetails.stkcode = stockmaster.stockid AND completed=0 INNER JOIN locstock ON stockmaster.stockid=locstock.stockid"; + if (isset($_POST['StockCat']) AND ((trim($_POST['StockCat']) == '') OR $_POST['StockCat'] == 'All')){ $WhereStockCat = ''; @@ -1051,14 +1058,13 @@ } else { $WhereStockCat = " AND stockmaster.categoryid='" . $_POST['StockCat'] . "' "; } + if ($_POST['Keywords']) { //insert wildcard characters in spaces $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; - $SQL .= " WHERE stockmaster.description " . LIKE . " '" . $SearchString . "' - " . $WhereStockCat ; + $SQL .= " WHERE stockmaster.description " . LIKE . " '" . $SearchString . "' " . $WhereStockCat; - } elseif (isset($_POST['StockCode'])){ $SQL .= " WHERE stockmaster.stockid " . LIKE . " '%" . $_POST['StockCode'] . "%'" . $WhereStockCat; @@ -1066,6 +1072,7 @@ $SQL .= " WHERE stockmaster.categoryid='" . $_POST['StockCat'] ."'"; } + $SQL .= $SQLConstraint; $SQL .= " GROUP BY stockmaster.stockid, stockmaster.description, @@ -1076,7 +1083,7 @@ $ErrMsg = _('No stock items were returned by the SQL because'); $DbgMsg = _('The SQL used to retrieve the searched parts was'); $StockItemsResult = DB_query($SQL,$ErrMsg,$DbgMsg); + return $StockItemsResult; - } ?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-02 05:27:00 UTC (rev 7898) +++ trunk/doc/Change.log 2018-01-02 19:18:56 UTC (rev 7899) @@ -1,5 +1,6 @@ webERP Change Log +2/1/18: PaulT: SelectSalesOrder.php: Move handling for URL Quotations parameter to top of file to avoid potential page error(s). (Reported in forums by Paul Becker) Handling move reduces code within some conditional checks. This change also includes minor whitespace improvements and removes an unused global reference. 2/1/18: PaulT: css/default/default.css: Add text alignment in a couple of styles to match the same use in other CSS to avoid formatting issues when the default theme is used. Also, set several property names to lowercase. 20/12/17 PaulT: FormMaker.php, ReportMaker.php, WriteForm.inc: A few more PHP 7.1 array compatibility changes. 20/12/17 PaulT: RCFunctions.inc, FormMaker.php: PHP 7.1 array compatibility change. |
From: <tu...@us...> - 2018-01-03 19:35:49
|
Revision: 7900 http://sourceforge.net/p/web-erp/reponame/7900 Author: turbopt Date: 2018-01-03 19:35:47 +0000 (Wed, 03 Jan 2018) Log Message: ----------- SelectSalesOrder.php: Fix search to retain quote option and set StockLocation to the UserStockLocation to auto-load current Sales Orders. Modified Paths: -------------- trunk/SelectSalesOrder.php trunk/doc/Change.log Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2018-01-02 19:18:56 UTC (rev 7899) +++ trunk/SelectSalesOrder.php 2018-01-03 19:35:47 UTC (rev 7900) @@ -32,7 +32,7 @@ if ( isset($_GET['Quotations']) ) { $_POST['Quotations'] = $_GET['Quotations']; } -else { +else if ( !isset($_POST['Quotations']) ) { $_POST['Quotations'] = ''; } @@ -677,7 +677,7 @@ } if(!isset($_POST['StockLocation'])) { - $_POST['StockLocation'] = ''; + $_POST['StockLocation'] = $_SESSION['UserStockLocation']; } //Harmonize the ordervalue with SUM function since webERP allowed same items appeared several times in one sales orders. If there is no sum value, this situation not inclued. //We should separate itemdue inquiry from normal inquiry. Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-02 19:18:56 UTC (rev 7899) +++ trunk/doc/Change.log 2018-01-03 19:35:47 UTC (rev 7900) @@ -1,5 +1,6 @@ webERP Change Log +3/1/18: PaulT: SelectSalesOrder.php: Fix search to retain quote option and set StockLocation to the UserStockLocation to auto-load current Sales Orders. 2/1/18: PaulT: SelectSalesOrder.php: Move handling for URL Quotations parameter to top of file to avoid potential page error(s). (Reported in forums by Paul Becker) Handling move reduces code within some conditional checks. This change also includes minor whitespace improvements and removes an unused global reference. 2/1/18: PaulT: css/default/default.css: Add text alignment in a couple of styles to match the same use in other CSS to avoid formatting issues when the default theme is used. Also, set several property names to lowercase. 20/12/17 PaulT: FormMaker.php, ReportMaker.php, WriteForm.inc: A few more PHP 7.1 array compatibility changes. |
From: <dai...@us...> - 2018-01-06 00:20:58
|
Revision: 7901 http://sourceforge.net/p/web-erp/reponame/7901 Author: daintree Date: 2018-01-06 00:20:56 +0000 (Sat, 06 Jan 2018) Log Message: ----------- Attempt to avoid XSS problems created by logged in users by parsing out script> Modified Paths: -------------- trunk/Factors.php trunk/doc/Change.log trunk/includes/session.php Modified: trunk/Factors.php =================================================================== --- trunk/Factors.php 2018-01-03 19:35:47 UTC (rev 7900) +++ trunk/Factors.php 2018-01-06 00:20:56 UTC (rev 7901) @@ -205,7 +205,7 @@ <table class="selection"> <tr> <td>' . _('Factor company Name') . ':</td> - <td><input tabindex="1" type="text" name="FactorName" required="required" size="42" maxlength="40" value="' .$_POST['FactorName'].'" /></td> + <td><input tabindex="1" type="text" name="FactorName" required="required" size="42" maxlength="40" value="' . $_POST['FactorName'] . '" /></td> </tr> <tr> <td>' . _('Address Line 1') . ':</td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-03 19:35:47 UTC (rev 7900) +++ trunk/doc/Change.log 2018-01-06 00:20:56 UTC (rev 7901) @@ -1,5 +1,6 @@ webERP Change Log +6/1/18 Phil: Attempt to avoid XSS attacks by logged in users by parsing out "script>" from all $_POST and $_GET variables. 3/1/18: PaulT: SelectSalesOrder.php: Fix search to retain quote option and set StockLocation to the UserStockLocation to auto-load current Sales Orders. 2/1/18: PaulT: SelectSalesOrder.php: Move handling for URL Quotations parameter to top of file to avoid potential page error(s). (Reported in forums by Paul Becker) Handling move reduces code within some conditional checks. This change also includes minor whitespace improvements and removes an unused global reference. 2/1/18: PaulT: css/default/default.css: Add text alignment in a couple of styles to match the same use in other CSS to avoid formatting issues when the default theme is used. Also, set several property names to lowercase. @@ -27,7 +28,7 @@ 3/12/17 Phil commited Tim's BankAccountBalances.php script 2/12/17 Exson: Fixed the outstanding quantity is not right in PO_SelectOSPurchOrder.php. 2/12/17 Phil committed Tim Schofield's fix for javascript date picker for US date formats -2/12/17 Phil/Paul Becker: Purchases report - also deleted id non-exsitent in css committed changes suggested by VortecCPI http://www.weberp.org/forum/showthread.php?tid=7943 +2/12/17 Phil/Paul Becker: Purchases report - also deleted id non-exsitent in css committed changes suggested by VortecCPI http://www.weberp.org/forum/showthread.php?tid=7943 23/11/2017 Andy Couling: Added Petty Cash receipt file upload to directory functionality. 7/11/17 Exson: Remove cost updating for WAC method in BOMs.php. 25/10/17 Exson: Fixed the salesman authority problem in PrintCustTrans.php. Modified: trunk/includes/session.php =================================================================== --- trunk/includes/session.php 2018-01-03 19:35:47 UTC (rev 7900) +++ trunk/includes/session.php 2018-01-06 00:20:56 UTC (rev 7901) @@ -55,13 +55,14 @@ if(get_magic_quotes_gpc()) { $_POST['name'] = stripslashes($_POST['name']); } - $_POST[$PostVariableName] = DB_escape_string($PostVariableValue); + + $_POST[$PostVariableName] = DB_escape_string(str_replace('script>','',$PostVariableValue)); } else { foreach ($PostVariableValue as $PostArrayKey => $PostArrayValue) { if(get_magic_quotes_gpc()) { $PostVariableValue[$PostArrayKey] = stripslashes($value[$PostArrayKey]); } - $PostVariableValue[$PostArrayKey] = DB_escape_string($PostArrayValue); + $PostVariableValue[$PostArrayKey] = DB_escape_string(str_replace('script>','',$PostArrayValue)); } } } @@ -71,7 +72,7 @@ */ foreach ($_GET as $GetKey => $GetValue) { if (gettype($GetValue) != 'array') { - $_GET[$GetKey] = DB_escape_string($GetValue); + $_GET[$GetKey] = DB_escape_string(str_replace('script>','',$GetValue)); } } } else { //set SESSION['FormID'] before the a user has even logged in |
From: <dai...@us...> - 2018-01-06 10:18:45
|
Revision: 7902 http://sourceforge.net/p/web-erp/reponame/7902 Author: daintree Date: 2018-01-06 10:18:42 +0000 (Sat, 06 Jan 2018) Log Message: ----------- Changed to strip_tags rather than replace script> in _POST and _GET variables per Tims idea Modified Paths: -------------- trunk/doc/Change.log trunk/includes/session.php Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-06 00:20:56 UTC (rev 7901) +++ trunk/doc/Change.log 2018-01-06 10:18:42 UTC (rev 7902) @@ -1,6 +1,6 @@ webERP Change Log -6/1/18 Phil: Attempt to avoid XSS attacks by logged in users by parsing out "script>" from all $_POST and $_GET variables. +6/1/18 Phil: Attempt to avoid XSS attacks by logged in users by parsing out "script>" from all $_POST and $_GET variables - subsequentely changed to strip_tags from all $_POST and $_GETs per Tim's recommendation 3/1/18: PaulT: SelectSalesOrder.php: Fix search to retain quote option and set StockLocation to the UserStockLocation to auto-load current Sales Orders. 2/1/18: PaulT: SelectSalesOrder.php: Move handling for URL Quotations parameter to top of file to avoid potential page error(s). (Reported in forums by Paul Becker) Handling move reduces code within some conditional checks. This change also includes minor whitespace improvements and removes an unused global reference. 2/1/18: PaulT: css/default/default.css: Add text alignment in a couple of styles to match the same use in other CSS to avoid formatting issues when the default theme is used. Also, set several property names to lowercase. Modified: trunk/includes/session.php =================================================================== --- trunk/includes/session.php 2018-01-06 00:20:56 UTC (rev 7901) +++ trunk/includes/session.php 2018-01-06 10:18:42 UTC (rev 7902) @@ -56,13 +56,13 @@ $_POST['name'] = stripslashes($_POST['name']); } - $_POST[$PostVariableName] = DB_escape_string(str_replace('script>','',$PostVariableValue)); + $_POST[$PostVariableName] = DB_escape_string(strip_tags($PostVariableValue)); } else { foreach ($PostVariableValue as $PostArrayKey => $PostArrayValue) { if(get_magic_quotes_gpc()) { $PostVariableValue[$PostArrayKey] = stripslashes($value[$PostArrayKey]); } - $PostVariableValue[$PostArrayKey] = DB_escape_string(str_replace('script>','',$PostArrayValue)); + $PostVariableValue[$PostArrayKey] = DB_escape_string(strip_tags($PostArrayValue)); } } } @@ -72,7 +72,7 @@ */ foreach ($_GET as $GetKey => $GetValue) { if (gettype($GetValue) != 'array') { - $_GET[$GetKey] = DB_escape_string(str_replace('script>','',$GetValue)); + $_GET[$GetKey] = DB_escape_string(strip_tags($GetValue)); } } } else { //set SESSION['FormID'] before the a user has even logged in |
From: <tu...@us...> - 2018-01-06 14:30:19
|
Revision: 7903 http://sourceforge.net/p/web-erp/reponame/7903 Author: turbopt Date: 2018-01-06 14:30:16 +0000 (Sat, 06 Jan 2018) Log Message: ----------- SelectSalesOrder.php: Fix handling to correct table heading value. (Reported in forums by Paul Becker) Modified Paths: -------------- trunk/SelectSalesOrder.php trunk/doc/Change.log Modified: trunk/SelectSalesOrder.php =================================================================== --- trunk/SelectSalesOrder.php 2018-01-06 10:18:42 UTC (rev 7902) +++ trunk/SelectSalesOrder.php 2018-01-06 14:30:16 UTC (rev 7903) @@ -647,11 +647,17 @@ } //figure out the SQL required from the inputs available - if( $_POST['Quotations'] == 'Quotes_Only' ) { + if( $_POST['Quotations'] == 'Orders_Only' ) { + $Quotations = 0; + } + elseif( $_POST['Quotations'] == 'Quotes_Only' ) { $Quotations = 1; - } elseif( $_POST['Quotations'] == 'Overdue_Only' ) { + } + elseif( $_POST['Quotations'] == 'Overdue_Only' ) { $Quotations = "0 AND itemdue<'" . Date('Y-m-d') . "'"; - } else { + } + else { + $_POST['Quotations'] = 'Orders_Only'; $Quotations = 0; } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-06 10:18:42 UTC (rev 7902) +++ trunk/doc/Change.log 2018-01-06 14:30:16 UTC (rev 7903) @@ -1,6 +1,7 @@ webERP Change Log -6/1/18 Phil: Attempt to avoid XSS attacks by logged in users by parsing out "script>" from all $_POST and $_GET variables - subsequentely changed to strip_tags from all $_POST and $_GETs per Tim's recommendation +6/1/18 PaulT: SelectSalesOrder.php: Fix handling to correct table heading value. (Reported in forums by Paul Becker) +6/1/18 Phil: Attempt to avoid XSS attacks by logged in users by parsing out "script>" from all $_POST and $_GET variables - subsequentely changed to strip_tags from all $_POST and $_GETs per Tim's recommendation 3/1/18: PaulT: SelectSalesOrder.php: Fix search to retain quote option and set StockLocation to the UserStockLocation to auto-load current Sales Orders. 2/1/18: PaulT: SelectSalesOrder.php: Move handling for URL Quotations parameter to top of file to avoid potential page error(s). (Reported in forums by Paul Becker) Handling move reduces code within some conditional checks. This change also includes minor whitespace improvements and removes an unused global reference. 2/1/18: PaulT: css/default/default.css: Add text alignment in a couple of styles to match the same use in other CSS to avoid formatting issues when the default theme is used. Also, set several property names to lowercase. |
From: <dai...@us...> - 2018-01-06 23:15:20
|
Revision: 7904 http://sourceforge.net/p/web-erp/reponame/7904 Author: daintree Date: 2018-01-06 23:15:16 +0000 (Sat, 06 Jan 2018) Log Message: ----------- Update phpxmlrpc from fithub latest Modified Paths: -------------- trunk/AutomaticTranslationDescriptions.php trunk/doc/Change.log trunk/includes/GoogleTranslator.php trunk/xmlrpc/lib/xmlrpc.inc trunk/xmlrpc/lib/xmlrpc_wrappers.inc trunk/xmlrpc/lib/xmlrpcs.inc Modified: trunk/AutomaticTranslationDescriptions.php =================================================================== --- trunk/AutomaticTranslationDescriptions.php 2018-01-06 14:30:16 UTC (rev 7903) +++ trunk/AutomaticTranslationDescriptions.php 2018-01-06 23:15:16 UTC (rev 7904) @@ -7,6 +7,12 @@ $BookMark = 'Z_TranslateItemDescriptions'; // Anchor's id in the manual's html document. include ('includes/header.php'); +if (!function_exists("curl_init")){ + prnMsg("This script requires that the PHP curl module be available to use the Google API. Unfortunately this installation does not have the curl module available","error"); + include('includes/footer.php'); + exit; +} + include ('includes/GoogleTranslator.php'); $SourceLanguage=mb_substr($_SESSION['Language'],0,2); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-06 14:30:16 UTC (rev 7903) +++ trunk/doc/Change.log 2018-01-06 23:15:16 UTC (rev 7904) @@ -1,7 +1,9 @@ webERP Change Log 6/1/18 PaulT: SelectSalesOrder.php: Fix handling to correct table heading value. (Reported in forums by Paul Becker) -6/1/18 Phil: Attempt to avoid XSS attacks by logged in users by parsing out "script>" from all $_POST and $_GET variables - subsequentely changed to strip_tags from all $_POST and $_GETs per Tim's recommendation +7/1/18 Phil: Update phpxmlrpc to latest from https://github.com/gggeek/phpxmlrpc +6/1/18 Phil: Attempt to avoid XSS attacks by logged in users by parsing out "script>" from all $_POST and $_GET variables - subsequentely changed to strip_tags from all $_POST and $_GETs per Tim's recommendation + 3/1/18: PaulT: SelectSalesOrder.php: Fix search to retain quote option and set StockLocation to the UserStockLocation to auto-load current Sales Orders. 2/1/18: PaulT: SelectSalesOrder.php: Move handling for URL Quotations parameter to top of file to avoid potential page error(s). (Reported in forums by Paul Becker) Handling move reduces code within some conditional checks. This change also includes minor whitespace improvements and removes an unused global reference. 2/1/18: PaulT: css/default/default.css: Add text alignment in a couple of styles to match the same use in other CSS to avoid formatting issues when the default theme is used. Also, set several property names to lowercase. Modified: trunk/includes/GoogleTranslator.php =================================================================== --- trunk/includes/GoogleTranslator.php 2018-01-06 14:30:16 UTC (rev 7903) +++ trunk/includes/GoogleTranslator.php 2018-01-06 23:15:16 UTC (rev 7904) @@ -4,14 +4,13 @@ // This webERP-style code is based on http://hayageek.com/google-translate-api-tutorial/ function translate_via_google_translator($text,$target,$source=false){ - $url = 'https://www.googleapis.com/language/translate/v2?key=' . $_SESSION['GoogleTranslatorAPIKey'] . '&q=' . rawurlencode($text); - $url .= '&target='.$target; + $url = 'https://www.googleapis.com/language/translate/v2?key=' . $_SESSION['GoogleTranslatorAPIKey'] . '&q=' . rawurlencode($text) . '&target=' . $target; if($source){ - $url .= '&source='.$source; + $url .= '&source=' . $source; } $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $response = curl_exec($ch); + $response = curl_exec($ch); curl_close($ch); $obj =json_decode($response,true); //true converts stdClass to associative array. if($obj != null){ @@ -21,13 +20,13 @@ else{ $TranslatedText = $obj['data']['translations'][0]['translatedText']; // if(isset($obj['data']['translations'][0]['detectedSourceLanguage'])) //this is set if only source is not available. - // echo "Detecte Source Languge : ".$obj['data']['translations'][0]['detectedSourceLanguage']."n"; + // echo "Detecte Source Languge : ".$obj['data']['translations'][0]['detectedSourceLanguage']."n"; } } else{ - $TranslatedText = "UNKNOW ERROR"; + $TranslatedText = "UNKNOW ERROR"; } return $TranslatedText; -} +} ?> \ No newline at end of file Modified: trunk/xmlrpc/lib/xmlrpc.inc =================================================================== --- trunk/xmlrpc/lib/xmlrpc.inc 2018-01-06 14:30:16 UTC (rev 7903) +++ trunk/xmlrpc/lib/xmlrpc.inc 2018-01-06 23:15:16 UTC (rev 7904) @@ -1,7 +1,6 @@ <?php // by Edd Dumbill (C) 1999-2002 // <ed...@us...> -// $Id: xmlrpc.inc,v 1.174 2009/03/16 19:36:38 ggiunta Exp $ // Copyright (c) 1999,2000,2002 Edd Dumbill. // All rights reserved. @@ -35,3742 +34,181 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // OF THE POSSIBILITY OF SUCH DAMAGE. - if(!function_exists('xml_parser_create')) - { - // For PHP 4 onward, XML functionality is always compiled-in on windows: - // no more need to dl-open it. It might have been compiled out on *nix... - if(strtoupper(substr(PHP_OS, 0, 3) != 'WIN')) - { - dl('xml.so'); - } - } +/****************************************************************************** + * + * *** DEPRECATED *** + * + * This file is only used to insure backwards compatibility + * with the API of the library <= rev. 3 + * + * If it is included, the library will work without any further autoloading + *****************************************************************************/ - // G. Giunta 2005/01/29: declare global these variables, - // so that xmlrpc.inc will work even if included from within a function - // Milosch: 2005/08/07 - explicitly request these via $GLOBALS where used. - $GLOBALS['xmlrpcI4']='i4'; - $GLOBALS['xmlrpcInt']='int'; - $GLOBALS['xmlrpcBoolean']='boolean'; - $GLOBALS['xmlrpcDouble']='double'; - $GLOBALS['xmlrpcString']='string'; - $GLOBALS['xmlrpcDateTime']='dateTime.iso8601'; - $GLOBALS['xmlrpcBase64']='base64'; - $GLOBALS['xmlrpcArray']='array'; - $GLOBALS['xmlrpcStruct']='struct'; - $GLOBALS['xmlrpcValue']='undefined'; +include_once(__DIR__.'/../src/PhpXmlRpc.php'); +include_once(__DIR__.'/../src/Value.php'); +include_once(__DIR__.'/../src/Request.php'); +include_once(__DIR__.'/../src/Response.php'); +include_once(__DIR__.'/../src/Client.php'); +include_once(__DIR__.'/../src/Encoder.php'); +include_once(__DIR__.'/../src/Helper/Charset.php'); +include_once(__DIR__.'/../src/Helper/Date.php'); +include_once(__DIR__.'/../src/Helper/Http.php'); +include_once(__DIR__.'/../src/Helper/Logger.php'); +include_once(__DIR__.'/../src/Helper/XMLParser.php'); - $GLOBALS['xmlrpcTypes']=array( - $GLOBALS['xmlrpcI4'] => 1, - $GLOBALS['xmlrpcInt'] => 1, - $GLOBALS['xmlrpcBoolean'] => 1, - $GLOBALS['xmlrpcString'] => 1, - $GLOBALS['xmlrpcDouble'] => 1, - $GLOBALS['xmlrpcDateTime'] => 1, - $GLOBALS['xmlrpcBase64'] => 1, - $GLOBALS['xmlrpcArray'] => 2, - $GLOBALS['xmlrpcStruct'] => 3 - ); - $GLOBALS['xmlrpc_valid_parents'] = array( - 'VALUE' => array('MEMBER', 'DATA', 'PARAM', 'FAULT'), - 'BOOLEAN' => array('VALUE'), - 'I4' => array('VALUE'), - 'INT' => array('VALUE'), - 'STRING' => array('VALUE'), - 'DOUBLE' => array('VALUE'), - 'DATETIME.ISO8601' => array('VALUE'), - 'BASE64' => array('VALUE'), - 'MEMBER' => array('STRUCT'), - 'NAME' => array('MEMBER'), - 'DATA' => array('ARRAY'), - 'ARRAY' => array('VALUE'), - 'STRUCT' => array('VALUE'), - 'PARAM' => array('PARAMS'), - 'METHODNAME' => array('METHODCALL'), - 'PARAMS' => array('METHODCALL', 'METHODRESPONSE'), - 'FAULT' => array('METHODRESPONSE'), - 'NIL' => array('VALUE'), // only used when extension activated - 'EX:NIL' => array('VALUE') // only used when extension activated - ); +/* Expose the global variables which used to be defined */ +PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding = 'ISO-8859-1'; // old default +PhpXmlRpc\PhpXmlRpc::exportGlobals(); - // define extra types for supporting NULL (useful for json or <NIL/>) - $GLOBALS['xmlrpcNull']='null'; - $GLOBALS['xmlrpcTypes']['null']=1; +/* some stuff deprecated enough that we do not want to put it in the new lib version */ - // Not in use anymore since 2.0. Shall we remove it? - /// @deprecated - $GLOBALS['xmlEntities']=array( - 'amp' => '&', - 'quot' => '"', - 'lt' => '<', - 'gt' => '>', - 'apos' => "'" - ); +/// @deprecated +$GLOBALS['xmlEntities'] = array( + 'amp' => '&', + 'quot' => '"', + 'lt' => '<', + 'gt' => '>', + 'apos' => "'" +); - // tables used for transcoding different charsets into us-ascii xml +// formulate backslashes for escaping regexp +// Not in use anymore since 2.0. Shall we remove it? +/// @deprecated +$GLOBALS['xmlrpc_backslash'] = chr(92).chr(92); - $GLOBALS['xml_iso88591_Entities']=array(); - $GLOBALS['xml_iso88591_Entities']['in'] = array(); - $GLOBALS['xml_iso88591_Entities']['out'] = array(); - for ($i = 0; $i < 32; $i++) - { - $GLOBALS['xml_iso88591_Entities']['in'][] = chr($i); - $GLOBALS['xml_iso88591_Entities']['out'][] = '&#'.$i.';'; - } - for ($i = 160; $i < 256; $i++) - { - $GLOBALS['xml_iso88591_Entities']['in'][] = chr($i); - $GLOBALS['xml_iso88591_Entities']['out'][] = '&#'.$i.';'; - } +/* Expose with the old names the classes which have been namespaced */ - /// @todo add to iso table the characters from cp_1252 range, i.e. 128 to 159? - /// These will NOT be present in true ISO-8859-1, but will save the unwary - /// windows user from sending junk (though no luck when reciving them...) - /* - $GLOBALS['xml_cp1252_Entities']=array(); - for ($i = 128; $i < 160; $i++) - { - $GLOBALS['xml_cp1252_Entities']['in'][] = chr($i); - } - $GLOBALS['xml_cp1252_Entities']['out'] = array( - '€', '?', '‚', 'ƒ', - '„', '…', '†', '‡', - 'ˆ', '‰', 'Š', '‹', - 'Œ', '?', 'Ž', '?', - '?', '‘', '’', '“', - '”', '•', '–', '—', - '˜', '™', 'š', '›', - 'œ', '?', 'ž', 'Ÿ' - ); - */ +class xmlrpcval extends PhpXmlRpc\Value +{ + /** + * @deprecated + * @param xmlrpcval $o + * @return string + */ + public function serializeval($o) + { + // add check? slower, but helps to avoid recursion in serializing broken xmlrpcvals... + //if (is_object($o) && (get_class($o) == 'xmlrpcval' || is_subclass_of($o, 'xmlrpcval'))) + //{ + $ar = $o->me; + $val = reset($ar); + $typ = key($ar); - $GLOBALS['xmlrpcerr'] = array( - 'unknown_method'=>1, - 'invalid_return'=>2, - 'incorrect_params'=>3, - 'introspect_unknown'=>4, - 'http_error'=>5, - 'no_data'=>6, - 'no_ssl'=>7, - 'curl_fail'=>8, - 'invalid_request'=>15, - 'no_curl'=>16, - 'server_error'=>17, - 'multicall_error'=>18, - 'multicall_notstruct'=>9, - 'multicall_nomethod'=>10, - 'multicall_notstring'=>11, - 'multicall_recursion'=>12, - 'multicall_noparams'=>13, - 'multicall_notarray'=>14, + return '<value>' . $this->serializedata($typ, $val) . "</value>\n"; + //} + } - 'cannot_decompress'=>103, - 'decompress_fail'=>104, - 'dechunk_fail'=>105, - 'server_cannot_decompress'=>106, - 'server_decompress_fail'=>107 - ); + /** + * @deprecated this code looks like it is very fragile and has not been fixed + * for a long long time. Shall we remove it for 2.0? + */ + public function getval() + { + // UNSTABLE + $b = reset($this->me); + $a = key($this->me); + // contributed by I Sofer, 2001-03-24 + // add support for nested arrays to scalarval + // i've created a new method here, so as to + // preserve back compatibility - $GLOBALS['xmlrpcstr'] = array( - 'unknown_method'=>'Unknown method', - 'invalid_return'=>'Invalid return payload: enable debugging to examine incoming payload', - 'incorrect_params'=>'Incorrect parameters passed to method', - 'introspect_unknown'=>"Can't introspect: method unknown", - 'http_error'=>"Didn't receive 200 OK from remote server.", - 'no_data'=>'No data received from server.', - 'no_ssl'=>'No SSL support compiled in.', - 'curl_fail'=>'CURL error', - 'invalid_request'=>'Invalid request payload', - 'no_curl'=>'No CURL support compiled in.', - 'server_error'=>'Internal server error', - 'multicall_error'=>'Received from server invalid multicall response', - 'multicall_notstruct'=>'system.multicall expected struct', - 'multicall_nomethod'=>'missing methodName', - 'multicall_notstring'=>'methodName is not a string', - 'multicall_recursion'=>'recursive system.multicall forbidden', - 'multicall_noparams'=>'missing params', - 'multicall_notarray'=>'params is not an array', + if (is_array($b)) { + foreach($b as $id => $cont) { + $b[$id] = $cont->scalarval(); + } + } - 'cannot_decompress'=>'Received from server compressed HTTP and cannot decompress', - 'decompress_fail'=>'Received from server invalid compressed HTTP', - 'dechunk_fail'=>'Received from server invalid chunked HTTP', - 'server_cannot_decompress'=>'Received from client compressed HTTP request and cannot decompress', - 'server_decompress_fail'=>'Received from client invalid compressed HTTP request' - ); + // add support for structures directly encoding php objects + if (is_object($b)) { + $t = get_object_vars($b); + foreach($t as $id => $cont) { + $t[$id] = $cont->scalarval(); + } + foreach($t as $id => $cont) { + @$b->$id = $cont; + } + } + // end contrib + return $b; + } - // The charset encoding used by the server for received messages and - // by the client for received responses when received charset cannot be determined - // or is not supported - $GLOBALS['xmlrpc_defencoding']='UTF-8'; + /// reset functionality added by parent class: same as it would happen if no interface was declared + public function count() + { + return 1; + } - // The encoding used internally by PHP. - // String values received as xml will be converted to this, and php strings will be converted to xml - // as if having been coded with this - $GLOBALS['xmlrpc_internalencoding']='ISO-8859-1'; + /// reset functionality added by parent class: same as it would happen if no interface was declared + public function getIterator() { + return new ArrayIterator($this); + } +} - $GLOBALS['xmlrpcName']='XML-RPC for PHP'; - $GLOBALS['xmlrpcVersion']='3.0.0.beta'; +class xmlrpcmsg extends PhpXmlRpc\Request +{ +} - // let user errors start at 800 - $GLOBALS['xmlrpcerruser']=800; - // let XML parse errors start at 100 - $GLOBALS['xmlrpcerrxml']=100; +class xmlrpcresp extends PhpXmlRpc\Response +{ +} - // formulate backslashes for escaping regexp - // Not in use anymore since 2.0. Shall we remove it? - /// @deprecated - $GLOBALS['xmlrpc_backslash']=chr(92).chr(92); +class xmlrpc_client extends PhpXmlRpc\Client +{ +} - // set to TRUE to enable correct decoding of <NIL/> and <EX:NIL/> values - $GLOBALS['xmlrpc_null_extension']=false; +/* Expose as global functions the ones which are now class methods */ - // set to TRUE to enable encoding of php NULL values to <EX:NIL/> instead of <NIL/> - $GLOBALS['xmlrpc_null_apache_encoding']=false; +/// Wrong speling, but we are adamant on backwards compatibility! +function xmlrpc_encode_entitites($data, $srcEncoding='', $destEncoding='') +{ + return PhpXmlRpc\Helper\Charset::instance()->encodeEntitites($data, $srcEncoding, $destEncoding); +} - // used to store state during parsing - // quick explanation of components: - // ac - used to accumulate values - // isf - used to indicate a parsing fault (2) or xmlrpcresp fault (1) - // isf_reason - used for storing xmlrpcresp fault string - // lv - used to indicate "looking for a value": implements - // the logic to allow values with no types to be strings - // params - used to store parameters in method calls - // method - used to store method name - // stack - array with genealogy of xml elements names: - // used to validate nesting of xmlrpc elements - $GLOBALS['_xh']=null; +function iso8601_encode($timeT, $utc=0) +{ + return PhpXmlRpc\Helper\Date::iso8601Encode($timeT, $utc); +} - /** - * Convert a string to the correct XML representation in a target charset - * To help correct communication of non-ascii chars inside strings, regardless - * of the charset used when sending requests, parsing them, sending responses - * and parsing responses, an option is to convert all non-ascii chars present in the message - * into their equivalent 'charset entity'. Charset entities enumerated this way - * are independent of the charset encoding used to transmit them, and all XML - * parsers are bound to understand them. - * Note that in the std case we are not sending a charset encoding mime type - * along with http headers, so we are bound by RFC 3023 to emit strict us-ascii. - * - * @todo do a bit of basic benchmarking (strtr vs. str_replace) - * @todo make usage of iconv() or recode_string() or mb_string() where available - */ - function xmlrpc_encode_entitites($data, $src_encoding='', $dest_encoding='') - { - if ($src_encoding == '') - { - // lame, but we know no better... - $src_encoding = $GLOBALS['xmlrpc_internalencoding']; - } +function iso8601_decode($iDate, $utc=0) +{ + return PhpXmlRpc\Helper\Date::iso8601Decode($iDate, $utc); +} - switch(strtoupper($src_encoding.'_'.$dest_encoding)) - { - case 'ISO-8859-1_': - case 'ISO-8859-1_US-ASCII': - $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); - $escaped_data = str_replace($GLOBALS['xml_iso88591_Entities']['in'], $GLOBALS['xml_iso88591_Entities']['out'], $escaped_data); - break; - case 'ISO-8859-1_UTF-8': - $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); - $escaped_data = utf8_encode($escaped_data); - break; - case 'ISO-8859-1_ISO-8859-1': - case 'US-ASCII_US-ASCII': - case 'US-ASCII_UTF-8': - case 'US-ASCII_': - case 'US-ASCII_ISO-8859-1': - case 'UTF-8_UTF-8': - //case 'CP1252_CP1252': - $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); - break; - case 'UTF-8_': - case 'UTF-8_US-ASCII': - case 'UTF-8_ISO-8859-1': - // NB: this will choke on invalid UTF-8, going most likely beyond EOF - $escaped_data = ''; - // be kind to users creating string xmlrpcvals out of different php types - $data = (string) $data; - $ns = strlen ($data); - for ($nn = 0; $nn < $ns; $nn++) - { - $ch = $data[$nn]; - $ii = ord($ch); - //1 7 0bbbbbbb (127) - if ($ii < 128) - { - /// @todo shall we replace this with a (supposedly) faster str_replace? - switch($ii){ - case 34: - $escaped_data .= '"'; - break; - case 38: - $escaped_data .= '&'; - break; - case 39: - $escaped_data .= '''; - break; - case 60: - $escaped_data .= '<'; - break; - case 62: - $escaped_data .= '>'; - break; - default: - $escaped_data .= $ch; - } // switch - } - //2 11 110bbbbb 10bbbbbb (2047) - else if ($ii>>5 == 6) - { - $b1 = ($ii & 31); - $ii = ord($data[$nn+1]); - $b2 = ($ii & 63); - $ii = ($b1 * 64) + $b2; - $ent = sprintf ('&#%d;', $ii); - $escaped_data .= $ent; - $nn += 1; - } - //3 16 1110bbbb 10bbbbbb 10bbbbbb - else if ($ii>>4 == 14) - { - $b1 = ($ii & 15); - $ii = ord($data[$nn+1]); - $b2 = ($ii & 63); - $ii = ord($data[$nn+2]); - $b3 = ($ii & 63); - $ii = ((($b1 * 64) + $b2) * 64) + $b3; - $ent = sprintf ('&#%d;', $ii); - $escaped_data .= $ent; - $nn += 2; - } - //4 21 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb - else if ($ii>>3 == 30) - { - $b1 = ($ii & 7); - $ii = ord($data[$nn+1]); - $b2 = ($ii & 63); - $ii = ord($data[$nn+2]); - $b3 = ($ii & 63); - $ii = ord($data[$nn+3]); - $b4 = ($ii & 63); - $ii = ((((($b1 * 64) + $b2) * 64) + $b3) * 64) + $b4; - $ent = sprintf ('&#%d;', $ii); - $escaped_data .= $ent; - $nn += 3; - } - } - break; -/* - case 'CP1252_': - case 'CP1252_US-ASCII': - $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); - $escaped_data = str_replace($GLOBALS['xml_iso88591_Entities']['in'], $GLOBALS['xml_iso88591_Entities']['out'], $escaped_data); - $escaped_data = str_replace($GLOBALS['xml_cp1252_Entities']['in'], $GLOBALS['xml_cp1252_Entities']['out'], $escaped_data); - break; - case 'CP1252_UTF-8': - $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); - /// @todo we could use real UTF8 chars here instead of xml entities... (note that utf_8 encode all allone will NOT convert them) - $escaped_data = str_replace($GLOBALS['xml_cp1252_Entities']['in'], $GLOBALS['xml_cp1252_Entities']['out'], $escaped_data); - $escaped_data = utf8_encode($escaped_data); - break; - case 'CP1252_ISO-8859-1': - $escaped_data = str_replace(array('&', '"', "'", '<', '>'), array('&', '"', ''', '<', '>'), $data); - // we might as well replave all funky chars with a '?' here, but we are kind and leave it to the receiving application layer to decide what to do with these weird entities... - $escaped_data = str_replace($GLOBALS['xml_cp1252_Entities']['in'], $GLOBALS['xml_cp1252_Entities']['out'], $escaped_data); - break; -*/ - default: - $escaped_data = ''; - error_log("Converting from $src_encoding to $dest_encoding: not supported..."); - } - return $escaped_data; - } +function decode_chunked($buffer) +{ + return PhpXmlRpc\Helper\Http::decodeChunked($buffer); +} - /// xml parser handler function for opening element tags - function xmlrpc_se($parser, $name, $attrs, $accept_single_vals=false) - { - // if invalid xmlrpc already detected, skip all processing - if ($GLOBALS['_xh']['isf'] < 2) - { - // check for correct element nesting - // top level element can only be of 2 types - /// @todo optimization creep: save this check into a bool variable, instead of using count() every time: - /// there is only a single top level element in xml anyway - if (count($GLOBALS['_xh']['stack']) == 0) - { - if ($name != 'METHODRESPONSE' && $name != 'METHODCALL' && ( - $name != 'VALUE' && !$accept_single_vals)) - { - $GLOBALS['_xh']['isf'] = 2; - $GLOBALS['_xh']['isf_reason'] = 'missing top level xmlrpc element'; - return; - } - else - { - $GLOBALS['_xh']['rt'] = strtolower($name); - $GLOBALS['_xh']['rt'] = strtolower($name); - } - } - else - { - // not top level element: see if parent is OK - $parent = end($GLOBALS['_xh']['stack']); - if (!array_key_exists($name, $GLOBALS['xmlrpc_valid_parents']) || !in_array($parent, $GLOBALS['xmlrpc_valid_parents'][$name])) - { - $GLOBALS['_xh']['isf'] = 2; - $GLOBALS['_xh']['isf_reason'] = "xmlrpc element $name cannot be child of $parent"; - return; - } - } +function php_xmlrpc_decode($xmlrpcVal, $options=array()) +{ + $encoder = new PhpXmlRpc\Encoder(); + return $encoder->decode($xmlrpcVal, $options); +} - switch($name) - { - // optimize for speed switch cases: most common cases first - case 'VALUE': - /// @todo we could check for 2 VALUE elements inside a MEMBER or PARAM element - $GLOBALS['_xh']['vt']='value'; // indicator: no value found yet - $GLOBALS['_xh']['ac']=''; - $GLOBALS['_xh']['lv']=1; - $GLOBALS['_xh']['php_class']=null; - break; - case 'I4': - case 'INT': - case 'STRING': - case 'BOOLEAN': - case 'DOUBLE': - case 'DATETIME.ISO8601': - case 'BASE64': - if ($GLOBALS['_xh']['vt']!='value') - { - //two data elements inside a value: an error occurred! - $GLOBALS['_xh']['isf'] = 2; - $GLOBALS['_xh']['isf_reason'] = "$name element following a {$GLOBALS['_xh']['vt']} element inside a single value"; - return; - } - $GLOBALS['_xh']['ac']=''; // reset the accumulator - break; - case 'STRUCT': - case 'ARRAY': - if ($GLOBALS['_xh']['vt']!='value') - { - //two data elements inside a value: an error occurred! - $GLOBALS['_xh']['isf'] = 2; - $GLOBALS['_xh']['isf_reason'] = "$name element following a {$GLOBALS['_xh']['vt']} element inside a single value"; - return; - } - // create an empty array to hold child values, and push it onto appropriate stack - $cur_val = array(); - $cur_val['values'] = array(); - $cur_val['type'] = $name; - // check for out-of-band information to rebuild php objs - // and in case it is found, save it - if (@isset($attrs['PHP_CLASS'])) - { - $cur_val['php_class'] = $attrs['PHP_CLASS']; - } - $GLOBALS['_xh']['valuestack'][] = $cur_val; - $GLOBALS['_xh']['vt']='data'; // be prepared for a data element next - break; - case 'DATA': - if ($GLOBALS['_xh']['vt']!='data') - { - //two data elements inside a value: an error occurred! - $GLOBALS['_xh']['isf'] = 2; - $GLOBALS['_xh']['isf_reason'] = "found two data elements inside an array element"; - return; - } - case 'METHODCALL': - case 'METHODRESPONSE': - case 'PARAMS': - // valid elements that add little to processing - break; - case 'METHODNAME': - case 'NAME': - /// @todo we could check for 2 NAME elements inside a MEMBER element - $GLOBALS['_xh']['ac']=''; - break; - case 'FAULT': - $GLOBALS['_xh']['isf']=1; - break; - case 'MEMBER': - $GLOBALS['_xh']['valuestack'][count($GLOBALS['_xh']['valuestack'])-1]['name']=''; // set member name to null, in case we do not find in the xml later on - //$GLOBALS['_xh']['ac']=''; - // Drop trough intentionally - case 'PARAM': - // clear value type, so we can check later if no value has been passed for this param/member - $GLOBALS['_xh']['vt']=null; - break; - case 'NIL': - case 'EX:NIL': - if ($GLOBALS['xmlrpc_null_extension']) - { - if ($GLOBALS['_xh']['vt']!='value') - { - //two data elements inside a value: an error occurred! - $GLOBALS['_xh']['isf'] = 2; - $GLOBALS['_xh']['isf_reason'] = "$name element following a {$GLOBALS['_xh']['vt']} element inside a single value"; - return; - } - $GLOBALS['_xh']['ac']=''; // reset the accumulator - break; - } - // we do not support the <NIL/> extension, so - // drop through intentionally - default: - /// INVALID ELEMENT: RAISE ISF so that it is later recognized!!! - $GLOBALS['_xh']['isf'] = 2; - $GLOBALS['_xh']['isf_reason'] = "found not-xmlrpc xml element $name"; - break; - } +function php_xmlrpc_encode($phpVal, $options=array()) +{ + $encoder = new PhpXmlRpc\Encoder(); + return $encoder->encode($phpVal, $options); +} - // Save current element name to stack, to validate nesting - $GLOBALS['_xh']['stack'][] = $name; +function php_xmlrpc_decode_xml($xmlVal, $options=array()) +{ + $encoder = new PhpXmlRpc\Encoder(); + return $encoder->decodeXml($xmlVal, $options); +} - /// @todo optimization creep: move this inside the big switch() above - if($name!='VALUE') - { - $GLOBALS['_xh']['lv']=0; - } - } - } +function guess_encoding($httpHeader='', $xmlChunk='', $encodingPrefs=null) +{ + return PhpXmlRpc\Helper\XMLParser::guessEncoding($httpHeader, $xmlChunk, $encodingPrefs); +} - /// Used in decoding xml chunks that might represent single xmlrpc values - function xmlrpc_se_any($parser, $name, $attrs) - { - xmlrpc_se($parser, $name, $attrs, true); - } +function has_encoding($xmlChunk) +{ + return PhpXmlRpc\Helper\XMLParser::hasEncoding($xmlChunk); +} - /// xml parser handler function for close element tags - function xmlrpc_ee($parser, $name, $rebuild_xmlrpcvals = true) - { - if ($GLOBALS['_xh']['isf'] < 2) - { - // push this element name from stack - // NB: if XML validates, correct opening/closing is guaranteed and - // we do not have to check for $name == $curr_elem. - // we also checked for proper nesting at start of elements... - $curr_elem = array_pop($GLOBALS['_xh']['stack']); - - switch($name) - { - case 'VALUE': - // This if() detects if no scalar was inside <VALUE></VALUE> - if ($GLOBALS['_xh']['vt']=='value') - { - $GLOBALS['_xh']['value']=$GLOBALS['_xh']['ac']; - $GLOBALS['_xh']['vt']=$GLOBALS['xmlrpcString']; - } - - if ($rebuild_xmlrpcvals) - { - // build the xmlrpc val out of the data received, and substitute it - $temp = new xmlrpcval($GLOBALS['_xh']['value'], $GLOBALS['_xh']['vt']); - // in case we got info about underlying php class, save it - // in the object we're rebuilding - if (isset($GLOBALS['_xh']['php_class'])) - $temp->_php_class = $GLOBALS['_xh']['php_class']; - // check if we are inside an array or struct: - // if value just built is inside an array, let's move it into array on the stack - $vscount = count($GLOBALS['_xh']['valuestack']); - if ($vscount && $GLOBALS['_xh']['valuestack'][$vscount-1]['type']=='ARRAY') - { - $GLOBALS['_xh']['valuestack'][$vscount-1]['values'][] = $temp; - } - else - { - $GLOBALS['_xh']['value'] = $temp; - } - } - else - { - /// @todo this needs to treat correctly php-serialized objects, - /// since std deserializing is done by php_xmlrpc_decode, - /// which we will not be calling... - if (isset($GLOBALS['_xh']['php_class'])) - { - } - - // check if we are inside an array or struct: - // if value just built is inside an array, let's move it into array on the stack - $vscount = count($GLOBALS['_xh']['valuestack']); - if ($vscount && $GLOBALS['_xh']['valuestack'][$vscount-1]['type']=='ARRAY') - { - $GLOBALS['_xh']['valuestack'][$vscount-1]['values'][] = $GLOBALS['_xh']['value']; - } - } - break; - case 'BOOLEAN': - case 'I4': - case 'INT': - case 'STRING': - case 'DOUBLE': - case 'DATETIME.ISO8601': - case 'BASE64': - $GLOBALS['_xh']['vt']=strtolower($name); - /// @todo: optimization creep - remove the if/elseif cycle below - /// since the case() in which we are already did that - if ($name=='STRING') - { - $GLOBALS['_xh']['value']=$GLOBALS['_xh']['ac']; - } - elseif ($name=='DATETIME.ISO8601') - { - if (!preg_match('/^[0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $GLOBALS['_xh']['ac'])) - { - error_log('XML-RPC: invalid value received in DATETIME: '.$GLOBALS['_xh']['ac']); - } - $GLOBALS['_xh']['vt']=$GLOBALS['xmlrpcDateTime']; - $GLOBALS['_xh']['value']=$GLOBALS['_xh']['ac']; - } - elseif ($name=='BASE64') - { - /// @todo check for failure of base64 decoding / catch warnings - $GLOBALS['_xh']['value']=base64_decode($GLOBALS['_xh']['ac']); - } - elseif ($name=='BOOLEAN') - { - // special case here: we translate boolean 1 or 0 into PHP - // constants true or false. - // Strings 'true' and 'false' are accepted, even though the - // spec never mentions them (see eg. Blogger api docs) - // NB: this simple checks helps a lot sanitizing input, ie no - // security problems around here - if ($GLOBALS['_xh']['ac']=='1' || strcasecmp($GLOBALS['_xh']['ac'], 'true') == 0) - { - $GLOBALS['_xh']['value']=true; - } - else - { - // log if receiveing something strange, even though we set the value to false anyway - if ($GLOBALS['_xh']['ac']!='0' && strcasecmp($GLOBALS['_xh']['ac'], 'false') != 0) - error_log('XML-RPC: invalid value received in BOOLEAN: '.$GLOBALS['_xh']['ac']); - $GLOBALS['_xh']['value']=false; - } - } - elseif ($name=='DOUBLE') - { - // we have a DOUBLE - // we must check that only 0123456789-.<space> are characters here - // NOTE: regexp could be much stricter than this... - if (!preg_match('/^[+-eE0123456789 \t.]+$/', $GLOBALS['_xh']['ac'])) - { - /// @todo: find a better way of throwing an error than this! - error_log('XML-RPC: non numeric value received in DOUBLE: '.$GLOBALS['_xh']['ac']); - $GLOBALS['_xh']['value']='ERROR_NON_NUMERIC_FOUND'; - } - else - { - // it's ok, add it on - $GLOBALS['_xh']['value']=(double)$GLOBALS['_xh']['ac']; - } - } - else - { - // we have an I4/INT - // we must check that only 0123456789-<space> are characters here - if (!preg_match('/^[+-]?[0123456789 \t]+$/', $GLOBALS['_xh']['ac'])) - { - /// @todo find a better way of throwing an error than this! - error_log('XML-RPC: non numeric value received in INT: '.$GLOBALS['_xh']['ac']); - $GLOBALS['_xh']['value']='ERROR_NON_NUMERIC_FOUND'; - } - else - { - // it's ok, add it on - $GLOBALS['_xh']['value']=(int)$GLOBALS['_xh']['ac']; - } - } - //$GLOBALS['_xh']['ac']=''; // is this necessary? - $GLOBALS['_xh']['lv']=3; // indicate we've found a value - break; - case 'NAME': - $GLOBALS['_xh']['valuestack'][count($GLOBALS['_xh']['valuestack'])-1]['name'] = $GLOBALS['_xh']['ac']; - break; - case 'MEMBER': - //$GLOBALS['_xh']['ac']=''; // is this necessary? - // add to array in the stack the last element built, - // unless no VALUE was found - if ($GLOBALS['_xh']['vt']) - { - $vscount = count($GLOBALS['_xh']['valuestack']); - $GLOBALS['_xh']['valuestack'][$vscount-1]['values'][$GLOBALS['_xh']['valuestack'][$vscount-1]['name']] = $GLOBALS['_xh']['value']; - } else - error_log('XML-RPC: missing VALUE inside STRUCT in received xml'); - break; - case 'DATA': - //$GLOBALS['_xh']['ac']=''; // is this necessary? - $GLOBALS['_xh']['vt']=null; // reset this to check for 2 data elements in a row - even if they're empty - break; - case 'STRUCT': - case 'ARRAY': - // fetch out of stack array of values, and promote it to current value - $curr_val = array_pop($GLOBALS['_xh']['valuestack']); - $GLOBALS['_xh']['value'] = $curr_val['values']; - $GLOBALS['_xh']['vt']=strtolower($name); - if (isset($curr_val['php_class'])) - { - $GLOBALS['_xh']['php_class'] = $curr_val['php_class']; - } - break; - case 'PARAM': - // add to array of params the current value, - // unless no VALUE was found - if ($GLOBALS['_xh']['vt']) - { - $GLOBALS['_xh']['params'][]=$GLOBALS['_xh']['value']; - $GLOBALS['_xh']['pt'][]=$GLOBALS['_xh']['vt']; - } - else - error_log('XML-RPC: missing VALUE inside PARAM in received xml'); - break; - case 'METHODNAME': - $GLOBALS['_xh']['method']=preg_replace('/^[\n\r\t ]+/', '', $GLOBALS['_xh']['ac']); - break; - case 'NIL': - case 'EX:NIL': - if ($GLOBALS['xmlrpc_null_extension']) - { - $GLOBALS['_xh']['vt']='null'; - $GLOBALS['_xh']['value']=null; - $GLOBALS['_xh']['lv']=3; - break; - } - // drop through intentionally if nil extension not enabled - case 'PARAMS': - case 'FAULT': - case 'METHODCALL': - case 'METHORESPONSE': - break; - default: - // End of INVALID ELEMENT! - // shall we add an assert here for unreachable code??? - break; - } - } - } - - /// Used in decoding xmlrpc requests/responses without rebuilding xmlrpc values - function xmlrpc_ee_fast($parser, $name) - { - xmlrpc_ee($parser, $name, false); - } - - /// xml parser handler function for character data - function xmlrpc_cd($parser, $data) - { - // skip processing if xml fault already detected - if ($GLOBALS['_xh']['isf'] < 2) - { - // "lookforvalue==3" means that we've found an entire value - // and should discard any further character data - if($GLOBALS['_xh']['lv']!=3) - { - // G. Giunta 2006-08-23: useless change of 'lv' from 1 to 2 - //if($GLOBALS['_xh']['lv']==1) - //{ - // if we've found text and we're just in a <value> then - // say we've found a value - //$GLOBALS['_xh']['lv']=2; - //} - // we always initialize the accumulator before starting parsing, anyway... - //if(!@isset($GLOBALS['_xh']['ac'])) - //{ - // $GLOBALS['_xh']['ac'] = ''; - //} - $GLOBALS['_xh']['ac'].=$data; - } - } - } - - /// xml parser handler function for 'other stuff', ie. not char data or - /// element start/end tag. In fact it only gets called on unknown entities... - function xmlrpc_dh($parser, $data) - { - // skip processing if xml fault already detected - if ($GLOBALS['_xh']['isf'] < 2) - { - if(substr($data, 0, 1) == '&' && substr($data, -1, 1) == ';') - { - // G. Giunta 2006-08-25: useless change of 'lv' from 1 to 2 - //if($GLOBALS['_xh']['lv']==1) - //{ - // $GLOBALS['_xh']['lv']=2; - //} - $GLOBALS['_xh']['ac'].=$data; - } - } - return true; - } - - class xmlrpc_client - { - var $path; - var $server; - var $port=0; - var $method='http'; - var $errno; - var $errstr; - var $debug=0; - var $username=''; - var $password=''; - var $authtype=1; - var $cert=''; - var $certpass=''; - var $cacert=''; - var $cacertdir=''; - var $key=''; - var $keypass=''; - var $verifypeer=true; - var $verifyhost=1; - var $no_multicall=false; - var $proxy=''; - var $proxyport=0; - var $proxy_user=''; - var $proxy_pass=''; - var $proxy_authtype=1; - var $cookies=array(); - var $extracurlopts=array(); - - /** - * List of http compression methods accepted by the client for responses. - * NB: PHP supports deflate, gzip compressions out of the box if compiled w. zlib - * - * NNB: you can set it to any non-empty array for HTTP11 and HTTPS, since - * in those cases it will be up to CURL to decide the compression methods - * it supports. You might check for the presence of 'zlib' in the output of - * curl_version() to determine wheter compression is supported or not - */ - var $accepted_compression = array(); - /** - * Name of compression scheme to be used for sending requests. - * Either null, gzip or deflate - */ - var $request_compression = ''; - /** - * CURL handle: used for keep-alive connections (PHP 4.3.8 up, see: - * http://curl.haxx.se/docs/faq.html#7.3) - */ - var $xmlrpc_curl_handle = null; - /// Wheter to use persistent connections for http 1.1 and https - var $keepalive = false; - /// Charset encodings that can be decoded without problems by the client - var $accepted_charset_encodings = array(); - /// Charset encoding to be used in serializing request. NULL = use ASCII - var $request_charset_encoding = ''; - /** - * Decides the content of xmlrpcresp objects returned by calls to send() - * valid strings are 'xmlrpcvals', 'phpvals' or 'xml' - */ - var $return_type = 'xmlrpcvals'; - /** - * Sent to servers in http headers - */ - var $user_agent; - - /** - * @param string $path either the complete server URL or the PATH part of the xmlrc server URL, e.g. /xmlrpc/server.php - * @param string $server the server name / ip address - * @param integer $port the port the server is listening on, defaults to 80 or 443 depending on protocol used - * @param string $method the http protocol variant: defaults to 'http', 'https' and 'http11' can be used if CURL is installed - */ - function xmlrpc_client($path, $server='', $port='', $method='') - { - // allow user to specify all params in $path - if($server == '' and $port == '' and $method == '') - { - $parts = parse_url($path); - $server = $parts['host']; - $path = isset($parts['path']) ? $parts['path'] : ''; - if(isset($parts['query'])) - { - $path .= '?'.$parts['query']; - } - if(isset($parts['fragment'])) - { - $path .= '#'.$parts['fragment']; - } - if(isset($parts['port'])) - { - $port = $parts['port']; - } - if(isset($parts['scheme'])) - { - $method = $parts['scheme']; - } - if(isset($parts['user'])) - { - $this->username = $parts['user']; - } - if(isset($parts['pass'])) - { - $this->password = $parts['pass']; - } - } - if($path == '' || $path[0] != '/') - { - $this->path='/'.$path; - } - else - { - $this->path=$path; - } - $this->server=$server; - if($port != '') - { - $this->port=$port; - } - if($method != '') - { - $this->method=$method; - } - - // if ZLIB is enabled, let the client by default accept compressed responses - if(function_exists('gzinflate') || ( - function_exists('curl_init') && (($info = curl_version()) && - ((is_string($info) && strpos($info, 'zlib') !== null) || isset($info['libz_version']))) - )) - { - $this->accepted_compression = array('gzip', 'deflate'); - } - - // keepalives: enabled by default - $this->keepalive = true; - - // by default the xml parser can support these 3 charset encodings - $this->accepted_charset_encodings = array('UTF-8', 'ISO-8859-1', 'US-ASCII'); - - // initialize user_agent string - $this->user_agent = $GLOBALS['xmlrpcName'] . ' ' . $GLOBALS['xmlrpcVersion']; - } - - /** - * Enables/disables the echoing to screen of the xmlrpc responses received - * @param integer $debug values 0, 1 and 2 are supported (2 = echo sent msg too, before received response) - * @access public - */ - function setDebug($in) - { - $this->debug=$in; - } - - /** - * Add some http BASIC AUTH credentials, used by the client to authenticate - * @param string $u username - * @param string $p password - * @param integer $t auth type. See curl_setopt man page for supported auth types. Defaults to CURLAUTH_BASIC (basic auth) - * @access public - */ - function setCredentials($u, $p, $t=1) - { - $this->username=$u; - $this->password=$p; - $this->authtype=$t; - } - - /** - * Add a client-side https certificate - * @param string $cert - * @param string $certpass - * @access public - */ - function setCertificate($cert, $certpass) - { - $this->cert = $cert; - $this->certpass = $certpass; - } - - /** - * Add a CA certificate to verify server with (see man page about - * CURLOPT_CAINFO for more details - * @param string $cacert certificate file name (or dir holding certificates) - * @param bool $is_dir set to true to indicate cacert is a dir. defaults to false - * @access public - */ - function setCaCertificate($cacert, $is_dir=false) - { - if ($is_dir) - { - $this->cacertdir = $cacert; - } - else - { - $this->cacert = $cacert; - } - } - - /** - * Set attributes for SSL communication: private SSL key - * NB: does not work in older php/curl installs - * Thanks to Daniel Convissor - * @param string $key The name of a file containing a private SSL key - * @param string $keypass The secret password needed to use the private SSL key - * @access public - */ - function setKey($key, $keypass) - { - $this->key = $key; - $this->keypass = $keypass; - } - - /** - * Set attributes for SSL communication: verify server certificate - * @param bool $i enable/disable verification of peer certificate - * @access public - */ - function setSSLVerifyPeer($i) - { - $this->verifypeer = $i; - } - - /** - * Set attributes for SSL communication: verify match of server cert w. hostname - * @param int $i - * @access public - */ - function setSSLVerifyHost($i) - { - $this->verifyhost = $i; - } - - /** - * Set proxy info - * @param string $proxyhost - * @param string $proxyport Defaults to 8080 for HTTP and 443 for HTTPS - * @param string $proxyusername Leave blank if proxy has public access - * @param string $proxypassword Leave blank if proxy has public access - * @param int $proxyauthtype set to constant CURLAUTH_NTLM to use NTLM auth with proxy - * @access public - */ - function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 1) - { - $this->proxy = $proxyhost; - $this->proxyport = $proxyport; - $this->proxy_user = $proxyusername; - $this->proxy_pass = $proxypassword; - $this->proxy_authtype = $proxyauthtype; - } - - /** - * Enables/disables reception of compressed xmlrpc responses. - * Note that enabling reception of compressed responses merely adds some standard - * http headers to xmlrpc requests. It is up to the xmlrpc server to return - * compressed responses when receiving such requests. - * @param string $compmethod either 'gzip', 'deflate', 'any' or '' - * @access public - */ - function setAcceptedCompression($compmethod) - { - if ($compmethod == 'any') - $this->accepted_compression = array('gzip', 'deflate'); - else - $this->accepted_compression = array($compmethod); - } - - /** - * Enables/disables http compression of xmlrpc request. - * Take care when sending compressed requests: servers might not support them - * (and automatic fallback to uncompressed requests is not yet implemented) - * @param string $compmethod either 'gzip', 'deflate' or '' - * @access public - */ - function setRequestCompression($compmethod) - { - $this->request_compression = $compmethod; - } - - /** - * Adds a cookie to list of cookies that will be sent to server. - * NB: setting any param but name and value will turn the cookie into a 'version 1' cookie: - * do not do it unless you know what you are doing - * @param string $name - * @param string $value - * @param string $path - * @param string $domain - * @param int $port - * @access public - * - * @todo check correctness of urlencoding cookie value (copied from php way of doing it...) - */ - function setCookie($name, $value='', $path='', $domain='', $port=null) - { - $this->cookies[$name]['value'] = urlencode($value); - if ($path || $domain || $port) - { - $this->cookies[$name]['path'] = $path; - $this->cookies[$name]['domain'] = $domain; - $this->cookies[$name]['port'] = $port; - $this->cookies[$name]['version'] = 1; - } - else - { - $this->cookies[$name]['version'] = 0; - } - } - - /** - * Directly set cURL options, for extra flexibility - * It allows eg. to bind client to a specific IP interface / address - * @param $options array - */ - function SetCurlOptions( $options ) - { - $this->extracurlopts = $options; - } - - /** - * Set user-agent string that will be used by this client instance - * in http headers sent to the server - */ - function SetUserAgent( $agentstring ) - { - $this->user_agent = $agentstring; - } - - /** - * Send an xmlrpc request - * @param mixed $msg The message object, or an array of messages for using multicall, or the complete xml representation of a request - * @param integer $timeout Connection timeout, in seconds, If unspecified, a platform specific timeout will apply - * @param string $method if left unspecified, the http protocol chosen during creation of the object will be used - * @return xmlrpcresp - * @access public - */ - function& send($msg, $timeout=0, $method='') - { - // if user deos not specify http protocol, use native method of this client - // (i.e. method set during call to constructor) - if($method == '') - { - $method = $this->method; - } - - if(is_array($msg)) - { - // $msg is an array of xmlrpcmsg's - $r = $this->multicall($msg, $timeout, $method); - return $r; - } - elseif(is_string($msg)) - { - $n = new xmlrpcmsg(''); - $n->payload = $msg; - $msg = $n; - } - - // where msg is an xmlrpcmsg - $msg->debug=$this->debug; - - if($method == 'https') - { - $r =& $this->sendPayloadHTTPS( - $msg, - $this->server, - $this->port, - $timeout, - $this->username, - $this->password, - $this->authtype, - $this->cert, - $this->certpass, - $this->cacert, - $this->cacertdir, - $this->proxy, - $this->proxyport, - $this->proxy_user, - $this->proxy_pass, - $this->proxy_authtype, - $this->keepalive, - $this->key, - $this->keypass - ); - } - elseif($method == 'http11') - { - $r =& $this->sendPayloadCURL( - $msg, - $this->server, - $this->port, - $timeout, - $this->username, - $this->password, - $this->authtype, - null, - null, - null, - null, - $this->proxy, - $this->proxyport, - $this->proxy_user, - $this->proxy_pass, - $this->proxy_authtype, - 'http', - $this->keepalive - ); - } - else - { - $r =& $this->sendPayloadHTTP10( - $msg, - $this->server, - $this->port, - $timeout, - $this->username, - $this->password, - $this->authtype, - $this->proxy, - $this->proxyport, - $this->proxy_user, - $this->proxy_pass, - $this->proxy_authtype - ); - } - - return $r; - } - - /** - * @access private - */ - function &sendPayloadHTTP10($msg, $server, $port, $timeout=0, - $username='', $password='', $authtype=1, $proxyhost='', - $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1) - { - if($port==0) - { - $port=80; - } - - // Only create the payload if it was not created previously - if(empty($msg->payload)) - { - $msg->createPayload($this->request_charset_encoding); - } - - $payload = $msg->payload; - // Deflate request body and set appropriate request headers - if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) - { - if($this->request_compression == 'gzip') - { - $a = @gzencode($payload); - if($a) - { - $payload = $a; - $encoding_hdr = "Content-Encoding: gzip\r\n"; - } - } - else - { - $a = @gzcompress($payload); - if($a) - { - $payload = $a; - $encoding_hdr = "Content-Encoding: deflate\r\n"; - } - } - } - else - { - $encoding_hdr = ''; - } - - // thanks to Grant Rauscher <gr...@fi...> for this - $credentials=''; - if($username!='') - { - $credentials='Authorization: Basic ' . base64_encode($username . ':' . $password) . "\r\n"; - if ($authtype != 1) - { - error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported with HTTP 1.0'); - } - } - - $accepted_encoding = ''; - if(is_array($this->accepted_compression) && count($this->accepted_compression)) - { - $accepted_encoding = 'Accept-Encoding: ' . implode(', ', $this->accepted_compression) . "\r\n"; - } - - $proxy_credentials = ''; - if($proxyhost) - { - if($proxyport == 0) - { - $proxyport = 8080; - } - $connectserver = $proxyhost; - $connectport = $proxyport; - $uri = 'http://'.$server.':'.$port.$this->path; - if($proxyusername != '') - { - if ($proxyauthtype != 1) - { - error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth to proxy is supported with HTTP 1.0'); - } - $proxy_credentials = 'Proxy-Authorization: Basic ' . base64_encode($proxyusername.':'.$proxypassword) . "\r\n"; - } - } - else - { - $connectserver = $server; - $connectport = $port; - $uri = $this->path; - } - - // Cookie generation, as per rfc2965 (version 1 cookies) or - // netscape's rules (version 0 cookies) - $cookieheader=''; - if (count($this->cookies)) - { - $version = ''; - foreach ($this->cookies as $name => $cookie) - { - if ($cookie['version']) - { - $version = ' $Version="' . $cookie['version'] . '";'; - $cookieheader .= ' ' . $name . '="' . $cookie['value'] . '";'; - if ($cookie['path']) - $cookieheader .= ' $Path="' . $cookie['path'] . '";'; - if ($cookie['domain']) - $cookieheader .= ' $Domain="' . $cookie['domain'] . '";'; - if ($cookie['port']) - $cookieheader .= ' $Port="' . $cookie['port'] . '";'; - } - else - { - $cookieheader .= ' ' . $name . '=' . $cookie['value'] . ";"; - } - } - $cookieheader = 'Cookie:' . $version . substr($cookieheader, 0, -1) . "\r\n"; - } - - $op= 'POST ' . $uri. " HTTP/1.0\r\n" . - 'User-Agent: ' . $this->user_agent . "\r\n" . - 'Host: '. $server . ':' . $port . "\r\n" . - $credentials . - $proxy_credentials . - $accepted_encoding . - $encoding_hdr . - 'Accept-Charset: ' . implode(',', $this->accepted_charset_encodings) . "\r\n" . - $cookieheader . - 'Content-Type: ' . $msg->content_type . "\r\nContent-Length: " . - strlen($payload) . "\r\n\r\n" . - $payload; - - if($this->debug > 1) - { - print "<PRE>\n---SENDING---\n" . htmlentities($op) . "\n---END---\n</PRE>"; - // let the client see this now in case http times out... - flush(); - } - - if($timeout>0) - { - $fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr, $timeout); - } - else - { - $fp=@fsockopen($connectserver, $connectport, $this->errno, $this->errstr); - } - if($fp) - { - if($timeout>0 && function_exists('stream_set_timeout')) - { - stream_set_timeout($fp, $timeout); - } - } - else - { - $this->errstr='Connect error: '.$this->errstr; - $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')'); - return $r; - } - - if(!fputs($fp, $op, strlen($op))) - { - fclose($fp); - $this->errstr='Write error'; - $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr); - return $r; - } - else - { - // reset errno and errstr on succesful socket connection - $this->errstr = ''; - } - // G. Giunta 2005/10/24: close socket before parsing. - // should yeld slightly better execution times, and make easier recursive calls (e.g. to follow http redirects) - $ipd=''; - do - { - // shall we check for $data === FALSE? - // as per the manual, it signals an error - $ipd.=fread($fp, 32768); - } while(!feof($fp)); - fclose($fp); - $r =& $msg->parseResponse($ipd, false, $this->return_type); - return $r; - - } - - /** - * @access private - */ - function &sendPayloadHTTPS($msg, $server, $port, $timeout=0, $username='', - $password='', $authtype=1, $cert='',$certpass='', $cacert='', $cacertdir='', - $proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1, - $keepalive=false, $key='', $keypass='') - { - $r =& $this->sendPayloadCURL($msg, $server, $port, $timeout, $username, - $password, $authtype, $cert, $certpass, $cacert, $cacertdir, $proxyhost, $proxyport, - $proxyusername, $proxypassword, $proxyauthtype, 'https', $keepalive, $key, $keypass); - return $r; - } - - /** - * Contributed by Justin Miller <ju...@vo...> - * Requires curl to be built into PHP - * NB: CURL versions before 7.11.10 cannot use proxy to talk to https servers! - * @access private - */ - function &sendPayloadCURL($msg, $server, $port, $timeout=0, $username='', - $password='', $authtype=1, $cert='', $certpass='', $cacert='', $cacertdir='', - $proxyhost='', $proxyport=0, $proxyusername='', $proxypassword='', $proxyauthtype=1, $method='https', - $keepalive=false, $key='', $keypass='') - { - if(!function_exists('curl_init')) - { - $this->errstr='CURL unavailable on this install'; - $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_curl'], $GLOBALS['xmlrpcstr']['no_curl']); - return $r; - } - if($method == 'https') - { - if(($info = curl_version()) && - ((is_string($info) && strpos($info, 'OpenSSL') === null) || (is_array($info) && !isset($info['ssl_version'])))) - { - $this->errstr='SSL unavailable on this install'; - $r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_ssl'], $GLOBALS['xmlrpcstr']['no_ssl']); - return $r; - } - } - - if($port == 0) - { - if($method == 'http') - { - $port = 80; - } - else - { - $port = 443; - } - } - - // Only create the payload if it was not created previously - if(empty($msg->payload)) - { - $msg->createPayload($this->request_charset_encoding); - } - - // Deflate request body and set appropriate request headers - $payload = $msg->payload; - if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) - { - if($this->request_compression == 'gzip') - { - $a = @gzencode($payload); - if($a) - { - $payload = $a; - $encoding_hdr = 'Content-Encoding: gzip'; - } - } - else - { - $a = @gzcompress($payload); - if($a) - { - $payload = $a; - $encoding_hdr = 'Content-Encoding: deflate'; - } - } - } - else - { - $encoding_hdr = ''; - } - - if($this->debug > 1) - { - print "<PRE>\n---SENDING---\n" . htmlentities($payload) . "\n---END---\n</PRE>"; - // let the client see this now in case http times out... - flush(); - } - - if(!$keepalive || !$this->xmlrpc_curl_handle) - { - $curl = curl_init($method . '://' . $server . ':' . $port . $this->path); - if($keepalive) - { - $this->xmlrpc_curl_handle = $curl; - } - } - else - { - $curl = $this->xmlrpc_curl_handle; - } - - // results into variable - curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); - - if($this->debug) - { - curl_setopt($curl, CURLOPT_VERBOSE, 1); - } - curl_setopt($curl, CURLOPT_USERAGENT, $this->user_agent); - // required for XMLRPC: post the data - curl_setopt($curl, CURLOPT_POST, 1); - // the data - curl_setopt($curl, CURLOPT_POSTFIELDS, $payload); - - // return the header too - curl_setopt($curl, CURLOPT_HEADER, 1); - - // will only work with PHP >= 5.0 - // NB: if we set an empty string, CURL will add http header indicating - // ALL methods it is supporting. This is possibly a better option than - // letting the user tell what curl can / cannot do... - if(is_array($this->accepted_compression) && count($this->accepted_compression)) - { - //curl_setopt($curl, CURLOPT_ENCODING, implode(',', $this->accepted_compression)); - // empty string means 'any supported by CURL' (shall we catch errors in case CURLOPT_SSLKEY undefined ?) - if (count($this->accepted_compression) == 1) - { - curl_setopt($curl, CURLOPT_ENCODING, $this->accepted_compression[0]); - } - else - curl_setopt($curl, CURLOPT_ENCODING, ''); - } - // extra headers - $headers = array('Content-Type: ' . $msg->content_type , 'Accept-Charset: ' . implode(',', $this->accepted_charset_encodings)); - // if no keepalive is wanted, let the server know it in advance - if(!$keepalive) - { - $headers[] = 'Connection: close'; - } - // request compression header - if($encoding_hdr) - { - $headers[] = $encoding_hdr; - } - - curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); - // timeout is borked - if($timeout) - { - curl_setopt($curl, CURLOPT_TIMEOUT, $timeout == 1 ? 1 : $timeout - 1); - } - - if($username && $password) - { - curl_setopt($curl, CURLOPT_USERPWD, $username.':'.$password); - if (defined('CURLOPT_HTTPAUTH')) - { - curl_setopt($curl, CURLOPT_HTTPAUTH, $authtype); - } - else if ($authtype != 1) - { - error_log('XML-RPC: '.__METHOD__.': warning. Only Basic auth is supported by the current PHP/curl install'); - } - } - - if($method == 'https') - { - // set cert file - if($cert) - { - curl_setopt($curl, CURLOPT_SSLCERT, $cert); - } - // set cert password - if($certpass) - { - curl_setopt($curl, CURLOPT_SSLCERTPASSWD, $certpass); - } - // whether to verify remote host's cert - curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verifypeer); - // set ca certificates file/dir - if($cacert) - { - curl_setopt($curl, CURLOPT_CAINFO, $cacert); - } - if($cacertdir) - { - curl_setopt($curl, CURLOPT_CAPATH, $cacertdir); - } - // set key file (shall we ... [truncated message content] |
From: <tu...@us...> - 2018-01-08 00:56:53
|
Revision: 7907 http://sourceforge.net/p/web-erp/reponame/7907 Author: turbopt Date: 2018-01-08 00:56:50 +0000 (Mon, 08 Jan 2018) Log Message: ----------- WriteReport.inc: Fix broken page number handling. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7955) Modified Paths: -------------- trunk/doc/Change.log trunk/reportwriter/WriteReport.inc Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-08 00:48:17 UTC (rev 7906) +++ trunk/doc/Change.log 2018-01-08 00:56:50 UTC (rev 7907) @@ -1,7 +1,9 @@ webERP Change Log +8/1/18 Paul Becker (PaulT commit): WriteReport.inc: Fix broken page number handling. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7955) +8/1/18 PaulT: Change.log: Update remaining past commit entries (during the past few weeks) to give credit to the right person(s) involved with the change, and when applicable, add the related forum URL for historical reference. 7/1/18 Phil: Update phpxmlrpc to latest from https://github.com/gggeek/phpxmlrpc -6/1/18 PaulT: Update some past commit entries to give credit to the right person(s) involved with the change, and when applicable, add the related forum URL for historical reference. +6/1/18 PaulT: Change.log: Update some past commit entries to give credit to the right person(s) involved with the change, and when applicable, add the related forum URL for historical reference. 6/1/18 Paul Becker and Tim (PaulT commit): SelectSalesOrder.php: Fix handling to correct table heading value. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8000) 6/1/18 Phil: Attempt to avoid XSS attacks by logged in users by parsing out "script>" from all $_POST and $_GET variables - subsequentely changed to strip_tags from all $_POST and $_GETs per Tim's recommendation 3/1/18: Paul Becker (PaulT commit): SelectSalesOrder.php: Fix search to retain quote option and set StockLocation to the UserStockLocation to auto-load current Sales Orders. (Reported in formus: http://www.weberp.org/forum/showthread.php?tid=8000) Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2018-01-08 00:48:17 UTC (rev 7906) +++ trunk/reportwriter/WriteReport.inc 2018-01-08 00:56:50 UTC (rev 7907) @@ -120,7 +120,7 @@ //Arial italic 8 $this->SetTextColor(0); //Page number - $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); + $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/' . $this->getNumPages(), 0, 0, 'C'); } function ReportTable($Data) { |
From: <tu...@us...> - 2018-01-08 05:57:26
|
Revision: 7908 http://sourceforge.net/p/web-erp/reponame/7908 Author: turbopt Date: 2018-01-08 05:57:24 +0000 (Mon, 08 Jan 2018) Log Message: ----------- SalesGraph.php: Replace period numbers in graph title with month and year. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7946) Modified Paths: -------------- trunk/SalesGraph.php trunk/doc/Change.log Modified: trunk/SalesGraph.php =================================================================== --- trunk/SalesGraph.php 2018-01-08 00:56:50 UTC (rev 7907) +++ trunk/SalesGraph.php 2018-01-08 05:57:24 UTC (rev 7908) @@ -218,6 +218,18 @@ $SelectClause = 'qty'; } + $SQL = "SELECT YEAR(`lastdate_in_period`) AS year, MONTHNAME(`lastdate_in_period`) AS month + FROM `periods` + WHERE `periodno`='" . $_POST['FromPeriod'] . "' OR periodno='" . $_POST['ToPeriod'] . "'"; + + $result = DB_query($SQL); + + $fromPeriod = DB_fetch_array($result); + $_POST['FromPeriod'] = $fromPeriod['month'] . ' ' . $fromPeriod['year']; + + $toPeriod = DB_fetch_array($result); + $_POST['ToPeriod'] = $toPeriod['month'] . ' ' . $toPeriod['year']; + $GraphTitle .= ' ' . _('From Period') . ' ' . $_POST['FromPeriod'] . ' ' . _('to') . ' ' . $_POST['ToPeriod'] . "\n\r"; if ($_POST['SalesArea']=='All'){ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-08 00:56:50 UTC (rev 7907) +++ trunk/doc/Change.log 2018-01-08 05:57:24 UTC (rev 7908) @@ -1,7 +1,8 @@ webERP Change Log -8/1/18 Paul Becker (PaulT commit): WriteReport.inc: Fix broken page number handling. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7955) -8/1/18 PaulT: Change.log: Update remaining past commit entries (during the past few weeks) to give credit to the right person(s) involved with the change, and when applicable, add the related forum URL for historical reference. +8/1/18 Paul Becker/Tim (PaulT commit): SalesGraph.php: Replace period numbers in graph title with month and year. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7946) +7/1/18 Paul Becker (PaulT commit): WriteReport.inc: Fix broken page number handling. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7955) +7/1/18 PaulT: Change.log: Update remaining past commit entries (during the past few weeks) to give credit to the right person(s) involved with the change, and when applicable, add the related forum URL for historical reference. 7/1/18 Phil: Update phpxmlrpc to latest from https://github.com/gggeek/phpxmlrpc 6/1/18 PaulT: Change.log: Update some past commit entries to give credit to the right person(s) involved with the change, and when applicable, add the related forum URL for historical reference. 6/1/18 Paul Becker and Tim (PaulT commit): SelectSalesOrder.php: Fix handling to correct table heading value. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8000) |
From: <tu...@us...> - 2018-01-09 00:19:02
|
Revision: 7909 http://sourceforge.net/p/web-erp/reponame/7909 Author: turbopt Date: 2018-01-09 00:19:00 +0000 (Tue, 09 Jan 2018) Log Message: ----------- PO_Items.php: Fix/improve Supplier checkbox hanlding, and fix a PHP7 compatibility issue. (Reported in forums by Confucius: http://www.weberp.org/forum/showthread.php?tid=7958) Modified Paths: -------------- trunk/PO_Items.php trunk/doc/Change.log Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2018-01-08 05:57:24 UTC (rev 7908) +++ trunk/PO_Items.php 2018-01-09 00:19:00 UTC (rev 7909) @@ -1149,14 +1149,16 @@ $_POST['StockCode']=''; } + if (isset($_POST['SupplierItemsOnly'])) { + $Checked = 'checked'; + } else { + $Checked = ''; + } + echo '</select></td> <td>' . _('Enter text extracts in the description') . ':</td> <td><input type="text" name="Keywords" size="20" maxlength="25" value="' . $_POST['Keywords'] . '" /></td></tr> - <tr><td>' . _('Only items defined as from this Supplier') . ' <input type="checkbox" checked name="SupplierItemsOnly" '; - if (isset($_POST['SupplierItemsOnly']) AND $_POST['SupplierItemsOnly']=='on'){ - echo 'checked'; - } - echo ' /></td> + <tr><td>' . _('Only items defined as from this Supplier') . ' <input type="checkbox" ' . $Checked . ' name="SupplierItemsOnly" /></td> <td><b>' . _('OR') . ' </b>' . _('Enter extract of the Stock Code') . ':</td> <td><input type="text" name="StockCode" size="15" maxlength="18" value="' . $_POST['StockCode'] . '" /></td> </tr> @@ -1213,7 +1215,10 @@ } $SupportedImgExt = array('png','jpg','jpeg'); - $imagefile = reset((glob($_SESSION['part_pics_dir'] . '/' . $myrow['stockid'] . '.{' . implode(",", $SupportedImgExt) . '}', GLOB_BRACE))); + + $imagefilearray = (glob($_SESSION['part_pics_dir'] . '/' . $myrow['stockid'] . '.{' . implode(",", $SupportedImgExt) . '}', GLOB_BRACE)); + $imagefile = reset($imagefilearray); + if (extension_loaded('gd') && function_exists('gd_info') && file_exists ($imagefile) ) { $ImageSource = '<img src="GetStockImage.php?automake=1&textcolor=FFFFFF&bgcolor=CCCCCC'. '&StockID='.urlencode($myrow['stockid']). Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-08 05:57:24 UTC (rev 7908) +++ trunk/doc/Change.log 2018-01-09 00:19:00 UTC (rev 7909) @@ -1,5 +1,6 @@ webERP Change Log +8/1/18 Tim (PaulT commit): PO_Items.php: Fix/improve Supplier checkbox hanlding, and fix a PHP7 compatibility issue. (Reported in forums by Confucius: http://www.weberp.org/forum/showthread.php?tid=7958) 8/1/18 Paul Becker/Tim (PaulT commit): SalesGraph.php: Replace period numbers in graph title with month and year. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7946) 7/1/18 Paul Becker (PaulT commit): WriteReport.inc: Fix broken page number handling. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7955) 7/1/18 PaulT: Change.log: Update remaining past commit entries (during the past few weeks) to give credit to the right person(s) involved with the change, and when applicable, add the related forum URL for historical reference. |
From: <tu...@us...> - 2018-01-09 01:14:58
|
Revision: 7910 http://sourceforge.net/p/web-erp/reponame/7910 Author: turbopt Date: 2018-01-09 01:14:56 +0000 (Tue, 09 Jan 2018) Log Message: ----------- PDFTransPageHeader.inc, PDFTransPageHeaderPortrait.inc: Add additional address fields and/or adds an extra space between some address fields. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7942) Modified Paths: -------------- trunk/doc/Change.log trunk/includes/PDFTransPageHeader.inc trunk/includes/PDFTransPageHeaderPortrait.inc Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-09 00:19:00 UTC (rev 7909) +++ trunk/doc/Change.log 2018-01-09 01:14:56 UTC (rev 7910) @@ -1,6 +1,7 @@ webERP Change Log -8/1/18 Tim (PaulT commit): PO_Items.php: Fix/improve Supplier checkbox hanlding, and fix a PHP7 compatibility issue. (Reported in forums by Confucius: http://www.weberp.org/forum/showthread.php?tid=7958) +8/1/18 Paul Becker (PaulT commit): PDFTransPageHeader.inc, PDFTransPageHeaderPortrait.inc: Add additional address fields and/or adds an extra space between some address fields. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7942) +8/1/18 Tim (PaulT commit): PO_Items.php: Fix/improve Supplier checkbox handling, and fix a PHP7 compatibility issue. (Reported in forums by Confucius: http://www.weberp.org/forum/showthread.php?tid=7958) 8/1/18 Paul Becker/Tim (PaulT commit): SalesGraph.php: Replace period numbers in graph title with month and year. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7946) 7/1/18 Paul Becker (PaulT commit): WriteReport.inc: Fix broken page number handling. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7955) 7/1/18 PaulT: Change.log: Update remaining past commit entries (during the past few weeks) to give credit to the right person(s) involved with the change, and when applicable, add the related forum URL for historical reference. Modified: trunk/includes/PDFTransPageHeader.inc =================================================================== --- trunk/includes/PDFTransPageHeader.inc 2018-01-09 00:19:00 UTC (rev 7909) +++ trunk/includes/PDFTransPageHeader.inc 2018-01-09 01:14:56 UTC (rev 7910) @@ -79,7 +79,7 @@ $pdf->addText($XPos, $YPos-10, $FontSize, $_SESSION['TaxAuthorityReferenceName'] . ': ' . $_SESSION['CompanyRecord']['gstno']); $pdf->addText($XPos, $YPos-19,$FontSize, $_SESSION['CompanyRecord']['regoffice1']); $pdf->addText($XPos, $YPos-28,$FontSize, $_SESSION['CompanyRecord']['regoffice2']); -$pdf->addText($XPos, $YPos-37,$FontSize, $_SESSION['CompanyRecord']['regoffice3'] . ' ' . $_SESSION['CompanyRecord']['regoffice4'] . ' ' . $_SESSION['CompanyRecord']['regoffice5']); +$pdf->addText($XPos, $YPos-37,$FontSize, $_SESSION['CompanyRecord']['regoffice3'] . ' ' . $_SESSION['CompanyRecord']['regoffice4'] . ' ' . $_SESSION['CompanyRecord']['regoffice5']); $pdf->addText($XPos, $YPos-46, $FontSize, $_SESSION['CompanyRecord']['regoffice6']); $pdf->addText($XPos, $YPos-54, $FontSize, _('Phone') . ':' . $_SESSION['CompanyRecord']['telephone'] . ' ' . _('Fax') . ': ' . $_SESSION['CompanyRecord']['fax']); $pdf->addText($XPos, $YPos-63, $FontSize, _('Email') . ': ' . $_SESSION['CompanyRecord']['email']); @@ -98,12 +98,12 @@ $pdf->addText($XPos, $YPos, $FontSize, html_entity_decode($myrow['name'])); $pdf->addText($XPos, $YPos-14, $FontSize, html_entity_decode($myrow['address1'])); $pdf->addText($XPos, $YPos-28, $FontSize, html_entity_decode($myrow['address2'])); - $pdf->addText($XPos, $YPos-42, $FontSize, html_entity_decode($myrow['address3']) . ' ' . html_entity_decode($myrow['address4'])); + $pdf->addText($XPos, $YPos-42, $FontSize, html_entity_decode($myrow['address3']) . ' ' . html_entity_decode($myrow['address4']) . ' ' . html_entity_decode($myrow['address5']) . ' ' . html_entity_decode($myrow['address6'])); } else { $pdf->addText($XPos, $YPos, $FontSize, html_entity_decode($myrow['name'])); $pdf->addText($XPos, $YPos-14, $FontSize, html_entity_decode($myrow['brpostaddr1'])); $pdf->addText($XPos, $YPos-28, $FontSize, html_entity_decode($myrow['brpostaddr2'])); - $pdf->addText($XPos, $YPos-42, $FontSize, html_entity_decode($myrow['brpostaddr3']) . ' ' . html_entity_decode($myrow['brpostaddr4']) . ' ' . html_entity_decode($myrow['brpostaddr5']) . ' ' . html_entity_decode($myrow['brpostaddr6'])); + $pdf->addText($XPos, $YPos-42, $FontSize, html_entity_decode($myrow['brpostaddr3']) . ' ' . html_entity_decode($myrow['brpostaddr4']) . ' ' . html_entity_decode($myrow['brpostaddr5']) . ' ' . html_entity_decode($myrow['brpostaddr6'])); } @@ -132,7 +132,7 @@ $pdf->addText($XPos, $YPos, $FontSize, html_entity_decode($myrow['deliverto'])); $pdf->addText($XPos, $YPos-14, $FontSize, html_entity_decode($myrow['deladd1'])); $pdf->addText($XPos, $YPos-28, $FontSize, html_entity_decode($myrow['deladd2'])); - $pdf->addText($XPos, $YPos-42, $FontSize, html_entity_decode($myrow['deladd3']) . ' ' . html_entity_decode($myrow['deladd4']) . ' ' . html_entity_decode($myrow['deladd5'])); + $pdf->addText($XPos, $YPos-42, $FontSize, html_entity_decode($myrow['deladd3']) . ' ' . html_entity_decode($myrow['deladd4']) . ' ' . html_entity_decode($myrow['deladd5']) . ' ' . html_entity_decode($myrow['deladd6'])); $XPos -=80; } if ($InvOrCredit=='Credit'){ @@ -143,7 +143,7 @@ $pdf->addText($XPos, $YPos, $FontSize, html_entity_decode($myrow['brname'])); $pdf->addText($XPos, $YPos-14, $FontSize, html_entity_decode($myrow['braddress1'])); $pdf->addText($XPos, $YPos-28, $FontSize, html_entity_decode($myrow['braddress2'])); - $pdf->addText($XPos, $YPos-42, $FontSize, html_entity_decode($myrow['braddress3']) . ' ' . html_entity_decode($myrow['braddress4']) . ' ' . html_entity_decode($myrow['braddress5']) . ' ' . html_entity_decode($myrow['braddress6'])); + $pdf->addText($XPos, $YPos-42, $FontSize, html_entity_decode($myrow['braddress3']) . ' ' . html_entity_decode($myrow['braddress4']) . ' ' . html_entity_decode($myrow['braddress5']) . ' ' . html_entity_decode($myrow['braddress6'])); $XPos -=80; } Modified: trunk/includes/PDFTransPageHeaderPortrait.inc =================================================================== --- trunk/includes/PDFTransPageHeaderPortrait.inc 2018-01-09 00:19:00 UTC (rev 7909) +++ trunk/includes/PDFTransPageHeaderPortrait.inc 2018-01-09 01:14:56 UTC (rev 7910) @@ -103,7 +103,7 @@ } if(($_SESSION['CompanyRecord']['regoffice3'] <> '') OR ($_SESSION['CompanyRecord']['regoffice4'] <> '') OR ($_SESSION['CompanyRecord']['regoffice5'] <> '')) { $LineCount += 1; - $pdf->addText($XPos, $YPos-$LineCount*$LineHeight,$FontSize, $_SESSION['CompanyRecord']['regoffice3'] . ' ' . $_SESSION['CompanyRecord']['regoffice4'] . ' ' . $_SESSION['CompanyRecord']['regoffice5']); // country in 6 not printed + $pdf->addText($XPos, $YPos-$LineCount*$LineHeight,$FontSize, $_SESSION['CompanyRecord']['regoffice3'] . ' ' . $_SESSION['CompanyRecord']['regoffice4'] . ' ' . $_SESSION['CompanyRecord']['regoffice5']); // country in 6 not printed } $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, _('Phone') . ':' . $_SESSION['CompanyRecord']['telephone']); @@ -137,7 +137,7 @@ $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['address2'])); $LineCount += 1; - $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['address3']) . ' ' . html_entity_decode($myrow['address4']) . ' ' . html_entity_decode($myrow['address5']) . ' ' . html_entity_decode($myrow['address6'])); + $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['address3']) . ' ' . html_entity_decode($myrow['address4']) . ' ' . html_entity_decode($myrow['address5']) . ' ' . html_entity_decode($myrow['address6'])); } else { $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['name'])); @@ -146,7 +146,7 @@ $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['brpostaddr2'])); $LineCount += 1; - $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['brpostaddr3']) . ' ' . html_entity_decode($myrow['brpostaddr4']) . ' ' . html_entity_decode($myrow['brpostaddr5']) . ' ' . html_entity_decode($myrow['brpostaddr6'])); + $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['brpostaddr3']) . ' ' . html_entity_decode($myrow['brpostaddr4']) . ' ' . html_entity_decode($myrow['brpostaddr5']) . ' ' . html_entity_decode($myrow['brpostaddr6'])); } $XPos = $Page_Width - 265; @@ -183,7 +183,7 @@ $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['deladd2'])); $LineCount += 1; - $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['deladd3']) . ' ' . html_entity_decode($myrow['deladd4']) . ' ' . html_entity_decode($myrow['deladd5']) . ' ' . html_entity_decode($myrow['deladd6'])); + $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['deladd3']) . ' ' . html_entity_decode($myrow['deladd4']) . ' ' . html_entity_decode($myrow['deladd5']) . ' ' . html_entity_decode($myrow['deladd6'])); //$XPos -=80; } if($InvOrCredit=='Credit') { @@ -199,7 +199,7 @@ $LineCount += 1; $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['braddress2'])); $LineCount += 1; - $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['braddress3']) . ' ' . html_entity_decode($myrow['braddress4']) . ' ' . html_entity_decode($myrow['braddress5']) . ' ' . html_entity_decode($myrow['braddress6'])); + $pdf->addText($XPos, $YPos-$LineCount*$LineHeight, $FontSize, html_entity_decode($myrow['braddress3']) . ' ' . html_entity_decode($myrow['braddress4']) . ' ' . html_entity_decode($myrow['braddress5']) . ' ' . html_entity_decode($myrow['braddress6'])); //$XPos -=80; } |
From: <tu...@us...> - 2018-01-09 16:30:50
|
Revision: 7911 http://sourceforge.net/p/web-erp/reponame/7911 Author: turbopt Date: 2018-01-09 16:30:48 +0000 (Tue, 09 Jan 2018) Log Message: ----------- Z_MakeNewCompany.php, default.sql, demo.sql: Remove doubled underscore in EDI_Sent reference. (Reported in forums: http://weberp.org/forum/showthread.php?tid=7920) Modified Paths: -------------- trunk/Z_MakeNewCompany.php trunk/doc/Change.log trunk/sql/mysql/country_sql/default.sql trunk/sql/mysql/country_sql/demo.sql Modified: trunk/Z_MakeNewCompany.php =================================================================== --- trunk/Z_MakeNewCompany.php 2018-01-09 01:14:56 UTC (rev 7910) +++ trunk/Z_MakeNewCompany.php 2018-01-09 16:30:48 UTC (rev 7911) @@ -191,7 +191,7 @@ unset ($_SESSION['Items']); unset ($_SESSION['CreditItems']); - $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/EDI__Sent' WHERE confname='EDI_MsgSent'"; + $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/EDI_Sent' WHERE confname='EDI_MsgSent'"; $result = DB_query($SQL); $SQL ="UPDATE config SET confvalue='companies/" . $_POST['NewDatabase'] . "/EDI_Incoming_Orders' WHERE confname='EDI_Incoming_Orders'"; $result = DB_query($SQL); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-09 01:14:56 UTC (rev 7910) +++ trunk/doc/Change.log 2018-01-09 16:30:48 UTC (rev 7911) @@ -1,5 +1,6 @@ webERP Change Log +9/1/18 Paul Becker (PaulT commit): Z_MakeNewCompany.php, default.sql, demo.sql: Remove doubled underscore in EDI_Sent reference. (Reported in forums: http://weberp.org/forum/showthread.php?tid=7920) 8/1/18 Paul Becker (PaulT commit): PDFTransPageHeader.inc, PDFTransPageHeaderPortrait.inc: Add additional address fields and/or adds an extra space between some address fields. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7942) 8/1/18 Tim (PaulT commit): PO_Items.php: Fix/improve Supplier checkbox handling, and fix a PHP7 compatibility issue. (Reported in forums by Confucius: http://www.weberp.org/forum/showthread.php?tid=7958) 8/1/18 Paul Becker/Tim (PaulT commit): SalesGraph.php: Replace period numbers in graph title with month and year. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7946) Modified: trunk/sql/mysql/country_sql/default.sql =================================================================== --- trunk/sql/mysql/country_sql/default.sql 2018-01-09 01:14:56 UTC (rev 7910) +++ trunk/sql/mysql/country_sql/default.sql 2018-01-09 16:30:48 UTC (rev 7911) @@ -6661,7 +6661,7 @@ INSERT INTO `config` VALUES ('EDIReference','WEBERP'); INSERT INTO `config` VALUES ('EDI_Incoming_Orders','companies/test/EDI_Incoming_Orders'); INSERT INTO `config` VALUES ('EDI_MsgPending','companies/test/EDI_Pending'); -INSERT INTO `config` VALUES ('EDI_MsgSent','companies/test/EDI__Sent'); +INSERT INTO `config` VALUES ('EDI_MsgSent','companies/test/EDI_Sent'); INSERT INTO `config` VALUES ('ExchangeRateFeed','Google'); INSERT INTO `config` VALUES ('Extended_CustomerInfo','1'); INSERT INTO `config` VALUES ('Extended_SupplierInfo','1'); Modified: trunk/sql/mysql/country_sql/demo.sql =================================================================== --- trunk/sql/mysql/country_sql/demo.sql 2018-01-09 01:14:56 UTC (rev 7910) +++ trunk/sql/mysql/country_sql/demo.sql 2018-01-09 16:30:48 UTC (rev 7911) @@ -8581,7 +8581,7 @@ INSERT INTO `config` VALUES ('EDIReference','WEBERP'); INSERT INTO `config` VALUES ('EDI_Incoming_Orders','companies/test/EDI_Incoming_Orders'); INSERT INTO `config` VALUES ('EDI_MsgPending','companies/test/EDI_Pending'); -INSERT INTO `config` VALUES ('EDI_MsgSent','companies/test/EDI__Sent'); +INSERT INTO `config` VALUES ('EDI_MsgSent','companies/test/EDI_Sent'); INSERT INTO `config` VALUES ('ExchangeRateFeed','Google'); INSERT INTO `config` VALUES ('Extended_CustomerInfo','1'); INSERT INTO `config` VALUES ('Extended_SupplierInfo','1'); |
From: <tu...@us...> - 2018-01-09 20:10:46
|
Revision: 7912 http://sourceforge.net/p/web-erp/reponame/7912 Author: turbopt Date: 2018-01-09 20:10:44 +0000 (Tue, 09 Jan 2018) Log Message: ----------- Payments.php: Show bank balance at payments. Know that balance display/output is protected by a similar security check manner as protected information at the dashboard. (Reported in forums: http://weberp.org/forum/showthread.php?tid=8017) Modified Paths: -------------- trunk/Payments.php trunk/doc/Change.log Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2018-01-09 16:30:48 UTC (rev 7911) +++ trunk/Payments.php 2018-01-09 20:10:44 UTC (rev 7912) @@ -58,6 +58,15 @@ echo '<div class="page_help_text">', _('Use this screen to enter payments FROM your bank account.<br />Note: To enter a payment FROM a supplier, first select the Supplier, click Enter a Payment to, or Receipt from the Supplier, and use a negative Payment amount on this form.'), '</div> <br />'; +$SQL = "SELECT pagesecurity + FROM scripts + WHERE scripts.script = 'BankAccountBalances.php'"; +$ErrMsg = _('The security for G/L Accounts cannot be retrieved because'); +$DbgMsg = _('The SQL that was used and failed was'); +$Security2Result = DB_query($SQL, $ErrMsg, $DbgMsg); +$MyUserRow = DB_fetch_array($Security2Result); +$CashSecurity = $MyUserRow['pagesecurity']; +echo 'CS: ' . $CashSecurity . '<br>'; if(isset($_GET['SupplierID'])) { /*The page was called with a supplierID check it is valid and default the inputs for Supplier Name and currency of payment */ @@ -167,10 +176,10 @@ if(isset($_POST['Paymenttype']) AND $_POST['Paymenttype']!='') { $_SESSION['PaymentDetail'.$identifier]->Paymenttype = $_POST['Paymenttype']; //lets validate the paymenttype here - $sql = "SELECT usepreprintedstationery + $SQL = "SELECT usepreprintedstationery FROM paymentmethods WHERE paymentname='" . $_SESSION['PaymentDetail'.$identifier]->Paymenttype . "'"; - $result = DB_query($sql); + $result = DB_query($SQL); $myrow = DB_fetch_row($result); if($myrow[0] == 1) { if(empty($_POST['ChequeNum'])) { @@ -332,10 +341,10 @@ $PeriodNo = GetPeriod($_SESSION['PaymentDetail'.$identifier]->DatePaid,$db); - $sql = "SELECT usepreprintedstationery + $SQL = "SELECT usepreprintedstationery FROM paymentmethods WHERE paymentname='" . $_SESSION['PaymentDetail'.$identifier]->Paymenttype ."'"; - $result=DB_query($sql); + $result=DB_query($SQL); $myrow=DB_fetch_row($result); // first time through commit if supplier cheque then print it first @@ -925,6 +934,16 @@ if($_SESSION['PaymentDetail'.$identifier]->BankAccountName!='') { echo ' ' . _('from the') . ' ' . $_SESSION['PaymentDetail'.$identifier]->BankAccountName; + + if (in_array($CashSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($CashSecurity)) { + $CurrBalanceSQL = "SELECT SUM(amount) AS balance FROM banktrans WHERE bankact='" . $_SESSION['PaymentDetail'.$identifier]->Account . "'"; + $CurrBalanceResult = DB_query($CurrBalanceSQL); + $CurrBalanceRow = DB_fetch_array($CurrBalanceResult); + + $DecimalPlacesSQL = "SELECT decimalplaces FROM currencies WHERE currabrev='" . $_SESSION['PaymentDetail'.$identifier]->Account . "'"; + $DecimalPlacesResult = DB_query($DecimalPlacesSQL); + $DecimalPlacesRow = DB_fetch_array($DecimalPlacesResult); + } } echo ' ' . _('on') . ' ' . $_SESSION['PaymentDetail'.$identifier]->DatePaid . '</h3></th></tr>'; @@ -966,8 +985,13 @@ } echo 'value="', $myrow['accountcode'], '">', $myrow['bankaccountname'], ' - ', $myrow['currcode'], '</option>'; } - echo '</select></td> - </tr>'; + echo '</select>'; + + if (in_array($CashSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($CashSecurity)) { + echo ' (' . locale_number_format($CurrBalanceRow['balance'], $_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('Balance in account currency') . ')'; + } + + echo '</td></tr>'; } echo '<tr> @@ -979,7 +1003,6 @@ echo '<tr> <td>', _('Currency'), ':</td> <td>'; -/*$result = DB_query("SELECT currency, currabrev, rate FROM currencies");*/ $result = DB_query("SELECT currabrev FROM currencies"); if(DB_num_rows($result) == 0) { prnMsg( _('No currencies are defined yet. Payments cannot be entered until a currency is defined'),'error'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-09 16:30:48 UTC (rev 7911) +++ trunk/doc/Change.log 2018-01-09 20:10:44 UTC (rev 7912) @@ -1,5 +1,6 @@ webERP Change Log +9/1/18 Paul Becker (PaulT commit): Payments.php: Show bank balance at payments. Know that balance display/output is protected by a similar security check manner as protected information at the dashboard. (Reported in forums: http://weberp.org/forum/showthread.php?tid=8017) 9/1/18 Paul Becker (PaulT commit): Z_MakeNewCompany.php, default.sql, demo.sql: Remove doubled underscore in EDI_Sent reference. (Reported in forums: http://weberp.org/forum/showthread.php?tid=7920) 8/1/18 Paul Becker (PaulT commit): PDFTransPageHeader.inc, PDFTransPageHeaderPortrait.inc: Add additional address fields and/or adds an extra space between some address fields. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7942) 8/1/18 Tim (PaulT commit): PO_Items.php: Fix/improve Supplier checkbox handling, and fix a PHP7 compatibility issue. (Reported in forums by Confucius: http://www.weberp.org/forum/showthread.php?tid=7958) |
From: <tu...@us...> - 2018-01-09 20:15:51
|
Revision: 7913 http://sourceforge.net/p/web-erp/reponame/7913 Author: turbopt Date: 2018-01-09 20:15:49 +0000 (Tue, 09 Jan 2018) Log Message: ----------- Remove my debug/test echo line from the previous commit. [committed with SVN version 7912] Modified Paths: -------------- trunk/Payments.php trunk/doc/Change.log Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2018-01-09 20:10:44 UTC (rev 7912) +++ trunk/Payments.php 2018-01-09 20:15:49 UTC (rev 7913) @@ -66,7 +66,7 @@ $Security2Result = DB_query($SQL, $ErrMsg, $DbgMsg); $MyUserRow = DB_fetch_array($Security2Result); $CashSecurity = $MyUserRow['pagesecurity']; -echo 'CS: ' . $CashSecurity . '<br>'; + if(isset($_GET['SupplierID'])) { /*The page was called with a supplierID check it is valid and default the inputs for Supplier Name and currency of payment */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-09 20:10:44 UTC (rev 7912) +++ trunk/doc/Change.log 2018-01-09 20:15:49 UTC (rev 7913) @@ -1,5 +1,6 @@ webERP Change Log +9/1/18 PaulT: Payments.php: Remove my debug/test echo line from the previous commit. 9/1/18 Paul Becker (PaulT commit): Payments.php: Show bank balance at payments. Know that balance display/output is protected by a similar security check manner as protected information at the dashboard. (Reported in forums: http://weberp.org/forum/showthread.php?tid=8017) 9/1/18 Paul Becker (PaulT commit): Z_MakeNewCompany.php, default.sql, demo.sql: Remove doubled underscore in EDI_Sent reference. (Reported in forums: http://weberp.org/forum/showthread.php?tid=7920) 8/1/18 Paul Becker (PaulT commit): PDFTransPageHeader.inc, PDFTransPageHeaderPortrait.inc: Add additional address fields and/or adds an extra space between some address fields. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=7942) |
From: <dai...@us...> - 2018-01-11 07:49:12
|
Revision: 7914 http://sourceforge.net/p/web-erp/reponame/7914 Author: daintree Date: 2018-01-11 07:49:09 +0000 (Thu, 11 Jan 2018) Log Message: ----------- Files I had meant to commmit but missed Added Paths: ----------- trunk/BOMs_SingleLevel.php trunk/BankAccountBalances.php Added: trunk/BOMs_SingleLevel.php =================================================================== --- trunk/BOMs_SingleLevel.php (rev 0) +++ trunk/BOMs_SingleLevel.php 2018-01-11 07:49:09 UTC (rev 7914) @@ -0,0 +1,979 @@ +<?php + +/* $Id: BOMs.php 6942 2014-10-27 02:48:29Z daintree $*/ + +include('includes/session.inc'); + +$Title = _('Bill Of Materials Maintenance'); + +include('includes/header.inc'); +include('includes/SQL_CommonFunctions.inc'); + +function display_children($Parent, $Level, &$BOMTree) { + + global $db; + global $i; + + // retrive all children of parent + $c_result = DB_query("SELECT parent, + component + FROM bom + WHERE parent='" . $Parent. "' + ORDER BY sequence ASC"); + if (DB_num_rows($c_result) > 0) { + + while ($row = DB_fetch_array($c_result)) { + //echo '<br />Parent: ' . $Parent . ' Level: ' . $Level . ' row[component]: ' . $row['component'] . '<br />'; + if ($Parent != $row['component']) { + // indent and display the title of this child + $BOMTree[$i]['Level'] = $Level; // Level + if ($Level > 15) { + prnMsg(_('A maximum of 15 levels of bill of materials only can be displayed'),'error'); + exit; + } + $BOMTree[$i]['Parent'] = $Parent; // Assemble + $BOMTree[$i]['Component'] = $row['component']; // Component + $i++; + } + } + } +} + + +function CheckForRecursiveBOM ($UltimateParent, $ComponentToCheck, $db) { + +/* returns true ie 1 if the BOM contains the parent part as a component +ie the BOM is recursive otherwise false ie 0 */ + + $sql = "SELECT component FROM bom WHERE parent='".$ComponentToCheck."'"; + $ErrMsg = _('An error occurred in retrieving the components of the BOM during the check for recursion'); + $DbgMsg = _('The SQL that was used to retrieve the components of the BOM and that failed in the process was'); + $result = DB_query($sql,$ErrMsg,$DbgMsg); + + if (DB_num_rows($result)!=0) { + while ($myrow=DB_fetch_array($result)){ + if ($myrow['component']==$UltimateParent){ + return 1; + } + if (CheckForRecursiveBOM($UltimateParent, $myrow['component'],$db)){ + return 1; + } + } //(while loop) + } //end if $result is true + + return 0; + +} //end of function CheckForRecursiveBOM + +function DisplayBOMItems($UltimateParent, $Parent, $Component,$Level, $db) { + + global $ParentMBflag; + $sql = "SELECT bom.sequence, + bom.component, + stockmaster.description as itemdescription, + stockmaster.units, + locations.locationname, + locations.loccode, + workcentres.description as workcentrename, + workcentres.code as workcentrecode, + bom.quantity, + bom.effectiveafter, + bom.effectiveto, + stockmaster.mbflag, + bom.autoissue, + stockmaster.controlled, + locstock.quantity AS qoh, + stockmaster.decimalplaces + FROM bom INNER JOIN stockmaster + ON bom.component=stockmaster.stockid + INNER JOIN locations ON + bom.loccode = locations.loccode + INNER JOIN workcentres + ON bom.workcentreadded=workcentres.code + INNER JOIN locstock + ON bom.loccode=locstock.loccode + AND bom.component = locstock.stockid + INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 + WHERE bom.component='".$Component."' + AND bom.parent = '".$Parent."'"; + + $ErrMsg = _('Could not retrieve the BOM components because'); + $DbgMsg = _('The SQL used to retrieve the components was'); + $result = DB_query($sql,$ErrMsg,$DbgMsg); + + //echo $TableHeader; + $RowCounter =0; + + while ($myrow=DB_fetch_array($result)) { + + $Level1 = str_repeat('- ',$Level-1).$Level; + if( $myrow['mbflag']=='B' + OR $myrow['mbflag']=='K' + OR $myrow['mbflag']=='D') { + + $DrillText = '%s%s'; + $DrillLink = '<div class="centre">' . _('No lower levels') . '</div>'; + $DrillID=''; + } else { + $DrillText = '<a href="%s&Select=%s">' . _('Drill Down') . '</a>'; + $DrillLink = htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?'; + $DrillID=$myrow['component']; + } + if ($ParentMBflag!='M' AND $ParentMBflag!='G'){ + $AutoIssue = _('N/A'); + } elseif ($myrow['controlled']==0 AND $myrow['autoissue']==1){//autoissue and not controlled + $AutoIssue = _('Yes'); + } elseif ($myrow['controlled']==1) { + $AutoIssue = _('No'); + } else { + $AutoIssue = _('N/A'); + } + + if ($myrow['mbflag']=='D' //dummy orservice + OR $myrow['mbflag']=='K' //kit-set + OR $myrow['mbflag']=='A' // assembly + OR $myrow['mbflag']=='G') /* ghost */ { + + $QuantityOnHand = _('N/A'); + } else { + $QuantityOnHand = locale_number_format($myrow['qoh'],$myrow['decimalplaces']); + } + + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td class="number">%s</td> + <td><a href="%s&Select=%s&SelectedComponent=%s">' . _('Edit') . '</a></td> + <td><a href="%s&Select=%s&SelectedComponent=%s&delete=1&ReSelect=%s&Location=%s&WorkCentre=%s" onclick="return confirm(\'' . _('Are you sure you wish to delete this component from the bill of material?') . '\');">' . _('Delete') . '</a></td> + </tr>', + $myrow['sequence'], + $myrow['component'], + $myrow['itemdescription'], + $myrow['locationname'], + $myrow['workcentrename'], + locale_number_format($myrow['quantity'],'Variable'), + $myrow['units'], + ConvertSQLDate($myrow['effectiveafter']), + ConvertSQLDate($myrow['effectiveto']), + $AutoIssue, + $QuantityOnHand, + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', + $Parent, + $myrow['component'], + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', + $Parent, + $myrow['component'], + $UltimateParent, + $myrow['loccode'], + $myrow['workcentrecode']); + + } //END WHILE LIST LOOP +} //end of function DisplayBOMItems + +//--------------------------------------------------------------------------------- + +/* SelectedParent could come from a post or a get */ +if (isset($_GET['SelectedParent'])){ + $SelectedParent = $_GET['SelectedParent']; +}else if (isset($_POST['SelectedParent'])){ + $SelectedParent = $_POST['SelectedParent']; +} + + + +/* SelectedComponent could also come from a post or a get */ +if (isset($_GET['SelectedComponent'])){ + $SelectedComponent = $_GET['SelectedComponent']; +} elseif (isset($_POST['SelectedComponent'])){ + $SelectedComponent = $_POST['SelectedComponent']; +} + +/* delete function requires Location to be set */ +if (isset($_GET['Location'])){ + $Location = $_GET['Location']; +} elseif (isset($_POST['Location'])){ + $Location = $_POST['Location']; +} + +/* delete function requires WorkCentre to be set */ +if (isset($_GET['WorkCentre'])){ + $WorkCentre = $_GET['WorkCentre']; +} elseif (isset($_POST['WorkCentre'])){ + $WorkCentre = $_POST['WorkCentre']; +} + +if (isset($_GET['Select'])){ + $Select = $_GET['Select']; +} elseif (isset($_POST['Select'])){ + $Select = $_POST['Select']; +} + + +$msg=''; + +if (isset($Errors)) { + unset($Errors); +} + +$Errors = array(); +$InputError = 0; + +if (isset($Select)) { //Parent Stock Item selected so display BOM or edit Component + $SelectedParent = $Select; + unset($Select);// = NULL; + echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . + '" alt="" />' . ' ' . $Title . '</p><br />'; + + if (isset($SelectedParent) AND isset($_POST['Submit'])) { + + //editing a component need to do some validation of inputs + + $i = 1; + + if (!Is_Date($_POST['EffectiveAfter'])) { + $InputError = 1; + prnMsg(_('The effective after date field must be a date in the format') . ' ' .$_SESSION['DefaultDateFormat'],'error'); + $Errors[$i] = 'EffectiveAfter'; + $i++; + } + if (!Is_Date($_POST['EffectiveTo'])) { + $InputError = 1; + prnMsg(_('The effective to date field must be a date in the format') . ' ' .$_SESSION['DefaultDateFormat'],'error'); + $Errors[$i] = 'EffectiveTo'; + $i++; + } + if (!is_numeric(filter_number_format($_POST['Quantity']))) { + $InputError = 1; + prnMsg(_('The quantity entered must be numeric'),'error'); + $Errors[$i] = 'Quantity'; + $i++; + } + if (filter_number_format($_POST['Quantity'])==0) { + $InputError = 1; + prnMsg(_('The quantity entered cannot be zero'),'error'); + $Errors[$i] = 'Quantity'; + $i++; + } + if(!Date1GreaterThanDate2($_POST['EffectiveTo'], $_POST['EffectiveAfter'])){ + $InputError = 1; + prnMsg(_('The effective to date must be a date after the effective after date') . '<br />' . _('The effective to date is') . ' ' . DateDiff($_POST['EffectiveTo'], $_POST['EffectiveAfter'], 'd') . ' ' . _('days before the effective after date') . '! ' . _('No updates have been performed') . '.<br />' . _('Effective after was') . ': ' . $_POST['EffectiveAfter'] . ' ' . _('and effective to was') . ': ' . $_POST['EffectiveTo'],'error'); + $Errors[$i] = 'EffectiveAfter'; + $i++; + $Errors[$i] = 'EffectiveTo'; + $i++; + } + if($_POST['AutoIssue']==1 AND isset($_POST['Component'])){ + $sql = "SELECT controlled FROM stockmaster WHERE stockid='" . $_POST['Component'] . "'"; + $CheckControlledResult = DB_query($sql); + $CheckControlledRow = DB_fetch_row($CheckControlledResult); + if ($CheckControlledRow[0]==1){ + prnMsg(_('Only non-serialised or non-lot controlled items can be set to auto issue. These items require the lot/serial numbers of items issued to the works orders to be specified so autoissue is not an option. Auto issue has been automatically set to off for this component'),'warn'); + $_POST['AutoIssue']=0; + } + } + + if (!in_array('EffectiveAfter', $Errors)) { + $EffectiveAfterSQL = FormatDateForSQL($_POST['EffectiveAfter']); + } + if (!in_array('EffectiveTo', $Errors)) { + $EffectiveToSQL = FormatDateForSQL($_POST['EffectiveTo']); + } + + if (isset($SelectedParent) AND isset($SelectedComponent) AND $InputError != 1) { + + + $sql = "UPDATE bom SET sequence='" . $_POST['Sequence'] . "', + workcentreadded='" . $_POST['WorkCentreAdded'] . "', + loccode='" . $_POST['LocCode'] . "', + effectiveafter='" . $EffectiveAfterSQL . "', + effectiveto='" . $EffectiveToSQL . "', + quantity= '" . filter_number_format($_POST['Quantity']) . "', + autoissue='" . $_POST['AutoIssue'] . "' + WHERE bom.parent='" . $SelectedParent . "' + AND bom.component='" . $SelectedComponent . "'"; + + $ErrMsg = _('Could not update this BOM component because'); + $DbgMsg = _('The SQL used to update the component was'); + + $result = DB_query($sql,$ErrMsg,$DbgMsg); + $msg = _('Details for') . ' - ' . $SelectedComponent . ' ' . _('have been updated') . '.'; + UpdateCost($db, $SelectedComponent); + + } elseif ($InputError !=1 AND ! isset($SelectedComponent) AND isset($SelectedParent)) { + + /*Selected component is null cos no item selected on first time round so must be adding a record must be Submitting new entries in the new component form */ + + //need to check not recursive BOM component of itself! + + if (!CheckForRecursiveBOM ($SelectedParent, $_POST['Component'], $db)) { + + /*Now check to see that the component is not already on the BOM */ + $sql = "SELECT component + FROM bom + WHERE parent='".$SelectedParent."' + AND component='" . $_POST['Component'] . "' + AND workcentreadded='" . $_POST['WorkCentreAdded'] . "' + AND loccode='" . $_POST['LocCode'] . "'" ; + + $ErrMsg = _('An error occurred in checking the component is not already on the BOM'); + $DbgMsg = _('The SQL that was used to check the component was not already on the BOM and that failed in the process was'); + + $result = DB_query($sql,$ErrMsg,$DbgMsg); + + if (DB_num_rows($result)==0) { + + $sql = "INSERT INTO bom (sequence, + parent, + component, + workcentreadded, + loccode, + quantity, + effectiveafter, + effectiveto, + autoissue) + VALUES ('" . $_POST['Sequence'] . "', + '".$SelectedParent."', + '" . $_POST['Component'] . "', + '" . $_POST['WorkCentreAdded'] . "', + '" . $_POST['LocCode'] . "', + " . filter_number_format($_POST['Quantity']) . ", + '" . $EffectiveAfterSQL . "', + '" . $EffectiveToSQL . "', + " . $_POST['AutoIssue'] . ")"; + + $ErrMsg = _('Could not insert the BOM component because'); + $DbgMsg = _('The SQL used to insert the component was'); + + $result = DB_query($sql,$ErrMsg,$DbgMsg); + + UpdateCost($db, $_POST['Component']); + $msg = _('A new component part') . ' ' . $_POST['Component'] . ' ' . _('has been added to the bill of material for part') . ' - ' . $SelectedParent . '.'; + + } else { + + /*The component must already be on the BOM */ + + prnMsg( _('The component') . ' ' . $_POST['Component'] . ' ' . _('is already recorded as a component of') . ' ' . $SelectedParent . '.' . '<br />' . _('Whilst the quantity of the component required can be modified it is inappropriate for a component to appear more than once in a bill of material'),'error'); + $Errors[$i]='ComponentCode'; + } + + + } //end of if its not a recursive BOM + + } //end of if no input errors + + if ($msg != '') {prnMsg($msg,'success');} + + } elseif (isset($_GET['delete']) AND isset($SelectedComponent) AND isset($SelectedParent)) { + + //the link to delete a selected record was clicked instead of the Submit button + + $sql="DELETE FROM bom + WHERE parent='".$SelectedParent."' + AND component='".$SelectedComponent."' + AND loccode='".$Location."' + AND workcentreadded='".$WorkCentre."'"; + + $ErrMsg = _('Could not delete this BOM components because'); + $DbgMsg = _('The SQL used to delete the BOM was'); + $result = DB_query($sql,$ErrMsg,$DbgMsg); + + $ComponentSQL = "SELECT component + FROM bom + WHERE parent='" . $SelectedParent ."'"; + $ComponentResult = DB_query($ComponentSQL); + $ComponentArray = DB_fetch_row($ComponentResult); + UpdateCost($db, $ComponentArray[0]); + + prnMsg(_('The component part') . ' - ' . $SelectedComponent . ' - ' . _('has been deleted from this BOM'),'success'); + // Now reset to enable New Component Details to display after delete + unset($_GET['SelectedComponent']); + } elseif (isset($SelectedParent) + AND !isset($SelectedComponent) + AND ! isset($_POST['submit'])) { + + /* It could still be the second time the page has been run and a record has been selected for modification - SelectedParent will exist because it was sent with the new call. if its the first time the page has been displayed with no parameters then none of the above are true and the list of components will be displayed with links to delete or edit each. These will call the same page again and allow update/input or deletion of the records*/ + //DisplayBOMItems($SelectedParent, $db); + + } //BOM editing/insertion ifs + + + if(isset($_GET['ReSelect'])) { + $SelectedParent = $_GET['ReSelect']; + } + + //DisplayBOMItems($SelectedParent, $db); + $sql = "SELECT stockmaster.description, + stockmaster.mbflag + FROM stockmaster + WHERE stockmaster.stockid='" . $SelectedParent . "'"; + + $ErrMsg = _('Could not retrieve the description of the parent part because'); + $DbgMsg = _('The SQL used to retrieve description of the parent part was'); + $result=DB_query($sql,$ErrMsg,$DbgMsg); + + $myrow=DB_fetch_row($result); + + $ParentMBflag = $myrow[1]; + + switch ($ParentMBflag){ + case 'A': + $MBdesc = _('Assembly'); + break; + case 'B': + $MBdesc = _('Purchased'); + break; + case 'M': + $MBdesc = _('Manufactured'); + break; + case 'K': + $MBdesc = _('Kit Set'); + break; + case 'G': + $MBdesc = _('Phantom'); + break; + } + + echo '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Select a Different BOM') . '</a></div><br />'; + // Display Manufatured Parent Items + $sql = "SELECT bom.parent, + stockmaster.description, + stockmaster.mbflag + FROM bom INNER JOIN locationusers ON locationusers.loccode=bom.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1, stockmaster + WHERE bom.component='".$SelectedParent."' + AND stockmaster.stockid=bom.parent + AND stockmaster.mbflag='M'"; + + $ErrMsg = _('Could not retrieve the description of the parent part because'); + $DbgMsg = _('The SQL used to retrieve description of the parent part was'); + $result=DB_query($sql,$ErrMsg,$DbgMsg); + $ix = 0; + if( DB_num_rows($result) > 0 ) { + echo '<table class="selection">'; + echo '<tr><td><div class="centre">' . _('Manufactured parent items').' : '; + while ($myrow = DB_fetch_array($result)){ + echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . + $myrow['description'].' ('.$myrow['parent'].')</a>'; + $ix++; + } //end while loop + echo '</div></td></tr>'; + echo '</table>'; + } + // Display Assembly Parent Items + $sql = "SELECT bom.parent, + stockmaster.description, + stockmaster.mbflag + FROM bom INNER JOIN stockmaster + ON bom.parent=stockmaster.stockid + WHERE bom.component='".$SelectedParent."' + AND stockmaster.mbflag='A'"; + + $ErrMsg = _('Could not retrieve the description of the parent part because'); + $DbgMsg = _('The SQL used to retrieve description of the parent part was'); + $result=DB_query($sql,$ErrMsg,$DbgMsg); + if( DB_num_rows($result) > 0 ) { + echo '<table class="selection">'; + echo '<tr><td><div class="centre">' . _('Assembly parent items').' : '; + $ix = 0; + while ($myrow = DB_fetch_array($result)){ + echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . + $myrow['description'].' ('.$myrow['parent'].')</a>'; + $ix++; + } //end while loop + echo '</div></td></tr>'; + echo '</table>'; + } + // Display Kit Sets + $sql = "SELECT bom.parent, + stockmaster.description, + stockmaster.mbflag + FROM bom INNER JOIN stockmaster + ON bom.parent=stockmaster.stockid + INNER JOIN locationusers ON locationusers.loccode=bom.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 + WHERE bom.component='".$SelectedParent."' + AND stockmaster.mbflag='K'"; + + $ErrMsg = _('Could not retrieve the description of the parent part because'); + $DbgMsg = _('The SQL used to retrieve description of the parent part was'); + $result=DB_query($sql,$ErrMsg,$DbgMsg); + if( DB_num_rows($result) > 0 ) { + echo '<table class="selection">'; + echo '<tr><td><div class="centre">' . _('Kit sets').' : '; + $ix = 0; + while ($myrow = DB_fetch_array($result)){ + echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . + $myrow['description'].' ('.$myrow['parent'].')</a>'; + $ix++; + } //end while loop + echo '</div></td></tr>'; + echo '</table>'; + } + // Display Phantom/Ghosts + $sql = "SELECT bom.parent, + stockmaster.description, + stockmaster.mbflag + FROM bom INNER JOIN stockmaster + ON bom.parent=stockmaster.stockid + WHERE bom.component='".$SelectedParent."' + AND stockmaster.mbflag='G'"; + + $ErrMsg = _('Could not retrieve the description of the parent part because'); + $DbgMsg = _('The SQL used to retrieve description of the parent part was'); + $result=DB_query($sql,$ErrMsg,$DbgMsg); + if( DB_num_rows($result) > 0 ) { + echo '<table class="selection"> + <tr> + <td><div class="centre">' . _('Phantom').' : '; + $ix = 0; + while ($myrow = DB_fetch_array($result)){ + echo (($ix)?', ':'') . '<a href="'.htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select='.$myrow['parent'].'">' . $myrow['description'].' ('.$myrow['parent'].')</a>'; + $ix++; + } //end while loop + echo '</div></td> + </tr> + </table>'; + } + echo '<br /> + <table class="selection">'; + echo '<tr> + <th colspan="13"><div class="centre"><b>' . $SelectedParent .' - ' . $myrow[0] . ' ('. $MBdesc. ') </b></div></th> + </tr>'; + + $BOMTree = array(); + //BOMTree is a 2 dimensional array with three elements for each item in the array - Level, Parent, Component + //display children populates the BOM_Tree from the selected parent + $i =0; + display_children($SelectedParent, 1, $BOMTree); + + $TableHeader = '<tr> + <th>' . _('Sequence') . '</th> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Location') . '</th> + <th>' . _('Work Centre') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('UOM') . '</th> + <th>' . _('Effective After') . '</th> + <th>' . _('Effective To') . '</th> + <th>' . _('Auto Issue') . '</th> + <th>' . _('Qty On Hand') . '</th> + </tr>'; + echo $TableHeader; + if(count($BOMTree) == 0) { + echo '<tr class="OddTableRows"> + <td colspan="8">' . _('No materials found.') . '</td> + </tr>'; + } else { + $UltimateParent = $SelectedParent; + $k = 0; + $RowCounter = 1; + $BOMTree = arrayUnique($BOMTree); + foreach($BOMTree as $BOMItem){ + $Level = $BOMItem['Level']; + $Parent = $BOMItem['Parent']; + $Component = $BOMItem['Component']; + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + }else { + echo '<tr class="OddTableRows">'; + $k++; + } + DisplayBOMItems($UltimateParent, $Parent, $Component, $Level, $db); + } + } + echo '</table> + <br />'; + /* We do want to show the new component entry form in any case - it is a lot of work to get back to it otherwise if we need to add */ + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?Select=' . $SelectedParent .'">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + if (isset($_GET['SelectedComponent']) AND $InputError !=1) { + //editing a selected component from the link to the line item + + $sql = "SELECT sequence, + bom.loccode, + effectiveafter, + effectiveto, + workcentreadded, + quantity, + autoissue + FROM bom + INNER JOIN locationusers ON locationusers.loccode=bom.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 + WHERE parent='".$SelectedParent."' + AND component='".$SelectedComponent."'"; + + $result = DB_query($sql); + $myrow = DB_fetch_array($result); + + $_POST['Sequence'] = $myrow['sequence']; + $_POST['LocCode'] = $myrow['loccode']; + $_POST['EffectiveAfter'] = ConvertSQLDate($myrow['effectiveafter']); + $_POST['EffectiveTo'] = ConvertSQLDate($myrow['effectiveto']); + $_POST['WorkCentreAdded'] = $myrow['workcentreadded']; + $_POST['Quantity'] = locale_number_format($myrow['quantity'],'Variable'); + $_POST['AutoIssue'] = $myrow['autoissue']; + + prnMsg(_('Edit the details of the selected component in the fields below') . '. <br />' . _('Click on the Enter Information button to update the component details'),'info'); + echo '<br /> + <input type="hidden" name="SelectedParent" value="' . $SelectedParent . '" />'; + echo '<input type="hidden" name="SelectedComponent" value="' . $SelectedComponent . '" />'; + echo '<table class="selection">'; + echo '<tr> + <th colspan="13"><div class="centre"><b>' . ('Edit Component Details') . '</b></div></th> + </tr>'; + echo '<tr> + <td>' . _('Component') . ':</td> + <td><b>' . $SelectedComponent . '</b></td> + <input type="hidden" name="Component" value="' . $SelectedComponent . '" /> + </tr>'; + + } else { //end of if $SelectedComponent + $_POST['Sequence'] = 0; + echo '<input type="hidden" name="SelectedParent" value="' . $SelectedParent . '" />'; + /* echo "Enter the details of a new component in the fields below. <br />Click on 'Enter Information' to add the new component, once all fields are completed."; + */ + echo '<table class="selection">'; + echo '<tr> + <th colspan="13"><div class="centre"><b>' . _('New Component Details') . '</b></div></th> + </tr>'; + echo '<tr> + <td>' . _('Component code') . ':</td> + <td>'; + echo '<select ' . (in_array('ComponentCode',$Errors) ? 'class="selecterror"' : '' ) .' tabindex="1" name="Component">'; + + if ($ParentMBflag=='A'){ /*Its an assembly */ + $sql = "SELECT stockmaster.stockid, + stockmaster.description + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid = stockcategory.categoryid + WHERE ((stockcategory.stocktype='L' AND stockmaster.mbflag ='D') + OR stockmaster.mbflag !='D') + AND stockmaster.mbflag !='K' + AND stockmaster.mbflag !='A' + AND stockmaster.controlled = 0 + AND stockmaster.stockid != '".$SelectedParent."' + ORDER BY stockmaster.stockid"; + + } else { /*Its either a normal manufac item, phantom, kitset - controlled items ok */ + $sql = "SELECT stockmaster.stockid, + stockmaster.description + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid = stockcategory.categoryid + WHERE ((stockcategory.stocktype='L' AND stockmaster.mbflag ='D') + OR stockmaster.mbflag !='D') + AND stockmaster.mbflag !='K' + AND stockmaster.mbflag !='A' + AND stockmaster.stockid != '".$SelectedParent."' + ORDER BY stockmaster.stockid"; + } + + $ErrMsg = _('Could not retrieve the list of potential components because'); + $DbgMsg = _('The SQL used to retrieve the list of potential components part was'); + $result = DB_query($sql,$ErrMsg, $DbgMsg); + + + while ($myrow = DB_fetch_array($result)) { + echo '<option value="' .$myrow['stockid'].'">' . str_pad($myrow['stockid'],21, '_', STR_PAD_RIGHT) . $myrow['description'] . '</option>'; + } //end while loop + + echo '</select></td> + </tr>'; + } + echo '<tr> + <td>' . _('Sequence in BOM') . ':</td> + <td><input type="text" class="integer" required="required" size="5" name="Sequence" value="' . $_POST['Sequence'] . '" /></td> + </tr>'; + + echo '<tr> + <td>' . _('Location') . ': </td> + <td><select tabindex="2" name="LocCode">'; + + DB_free_result($result); + $sql = "SELECT locationname, + locations.loccode + FROM locations + INNER JOIN locationusers + ON locationusers.loccode=locations.loccode + AND locationusers.userid='" . $_SESSION['UserID'] . "' + AND locationusers.canupd=1 + WHERE locations.usedforwo = 1"; + $result = DB_query($sql); + + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['LocCode']) AND $myrow['loccode']==$_POST['LocCode']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $myrow['loccode'] . '">' . $myrow['locationname'] . '</option>'; + + } //end while loop + + DB_free_result($result); + + echo '</select></td> + </tr> + <tr> + <td>' . _('Work Centre Added') . ': </td><td>'; + + $sql = "SELECT code, description FROM workcentres INNER JOIN locationusers ON locationusers.loccode=workcentres.location AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1"; + $result = DB_query($sql); + + if (DB_num_rows($result)==0){ + prnMsg( _('There are no work centres set up yet') . '. ' . _('Please use the link below to set up work centres') . '.','warn'); + echo '<a href="' . $RootPath . '/WorkCentres.php">' . _('Work Centre Maintenance') . '</a></td></tr></table><br />'; + include('includes/footer.inc'); + exit; + } + + echo '<select tabindex="3" name="WorkCentreAdded">'; + + while ($myrow = DB_fetch_array($result)) { + if (isset($_POST['WorkCentreAdded']) AND $myrow['code']==$_POST['WorkCentreAdded']) { + echo '<option selected="selected" value="'; + } else { + echo '<option value="'; + } + echo $myrow['code'] . '">' . $myrow['description'] . '</option>'; + } //end while loop + + DB_free_result($result); + + echo '</select></td> + </tr> + <tr> + <td>' . _('Quantity') . ': </td> + <td><input ' . (in_array('Quantity',$Errors) ? 'class="inputerror"' : '' ) .' tabindex="4" type="text" class="number" required="required" name="Quantity" size="10" maxlength="8" title="' . _('Enter the quantity of this item required for the parent item') . '" value="'; + if (isset($_POST['Quantity'])){ + echo $_POST['Quantity']; + } else { + echo 1; + } + + echo '" /></td> + </tr>'; + + if (!isset($_POST['EffectiveTo']) OR $_POST['EffectiveTo']=='') { + $_POST['EffectiveTo'] = Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m'),Date('d'),(Date('y')+20))); + } + if (!isset($_POST['EffectiveAfter']) OR $_POST['EffectiveAfter']=='') { + $_POST['EffectiveAfter'] = Date($_SESSION['DefaultDateFormat'],Mktime(0,0,0,Date('m'),Date('d')-1,Date('y'))); + } + + echo '<tr> + <td>' . _('Effective After') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input ' . (in_array('EffectiveAfter',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex="5" type="text" required="required" name="EffectiveAfter" class="date" alt="' .$_SESSION['DefaultDateFormat'] .'" size="11" maxlength="10" value="' . $_POST['EffectiveAfter'] .'" /></td> + </tr> + <tr> + <td>' . _('Effective To') . ' (' . $_SESSION['DefaultDateFormat'] . '):</td> + <td><input ' . (in_array('EffectiveTo',$Errors) ? 'class="inputerror"' : '' ) . ' tabindex="6" type="text" name="EffectiveTo" class="date" alt="' .$_SESSION['DefaultDateFormat'] . '" size="11" maxlength="10" value="' . $_POST['EffectiveTo'] .'" /></td> + </tr>'; + + if ($ParentMBflag=='M' OR $ParentMBflag=='G'){ + echo '<tr> + <td>' . _('Auto Issue this Component to Work Orders') . ':</td> + <td> + <select tabindex="7" name="AutoIssue">'; + + if (!isset($_POST['AutoIssue'])){ + $_POST['AutoIssue'] = $_SESSION['AutoIssue']; + } + if ($_POST['AutoIssue']==0) { + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + echo '<option value="1">' . _('Yes') . '</option>'; + } else { + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + echo '<option value="0">' . _('No') . '</option>'; + } + + + echo '</select></td> + </tr>'; + } else { + echo '<input type="hidden" name="AutoIssue" value="0" />'; + } + + echo '</table> + <br /> + <div class="centre"> + <input tabindex="8" type="submit" name="Submit" value="' . _('Enter Information') . '" /> + </div> + </div> + </form>'; + + + // end of BOM maintenance code - look at the parent selection form if not relevant +// ---------------------------------------------------------------------------------- + +} elseif (isset($_POST['Search'])){ + // Work around to auto select + if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { + $_POST['StockCode']='%'; + } + if ($_POST['Keywords'] AND $_POST['StockCode']) { + prnMsg( _('Stock description keywords have been used in preference to the Stock code extract entered'), 'info' ); + } + if ($_POST['Keywords']=='' AND $_POST['StockCode']=='') { + prnMsg( _('At least one stock description keyword or an extract of a stock code must be entered for the search'), 'info' ); + } else { + if (mb_strlen($_POST['Keywords'])>0) { + //insert wildcard characters in spaces + $SearchString = '%' . str_replace(' ', '%', $_POST['Keywords']) . '%'; + + $sql = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + stockmaster.mbflag, + SUM(locstock.quantity) as totalonhand + FROM stockmaster INNER JOIN locstock + ON stockmaster.stockid = locstock.stockid + WHERE stockmaster.description " . LIKE . " '".$SearchString."' + AND (stockmaster.mbflag='M' OR stockmaster.mbflag='K' OR stockmaster.mbflag='A' OR stockmaster.mbflag='G') + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces, + stockmaster.mbflag + ORDER BY stockmaster.stockid"; + + } elseif (mb_strlen($_POST['StockCode'])>0){ + $sql = "SELECT stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.decimalplaces, + sum(locstock.quantity) as totalonhand + FROM stockmaster INNER JOIN locstock + ON stockmaster.stockid = locstock.stockid + WHERE stockmaster.stockid " . LIKE . "'%" . $_POST['StockCode'] . "%' + AND (stockmaster.mbflag='M' + OR stockmaster.mbflag='K' + OR stockmaster.mbflag='G' + OR stockmaster.mbflag='A') + GROUP BY stockmaster.stockid, + stockmaster.description, + stockmaster.units, + stockmaster.mbflag, + stockmaster.decimalplaces + ORDER BY stockmaster.stockid"; + + } + + $ErrMsg = _('The SQL to find the parts selected failed with the message'); + $result = DB_query($sql,$ErrMsg); + + } //one of keywords or StockCode was more than a zero length string +} //end of if search + +if (!isset($SelectedParent)) { + + echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/magnifier.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">' . + '<div class="page_help_text">' . _('Select a manufactured part') . ' (' . _('or Assembly or Kit part') . ') ' . _('to maintain the bill of material for using the options below') . '<br />' . _('Parts must be defined in the stock item entry') . '/' . _('modification screen as manufactured') . ', ' . _('kits or assemblies to be available for construction of a bill of material') . '</div>' . ' + <div> + <br /> + <table class="selection" cellpadding="3"> + <tr><td>' . _('Enter text extracts in the') . ' <b>' . _('description') . '</b>:</td> + <td><input tabindex="1" type="text" name="Keywords" size="20" maxlength="25" /></td> + <td><b>' . _('OR') . '</b></td> + <td>' . _('Enter extract of the') . ' <b>' . _('Stock Code') . '</b>:</td> + <td><input tabindex="2" type="text" name="StockCode" autofocus="autofocus" size="15" maxlength="18" /></td> + </tr> + </table> + <br /><div class="centre"><input tabindex="3" type="submit" name="Search" value="' . _('Search Now') . '" /></div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + if (isset($_POST['Search']) + AND isset($result) + AND !isset($SelectedParent)) { + + echo '<br /> + <table cellpadding="2" class="selection">'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('On Hand') . '</th> + <th>' . _('Units') . '</th> + </tr>'; + + echo $TableHeader; + + $j = 1; + $k=0; //row colour counter + while ($myrow=DB_fetch_array($result)) { + if ($k==1){ + echo '<tr class="EvenTableRows">';; + $k=0; + } else { + echo '<tr class="OddTableRows">';; + $k++; + } + if ($myrow['mbflag']=='A' OR $myrow['mbflag']=='K' OR $myrow['mbflag']=='G'){ + $StockOnHand = _('N/A'); + } else { + $StockOnHand = locale_number_format($myrow['totalonhand'],$myrow['decimalplaces']); + } + $tab = $j+3; + printf('<td><input tabindex="' . $tab . '" type="submit" name="Select" value="%s" /></td> + <td>%s</td> + <td class="number">%s</td> + <td>%s</td> + </tr>', + $myrow['stockid'], + $myrow['description'], + $StockOnHand, + $myrow['units']); + + $j++; + //end of page full new headings if + } + //end of while loop + + echo '</table>'; + + } + //end if results to show + + echo '</div>'; + echo '</form>'; + + } //end StockID already selected +// This function created by Dominik Jungowski on PHP developer blog +function arrayUnique($array, $preserveKeys = false) +{ + //Unique Array for return + $arrayRewrite = array(); + //Array with the md5 hashes + $arrayHashes = array(); + foreach($array as $key => $item) { + // Serialize the current element and create a md5 hash + $hash = md5(serialize($item)); + // If the md5 didn't come up yet, add the element to + // arrayRewrite, otherwise drop it + if (!isset($arrayHashes[$hash])) { + // Save the current element hash + $arrayHashes[$hash] = $hash; + //Add element to the unique Array + if ($preserveKeys) { + $arrayRewrite[$key] = $item; + } else { + $arrayRewrite[] = $item; + } + } + } + return $arrayRewrite; +} + +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/BankAccountBalances.php =================================================================== --- trunk/BankAccountBalances.php (rev 0) +++ trunk/BankAccountBalances.php 2018-01-11 07:49:09 UTC (rev 7914) @@ -0,0 +1,59 @@ +<?php + +include('includes/session.php'); + +$Title = _('List of bank account balances'); +/* Manual links before header.php */ +$ViewTopic = 'GeneralLedger'; +$BookMark = ''; +include('includes/header.php'); + +echo '<p class="page_title_text"><img src="', $RootPath, '/css/', $_SESSION['Theme'], '/images/bank.png" title="', _('Bank Account Balances'), '" alt="" /> ', + _('Bank Account Balances'), ' + </p< + table> + <tr> + <th>', _('Bank Account'), '</th> + <th>', _('Account Name'), '</th> + <th>', _('Balance in account currency'), '</th> + <th>', _('Balance in functional currency'), '</th> + </tr>'; + +$SQL = "SELECT bankaccounts.accountcode, + currcode, + bankaccountname + FROM bankaccounts + INNER JOIN bankaccountusers + ON bankaccounts.accountcode=bankaccountusers.accountcode + AND userid='" . $_SESSION['UserID'] . "'"; +$Result = DB_query($SQL); + +if (DB_num_rows($Result) == 0) { + echo _('There are no bank accounts defined that you have authority to see'); +} else { + + while ($MyBankRow = DB_fetch_array($Result)) { + $CurrBalanceSQL = "SELECT SUM(amount) AS balance FROM banktrans WHERE bankact='" . $MyBankRow['accountcode'] . "'"; + $CurrBalanceResult = DB_query($CurrBalanceSQL); + $CurrBalanceRow = DB_fetch_array($CurrBalanceResult); + + $FuncBalanceSQL = "SELECT SUM(amount) AS balance FROM gltrans WHERE account='" . $MyBankRow['accountcode'] . "'"; + $FuncBalanceResult = DB_query($FuncBalanceSQL); + $FuncBalanceRow = DB_fetch_array($FuncBalanceResult); + + $DecimalPlacesSQL = "SELECT decimalplaces FROM currencies WHERE currabrev='" . $MyBankRow['currcode'] . "'"; + $DecimalPlacesResult = DB_query($DecimalPlacesSQL); + $DecimalPlacesRow = DB_fetch_array($DecimalPlacesResult); + + echo '<tr class="selection"> + <td>', $MyBankRow['accountcode'], '</td> + <td>', $MyBankRow['bankaccountname'], '</td> + <td class="number">', locale_number_format($CurrBalanceRow['balance'], $DecimalPlacesRow['decimalplaces']), ' ', $MyBankRow['currcode'], '</td> + <td class="number">', locale_number_format($FuncBalanceRow['balance'], $_SESSION['CompanyRecord']['decimalplaces']), ' ', $_SESSION['CompanyRecord']['currencydefault'], '</td> + </tr>'; + } + + echo '</table>'; +} +include('includes/footer.php'); +?> \ No newline at end of file |
From: <tu...@us...> - 2018-01-12 22:59:09
|
Revision: 7916 http://sourceforge.net/p/web-erp/reponame/7916 Author: turbopt Date: 2018-01-12 22:59:06 +0000 (Fri, 12 Jan 2018) Log Message: ----------- CustomerPurchases.php: Fix script to show actual Price and actual Amount of Sale based upon discount. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) Modified Paths: -------------- trunk/CustomerPurchases.php trunk/doc/Change.log Modified: trunk/CustomerPurchases.php =================================================================== --- trunk/CustomerPurchases.php 2018-01-11 08:08:07 UTC (rev 7915) +++ trunk/CustomerPurchases.php 2018-01-12 22:59:06 UTC (rev 7916) @@ -45,6 +45,7 @@ price, reference, qty, + discountpercent, narrative FROM stockmoves INNER JOIN stockmaster @@ -99,9 +100,9 @@ <td class="number">' . $StockMovesRow['transno'] . '</td> <td>' . $StockMovesRow['locationname'] . '</td> <td>' . $StockMovesRow['branchcode'] . '</td> - <td class="number">' . locale_number_format($StockMovesRow['price'], $_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format($StockMovesRow['price'] * (1 - $StockMovesRow['discountpercent']), $_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . locale_number_format(-$StockMovesRow['qty'], $_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format((-$StockMovesRow['qty'] * $StockMovesRow['price']), $_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format((-$StockMovesRow['qty'] * $StockMovesRow['price'] * (1 - $StockMovesRow['discountpercent'])), $_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . $StockMovesRow['reference'] . '</td> <td>' . $StockMovesRow['narrative'] . '</td> </tr>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-11 08:08:07 UTC (rev 7915) +++ trunk/doc/Change.log 2018-01-12 22:59:06 UTC (rev 7916) @@ -1,5 +1,6 @@ webERP Change Log +12/1/18 Paul Becker (PaulT commit): CustomerPurchases.php: Fix script to show actual Price and actual Amount of Sale based upon discount. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) 9/1/18 PaulT: Payments.php: Remove my debug/test echo line from the previous commit. 9/1/18 Paul Becker (PaulT commit): Payments.php: Show bank balance at payments. Know that balance display/output is protected by a similar security check manner as protected information at the dashboard. (Reported in forums: http://weberp.org/forum/showthread.php?tid=8017) 9/1/18 Paul Becker (PaulT commit): Z_MakeNewCompany.php, default.sql, demo.sql: Remove doubled underscore in EDI_Sent reference. (Reported in forums: http://weberp.org/forum/showthread.php?tid=7920) |
From: <tu...@us...> - 2018-01-15 22:41:54
|
Revision: 7917 http://sourceforge.net/p/web-erp/reponame/7917 Author: turbopt Date: 2018-01-15 22:41:51 +0000 (Mon, 15 Jan 2018) Log Message: ----------- CustomerPurchases.php: Adds Units and Discount columns and other minor changes so that it more closely matches output from OrderDetails.php. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) Modified Paths: -------------- trunk/CustomerPurchases.php trunk/doc/Change.log Modified: trunk/CustomerPurchases.php =================================================================== --- trunk/CustomerPurchases.php 2018-01-12 22:59:06 UTC (rev 7916) +++ trunk/CustomerPurchases.php 2018-01-15 22:41:51 UTC (rev 7917) @@ -37,6 +37,7 @@ $SQL = "SELECT stockmoves.stockid, stockmaster.description, + stockmaster.units, systypes.typename, transno, locations.locationname, @@ -84,9 +85,11 @@ <th>' . _('Transaction No.') . '</th> <th>' . _('From Location') . '</th> <th>' . _('Branch Code') . '</th> + <th>' . _('Quantity') . '</th> + <th>' . _('Unit') . '</th> <th>' . _('Price') . '</th> - <th>' . _('Quantity') . '</th> - <th>' . _('Amount of Sale') . '</th> + <th>' . _('Discount') . '</th> + <th>' . _('Total') . '</th> <th>' . _('Reference') . '</th> <th>' . _('Narrative') . '</th> </tr>'; @@ -100,8 +103,10 @@ <td class="number">' . $StockMovesRow['transno'] . '</td> <td>' . $StockMovesRow['locationname'] . '</td> <td>' . $StockMovesRow['branchcode'] . '</td> + <td class="number">' . -$StockMovesRow['qty'] . '</td> + <td>' . $StockMovesRow['units'] . '</td> <td class="number">' . locale_number_format($StockMovesRow['price'] * (1 - $StockMovesRow['discountpercent']), $_SESSION['CompanyRecord']['decimalplaces']) . '</td> - <td class="number">' . locale_number_format(-$StockMovesRow['qty'], $_SESSION['CompanyRecord']['decimalplaces']) . '</td> + <td class="number">' . locale_number_format(($StockMovesRow['discountpercent'] * 100),2) . '%' . '</td> <td class="number">' . locale_number_format((-$StockMovesRow['qty'] * $StockMovesRow['price'] * (1 - $StockMovesRow['discountpercent'])), $_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td class="number">' . $StockMovesRow['reference'] . '</td> <td>' . $StockMovesRow['narrative'] . '</td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-12 22:59:06 UTC (rev 7916) +++ trunk/doc/Change.log 2018-01-15 22:41:51 UTC (rev 7917) @@ -1,5 +1,6 @@ webERP Change Log +15/1/18 Paul Becker (PaulT commit): CustomerPurchases.php: Adds Units and Discount columns and other minor changes so that it more closely matches output from OrderDetails.php. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) 12/1/18 Paul Becker (PaulT commit): CustomerPurchases.php: Fix script to show actual Price and actual Amount of Sale based upon discount. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) 9/1/18 PaulT: Payments.php: Remove my debug/test echo line from the previous commit. 9/1/18 Paul Becker (PaulT commit): Payments.php: Show bank balance at payments. Know that balance display/output is protected by a similar security check manner as protected information at the dashboard. (Reported in forums: http://weberp.org/forum/showthread.php?tid=8017) |
From: <tu...@us...> - 2018-01-24 17:16:47
|
Revision: 7918 http://sourceforge.net/p/web-erp/reponame/7918 Author: turbopt Date: 2018-01-24 17:16:45 +0000 (Wed, 24 Jan 2018) Log Message: ----------- SelectOrderItems.php: Paul B. Remove stray value output / PaulT. Replace hard-coded style with existing CSS class. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057) Modified Paths: -------------- trunk/SelectOrderItems.php trunk/doc/Change.log Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2018-01-15 22:41:51 UTC (rev 7917) +++ trunk/SelectOrderItems.php 2018-01-24 17:16:45 UTC (rev 7918) @@ -1351,7 +1351,7 @@ echo '<div class="page_help_text">' . _('Quantity (required) - Enter the number of units ordered. Price (required) - Enter the unit price. Discount (optional) - Enter a percentage discount. GP% (optional) - Enter a percentage Gross Profit (GP) to add to the unit cost. Due Date (optional) - Enter a date for delivery.') . '</div><br />'; echo '<br /> <table width="90%" cellpadding="2"> - <tr style="background-color:#800000">'; + <tr class="tableheader">'; /* if($_SESSION['Items'.$identifier]->DefaultPOLine == 1){*/ if($ShowPOLine) { echo '<th>' . _('PO Line') . '</th>'; @@ -1471,7 +1471,6 @@ echo '<tr class="EvenTableRows"> <td class="number" colspan="6"><b>' . _('TOTAL Excl Tax/Freight') . '</b></td> <td colspan="' . $varColSpan . '" class="number"><b>' . $DisplayTotal . '</b></td> - <td colspan="2">' . $ShowDiscountGP . ' </td> </tr> </table>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-15 22:41:51 UTC (rev 7917) +++ trunk/doc/Change.log 2018-01-24 17:16:45 UTC (rev 7918) @@ -1,5 +1,6 @@ webERP Change Log +24/1/18 Paul Becker/PaulT (PaulT commit): SelectOrderItems.php: Paul B. Remove stray value output / PaulT. Replace hard-coded style with existing CSS class. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057) 15/1/18 Paul Becker (PaulT commit): CustomerPurchases.php: Adds Units and Discount columns and other minor changes so that it more closely matches output from OrderDetails.php. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) 12/1/18 Paul Becker (PaulT commit): CustomerPurchases.php: Fix script to show actual Price and actual Amount of Sale based upon discount. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) 9/1/18 PaulT: Payments.php: Remove my debug/test echo line from the previous commit. |
From: <tu...@us...> - 2018-01-24 17:46:29
|
Revision: 7919 http://sourceforge.net/p/web-erp/reponame/7919 Author: turbopt Date: 2018-01-24 17:46:27 +0000 (Wed, 24 Jan 2018) Log Message: ----------- SupplierInvoice.php, CounterSales.php: Replace two other hard-coded styles with existing CSS class. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057) Modified Paths: -------------- trunk/CounterSales.php trunk/SupplierInvoice.php trunk/doc/Change.log Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2018-01-24 17:16:45 UTC (rev 7918) +++ trunk/CounterSales.php 2018-01-24 17:46:27 UTC (rev 7919) @@ -743,7 +743,7 @@ echo '<br /> <table width="90%" cellpadding="2"> - <tr style="background-color:#800000">'; + <tr style="tableheader">'; echo '<th>' . _('Item Code') . '</th> <th>' . _('Item Description') . '</th> <th>' . _('Quantity') . '</th> Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2018-01-24 17:16:45 UTC (rev 7918) +++ trunk/SupplierInvoice.php 2018-01-24 17:46:27 UTC (rev 7919) @@ -667,7 +667,7 @@ <tr> <th colspan="6">' . _('Purchase Order Charges') . '</th> </tr>'; - $tableheader = '<tr style="background-color:#800000"> + $tableheader = '<tr style="tableheader"> <th>' . _('Seq') . ' #</th> <th>' . _('GRN Batch') . '</th> <th>' . _('Supplier Ref') . '</th> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-24 17:16:45 UTC (rev 7918) +++ trunk/doc/Change.log 2018-01-24 17:46:27 UTC (rev 7919) @@ -1,5 +1,6 @@ webERP Change Log +24/1/18 Andy Couling (PaulT commit): SupplierInvoice.php, CounterSales.php: Replace two other hard-coded styles with existing CSS class. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057) 24/1/18 Paul Becker/PaulT (PaulT commit): SelectOrderItems.php: Paul B. Remove stray value output / PaulT. Replace hard-coded style with existing CSS class. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057) 15/1/18 Paul Becker (PaulT commit): CustomerPurchases.php: Adds Units and Discount columns and other minor changes so that it more closely matches output from OrderDetails.php. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) 12/1/18 Paul Becker (PaulT commit): CustomerPurchases.php: Fix script to show actual Price and actual Amount of Sale based upon discount. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) |
From: <tu...@us...> - 2018-01-24 23:28:26
|
Revision: 7920 http://sourceforge.net/p/web-erp/reponame/7920 Author: turbopt Date: 2018-01-24 23:28:23 +0000 (Wed, 24 Jan 2018) Log Message: ----------- SelectOrderItems.php: Paul B. Fix stock table columns NOT sorting on this page / PaulT. Use existing CSS to replace two style attributes. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057&pid=13987#pid13987) Modified Paths: -------------- trunk/SelectOrderItems.php trunk/doc/Change.log Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2018-01-24 17:46:27 UTC (rev 7919) +++ trunk/SelectOrderItems.php 2018-01-24 23:28:23 UTC (rev 7920) @@ -1694,9 +1694,12 @@ echo '<div>'; echo '<input name="FormID" type="hidden" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; - echo '<tr><td colspan="1"><input name="PreviousList" type="hidden" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+8).'" type="submit" name="Previous" value="'._('Previous').'" /></td>'; - echo '<td style="text-align:center" colspan="6"><input name="SelectingOrderItems" type="hidden" value="1" /><input tabindex="'.strval($j+9).'" type="submit" value="'._('Add to Sales Order').'" /></td>'; - echo '<td colspan="1"><input name="NextList" type="hidden" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+10).'" name="Next" type="submit" value="'._('Next').'" /></td></tr>'; + echo '<thead><tr> + <td colspan="1"><input name="PreviousList" type="hidden" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+8).'" type="submit" name="Previous" value="'._('Previous').'" /></td> + <td class="centre" colspan="6"><input name="SelectingOrderItems" type="hidden" value="1" /><input tabindex="'.strval($j+9).'" type="submit" value="'._('Add to Sales Order').'" /></td> + <td colspan="1"><input name="NextList" type="hidden" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+10).'" name="Next" type="submit" value="'._('Next').'" /></td> + </tr></thead>'; + echo '<tbody>'; echo '<tr> <th class="ascending" >' . _('Code') . '</th> <th class="ascending" >' . _('Description') . '</th> @@ -1789,11 +1792,12 @@ #end of page full new headings if } #end of while loop - echo '<tr> + echo '</tbody>'; + echo '<tfoot><tr> <td><input name="PreviousList" type="hidden" value="'. strval($Offset-1).'" /><input tabindex="'. strval($j+7).'" type="submit" name="Previous" value="'._('Previous').'" /></td> - <td style="text-align:center" colspan="6"><input name="SelectingOrderItems" type="hidden" value="1" /><input tabindex="'. strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td> + <td class="centre" colspan="6"><input name="SelectingOrderItems" type="hidden" value="1" /><input tabindex="'. strval($j+8).'" type="submit" value="'._('Add to Sales Order').'" /></td> <td><input name="NextList" type="hidden" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" name="Next" type="submit" value="'._('Next').'" /></td> - </tr> + </tr></tfoot> </table> </div>'; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-24 17:46:27 UTC (rev 7919) +++ trunk/doc/Change.log 2018-01-24 23:28:23 UTC (rev 7920) @@ -1,5 +1,6 @@ webERP Change Log +24/1/18 Paul Becker/PaulT (PaulT commit): SelectOrderItems.php: Paul B. Fix stock table columns NOT sorting on this page / PaulT. Use existing CSS to replace two style attributes. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057&pid=13987#pid13987) 24/1/18 Andy Couling (PaulT commit): SupplierInvoice.php, CounterSales.php: Replace two other hard-coded styles with existing CSS class. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057) 24/1/18 Paul Becker/PaulT (PaulT commit): SelectOrderItems.php: Paul B. Remove stray value output / PaulT. Replace hard-coded style with existing CSS class. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057) 15/1/18 Paul Becker (PaulT commit): CustomerPurchases.php: Adds Units and Discount columns and other minor changes so that it more closely matches output from OrderDetails.php. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8040) |
From: <tu...@us...> - 2018-01-25 17:27:45
|
Revision: 7921 http://sourceforge.net/p/web-erp/reponame/7921 Author: turbopt Date: 2018-01-25 17:27:43 +0000 (Thu, 25 Jan 2018) Log Message: ----------- ReorderLevel.php: Exclude completed orders from on order counts. (Reported in forums by briantmg: http://www.weberp.org/forum/showthread.php?tid=8060) Modified Paths: -------------- trunk/ReorderLevel.php trunk/doc/Change.log Modified: trunk/ReorderLevel.php =================================================================== --- trunk/ReorderLevel.php 2018-01-24 23:28:23 UTC (rev 7920) +++ trunk/ReorderLevel.php 2018-01-25 17:27:43 UTC (rev 7921) @@ -83,12 +83,13 @@ $OnOrderSQL = "SELECT SUM(quantityord-quantityrecd) AS quantityonorder FROM purchorders LEFT JOIN purchorderdetails - ON purchorders.orderno=purchorderdetails.orderno - WHERE purchorders.status !='Cancelled' - AND purchorders.status !='Rejected' - AND purchorders.status !='Pending' - AND purchorderdetails.itemcode='".$myrow['stockid']."' - AND purchorders.intostocklocation='".$myrow['loccode']."'"; + ON purchorders.orderno=purchorderdetails.orderno + WHERE purchorders.status != 'Cancelled' + AND purchorders.status != 'Rejected' + AND purchorders.status != 'Pending' + AND purchorders.status != 'Completed' + AND purchorderdetails.itemcode='".$myrow['stockid']."' + AND purchorders.intostocklocation='".$myrow['loccode']."'"; $OnOrderResult = DB_query($OnOrderSQL); $OnOrderRow = DB_fetch_array($OnOrderResult); // Parameters for addTextWrap are defined in /includes/class.pdf.php Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-24 23:28:23 UTC (rev 7920) +++ trunk/doc/Change.log 2018-01-25 17:27:43 UTC (rev 7921) @@ -1,5 +1,6 @@ webERP Change Log +24/1/18 Briantmg (PaulT commit): ReorderLevel.php: Exclude completed orders from on order counts. (Reported in forums by briantmg: http://www.weberp.org/forum/showthread.php?tid=8060) 24/1/18 Paul Becker/PaulT (PaulT commit): SelectOrderItems.php: Paul B. Fix stock table columns NOT sorting on this page / PaulT. Use existing CSS to replace two style attributes. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057&pid=13987#pid13987) 24/1/18 Andy Couling (PaulT commit): SupplierInvoice.php, CounterSales.php: Replace two other hard-coded styles with existing CSS class. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057) 24/1/18 Paul Becker/PaulT (PaulT commit): SelectOrderItems.php: Paul B. Remove stray value output / PaulT. Replace hard-coded style with existing CSS class. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8057) |
From: <tu...@us...> - 2018-01-26 23:55:59
|
Revision: 7924 http://sourceforge.net/p/web-erp/reponame/7924 Author: turbopt Date: 2018-01-26 23:55:55 +0000 (Fri, 26 Jan 2018) Log Message: ----------- Andrew Galuski/Tim (PaulT merge/commit): New picking list feature for regular and controlled/serialized stock. This feature improves (and replaces) the current pick list handling. (Reported in forums by HDeriauFF: http://www.weberp.org/forum/showthread.php?tid=7988) Modified Paths: -------------- trunk/AgedControlledInventory.php trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/PDFWOPrint.php trunk/PrintCustOrder_generic.php trunk/SelectSalesOrder.php trunk/SystemParameters.php trunk/Z_ChangeStockCode.php trunk/companies/weberpdemo/FormDesigns/PickingList.xml trunk/doc/Change.log trunk/includes/Add_SerialItems.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsExisting.php trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/country_sql/default.sql trunk/sql/mysql/country_sql/demo.sql trunk/sql/mysql/upgrade4.14.1-4.14.2.sql Added Paths: ----------- trunk/GeneratePickingList.php trunk/PDFAck.php trunk/PDFShipLabel.php trunk/PickingLists.php trunk/PickingListsControlled.php trunk/SelectPickingLists.php trunk/companies/weberpdemo/FormDesigns/ShippingLabel.xml trunk/includes/GenPickingListHeader.inc trunk/includes/PDFAckPageHeader.php Modified: trunk/AgedControlledInventory.php =================================================================== --- trunk/AgedControlledInventory.php 2018-01-26 14:22:29 UTC (rev 7923) +++ trunk/AgedControlledInventory.php 2018-01-26 23:55:55 UTC (rev 7924) @@ -4,8 +4,10 @@ include('includes/session.php'); $PricesSecurity = 12;//don't show pricing info unless security token 12 available to user + $Today = time(); -$Title = _('Aged Controlled Inventory') . ' ' ._('as-of') .' ' . Date(($_SESSION['DefaultDateFormat']), strtotime($UpcomingDate . ' + 0 days')); +$Title = _('Aged Controlled Inventory') . ' ' . _('as-of') . ' ' . Date(($_SESSION['DefaultDateFormat']), $Today); + include('includes/header.php'); echo '<p class="page_title_text"> @@ -19,24 +21,30 @@ stockserialitems.quantity, stockmoves.trandate, stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost AS cost, + createdate, decimalplaces FROM stockserialitems - LEFT JOIN stockserialmoves ON stockserialitems.serialno=stockserialmoves.serialno - LEFT JOIN stockmoves ON stockserialmoves.stockmoveno=stockmoves.stkmoveno - INNER JOIN stockmaster ON stockmaster.stockid = stockserialitems.stockid - INNER JOIN locationusers ON locationusers.loccode=stockserialitems.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canview=1 + LEFT JOIN stockserialmoves + ON stockserialitems.serialno=stockserialmoves.serialno + LEFT JOIN stockmoves + ON stockserialmoves.stockmoveno=stockmoves.stkmoveno + INNER JOIN stockmaster + ON stockmaster.stockid = stockserialitems.stockid + INNER JOIN locationusers + ON locationusers.loccode=stockserialitems.loccode + AND locationusers.userid='" . $_SESSION['UserID'] . "' + AND locationusers.canview=1 WHERE quantity > 0 - GROUP BY stockid, serialno - ORDER BY trandate"; + ORDER BY createdate, quantity"; $ErrMsg = _('The stock held could not be retrieved because'); $LocStockResult = DB_query($sql, $ErrMsg); -$NumRows = DB_num_rows($LocStockResult, $db); +$NumRows = DB_num_rows($LocStockResult); -$j = 1; $TotalQty=0; $TotalVal=0; $k=0; //row colour counter + echo '<table> <tr> <th class="ascending">' . _('Stock') . '</th> @@ -47,6 +55,7 @@ <th class="ascending">' . _('Date') . '</th> <th class="ascending">' . _('Days Old') . '</th> </tr>'; + while ($LocQtyRow=DB_fetch_array($LocStockResult)) { if ($k==1){ @@ -56,14 +65,16 @@ echo '<tr class="EvenTableRows">'; $k=1; } - $DaysOld=floor(($Today - strtotime($LocQtyRow['trandate']))/(60*60*24)); + + $DaysOld=floor(($Today - strtotime($LocQtyRow['createdate']))/(60*60*24)); $TotalQty +=$LocQtyRow['quantity']; - //$TotalVal +=($LocQtyRow['quantity'] *$LocQtyRow['cost']); $DispVal = '-----------'; + if (in_array($PricesSecurity, $_SESSION['AllowedPageSecurityTokens']) OR !isset($PricesSecurity)) { $DispVal =locale_number_format(($LocQtyRow['quantity']*$LocQtyRow['cost']),$LocQtyRow['decimalplaces']); $TotalVal +=($LocQtyRow['quantity'] *$LocQtyRow['cost']); } + printf('<td>%s</td> <td>%s</td> <td>%s</td> @@ -70,17 +81,18 @@ <td class="number">%s</td> <td class="number">%s</td> <td>%s</td> - <td class="number">%s</td></tr>', + <td class="number">%s</td> + </tr>', mb_strtoupper($LocQtyRow['stockid']), $LocQtyRow['description'], $LocQtyRow['serialno'], locale_number_format($LocQtyRow['quantity'],$LocQtyRow['decimalplaces']), $DispVal, - ConvertSQLDate($LocQtyRow['trandate']), - $DaysOld); + ConvertSQLDate($LocQtyRow['createdate']), + $DaysOld + ); +} //while - -} //while if ($k==1){ echo '<tfoot><tr class="OddTableRows">'; $k=0; @@ -88,7 +100,12 @@ echo '<tfoot><tr class="EvenTableRows">'; $k=1; } -echo '<td colspan="3"><b>' . _('Total') . '</b></td><td class="number"><b>' . locale_number_format($TotalQty,2) . '</td><td class="number"><b>' . locale_number_format($TotalVal,2) . '</td><td colspan="2"></td>'; + +echo '<td colspan="3"><b>' . _('Total') . '</b></td> + <td class="number"><b>' . locale_number_format($TotalQty,2) . '</b></td> + <td class="number"><b>' . locale_number_format($TotalVal,2) . '</b></td> + <td colspan="2"></td> + </tr></tfoot>'; echo '</table>'; include('includes/footer.php'); Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2018-01-26 14:22:29 UTC (rev 7923) +++ trunk/ConfirmDispatchControlled_Invoice.php 2018-01-26 23:55:55 UTC (rev 7924) @@ -72,6 +72,13 @@ $RecvQty = $LineItem->Quantity-$LineItem->QtyInv; $ItemMustExist = true; /*Can only invoice valid batches/serial numbered items that exist */ $LocationOut = $_SESSION['Items'.$identifier]->Location; + +if ($_SESSION['RequirePickingNote'] == 1) { + $OrderstoPick = $_SESSION['Items'.$identifier]->OrderNo; +} else { + unset($OrderstoPick); +} + $InOutModifier=1; $ShowExisting=true; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2018-01-26 14:22:29 UTC (rev 7923) +++ trunk/ConfirmDispatch_Invoice.php 2018-01-26 23:55:55 UTC (rev 7924) @@ -8,6 +8,8 @@ include('includes/session.php'); $Title = _('Confirm Dispatches and Invoice An Order'); + +/* Manual links before header.php */ $ViewTopic= 'ARTransactions'; $BookMark = 'ConfirmInvoice'; include('includes/header.php'); @@ -51,6 +53,7 @@ salesorders.branchcode, salesorders.customerref, salesorders.comments, + salesorders.internalcomment, salesorders.orddate, salesorders.ordertype, salesorders.shipvia, @@ -73,17 +76,26 @@ currencies.rate as currency_rate, currencies.decimalplaces, custbranch.defaultshipvia, - custbranch.specialinstructions - FROM salesorders INNER JOIN debtorsmaster - ON salesorders.debtorno = debtorsmaster.debtorno + custbranch.specialinstructions, + pickreq.consignment, + pickreq.packages + FROM salesorders + INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno INNER JOIN custbranch - ON salesorders.branchcode = custbranch.branchcode - AND salesorders.debtorno = custbranch.debtorno + ON salesorders.branchcode = custbranch.branchcode + AND salesorders.debtorno = custbranch.debtorno INNER JOIN currencies - ON debtorsmaster.currcode = currencies.currabrev + ON debtorsmaster.currcode = currencies.currabrev INNER JOIN locations - ON locations.loccode=salesorders.fromstkloc - INNER JOIN locationusers ON locationusers.loccode=salesorders.fromstkloc AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 + ON locations.loccode=salesorders.fromstkloc + INNER JOIN locationusers + ON locationusers.loccode=salesorders.fromstkloc + AND locationusers.userid='" . $_SESSION['UserID'] . "' + AND locationusers.canupd=1 + LEFT OUTER JOIN pickreq + ON pickreq.orderno=salesorders.orderno + AND pickreq.closed=0 WHERE salesorders.orderno = '" . $_GET['OrderNumber']."'"; if($_SESSION['SalesmanLogin'] != '') { @@ -109,6 +121,9 @@ $_SESSION['Items'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; $BestShipper = $myrow['shipvia']; $_SESSION['Items'.$identifier]->ShipVia = $myrow['shipvia']; + $_SESSION['Items'.$identifier]->InternalComments = reverse_escape($myrow['internalcomment']); + $_SESSION['Items'.$identifier]->Consignment = $myrow['consignment']; + $_SESSION['Items'.$identifier]->Packages = $myrow['packages']; if(is_null($BestShipper)) { $BestShipper=0; @@ -175,6 +190,9 @@ if(DB_num_rows($LineItemsResult)>0) { while ($myrow=DB_fetch_array($LineItemsResult)) { + $QOHSQL = "SELECT quantity FROM locstock WHERE stockid='" . $myrow['stkcode'] . "' and loccode='" . $_SESSION['Items'.$identifier]->Location . "'"; + $QOHResult = DB_query($QOHSQL); + $QOHRow = DB_fetch_array($QOHResult); $_SESSION['Items'.$identifier]->add_to_cart($myrow['stkcode'], $myrow['quantity'], @@ -185,7 +203,7 @@ $myrow['units'], $myrow['volume'], $myrow['grossweight'], - 0, + $QOHRow['quantity'], $myrow['mbflag'], $myrow['actualdispatchdate'], $myrow['qtyinvoiced'], @@ -205,7 +223,35 @@ /*Calculate the taxes applicable to this line item from the customer branch Tax Group and Item Tax Category */ $_SESSION['Items'.$identifier]->GetTaxes($myrow['orderlineno']); + $SerialItemsSQL = "SELECT pickreqdetails.qtypicked, + pickserialdetails.stockid, + serialno, + moveqty + FROM pickreq + INNER JOIN pickreqdetails + ON pickreqdetails.prid=pickreq.prid + LEFT OUTER JOIN pickserialdetails + ON pickserialdetails.detailno=pickreqdetails.detailno + WHERE pickreq.orderno ='" . $_GET['OrderNumber'] . "' + AND pickreq.closed=0 + AND pickreqdetails.orderlineno='" . $myrow['orderlineno'] . "'"; + $ErrMsg = _('The serial items of the pick list cannot be retrieved because'); + $DbgMsg = _('The SQL that failed was'); + $SerialItemsResult = DB_query($SerialItemsSQL, $ErrMsg, $DbgMsg); + + if (DB_num_rows($SerialItemsResult) > 0) { + $InOutModifier = 1; + while ($MySerial = DB_fetch_array($SerialItemsResult)) { + if (isset($MySerial['serialno'])) { + $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->SerialItems[$MySerial['serialno']] = new SerialItem($MySerial['serialno'], ($InOutModifier > 0 ? 1 : 1) * filter_number_format($MySerial['moveqty'])); + } else { + if ($_SESSION['RequirePickingNote'] == 1) { + $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->QtyDispatched = $MySerial['qtypicked']; + } + } + } + } } /* line items from sales order details */ } else { /* there are no line items that have a quantity to deliver */ echo '<br />'; @@ -233,6 +279,9 @@ if(isset($_POST['ChargeFreightCost'])) { $_SESSION['Items'.$identifier]->FreightCost = filter_number_format($_POST['ChargeFreightCost']); } + if (isset($_POST['InternalComments'])) { + $_SESSION['Items'.$identifier]->InternalComments = $_POST['InternalComments']; + } $i=1; foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if(isset($_POST['FreightTaxRate' . $i])) { @@ -249,7 +298,7 @@ } //Preventing from dispatched more than ordered. Since it's controlled items, users must select the batch/lot again. if($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched > ($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv)) { - prnMsg(_('Dispathed Quantity should not be more than order balanced quantity').'. '._('To dispatch quantity is').' '.$_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched.' '._('And the order balance is ').' '.($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv),'error'); + prnMsg(_('Dispatched Quantity should not be more than order balanced quantity').'. '._('To dispatch quantity is').' '.$_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched.' '._('And the order balance is ').' '.($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv),'error'); include('includes/footer.php'); exit; } @@ -325,34 +374,52 @@ /*show the line items on the order with the quantity being dispatched available for modification */ $k=0; //row colour counter -$j=0; +$j=0; //used for tabindex + foreach ($_SESSION['Items'.$identifier]->LineItems as $LnItm) { $j++; - $LineTotal = $LnItm->QtyDispatched * $LnItm->Price * (1 - $LnItm->DiscountPercent); - $_SESSION['Items'.$identifier]->total += $LineTotal; - $_SESSION['Items'.$identifier]->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); - $_SESSION['Items'.$identifier]->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); - if($k==1) { - $RowStarter = '<tr class="EvenTableRows">'; + if ($LnItm->QOHatLoc < $LnItm->Quantity and ($LnItm->MBflag == 'B' or $LnItm->MBflag == 'M')) { + /*There is a stock deficiency in the stock location selected */ + $RowStarter = '<tr style="background:#FF0000;color:#FFC0CB">'; //rows show red where stock deficiency + } elseif ($k == 1) { + $RowStarter = '<tr class="OddTableRows">'; $k = 0; } else { - $RowStarter = '<tr class="OddTableRows">'; + $RowStarter = '<tr class="EvenTableRows">'; $k = 1; } - echo $RowStarter, ' - <td>', $LnItm->StockID, '</td> - <td class="text" title="', $LnItm->LongDescription, '">', $LnItm->ItemDescription, '</td> - <td class="number">', locale_number_format($LnItm->Quantity, $LnItm->DecimalPlaces), '</td> - <td class="text">', $LnItm->Units, '</td> - <td class="number">', locale_number_format($LnItm->QtyInv, $LnItm->DecimalPlaces), '</td>'; + if (sizeOf($LnItm->SerialItems) > 0) { + $_SESSION['Items'.$identifier]->LineItems[$LnItm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched + foreach ($LnItm->SerialItems as $SerialItem) { //calculate QtyDispatched from bundle quantities + $_SESSION['Items'.$identifier]->LineItems[$LnItm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; + } + } else if (isset($_POST[$LnItm->LineNumber . '_QtyDispatched'])) { + if (is_numeric(filter_number_format($_POST[$LnItm->LineNumber . '_QtyDispatched'])) and filter_number_format($_POST[$LnItm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items'.$identifier]->LineItems[$LnItm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$LnItm->LineNumber]->QtyInv)) { + + $_SESSION['Items'.$identifier]->LineItems[$LnItm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$LnItm->LineNumber . '_QtyDispatched']), $LnItm->DecimalPlaces); + } + } + + $LineTotal = $LnItm->QtyDispatched * $LnItm->Price * (1 - $LnItm->DiscountPercent); + $_SESSION['Items'.$identifier]->total += $LineTotal; + $_SESSION['Items'.$identifier]->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); + $_SESSION['Items'.$identifier]->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); + + echo $RowStarter; + echo '<td>' . $LnItm->StockID . '</td> + <td class="text" title="' . $LnItm->LongDescription . '">' . $LnItm->ItemDescription . '</td> + <td class="number">' . locale_number_format($LnItm->Quantity, $LnItm->DecimalPlaces) . '</td> + <td class="text">' . $LnItm->Units . '</td> + <td class="number">' . locale_number_format($LnItm->QtyInv, $LnItm->DecimalPlaces) . '</td>'; + if($LnItm->Controlled==1) { if(isset($_POST['ProcessInvoice'])) { echo '<td class="number">' . locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input type="hidden" name="' . $LnItm->LineNumber . '_QtyDispatched" value="' . $LnItm->QtyDispatched . '" /><a href="' . $RootPath .'/ConfirmDispatchControlled_Invoice.php?identifier=' . $identifier . '&LineNo='. $LnItm->LineNumber.'">' .locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</a></td>'; + echo '<td class="number"><input type="hidden" name="' . $LnItm->LineNumber . '_QtyDispatched" required="required" maxlength="11" value="' . $LnItm->QtyDispatched . '" /><a href="' . $RootPath .'/ConfirmDispatchControlled_Invoice.php?identifier=' . urlencode($identifier) . '&LineNo=' . urlencode($LnItm->LineNumber) . '">' .locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</a></td>'; } } else { if(isset($_POST['ProcessInvoice'])) { @@ -420,7 +487,7 @@ if($LnItm->Controlled==1) { if(!isset($_POST['ProcessInvoice'])) { - echo '<td><a href="' . $RootPath . '/ConfirmDispatchControlled_Invoice.php?identifier=' . $identifier . '&LineNo='. $LnItm->LineNumber.'">'; + echo '<td><a href="' . $RootPath . '/ConfirmDispatchControlled_Invoice.php?identifier=' . urlencode($identifier) . '&LineNo=' . urlencode($LnItm->LineNumber) . '">'; if($LnItm->Serialised==1) { echo _('Enter Serial Numbers'); } else { /*Just batch/roll/lot control */ @@ -441,7 +508,7 @@ It seems unfair to charge the customer twice for freight if the order was not fully delivered the first time ?? */ -if(!isset($_SESSION['Items'.$identifier]->FreightCost)) { +if (!isset($_SESSION['Items'.$identifier]->FreightCost) or $_SESSION['Items'.$identifier]->FreightCost == 0) { if($_SESSION['DoFreightCalc']==True) { list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items'.$identifier]->total, $_SESSION['Items'.$identifier]->BrAdd2, @@ -456,7 +523,7 @@ $db); $_SESSION['Items'.$identifier]->ShipVia = $BestShipper; } - if(is_numeric($FreightCost)) { + if (isset($FreightCost) and is_numeric($FreightCost)) { $FreightCost = $FreightCost / $_SESSION['CurrencyRate']; } else { $FreightCost =0; @@ -634,8 +701,8 @@ ON stockmaster.stockid=bom.component WHERE bom.parent='" . $OrderLine->StockID . "' AND locstock.loccode='" . $_SESSION['Items'.$identifier]->Location . "' - AND bom.effectiveafter <= '" . date('Y-m-d') . "' - AND bom.effectiveto > '" . date('Y-m-d') . "'"; + AND effectiveafter <= CURRENT_DATE + AND effectiveto > CURRENT_DATE"; $ErrMsg = _('Could not retrieve the component quantity left at the location once the assembly item on this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$ErrMsg); @@ -768,7 +835,9 @@ /*Update order header for invoice charged on */ $SQL = "UPDATE salesorders - SET comments = CONCAT(comments,' Inv ','" . $InvoiceNo . "') + SET comments = CONCAT(comments,' Inv ','" . $InvoiceNo . "'), + internalcomment = '" . $_POST['InternalComments'] . "', + printedpackingslip=0 WHERE orderno= '" . $_SESSION['ProcessingOrder']."'"; $ErrMsg = _('CRITICAL ERROR') . ' ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales order header could not be updated with the invoice number'); @@ -804,7 +873,7 @@ '" . $DefaultDispatchDate . "', '" . date('Y-m-d H-i-s') . "', '" . $PeriodNo . "', - '', + '" . $_SESSION['Items'.$identifier]->CustRef . "', '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $_SESSION['ProcessingOrder'] . "', '" . $_SESSION['Items'.$identifier]->total . "', @@ -946,8 +1015,32 @@ $DbgMsg = _('The following SQL to update the sales order detail record was used'); $Result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - /* Update location stock records if not a dummy stock item - need the MBFlag later too so save it to $MBFlag */ + /*update any open pickreqdetails*/ + $LineItemsSQL = "SELECT pickreqdetails.detailno + FROM pickreqdetails INNER JOIN pickreq ON pickreq.prid=pickreqdetails.prid + INNER JOIN salesorderdetails + ON salesorderdetails.orderno = pickreq.orderno + AND salesorderdetails.orderlineno=pickreqdetails.orderlineno + WHERE pickreq.orderno ='" . $_SESSION['ProcessingOrder'] . "' + AND pickreq.closed=0 + AND salesorderdetails.orderlineno='" . $OrderLine->LineNumber . "'"; + + $ErrMsg = _('The line items of the pick list cannot be retrieved because'); + $DbgMsg = _('The SQL that failed was'); + $LineItemsResult = DB_query($LineItemsSQL, $ErrMsg, $DbgMsg); + + $MyLine = DB_fetch_array($LineItemsResult); + $DetailNo = $MyLine['detailno']; + $SQL = "UPDATE pickreqdetails + SET invoicedqty='" . $OrderLine->QtyDispatched . "' + WHERE detailno='" . $DetailNo . "'"; + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The pickreqdetail record could not be inserted because'); + $DbgMsg = _('The following SQL to insert the pickreqdetail records was used'); + $Result = DB_query($SQL, $ErrMsg, $DbgMsg, true); + + /* Update location stock records if not a dummy stock item + need the MBFlag later too so save it to $MBFlag */ $Result = DB_query("SELECT mbflag FROM stockmaster WHERE stockid = '" . $OrderLine->StockID . "'", @@ -996,8 +1089,8 @@ FROM bom INNER JOIN stockmaster ON bom.component=stockmaster.stockid WHERE bom.parent='" . $OrderLine->StockID . "' - AND bom.effectiveafter <= '" . date('Y-m-d') . "' - AND bom.effectiveto > '" . date('Y-m-d') . "'"; + AND bom.effectiveto > CURRENT_DATE + AND bom.effectiveafter <= CURRENT_DATE"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Could not retrieve assembly components from the database for'). ' '. $OrderLine->StockID . _('because').' '; $DbgMsg = _('The SQL that failed was'); @@ -1145,7 +1238,7 @@ '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', - '" . $_SESSION['ProcessingOrder'] . "', + '" . DB_escape_string($_SESSION['ProcessingOrder']) . "', '" . -$OrderLine->QtyDispatched . "', '" . $OrderLine->DiscountPercent . "', '" . $OrderLine->StandardCost . "', @@ -1228,7 +1321,8 @@ salesanalysis.periodno, salesanalysis.typeabbrev, salesanalysis.salesperson - FROM salesanalysis INNER JOIN custbranch + FROM salesanalysis + INNER JOIN custbranch ON salesanalysis.cust=custbranch.debtorno AND salesanalysis.custbranch=custbranch.branchcode AND salesanalysis.area=custbranch.area @@ -1235,12 +1329,12 @@ INNER JOIN stockmaster ON salesanalysis.stkcategory=stockmaster.categoryid WHERE salesanalysis.salesperson='" . $_SESSION['Items'.$identifier]->SalesPerson . "' - AND salesanalysis.typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' - AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust='" . $_SESSION['Items'.$identifier]->DebtorNo . "' - AND salesanalysis.custbranch='" . $_SESSION['Items'.$identifier]->Branch . "' - AND salesanalysis.stockid='" . $OrderLine->StockID . "' - AND salesanalysis.budgetoractual=1 + AND salesanalysis.typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' + AND salesanalysis.periodno='" . $PeriodNo . "' + AND salesanalysis.cust='" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch='" . $_SESSION['Items'.$identifier]->Branch . "' + AND salesanalysis.stockid='" . $OrderLine->StockID . "' + AND salesanalysis.budgetoractual=1 GROUP BY salesanalysis.stockid, salesanalysis.stkcategory, salesanalysis.cust, @@ -1540,7 +1634,7 @@ 10, '" . $InvoiceNo . "', '" . $PeriodNo . "', - '" . Date('Y-m-d') . "', + CURRENT_DATE, 'disposal', '" . round(($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $DefaultDispatchDate . "')"; @@ -1562,6 +1656,16 @@ } /*end of OrderLine loop */ + /*update any open pick list*/ + $SQL = "UPDATE pickreq + SET status = 'Invoiced', + closed='1' + WHERE orderno= '" . $_SESSION['ProcessingOrder'] . "' + AND closed=0"; + $ErrMsg = _('CRITICAL ERROR') . ' ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The pick list header could not be updated'); + $DbgMsg = _('The following SQL to update the pick list was used'); + $Result = DB_query($SQL, $ErrMsg, $DbgMsg, true); + if($_SESSION['CompanyRecord']['gllink_debtors']==1) { /*Post debtors transaction to GL debit debtors, credit freight re-charged and credit sales */ @@ -1635,10 +1739,10 @@ } } } /*end of if Sales and GL integrated */ - EnsureGLEntriesBalance(10,$InvoiceNo,$db); DB_Txn_Commit(); + EnsureGLEntriesBalance(10, $InvoiceNo,$db); // ************************************************************************* // E N D O F I N V O I C E S Q L P R O C E S S I N G // ************************************************************************* @@ -1664,10 +1768,18 @@ } else { /*Process Invoice not set so allow input of invoice data */ if(!isset($_POST['Consignment'])) { - $_POST['Consignment']=''; + if ($_SESSION['Items'.$identifier]->Consignment != '') { + $_POST['Consignment'] = $_SESSION['Items'.$identifier]->Consignment; + } else { + $_POST['Consignment']=''; + } } if(!isset($_POST['Packages'])) { - $_POST['Packages']='1'; + if ($_SESSION['Items'.$identifier]->Packages) { + $_POST['Packages'] = $_SESSION['Items'.$identifier]->Packages; + } else { + $_POST['Packages']='1'; + } } if(!isset($_POST['InvoiceText'])) { $_POST['InvoiceText']=''; @@ -1676,7 +1788,7 @@ echo '<table class="selection"> <tr> <td>' ._('Date On Invoice'). ':</td> - <td><input tabindex="'.$j.'" type="text" maxlength="10" size="15" required="required" name="DispatchDate" value="' . $DefaultDispatchDate . '" id="datepicker" alt="' . $_SESSION['DefaultDateFormat'] . '" class="date" /></td> + <td><input tabindex="'.$j.'" type="text" required="required" maxlength="10" size="15" required="required" name="DispatchDate" value="' . $DefaultDispatchDate . '" id="datepicker" alt="' . $_SESSION['DefaultDateFormat'] . '" class="date" /></td> </tr>'; $j++; echo '<tr> @@ -1692,7 +1804,12 @@ $j++; echo '<tr> <td>' . _('Action For Balance'). ':</td> - <td><select tabindex="'.$j.'" name="BOPolicy"><option selected="selected" value="BO">' . _('Automatically put balance on back order') . '</option><option value="CAN">' . _('Cancel any quantities not delivered') . '</option></select></td> + <td> + <select required="required" tabindex="' . $j . '" name="BOPolicy"> + <option selected="selected" value="BO">' . _('Automatically put balance on back order') . '</option> + <option value="CAN">' . _('Cancel any quantities not delivered') . '</option> + </select> + </td> </tr>'; $j++; echo '<tr> @@ -1700,6 +1817,12 @@ <td><textarea tabindex="'.$j.'" name="InvoiceText" pattern=".{0,20}" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> </tr>'; + ++$j; + echo '<tr> + <td>' . _('Internal Comments') . ':</td> + <td><textarea tabindex="' . $j . '" name="InternalComments" pattern=".{0,20}" cols="31" rows="5">' . reverse_escape($_SESSION['Items'.$identifier]->InternalComments) . '</textarea></td> + </tr>'; + $j++; echo '</table> <br /> @@ -1709,7 +1832,7 @@ $j++; echo '<br /> - <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> + <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> </div> <input type="hidden" name="ShipVia" value="' . $_SESSION['Items'.$identifier]->ShipVia . '" />'; } @@ -1717,4 +1840,4 @@ echo '</form>'; include('includes/footer.php'); -?> +?> \ No newline at end of file Added: trunk/GeneratePickingList.php =================================================================== --- trunk/GeneratePickingList.php (rev 0) +++ trunk/GeneratePickingList.php 2018-01-26 23:55:55 UTC (rev 7924) @@ -0,0 +1,513 @@ +<?php + +/* $Id: GeneratePickingList.php 1 2014-08-26 11:54:03Z agaluski $*/ + +include('includes/session.php'); +include('includes/SQL_CommonFunctions.inc'); + +/* Check that the config variable is set for + * picking notes and get out if not. + */ +if ($_SESSION['RequirePickingNote'] == 0) { + $Title = _('Picking Lists Not Enabled'); + include('includes/header.php'); + echo '<br />'; + prnMsg(_('The system is not configured for picking lists. A configuration parameter is required where picking slips are required. Please consult your system administrator.'), 'info'); + include('includes/footer.php'); + exit; +} + +/* Show selection screen if we have no orders to work with */ +if ((!isset($_GET['TransNo']) or $_GET['TransNo'] == '') and !isset($_POST['TransDate'])) { + $Title = _('Select Picking Lists'); + include('includes/header.php'); + $SQL = "SELECT locations.loccode, + locationname + FROM locations + INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1"; + $Result = DB_query($SQL); + echo '<p class="page_title_text"><img src="' . $RootPath . '/css/' . $_SESSION['Theme'] . '/images/sales.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p><br />'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '" method="post" name="form"> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Create picking lists for all deliveries to be made on') . ' : ' . '</td> + <td><input type="text" required="required" autofocus="autofocus" class="date" name="TransDate" maxlength="10" size="11" value="' . date($_SESSION['DefaultDateFormat'], mktime(date('m'), date('Y'), date('d') + 1)) . '" /></td> + </tr> + <tr> + <td>' . _('From Warehouse') . ' : ' . '</td> + <td><select required="required" name="loccode">'; + while ($MyRow = DB_fetch_array($Result)) { + echo '<option value="' . $MyRow['loccode'] . '">' . $MyRow['locationname'] . '</option>'; + } + echo '</select></td> + </tr> + </table>'; + echo '<div class="centre"> + <input type="submit" name="Process" value="' . _('Print Picking Lists') . '" /> + </div> + </form>'; + include('includes/footer.php'); + exit(); +} + +/*retrieve the order details from the database to print */ +$ErrMsg = _('There was a problem retrieving the order header details from the database'); + +if (!isset($_POST['TransDate']) and $_GET['TransNo'] != 'Preview') { + /* If there is no transaction date set, then it must be for a single order */ + $SQL = "SELECT salesorders.debtorno, + salesorders.orderno, + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.deliverblind, + salesorders.deliverydate, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + locations.loccode, + locations.locationname + FROM salesorders INNER JOIN salesorderdetails on salesorderdetails.orderno=salesorders.orderno, + debtorsmaster, + shippers, + locations INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 + WHERE salesorders.debtorno=debtorsmaster.debtorno + AND salesorders.shipvia=shippers.shipper_id + AND salesorders.fromstkloc=locations.loccode + AND salesorders.orderno='" . $_GET['TransNo'] . "' + AND salesorderdetails.completed=0 + GROUP BY salesorders.orderno"; +} else if (isset($_POST['TransDate']) or (isset($_GET['TransNo']) and $_GET['TransNo'] != 'Preview')) { + /* We are printing picking lists for all orders on a day */ + $SQL = "SELECT salesorders.debtorno, + salesorders.orderno, + salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.deliverblind, + salesorders.deliverydate, + debtorsmaster.name, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + locations.loccode, + locations.locationname + FROM salesorders INNER JOIN salesorderdetails on salesorderdetails.orderno=salesorders.orderno, + debtorsmaster, + shippers, + locations INNER JOIN locationusers ON locationusers.loccode=locations.loccode AND locationusers.userid='" . $_SESSION['UserID'] . "' AND locationusers.canupd=1 + WHERE salesorders.debtorno=debtorsmaster.debtorno + AND salesorders.shipvia=shippers.shipper_id + AND salesorders.fromstkloc=locations.loccode + AND salesorders.fromstkloc='" . $_POST['loccode'] . "' + AND salesorders.deliverydate<='" . FormatDateForSQL($_POST['TransDate']) . "' + AND salesorderdetails.completed=0 + GROUP BY salesorders.orderno + ORDER BY salesorders.deliverydate, salesorders.orderno"; +} + +if ($_SESSION['SalesmanLogin'] != '') { + $SQL .= " AND salesorders.salesperson='" . $_SESSION['SalesmanLogin'] . "'"; +} + +if (isset($_POST['TransDate']) or (isset($_GET['TransNo']) and $_GET['TransNo'] != 'Preview')) { + $Result = DB_query($SQL, $ErrMsg); + + /*if there are no rows, there's a problem. */ + if (DB_num_rows($Result) == 0) { + $Title = _('Print Picking List Error'); + include('includes/header.php'); + echo '<br />'; + prnMsg(_('Unable to Locate any orders for this criteria '), 'info'); + echo '<br /> + <table class="selection"> + <tr> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('Enter Another Date') . '</a></td> + </tr> + </table> + <br />'; + include('includes/footer.php'); + exit(); + } + + /*retrieve the order details from the database and place them in an array */ + while ($MyRow = DB_fetch_array($Result)) { + $OrdersToPick[] = $MyRow; + } +} +else { + $OrdersToPick[0]['debtorno'] = str_pad('', 10, 'x'); + $OrdersToPick[0]['orderno'] = 'Preview'; + $OrdersToPick[0]['customerref'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['comments'] = str_pad('', 100, 'x'); + $OrdersToPick[0]['orddate'] = '1900-00-01'; + $OrdersToPick[0]['deliverto'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['deladd1'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['deladd2'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['deladd3'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['deladd4'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['deladd5'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['deladd6'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['deliverblind'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['deliverydate'] = '1900-00-01'; + $OrdersToPick[0]['name'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['address1'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['address2'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['address3'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['address4'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['address5'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['address6'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['shippername'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['printedpackingslip'] = str_pad('', 20, 'x'); + $OrdersToPick[0]['datepackingslipprinted'] = '1900-00-01'; + $OrdersToPick[0]['locationname'] = str_pad('', 15, 'x'); +} +/* Then there's an order to print and its not been printed already (or its been flagged for reprinting/ge_Width=807;) +LETS GO */ + +if ($OrdersToPick[0]['orderno'] == 'Preview') { + $FormDesign = simplexml_load_file(sys_get_temp_dir() . '/PickingList.xml'); +} else { + $FormDesign = simplexml_load_file($PathPrefix . 'companies/' . $_SESSION['DatabaseName'] . '/FormDesigns/PickingList.xml'); +} + +$PaperSize = $FormDesign->PaperSize; +include('includes/PDFStarter.php'); +$pdf->addInfo('Title', _('Picking List')); +$pdf->addInfo('Subject', _('Laser Picking List')); +$FontSize = 12; +$ListCount = 0; +$Copy = ''; + +$line_height = $FormDesign->LineHeight; +$TotalOrderCount = sizeof($OrdersToPick); + +for ( $i = 0; $i < $TotalOrderCount; $i++ ){ + /*Cycle through each of the orders to pick */ + if ($i > 0) { + $pdf->newPage(); + } + + /* Now ... Has the order got any line items still outstanding to be picked */ + + $PageNumber = 1; + + if (isset($_POST['TransDate']) or (isset($_GET['TransNo']) and $_GET['TransNo'] != 'Preview')) { + $ErrMsg = _('There was a problem retrieving the order line details for Order Number') . ' ' . $OrdersToPick[$i]['orderno'] . ' ' . _('from the database'); + + /* Are there any picking lists for this order already */ + $SQL = "SELECT COUNT(orderno), + prid, + comments + FROM pickreq + WHERE orderno='" . $OrdersToPick[$i]['orderno'] . "' + AND closed='0'"; + + $CountResult = DB_query($SQL); + $Count = DB_fetch_row($CountResult); + + if (!isset($Count[2]) or $Count[2] == '') { /* No comment was found in the query */ + $Count[2]='Please pick order. Generate packing slip. Apply shipment labels and ship in system.'; + } + + if ($Count[0] == 0) { + $SQL = "SELECT salesorderdetails.stkcode, + stockmaster.description, + stockmaster.controlled, + stockmaster.serialised, + salesorderdetails.orderlineno, + (salesorderdetails.quantity - salesorderdetails.qtyinvoiced) as qtyexpected, + salesorderdetails.quantity, + salesorderdetails.qtyinvoiced, + salesorderdetails.narrative, + stockmaster.decimalplaces, + custitem.cust_part, + custitem.cust_description, + locstock.quantity qtyavail, + bin + FROM salesorderdetails + INNER JOIN locstock + ON locstock.loccode='" . $OrdersToPick[$i]['loccode'] . "' + AND locstock.stockid=salesorderdetails.stkcode + INNER JOIN stockmaster + ON salesorderdetails.stkcode=stockmaster.stockid + LEFT OUTER JOIN custitem + ON custitem.debtorno='" . $OrdersToPick[$i]['debtorno'] . "' + AND custitem.stockid=stockmaster.stockid + WHERE salesorderdetails.orderno='" . $OrdersToPick[$i]['orderno'] . "' + AND salesorderdetails.completed=0"; + } else { + $SQL = "SELECT salesorderdetails.stkcode, + stockmaster.description, + stockmaster.controlled, + stockmaster.serialised, + salesorderdetails.orderlineno, + (salesorderdetails.quantity - salesorderdetails.qtyinvoiced) as qtyexpected, + salesorderdetails.quantity, + salesorderdetails.qtyinvoiced, + pickreqdetails.qtypicked, + pickreqdetails.shipqty, + salesorderdetails.narrative, + stockmaster.decimalplaces, + custitem.cust_part, + custitem.cust_description, + locstock.quantity qtyavail, + bin + FROM salesorderdetails + INNER JOIN locstock + ON locstock.loccode='" . $OrdersToPick[$i]['loccode'] . "' + AND locstock.stockid=salesorderdetails.stkcode + INNER JOIN stockmaster + ON salesorderdetails.stkcode=stockmaster.stockid + LEFT OUTER JOIN pickreq + ON pickreq.orderno=salesorderdetails.orderno + AND pickreq.closed=0 + LEFT OUTER JOIN pickreqdetails + ON pickreqdetails.stockid=salesorderdetails.stkcode + AND pickreqdetails.orderlineno=salesorderdetails.orderlineno + AND pickreqdetails.prid=pickreq.prid + LEFT OUTER JOIN custitem + ON custitem.debtorno='" . $OrdersToPick[$i]['debtorno'] . "' + AND custitem.stockid=stockmaster.stockid + WHERE salesorderdetails.orderno='" . $OrdersToPick[$i]['orderno'] . "' + AND salesorderdetails.completed=0"; + } + $LineResult = DB_query($SQL, $ErrMsg); + } + if ((isset($_GET['TransNo']) and $_GET['TransNo'] == 'Preview') or (isset($LineResult) and DB_num_rows($LineResult) > 0)) { + /*Yes there are line items to start the ball rolling with a page header */ + DB_Txn_Begin(); + + if (isset($_POST['TransDate']) or (isset($_GET['TransNo']) and $_GET['TransNo'] != 'Preview')) { + $LinesToShow = DB_num_rows($LineResult); + if ($Count[0] == 0) { + /*create picklist we have open lines and no pickreq yet*/ + + $SQL = "INSERT INTO pickreq + (prid, + initiator, + initdate, + requestdate, + status, + comments, + loccode, + orderno) + VALUES ( + 'NULL', + '" . $_SESSION['UserID'] . "', + '" . date('Y-m-d') . "', + '" . $OrdersToPick[$i]['deliverydate'] . "', + 'New', + 'Please pick order. Generate packing slip. Apply shipment labels and ship in system. Return all Paperwork to Mem...@re...', + '" . $OrdersToPick[$i]['loccode'] . "', + '" . $OrdersToPick[$i]['orderno'] . "');"; + $HeaderResult = DB_query($SQL); + $PickReqID = DB_Last_Insert_ID('pickreq', 'prid'); + $Count[1]=$PickReqID; + } //create pickreq + } + else { + $LinesToShow = 1; + } + + include('includes/GenPickingListHeader.inc'); + $YPos = $FormDesign->Data->y; + $Lines = 0; + + while ($Lines < $LinesToShow) { + if (isset($_GET['TransNo']) and $_GET['TransNo'] == 'Preview') { + $MyRow2['stkcode'] = str_pad('', 10, 'x'); + $MyRow2['decimalplaces'] = 2; + $DisplayQty = 'XXXX.XX'; + $DisplayPrevDel = 'XXXX.XX'; + $DisplayQtySupplied = 'XXXX.XX'; + $MyRow2['description'] = str_pad('', 18, 'x'); + $MyRow2['narrative'] = str_pad('', 18, 'x'); + } + else { + $MyRow2 = DB_fetch_array($LineResult); + + if ($Count[0] == 0) { + $SQL = "INSERT INTO pickreqdetails + (detailno, + prid, + orderlineno, + stockid, + qtyexpected) + VALUES ( + 'NULL', + '" . $PickReqID . "', + '" . $MyRow2['orderlineno'] . "', + '" . $MyRow2['stkcode'] . "', + '" . $MyRow2['qtyexpected'] . "');"; + + $InsLineResult = DB_query($SQL); + $MyRow2['qtyexpected'] = 0; + $MyRow2['qtypicked'] = 0; + } //create pickreqdetail + + $DisplayQty = locale_number_format($MyRow2['quantity'], $MyRow2['decimalplaces']); + $DisplayQtySupplied = locale_number_format($MyRow2['quantity'] - $MyRow2['qtyinvoiced'], $MyRow2['decimalplaces']); + $DisplayPrevDel = locale_number_format($MyRow2['qtyinvoiced'], $MyRow2['decimalplaces']); + $DisplayQtyAvail = locale_number_format($MyRow2['qtyavail'], $MyRow2['decimalplaces']); + + if ($MyRow2['qtypicked'] > 0) { + $DisplayPicked = locale_number_format($MyRow2['qtypicked'], $MyRow2['decimalplaces']); + } else { + $DisplayPicked = '____________'; + } + } + ++$ListCount; + + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column1->x, $Page_Height - $YPos, $FormDesign->Headings->Column1->Length, $FormDesign->Headings->Column1->FontSize, $MyRow2['stkcode'], 'left'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column2->x, $Page_Height - $YPos, $FormDesign->Headings->Column2->Length, $FormDesign->Headings->Column2->FontSize, $MyRow2['description']); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column3->x, $Page_Height - $YPos, $FormDesign->Headings->Column3->Length, $FormDesign->Headings->Column3->FontSize, $MyRow2['bin'], 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column4->x, $Page_Height - $YPos, $FormDesign->Headings->Column4->Length, $FormDesign->Headings->Column4->FontSize, $DisplayQtySupplied, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column5->x, $Page_Height - $YPos, $FormDesign->Headings->Column5->Length, $FormDesign->Headings->Column5->FontSize, $DisplayQtyAvail, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column6->x, $Page_Height - $YPos, $FormDesign->Headings->Column6->Length, $FormDesign->Headings->Column6->FontSize, $DisplayPicked, 'right'); + + if ($Page_Height - $YPos - $line_height <= 60) { + /* We reached the end of the page so finish off the page and start a new */ + $PageNumber++; + include ('includes/GenPickingListHeader.inc'); + } //end if need a new page headed up + else { + /*increment a line down for the next line item */ + $YPos += ($line_height); + } + + if ($MyRow2['cust_part'] > '') { + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column2->x, $Page_Height - $YPos, $FormDesign->Headings->Column2->Length, $FormDesign->Headings->Column2->FontSize, $MyRow2['cust_part'] . ' ' . $MyRow2['cust_description']); + + if ($Page_Height - $YPos - $line_height <= 60) { + /* We reached the end of the page so finish off the page and start a new */ + $PageNumber++; + include ('includes/GenPickingListHeader.inc'); + } //end if need a new page headed up + else { + /*increment a line down for the next line item */ + $YPos += ($line_height); + } + } + + if ($MyRow2['narrative'] > '') { + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column2->x, $Page_Height - $YPos, $FormDesign->Headings->Column2->Length, $FormDesign->Headings->Column2->FontSize, $MyRow2['narrative']); + if ($Page_Height - $YPos - $line_height <= 60) { + /* We reached the end of the page so finish off the page and start a new */ + $PageNumber++; + include ('includes/GenPickingListHeader.inc'); + } //end if need a new page headed up + else { + /*increment a line down for the next line item */ + $YPos += ($line_height); + } + } + + if ($MyRow2['controlled'] == 1) { + if ($MyRow2['serialised'] == 1) { + $BundleLabel = _('Serial#:'); + } + else { + $BundleLabel = _('Lot#:'); + } + $SQL = "SELECT serialno, + quantity, + (SELECT SUM(moveqty) + FROM pickserialdetails + INNER JOIN pickreqdetails on pickreqdetails.detailno=pickserialdetails.detailno + INNER JOIN pickreq on pickreq.prid=pickreqdetails.prid + AND pickreq.closed=0 + WHERE pickserialdetails.serialno=stockserialitems.serialno + AND pickserialdetails.stockid=stockserialitems.stockid) as qtypickedtotal, + (SELECT SUM(moveqty) + FROM pickserialdetails + INNER JOIN pickreqdetails on pickreqdetails.detailno=pickserialdetails.detailno + INNER JOIN pickreq on pickreq.prid=pickreqdetails.prid + AND pickreq.orderno='" . $OrdersToPick[$i]['orderno'] . "' + AND pickreq.closed=0 + WHERE pickserialdetails.serialno=stockserialitems.serialno + AND pickserialdetails.stockid=stockserialitems.stockid) as qtypickedthisorder + FROM stockserialitems + WHERE stockid='" . $MyRow2['stkcode'] . "' + AND stockserialitems.loccode ='" . $OrdersToPick[$i]['loccode'] . "' + AND quantity > 0 + ORDER BY createdate, quantity"; + + $ErrMsg = '<br />' . _('Could not retrieve the items for') . ' ' . $MyRow2['stkcode']; + $Bundles = DB_query($SQL, $ErrMsg); + $YPos += ($line_height); + + while ($mybundles = DB_fetch_array($Bundles)) { + if ($mybundles['qtypickedthisorder'] == 0 or is_null($mybundles['qtypickedthisorder'])) { + $mybundles['qtypickedthisorder'] = '____________'; + } + + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column3->x, $Page_Height - $YPos, $FormDesign->Headings->Column3->Length, $FormDesign->Headings->Column3->FontSize, $BundleLabel, 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column4->x, $Page_Height - $YPos, $FormDesign->Headings->Column4->Length, $FormDesign->Headings->Column4->FontSize, $mybundles['serialno'], 'left'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column5->x, $Page_Height - $YPos, $FormDesign->Headings->Column5->Length, $FormDesign->Headings->Column5->FontSize, $mybundles['quantity'] - $mybundles['qtypickedtotal'], 'right'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column6->x, $Page_Height - $YPos, $FormDesign->Headings->Column6->Length, $FormDesign->Headings->Column6->FontSize, $mybundles['qtypickedthisorder'], 'right'); + + if ($Page_Height - $YPos - $line_height <= 60) { + /* We reached the end of the page so finish off the page and start a new */ + $PageNumber++; + include ('includes/GenPickingListHeader.inc'); + } //end if need a new page headed up + else { + /*increment a line down for the next line item */ + $YPos += ($line_height); + } + } //while + } //controlled + + ++$Lines; + $YPos += ($line_height); + } //end while there are line items to print out + + $YPos = $Page_Height - 45; + $pdf->setFont('', 'B'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column2->x, $Page_Height - $YPos, $FormDesign->Headings->Column2->Length, $FormDesign->Headings->Column2->FontSize, _('Signed for: ') . '______________________________'); + $LeftOvers = $pdf->addTextWrap($FormDesign->Headings->Column3->x, $Page_Height - $YPos, $FormDesign->Headings->Column3->Length, $FormDesign->Headings->Column3->FontSize, _('Date : ') . '__________'); + $pdf->setFont('', ''); + } /*end if there are order details to show on the order*/ +} /*end for loop to print the whole lot twice */ + +if ($ListCount == 0) { + $Title = _('Print Picking List Error'); + include('includes/header.php'); + prnMsg( _('There are no picking lists to print'), 'error'); + include('includes/footer.php'); + exit; +} else { + $pdf->OutputD($_SESSION['DatabaseName'] . '_PickingLists_' . date('Y-m-d') . '.pdf'); + $pdf->__destruct(); + DB_Txn_Commit(); +} +?> \ No newline at end of file Added: trunk/PDFAck.php =================================================================== --- trunk/PDFAck.php (rev 0) +++ trunk/PDFAck.php 2018-01-26 23:55:55 UTC (rev 7924) @@ -0,0 +1,283 @@ +<?php + +/* $Id: PDFAcknowledgementPortrait.php 4491 2011-02-15 06:31:08Z daintree $ */ + +include('includes/session.php'); +include('includes/SQL_CommonFunctions.inc'); + +//Get Out if we have no order number to work with +If (!isset($_GET['AcknowledgementNo']) || $_GET['AcknowledgementNo'] == "") { + $Title = _('Select Acknowledgement To Print'); + include('includes/header.php'); + prnMsg(_('Select a Acknowledgement to Print before calling this page'), 'error'); + echo '<table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="' . $RootPath . '/SelectSalesOrder.php?Acknowledgements=Quotes_Only">' . _('Acknowledgements') . '</a></li> + </ul> + </td> + </tr> + </table>'; + include('includes/footer.php'); + exit(); +} + +/*retrieve the order details from the database to print */ +$ErrMsg = _('There was a problem retrieving the Acknowledgement header details for Order Number') . ' ' . $_GET['AcknowledgementNo'] . ' ' . _('from the database'); + +$SQL = "SELECT salesorders.customerref, + salesorders.comments, + salesorders.orddate, + salesorders.deliverto, + salesorders.deladd1, + salesorders.deladd2, + salesorders.deladd3, + salesorders.deladd4, + salesorders.deladd5, + salesorders.deladd6, + salesorders.freightcost, + debtorsmaster.debtorno, + debtorsmaster.name, + debtorsmaster.currcode, + debtorsmaster.address1, + debtorsmaster.address2, + debtorsmaster.address3, + debtorsmaster.address4, + debtorsmaster.address5, + debtorsmaster.address6, + shippers.shippername, + salesorders.printedpackingslip, + salesorders.datepackingslipprinted, + salesorders.branchcode, + locations.taxprovinceid, + locations.locationname, + currencies.decimalplaces AS currdecimalplaces + FROM salesorders + INNER JOIN debtorsmaster + ON salesorders.debtorno=debtorsmaster.debtorno + INNER JOIN shippers + ON salesorders.shipvia=shippers.shipper_id + INNER JOIN locations + ON salesorders.fromstkloc=locations.loccode + INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev + AND salesorders.orderno='" . $_GET['AcknowledgementNo'] . "'"; + +$Result = DB_query($SQL, $ErrMsg); + +//If there are no rows, there's a problem. +if (DB_num_rows($Result) == 0) { + $Title = _('Print Acknowledgement Error'); + include('includes/header.php'); + prnMsg(_('Unable to Locate Acknowledgement Number') . ' : ' . $_GET['AcknowledgementNo'] . ' ', 'error'); + echo '<table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="' . $RootPath . '/SelectSalesOrder.php?Acknowledgements=Quotes_Only">' . _('Outstanding Acknowledgements') . '</a></li></ul> + </td> + </tr> + </table>'; + include('includes/footer.php'); + exit; +} elseif (DB_num_rows($Result) == 1) { + /*There is only one order header returned - thats good! */ + $MyRow = DB_fetch_array($Result); +} + +/*retrieve the order details from the database to print */ + +/* Then there's an order to print and its not been printed already (or its been flagged for reprinting/ge_Width=807; +) +LETS GO */ +$Terms = $_SESSION['TermsAndConditions']; + +$PaperSize = 'Letter'; + +include('includes/PDFStarter.php'); +$pdf->addInfo('Title', _('Customer Acknowledgement')); +$pdf->addInfo('Subject', _('Acknowledgement') . ' ' . $_GET['AcknowledgementNo']); +$FontSize = 12; +$PageNumber = 1; +$line_height = $FontSize * 1.25; + +/* Now ... Has the order got any line items still outstanding to be invoiced */ + +$ErrMsg = _('There was a problem retrieving the Acknowledgement line details for Acknowledgement Number') . ' ' . $_GET['AcknowledgementNo'] . ' ' . _('from the database'); + +$SQL = "SELECT salesorderdetails.stkcode, + stockmaster.description, + salesorderdetails.quantity, + salesorderdetails.qtyinvoiced, + salesorderdetails.unitprice, + salesorderdetails.itemdue, + salesorderdetails.narrative, + stockmaster.taxcatid, + salesorderdetails.narrative, + stockmaster.decimalplaces, + custitem.cust_part, + custitem.cust_description + FROM salesorderdetails + INNER JOIN stockmaster + ON salesorderdetails.stkcode=stockmaster.stockid + LEFT OUTER JOIN custitem + ON custitem.debtorno='" . $MyRow['debtorno'] . "' + AND custitem.stockid=stockmaster.stockid + WHERE salesorderdetails.orderno='" . $_GET['AcknowledgementNo'] . "'"; + +$Result = DB_query($SQL, $ErrMsg); + +$ListCount = 0; + +if (DB_num_rows($Result) > 0) { + /*Yes there are line items to start the ball rolling with a page header */ + include('includes/PDFAckPageHeader.php'); + + $AcknowledgementTotal = $MyRow['freightcost']; + $AcknowledgementTotalEx = 0; + $TaxTotal = 0; + + while ($MyRow2 = DB_fetch_array($Result)) { + + $ListCount++; + + if ((mb_strlen($MyRow2['narrative']) > 200 AND $YPos - $line_height <= 75) OR (mb_strlen($MyRow2['narrative']) > 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 */ + $PageNumber++; + include('includes/PDFAckPageHeader.php'); + + } //end if need a new page headed up + + $DisplayQty = locale_number_format($MyRow2['quantity'], $MyRow2['decimalplaces']); + $DisplayPrevDel = locale_number_format($MyRow2['qtyinvoiced'], $MyRow2['decimalplaces']); + //$DisplayPrice = locale_number_format($MyRow2['unitprice'],$MyRow['currdecimalplaces']); + $DisplayPrice = locale_number_format($MyRow2['unitprice'], 4); + $SubTot = $MyRow2['unitprice'] * $MyRow2['quantity'] * (1 - $MyRow2['discountpercent']); + $TaxProv = $MyRow['taxprovinceid']; + $TaxCat = $MyRow2['taxcatid']; + $Branch = $MyRow['branchcode']; + $SQL3 = " SELECT taxgrouptaxes.taxauthid + FROM taxgrouptaxes + INNER JOIN custbranch + ON taxgrouptaxes.taxgroupid=custbranch.taxgroupid + WHERE custbranch.branchcode='" . $Branch . "'"; + $Result3 = DB_query($SQL3, $ErrMsg); + while ($MyRow3 = DB_fetch_array($Result3)) { + $TaxAuth = $MyRow3['taxauthid']; + } + + $SQL4 = "SELECT taxrate + FROM taxauthrates + WHERE dispatchtaxprovince='" . $TaxProv . "' + AND taxcatid='" . $TaxCat . "' + AND taxauthority='" . $TaxAuth . "'"; + $Result4 = DB_query($SQL4, $ErrMsg); + while ($MyRow4 = DB_fetch_array($Result4)) { + $TaxClass = 100 * $MyRow4['taxrate']; + } + + $DisplayTaxClass = $TaxClass . "%"; + $TaxAmount = (($SubTot / 100) * (100 + $TaxClass)) - $SubTot; + $DisplayTaxAmount = locale_number_format($TaxAmount, $MyRow['currdecimalplaces']); + + $LineTotal = $SubTot + $TaxAmount; + $DisplayTotal = locale_number_format($LineTotal, $MyRow['currdecimalplaces']); + + $FontSize = 10; + + $LeftOvers = $pdf->addTextWrap($XPos + 1, $YPos, 100, $FontSize, $MyRow2['stkcode']); + $LeftOvers = $pdf->addTextWrap(120, $YPos, 295, $FontSize, $MyRow2['description']); + $LeftOvers = $pdf->addTextWrap(270, $YPos, 85, $FontSize, ConvertSQLDate($MyRow2['itemdue']), right); + $LeftOvers = $pdf->addTextWrap(350, $YPos, 85, $FontSize, $DisplayQty, 'right'); + $LeftOvers = $pdf->addTextWrap(400, $YPos, 85, $FontSize, $DisplayPrice, 'right'); + $LeftOvers = $pdf->addTextWrap($Page_Width - $Right_Margin - 90, $YPos, 90, $FontSize, $DisplayTotal, 'right'); + + if ($MyRow2['cust_part'] > '') { + $YPos -= $line_height; + $LeftOvers = $pdf->addTextWrap($XPos + 10, $YPos, 300, $FontSize, _('Customer Part') . ': ' . $MyRow2['cust_part'] . ' ' . $MyRow2['cust_description']); + //$LeftOvers = $pdf->addTextWrap(190,$YPos,186,$FontSize,$MyRow2['cust_description']); + } + + // Prints salesorderdetails.narrative + $Split = explode("\r\n", wordwrap($MyRow2['narrative'], 130, "\r\n")); + foreach ($Split as $TextLine) { + $YPos -= $line_height; // rchacon's suggestion: $YPos -= $FontSize; + if ($YPos < ($Bottom_Margin + $line_height)) { // Begins new page + $PageNumber++; + include('includes/PDFAckPageHeader.php'); + } + $LeftOvers = $pdf->addTextWrap($XPos + 1, $YPos, 750, 10, $TextLine); + } + $YPos -= $line_height; + + $AcknowledgementTotal += $LineTotal; + $AcknowledgementTotalEx += $SubTot; + $TaxTotal += $TaxAmount; + + /*increment a line down for the next line item */ + $YPos -= ($line_height); + + } //end while there are line items to print out + if ((mb_strlen($MyRow['comments']) > 200 AND $YPos - $line_height <= 75) OR (mb_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 */ + $PageNumber++; + include('includes/PDFAckPageHeader.php'); + } //end if need a new page headed up + + $LeftOvers = $pdf->addTextWrap($XPos, $YPos - 80, 30, 10, _('Notes:')); + $LeftOvers = $pdf->addText($XPos, $YPos - 95, 10, $MyRow['comments']); + + if (mb_strlen($LeftOvers) > 1) { + $YPos -= 10; + $LeftOvers = $pdf->addTextWrap($XPos, $YPos, 700, 10, $LeftOvers); + if (mb_strlen($LeftOve... [truncated message content] |
From: <tu...@us...> - 2018-01-27 19:11:16
|
Revision: 7925 http://sourceforge.net/p/web-erp/reponame/7925 Author: turbopt Date: 2018-01-27 19:11:13 +0000 (Sat, 27 Jan 2018) Log Message: ----------- MiscFunctions.php, Z_ChangeStockCode.php, Z_ChangeGLAccountCode.php: Remove unused $db parameter from function ChangeFieldInTable() and all call points. Modified Paths: -------------- trunk/Z_ChangeGLAccountCode.php trunk/Z_ChangeStockCode.php trunk/doc/Change.log trunk/includes/MiscFunctions.php Modified: trunk/Z_ChangeGLAccountCode.php =================================================================== --- trunk/Z_ChangeGLAccountCode.php 2018-01-26 23:55:55 UTC (rev 7924) +++ trunk/Z_ChangeGLAccountCode.php 2018-01-27 19:11:13 UTC (rev 7925) @@ -66,62 +66,62 @@ DB_IgnoreForeignKeys(); - ChangeFieldInTable("bankaccounts", "accountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("bankaccounts", "accountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("bankaccountusers", "accountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("bankaccountusers", "accountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("banktrans", "bankact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("banktrans", "bankact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("chartdetails", "accountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("chartdetails", "accountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("cogsglpostings", "glcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("cogsglpostings", "glcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("companies", "debtorsact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("companies", "pytdiscountact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("companies", "creditorsact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("companies", "payrollact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("companies", "grnact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("companies", "exchangediffact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("companies", "purchasesexchangediffact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("companies", "retainedearnings", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("companies", "freightact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("companies", "debtorsact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("companies", "pytdiscountact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("companies", "creditorsact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("companies", "payrollact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("companies", "grnact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("companies", "exchangediffact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("companies", "purchasesexchangediffact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("companies", "retainedearnings", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("companies", "freightact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("fixedassetcategories", "costact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("fixedassetcategories", "depnact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("fixedassetcategories", "disposalact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("fixedassetcategories", "accumdepnact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("fixedassetcategories", "costact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("fixedassetcategories", "depnact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("fixedassetcategories", "disposalact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("fixedassetcategories", "accumdepnact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("glaccountusers", "accountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("glaccountusers", "accountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("gltrans", "account", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("gltrans", "account", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("lastcostrollup", "stockact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("lastcostrollup", "adjglact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("lastcostrollup", "stockact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("lastcostrollup", "adjglact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("locations", "glaccountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db);// Location's ledger account. + ChangeFieldInTable("locations", "glaccountcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']);// Location's ledger account. - ChangeFieldInTable("pcexpenses", "glaccount", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("pcexpenses", "glaccount", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("pctabs", "glaccountassignment", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("pctabs", "glaccountpcash", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("pctabs", "glaccountassignment", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("pctabs", "glaccountpcash", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("purchorderdetails", "glcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("purchorderdetails", "glcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("salesglpostings", "discountglcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("salesglpostings", "salesglcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("salesglpostings", "discountglcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("salesglpostings", "salesglcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("stockcategory", "stockact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("stockcategory", "adjglact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("stockcategory", "issueglact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("stockcategory", "purchpricevaract", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("stockcategory", "materialuseagevarac", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("stockcategory", "wipact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("stockcategory", "stockact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("stockcategory", "adjglact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("stockcategory", "issueglact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("stockcategory", "purchpricevaract", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("stockcategory", "materialuseagevarac", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("stockcategory", "wipact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("taxauthorities", "taxglcode", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("taxauthorities", "purchtaxglaccount", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); - ChangeFieldInTable("taxauthorities", "bankacctype", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("taxauthorities", "taxglcode", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("taxauthorities", "purchtaxglaccount", $_POST['OldAccountCode'], $_POST['NewAccountCode']); + ChangeFieldInTable("taxauthorities", "bankacctype", $_POST['OldAccountCode'], $_POST['NewAccountCode']); - ChangeFieldInTable("workcentres", "overheadrecoveryact", $_POST['OldAccountCode'], $_POST['NewAccountCode'], $db); + ChangeFieldInTable("workcentres", "overheadrecoveryact", $_POST['OldAccountCode'], $_POST['NewAccountCode']); DB_ReinstateForeignKeys(); Modified: trunk/Z_ChangeStockCode.php =================================================================== --- trunk/Z_ChangeStockCode.php 2018-01-26 23:55:55 UTC (rev 7924) +++ trunk/Z_ChangeStockCode.php 2018-01-27 19:11:13 UTC (rev 7925) @@ -2,7 +2,7 @@ /* $Id$*/ /* This script is an utility to change an inventory item code. */ /* It uses function ChangeFieldInTable($TableName, $FieldName, $OldValue, - $NewValue, $db) from .../includes/MiscFunctions.php.*/ + $NewValue) from .../includes/MiscFunctions.php.*/ include ('includes/session.php'); $Title = _('UTILITY PAGE Change A Stock Code');// Screen identificator. @@ -118,10 +118,10 @@ $result = DB_query($sql,$ErrMsg,$DbgMsg,true); echo ' ... ' . _('completed'); - ChangeFieldInTable("locstock", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("stockmoves", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("loctransfers", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("mrpdemands", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); + ChangeFieldInTable("locstock", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("stockmoves", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("loctransfers", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("mrpdemands", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); //check if MRP tables exist before assuming $sql = "SELECT * FROM mrpparameters"; @@ -129,41 +129,38 @@ if (DB_error_no() == 0) { $result = DB_query("SELECT COUNT(*) FROM mrpplannedorders",'','',false,false); if (DB_error_no()==0) { - ChangeFieldInTable("mrpplannedorders", "part", $_POST['OldStockID'], $_POST['NewStockID'], $db); + ChangeFieldInTable("mrpplannedorders", "part", $_POST['OldStockID'], $_POST['NewStockID']); } $result = DB_query("SELECT * FROM mrprequirements" ,'','',false,false); if (DB_error_no()==0){ - ChangeFieldInTable("mrprequirements", "part", $_POST['OldStockID'], $_POST['NewStockID'], $db); + ChangeFieldInTable("mrprequirements", "part", $_POST['OldStockID'], $_POST['NewStockID']); } $result = DB_query("SELECT * FROM mrpsupplies" ,'','',false,false); if (DB_error_no()==0){ - ChangeFieldInTable("mrpsupplies", "part", $_POST['OldStockID'], $_POST['NewStockID'], $db); + ChangeFieldInTable("mrpsupplies", "part", $_POST['OldStockID'], $_POST['NewStockID']); } } - ChangeFieldInTable("salesanalysis", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("orderdeliverydifferenceslog", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("prices", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("salesorderdetails", "stkcode", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("purchorderdetails", "itemcode", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("purchdata", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("shipmentcharges", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("stockcheckfreeze", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("stockcounts", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("grns", "itemcode", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("contractbom", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("bom", "component", $_POST['OldStockID'], $_POST['NewStockID'], $db); + ChangeFieldInTable("salesanalysis", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("orderdeliverydifferenceslog", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("prices", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("salesorderdetails", "stkcode", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("purchorderdetails", "itemcode", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("purchdata", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("shipmentcharges", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("stockcheckfreeze", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("stockcounts", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("grns", "itemcode", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("contractbom", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("bom", "component", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("bom", "parent", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("stockrequestitems", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("stockdescriptiontranslations", "stockid", $_POST['OldStockID'], $_POST['NewStockID']);// Updates the translated item titles (StockTitles) + ChangeFieldInTable("custitem", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("pricematrix", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("pickreqdetails", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); - DB_IgnoreForeignKeys($db); - - ChangeFieldInTable("bom", "parent", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("stockrequestitems", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("stockdescriptiontranslations", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db);// Updates the translated item titles (StockTitles) - ChangeFieldInTable("custitem", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("pricematrix", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("pickreqdetails", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - echo '<br />' . _('Changing any image files'); $SupportedImgExt = array('png','jpg','jpeg'); foreach ($SupportedImgExt as $ext) { @@ -180,17 +177,17 @@ } } - ChangeFieldInTable("stockitemproperties", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("worequirements", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("worequirements", "parentstockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("woitems", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("salescatprod", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("stockserialitems", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("stockserialmoves", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("offers", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("tenderitems", "stockid", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("prodspecs", "keyval", $_POST['OldStockID'], $_POST['NewStockID'], $db); - ChangeFieldInTable("qasamples", "prodspeckey", $_POST['OldStockID'], $_POST['NewStockID'], $db); + ChangeFieldInTable("stockitemproperties", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("worequirements", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("worequirements", "parentstockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("woitems", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("salescatprod", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("stockserialitems", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("stockserialmoves", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("offers", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("tenderitems", "stockid", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("prodspecs", "keyval", $_POST['OldStockID'], $_POST['NewStockID']); + ChangeFieldInTable("qasamples", "prodspeckey", $_POST['OldStockID'], $_POST['NewStockID']); DB_ReinstateForeignKeys(); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2018-01-26 23:55:55 UTC (rev 7924) +++ trunk/doc/Change.log 2018-01-27 19:11:13 UTC (rev 7925) @@ -1,5 +1,6 @@ webERP Change Log +27/1/17 PaulT: MiscFunctions.php, Z_ChangeStockCode.php, Z_ChangeGLAccountCode.php: Remove unused $db parameter from function ChangeFieldInTable(). 26/1/18 Andrew Galuski/Tim (PaulT merge/commit): New picking list feature for regular and controlled/serialized stock. This feature improves (and replaces) the current pick list handling. (Reported in forums by HDeriauFF: http://www.weberp.org/forum/showthread.php?tid=7988) 26/1/18 Exson: Add single quotation escape and charset in htmlspecialchars() in session.inc 26/1/18 Exson: Use htmlspecialchars() to encode html special characters to html entity and set the cookie available only httponly in session.inc Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2018-01-26 23:55:55 UTC (rev 7924) +++ trunk/includes/MiscFunctions.php 2018-01-27 19:11:13 UTC (rev 7925) @@ -395,7 +395,7 @@ if ($i==0) { $FirstPart .= intval($ExplodedUnits[$i]).','; // creates each of the 2's group and adds a comma to the end } else { - $FirstPart .= $ExplodedUnits[$i].','; + $FirstPart .= $ExplodedUnits[$i].','; } } @@ -445,7 +445,7 @@ return $ToList; } -function ChangeFieldInTable($TableName, $FieldName, $OldValue, $NewValue, $db){ +function ChangeFieldInTable($TableName, $FieldName, $OldValue, $NewValue){ /* Used in Z_ scripts to change one field across the table. */ echo '<br />' . _('Changing') . ' ' . $TableName . ' ' . _('records'); @@ -456,4 +456,4 @@ echo ' ... ' . _('completed'); } -?> +?> \ No newline at end of file |