|
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:10...
[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 ...
[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="Effecti...
[truncated message content] |
|
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 locatio...
[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
|