From: <dai...@us...> - 2011-11-06 07:09:31
|
Revision: 4741 http://web-erp.svn.sourceforge.net/web-erp/?rev=4741&view=rev Author: daintree Date: 2011-11-06 07:09:21 +0000 (Sun, 06 Nov 2011) Log Message: ----------- pre 4.06RC1 Modified Paths: -------------- trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/ConnectDB.inc trunk/includes/LanguagesArray.php trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/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/sql/mysql/upgrade4.05-4.06.sql trunk/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/UpgradeDatabase.php 2011-11-06 07:09:21 UTC (rev 4741) @@ -117,6 +117,7 @@ case '4.05': case '4.05.1': case '4.05.2': + case '4.05.3': $SQLScripts[] = './sql/mysql/upgrade4.05-4.06.sql'; case '4.06': break; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/doc/Change.log 2011-11-06 07:09:21 UTC (rev 4741) @@ -1,5 +1,7 @@ webERP Change Log +6/11/11 Release 4.06RC1 + 30/10/11 Exson: Modification to Stocks.php to avoid losing PanSize and ShrinkFactor 30/10/11 Phil: Made it so a saleman cannot be deleted if a user is setup referring only to this salesperson 29/10/11 High-Tech Bridge SA Security Research Lab <adv...@ht...> - sanitising $_SERVER['PHP_SELF'] and unquoted sql in reportwriter/FormMaker.php and reportwriter/ReportMaker.php Modified: trunk/includes/ConnectDB.inc =================================================================== --- trunk/includes/ConnectDB.inc 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/includes/ConnectDB.inc 2011-11-06 07:09:21 UTC (rev 4741) @@ -4,7 +4,7 @@ * this value is saved in the $_SESSION['Versionumber'] when includes/GetConfig.php is run * if VersionNumber is < $Version then the DB update script is run */ -$Version='4.05.3'; //must update manually every time there is a DB change +$Version='4.06'; //must update manually every time there is a DB change require_once ($PathPrefix .'includes/MiscFunctions.php'); Modified: trunk/includes/LanguagesArray.php =================================================================== --- trunk/includes/LanguagesArray.php 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/includes/LanguagesArray.php 2011-11-06 07:09:21 UTC (rev 4741) @@ -8,8 +8,8 @@ $LanguagesArray['en_GB.utf8']['LanguageName'] = _('English British'); $LanguagesArray['en_GB.utf8']['WindowsLocale'] = 'english-uk'; -$LanguagesArray['en_GB.utf8']['DecimalPoint'] = ','; -$LanguagesArray['en_GB.utf8']['ThousandsSeparator'] = '.'; +$LanguagesArray['en_GB.utf8']['DecimalPoint'] = '.'; +$LanguagesArray['en_GB.utf8']['ThousandsSeparator'] = ','; $LanguagesArray['cz_CZ.utf8']['LanguageName'] = _('Czech'); $LanguagesArray['cz_CZ.utf8']['WindowsLocale'] = 'czech'; Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-06 03:12:31 UTC (rev 4740) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-06 07:09:21 UTC (rev 4741) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-01 22:26+1300\n" +"POT-Creation-Date: 2011-11-06 19:49+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -142,7 +142,7 @@ #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 #: CustomerBranches.php:316 CustomerTypes.php:147 CustomerTypes.php:157 #: Customers.php:289 Customers.php:298 Customers.php:306 Customers.php:314 -#: Factors.php:134 FixedAssetCategories.php:129 GLAccounts.php:80 +#: Factors.php:134 FixedAssetCategories.php:133 GLAccounts.php:80 #: GLAccounts.php:96 Locations.php:237 Locations.php:245 Locations.php:256 #: Locations.php:265 Locations.php:274 Locations.php:283 Locations.php:292 #: Locations.php:301 MRPDemandTypes.php:87 PaymentMethods.php:138 @@ -210,7 +210,7 @@ #: CustEDISetup.php:17 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:125 #: DiscountCategories.php:10 DiscountCategories.php:131 DiscountMatrix.php:16 #: EDIMessageFormat.php:104 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:237 +#: FixedAssetRegister.php:13 FixedAssetRegister.php:243 #: FixedAssetTransfer.php:31 FormDesigner.php:129 GLBalanceSheet.php:362 #: GLBudgets.php:29 GLJournal.php:246 InventoryPlanning.php:374 #: InventoryPlanningPrefSupplier.php:467 Labels.php:115 Labels.php:270 @@ -237,7 +237,7 @@ #: WWW_Users.php:31 WhereUsedInquiry.php:18 WorkCentres.php:111 #: WorkCentres.php:162 WorkOrderCosting.php:13 WorkOrderEntry.php:11 #: WorkOrderIssue.php:22 WorkOrderReceive.php:15 WorkOrderStatus.php:42 -#: Z_BottomUpCosts.php:51 +#: Z_BottomUpCosts.php:56 msgid "Search" msgstr "Vyhledávání" @@ -245,7 +245,7 @@ msgid "Group Name" msgstr "Název skupiny" -#: AccountGroups.php:228 EDIMessageFormat.php:129 EDIMessageFormat.php:207 +#: AccountGroups.php:228 EDIMessageFormat.php:129 EDIMessageFormat.php:208 msgid "Section" msgstr "Sekce" @@ -292,8 +292,8 @@ #: SystemParameters.php:654 SystemParameters.php:781 SystemParameters.php:916 #: SystemParameters.php:918 SystemParameters.php:928 SystemParameters.php:930 #: SystemParameters.php:984 SystemParameters.php:996 SystemParameters.php:998 -#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:629 -#: WWW_Users.php:631 +#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 +#: WWW_Users.php:634 msgid "Yes" msgstr "Ano" @@ -327,8 +327,8 @@ #: SystemParameters.php:655 SystemParameters.php:782 SystemParameters.php:915 #: SystemParameters.php:919 SystemParameters.php:927 SystemParameters.php:931 #: SystemParameters.php:985 SystemParameters.php:995 SystemParameters.php:999 -#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:628 -#: WWW_Users.php:632 includes/PDFLowGPPageHeader.inc:44 +#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 +#: WWW_Users.php:635 includes/PDFLowGPPageHeader.inc:44 #: includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" @@ -338,8 +338,8 @@ #: BOMs.php:149 BankAccounts.php:223 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 #: CustomerBranches.php:414 CustomerTypes.php:202 Customers.php:1011 -#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:300 -#: FixedAssetCategories.php:182 FixedAssetLocations.php:102 +#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:329 +#: FixedAssetCategories.php:186 FixedAssetLocations.php:107 #: FreightCosts.php:240 GLAccounts.php:312 GLTags.php:91 GeocodeSetup.php:173 #: Labels.php:411 Locations.php:382 MRPDemandTypes.php:120 MRPDemands.php:306 #: PO_AuthorisationLevels.php:151 PaymentMethods.php:200 PaymentTerms.php:205 @@ -353,7 +353,7 @@ #: SuppTransGLAnalysis.php:120 SupplierContacts.php:163 SupplierTypes.php:189 #: TaxAuthorities.php:174 TaxCategories.php:182 TaxGroups.php:188 #: TaxProvinces.php:180 UnitsOfMeasure.php:185 WWW_Access.php:123 -#: WWW_Users.php:315 WorkCentres.php:141 includes/InputSerialItems.php:88 +#: WWW_Users.php:318 WorkCentres.php:141 includes/InputSerialItems.php:88 #: includes/OutputSerialItems.php:20 #, php-format msgid "Edit" @@ -369,9 +369,9 @@ #: BOMs.php:151 BankAccounts.php:224 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 #: CounterSales.php:812 CreditStatus.php:175 Credit_Invoice.php:381 -#: Currencies.php:275 CustomerReceipt.php:865 CustomerTypes.php:203 -#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:175 -#: EDIMessageFormat.php:151 FixedAssetCategories.php:183 FreightCosts.php:241 +#: Currencies.php:275 CustomerReceipt.php:913 CustomerTypes.php:203 +#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:182 +#: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 #: GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 GeocodeSetup.php:174 #: Labels.php:411 Locations.php:383 MRPDemandTypes.php:121 MRPDemands.php:307 #: PO_AuthorisationLevels.php:153 PO_Items.php:711 PaymentMethods.php:201 @@ -390,7 +390,7 @@ #: SuppTransGLAnalysis.php:121 SupplierContacts.php:164 SupplierTypes.php:191 #: TaxAuthorities.php:175 TaxCategories.php:183 TaxGroups.php:189 #: TaxProvinces.php:181 UnitsOfMeasure.php:186 WOSerialNos.php:319 -#: WWW_Access.php:124 WWW_Users.php:316 WorkCentres.php:142 +#: WWW_Access.php:124 WWW_Users.php:319 WorkCentres.php:142 #: includes/InputSerialItemsKeyed.php:59 includes/OutputSerialItems.php:99 #, php-format msgid "Delete" @@ -436,18 +436,18 @@ #: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 #: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 #: BOMs.php:759 BankAccounts.php:391 COGSGLPostings.php:354 -#: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:261 -#: DiscountMatrix.php:136 EDIMessageFormat.php:247 -#: FixedAssetCategories.php:322 FixedAssetLocations.php:148 +#: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 +#: DiscountMatrix.php:141 EDIMessageFormat.php:248 +#: FixedAssetCategories.php:344 FixedAssetLocations.php:156 #: FreightCosts.php:339 GLAccounts.php:262 GeocodeSetup.php:270 #: Locations.php:597 MRPDemandTypes.php:187 MRPDemands.php:419 #: OffersReceived.php:56 OffersReceived.php:143 PO_AuthorisationLevels.php:248 #: PaymentMethods.php:282 PaymentTerms.php:309 Prices_Customer.php:354 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 #: SalesPeople.php:368 Shippers.php:200 StockCategories.php:581 -#: SuppLoginSetup.php:285 SupplierContacts.php:281 TaxAuthorities.php:327 +#: SuppLoginSetup.php:293 SupplierContacts.php:281 TaxAuthorities.php:327 #: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WWW_Users.php:671 WorkCentres.php:279 +#: WWW_Users.php:674 WorkCentres.php:279 msgid "Enter Information" msgstr "Vložit informace" @@ -517,7 +517,7 @@ msgid "Customer Contacts" msgstr "Zákazník Kontakty" -#: AddCustomerContacts.php:20 CustEDISetup.php:9 CustLoginSetup.php:11 +#: AddCustomerContacts.php:20 CustEDISetup.php:9 CustLoginSetup.php:21 #: Z_CheckDebtorsControl.php:20 msgid "Back to Customers" msgstr "Zpět k zákazníkům" @@ -556,7 +556,7 @@ #: AddCustomerContacts.php:61 AddCustomerNotes.php:52 #: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 -#: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:243 +#: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:246 #: MRPCalendar.php:176 PO_Items.php:374 PcAssignCashToTab.php:88 #: PcClaimExpensesFromTab.php:79 PcExpenses.php:95 PcTabs.php:102 #: PcTypeTabs.php:60 SalesAnalReptCols.php:129 SalesPeople.php:97 @@ -594,13 +594,13 @@ #: AddCustomerContacts.php:131 AddCustomerContacts.php:240 #: CustomerBranches.php:374 CustomerBranches.php:774 CustomerInquiry.php:253 #: Customers.php:1001 Customers.php:1009 EmailCustTrans.php:15 -#: EmailCustTrans.php:63 Factors.php:225 Factors.php:263 Locations.php:563 +#: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:563 #: OrderDetails.php:109 PDFRemittanceAdvice.php:243 PO_PDFPurchOrder.php:369 #: PO_PDFPurchOrder.php:372 PrintCustTrans.php:714 PrintCustTrans.php:945 #: PrintCustTrans.php:994 PrintCustTransPortrait.php:753 #: PrintCustTransPortrait.php:999 PrintCustTransPortrait.php:1056 #: SelectCustomer.php:610 SupplierContacts.php:154 SupplierContacts.php:274 -#: UserSettings.php:183 WWW_Users.php:271 includes/PDFPickingListHeader.inc:25 +#: UserSettings.php:183 WWW_Users.php:274 includes/PDFPickingListHeader.inc:25 #: includes/PDFStatementPageHeader.inc:67 includes/PDFTransPageHeader.inc:82 #: includes/PDFTransPageHeaderPortrait.inc:109 #: includes/PO_PDFOrderPageHeader.inc:29 @@ -628,7 +628,7 @@ msgid "Contact Code" msgstr "Kontakt kód" -#: AddCustomerContacts.php:214 Factors.php:219 SupplierContacts.php:236 +#: AddCustomerContacts.php:214 Factors.php:233 SupplierContacts.php:236 msgid "Contact Name" msgstr "Jméno kontaktní osoby" @@ -697,9 +697,9 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1017 UpgradeDatabase.php:171 UpgradeDatabase.php:174 -#: UpgradeDatabase.php:177 UpgradeDatabase.php:180 UpgradeDatabase.php:183 -#: UpgradeDatabase.php:186 UpgradeDatabase.php:189 UpgradeDatabase.php:192 +#: Stocks.php:1017 UpgradeDatabase.php:172 UpgradeDatabase.php:175 +#: UpgradeDatabase.php:178 UpgradeDatabase.php:181 UpgradeDatabase.php:184 +#: UpgradeDatabase.php:187 UpgradeDatabase.php:190 UpgradeDatabase.php:193 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 #: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 #: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 @@ -886,7 +886,7 @@ #: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:960 #: ConfirmDispatch_Invoice.php:974 Contracts.php:580 CounterSales.php:1353 #: CounterSales.php:1367 Credit_Invoice.php:697 Credit_Invoice.php:718 -#: CustomerReceipt.php:523 CustomerReceipt.php:657 CustomerReceipt.php:685 +#: CustomerReceipt.php:537 CustomerReceipt.php:676 CustomerReceipt.php:704 #: CustomerTransInquiry.php:91 DeliveryDetails.php:396 GLProfit_Loss.php:596 #: GLTagProfit_Loss.php:511 PDFRemittanceAdvice.php:85 Payments.php:325 #: PurchData.php:86 PurchData.php:104 PurchData.php:245 @@ -900,7 +900,7 @@ #: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:136 #: SupplierInquiry.php:190 SupplierTransInquiry.php:95 WOSerialNos.php:47 #: WorkOrderCosting.php:418 WorkOrderReceive.php:273 -#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:92 +#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:91 #: Z_DeleteCreditNote.php:58 Z_DeleteInvoice.php:87 #: includes/PDFPaymentRun_PymtFooter.php:59 #: includes/PDFPaymentRun_PymtFooter.php:89 @@ -921,11 +921,11 @@ msgid "Aged Debtor Analysis" msgstr "Ve věku dlužníka analýza" -#: AgedDebtors.php:461 DebtorsAtPeriodEnd.php:136 +#: AgedDebtors.php:461 DebtorsAtPeriodEnd.php:137 msgid "From Customer Code" msgstr "Od kódu zákazníka" -#: AgedDebtors.php:465 DebtorsAtPeriodEnd.php:139 +#: AgedDebtors.php:465 DebtorsAtPeriodEnd.php:141 msgid "To Customer Code" msgstr "Do kódu zákazníka" @@ -972,7 +972,7 @@ #: AgedDebtors.php:517 AgedSuppliers.php:328 BOMExtendedQty.php:295 #: BOMIndented.php:276 BOMIndentedReverse.php:255 BOMListing.php:129 -#: DebtorsAtPeriodEnd.php:157 InventoryPlanning.php:445 +#: DebtorsAtPeriodEnd.php:163 InventoryPlanning.php:445 #: InventoryPlanningPrefSupplier.php:516 InventoryQuantities.php:209 #: InventoryValuation.php:268 MRPPlannedPurchaseOrders.php:280 #: MRPPlannedWorkOrders.php:337 MRPReschedules.php:152 MRPShortages.php:302 @@ -1103,7 +1103,7 @@ msgstr "Kód oblasti" #: Areas.php:132 CustomerTypes.php:164 Factors.php:140 -#: FixedAssetCategories.php:134 GLAccounts.php:197 Locations.php:328 +#: FixedAssetCategories.php:138 GLAccounts.php:197 Locations.php:328 #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:166 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:135 @@ -1155,7 +1155,7 @@ #: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 #: CounterSales.php:2141 CounterSales.php:2144 CustomerTransInquiry.php:31 -#: DailySalesInquiry.php:46 DailySalesInquiry.php:48 FixedAssetRegister.php:56 +#: DailySalesInquiry.php:47 DailySalesInquiry.php:49 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:144 @@ -1209,8 +1209,8 @@ #: StockCategories.php:217 StockLocMovements.php:88 StockMovements.php:92 #: SupplierAllocations.php:453 SupplierInquiry.php:207 #: SupplierTransInquiry.php:19 SupplierTransInquiry.php:100 -#: Z_CheckAllocationsFrom.php:26 Z_CheckAllocationsFrom.php:49 -#: Z_CheckAllocs.php:57 Z_CheckGLTransBalance.php:11 +#: Z_CheckAllocationsFrom.php:32 Z_CheckAllocationsFrom.php:57 +#: Z_CheckAllocs.php:62 Z_CheckGLTransBalance.php:11 #: includes/InputSerialItemsFile.php:86 includes/InputSerialItemsFile.php:126 #: includes/PDFTaxPageHeader.inc:34 msgid "Type" @@ -1383,7 +1383,7 @@ msgstr "Vytištěno" #: BOMExtendedQty.php:321 BOMIndented.php:303 BOMIndentedReverse.php:283 -#: FixedAssetRegister.php:334 GLAccountReport.php:322 +#: FixedAssetRegister.php:351 GLAccountReport.php:322 #: InventoryPlanningPrefSupplier.php:58 InventoryQuantities.php:233 #: MRPPlannedPurchaseOrders.php:304 MRPPlannedWorkOrders.php:361 #: MRPReport.php:814 MRPReschedules.php:178 MRPShortages.php:332 @@ -1518,9 +1518,9 @@ #: BOMInquiry.php:199 BOMs.php:529 BOMs.php:855 ContractBOM.php:236 #: ContractBOM.php:346 ContractOtherReqts.php:93 CounterSales.php:2015 #: CounterSales.php:2196 CreditStatus.php:152 CreditStatus.php:241 -#: EmailConfirmation.php:192 FixedAssetCategories.php:159 -#: FixedAssetDepreciation.php:84 FixedAssetRegister.php:81 -#: FixedAssetRegister.php:355 FixedAssetTransfer.php:50 +#: EmailConfirmation.php:192 FixedAssetCategories.php:163 +#: FixedAssetDepreciation.php:86 FixedAssetRegister.php:83 +#: FixedAssetRegister.php:372 FixedAssetTransfer.php:50 #: FixedAssetTransfer.php:110 GLTags.php:59 GLTags.php:77 #: GLTransInquiry.php:47 GoodsReceived.php:99 InventoryQuantities.php:244 #: Labels.php:410 MRPDemandTypes.php:113 MRPDemands.php:91 MRPDemands.php:292 @@ -1632,7 +1632,7 @@ #: BOMInquiry.php:30 BOMs.php:839 ContractBOM.php:324 ContractBOM.php:329 #: Contracts.php:756 Contracts.php:759 CounterSales.php:2166 -#: CustomerReceipt.php:1026 CustomerReceipt.php:1029 +#: CustomerReceipt.php:1101 CustomerReceipt.php:1104 #: DiscountCategories.php:104 DiscountCategories.php:106 #: DiscountCategories.php:110 DiscountCategories.php:112 #: FixedAssetTransfer.php:61 MRPDemands.php:333 MRPDemands.php:336 @@ -1666,12 +1666,12 @@ #: StockStatus.php:59 StockTransfers.php:47 StockTransfers.php:458 #: StockUsage.php:64 SupplierTenders.php:359 WorkOrderEntry.php:606 #: WorkOrderIssue.php:667 Z_ChangeStockCategory.php:90 -#: Z_ChangeStockCode.php:303 +#: Z_ChangeStockCode.php:313 msgid "Stock Code" msgstr "Skladový kód" #: BOMInquiry.php:37 BOMs.php:844 ContractBOM.php:334 Contracts.php:764 -#: CounterSales.php:2170 CustomerReceipt.php:1034 FixedAssetTransfer.php:72 +#: CounterSales.php:2170 CustomerReceipt.php:1111 FixedAssetTransfer.php:72 #: MRPDemands.php:338 MRPReport.php:554 PO_Header.php:541 PO_Items.php:1060 #: SelectAsset.php:102 SelectCreditItems.php:229 SelectCreditItems.php:978 #: SelectCustomer.php:369 SelectGLAccount.php:96 SelectOrderItems.php:593 @@ -1709,7 +1709,7 @@ #: BOMInquiry.php:112 BOMs.php:528 BOMs.php:854 ContractBOM.php:345 #: CounterSales.php:2014 CounterSales.php:2195 CustomerBranches.php:367 -#: CustomerReceipt.php:1040 GLCodesInquiry.php:26 MRPDemands.php:90 +#: CustomerReceipt.php:1122 GLCodesInquiry.php:26 MRPDemands.php:90 #: MRPPlannedWorkOrders.php:256 MRPReport.php:746 PDFOrderStatus.php:318 #: PDFOrdersInvoiced.php:347 PDFPrintLabel.php:247 PO_Header.php:551 #: PO_Items.php:1072 PO_SelectOSPurchOrder.php:230 PO_SelectPurchOrder.php:211 @@ -2017,7 +2017,7 @@ msgid "Assembly" msgstr "Sestava" -#: BOMs.php:408 FixedAssetRegister.php:357 Stocks.php:958 Stocks.php:960 +#: BOMs.php:408 FixedAssetRegister.php:374 Stocks.php:958 Stocks.php:960 msgid "Purchased" msgstr "Koupeno" @@ -2053,7 +2053,7 @@ msgid "Level" msgstr "Úroveň" -#: BOMs.php:530 BOMs.php:660 Contracts.php:868 FixedAssetRegister.php:83 +#: BOMs.php:530 BOMs.php:660 Contracts.php:868 FixedAssetRegister.php:85 #: InventoryQuantities.php:245 Locations.php:328 MRP.php:551 MRP.php:583 #: PDFOrderStatus.php:278 PDFOrdersInvoiced.php:309 ReorderLevel.php:258 #: ReorderLevel.php:267 ReorderLevelLocation.php:169 StockCounts.php:133 @@ -2306,7 +2306,7 @@ msgid "Bank Address" msgstr "Adresa banky" -#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:755 +#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:783 #: CustomerTransInquiry.php:108 OffersReceived.php:109 PDFPrintLabel.php:97 #: PO_AuthorisationLevels.php:126 PO_AuthorisationLevels.php:209 #: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:115 @@ -2413,7 +2413,7 @@ "účtu. Zkontrolujte, zda vaše bankovní výpis a klikněte na check-box, když " "zjistíte, odpovídající transakce." -#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:728 +#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:749 #: DailyBankTransactions.php:32 PDFChequeListing.php:44 Payments.php:741 #: TaxAuthorities.php:151 TaxAuthorities.php:316 msgid "Bank Account" @@ -2545,7 +2545,7 @@ msgstr "Ref" #: BankMatching.php:264 ConfirmDispatch_Invoice.php:276 Credit_Invoice.php:279 -#: CustWhereAlloc.php:109 CustomerAllocations.php:364 CustomerReceipt.php:844 +#: CustWhereAlloc.php:109 CustomerAllocations.php:364 CustomerReceipt.php:892 #: CustomerTransInquiry.php:107 PaymentAllocations.php:67 Payments.php:1014 #: Payments.php:1018 Payments.php:1034 PcAssignCashToTab.php:222 #: PcAssignCashToTab.php:345 PcAuthorizeExpenses.php:90 @@ -2558,7 +2558,7 @@ #: SupplierAllocations.php:457 SupplierCredit.php:352 SupplierCredit.php:385 #: SupplierCredit.php:421 SupplierCredit.php:460 SupplierInvoice.php:330 #: SupplierInvoice.php:371 SupplierInvoice.php:411 SupplierInvoice.php:455 -#: SupplierTransInquiry.php:108 Z_CheckAllocs.php:61 +#: SupplierTransInquiry.php:108 Z_CheckAllocs.php:66 #: includes/PDFBankingSummaryPageHeader.inc:55 #: includes/PDFChequeListingPageHeader.inc:37 msgid "Amount" @@ -2627,25 +2627,25 @@ msgid "The bank accounts could not be retrieved by the SQL because" msgstr "Bankovní účty se nepodařilo získat na SQL, protože" -#: BankReconciliation.php:101 CustomerReceipt.php:719 +#: BankReconciliation.php:101 CustomerReceipt.php:737 #: DailyBankTransactions.php:28 Payments.php:737 SuppPaymentRun.php:317 msgid "The SQL used to retrieve the bank accounts was" msgstr "SQL slouží k získání bankovní účty byly" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 msgid "Bank Accounts have not yet been defined" msgstr "Bankovní účty dosud nebyly definovány" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 msgid "You must first" msgstr "Musíte nejprve" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 #: DailyBankTransactions.php:38 Payments.php:749 SuppPaymentRun.php:330 msgid "define the bank accounts" msgstr "definovat bankovních účtů" -#: BankReconciliation.php:111 CustomerReceipt.php:733 +#: BankReconciliation.php:111 CustomerReceipt.php:757 #: DailyBankTransactions.php:38 Payments.php:749 SuppPaymentRun.php:330 msgid "and general ledger accounts to be affected" msgstr "a účtů hlavní knihy mohly být postiženy" @@ -2686,7 +2686,7 @@ #: PrintCustTransPortrait.php:1038 StockMovements.php:93 #: SupplierAllocations.php:454 SupplierAllocations.php:567 #: SupplierAllocations.php:642 SupplierTransInquiry.php:101 -#: Z_CheckAllocs.php:58 Z_CheckGLTransBalance.php:12 +#: Z_CheckAllocs.php:63 Z_CheckGLTransBalance.php:12 #: includes/PDFQuotationPageHeader.inc:88 #: includes/PDFQuotationPortraitPageHeader.inc:86 #: includes/PDFStatementPageHeader.inc:168 @@ -2701,7 +2701,7 @@ #: GLAccountReport.php:337 PDFRemittanceAdvice.php:301 #: PaymentAllocations.php:64 PaymentAllocations.php:65 ShiptsList.php:37 #: StockCounts.php:99 StockCounts.php:135 StockLocMovements.php:93 -#: StockMovements.php:98 Z_CheckAllocs.php:59 +#: StockMovements.php:98 Z_CheckAllocs.php:64 #: includes/PDFBankingSummaryPageHeader.inc:40 #: includes/PDFCustTransListingPageHeader.inc:49 #: includes/PDFPeriodStockTransListingPageHeader.inc:48 @@ -2825,7 +2825,7 @@ #: COGSGLPostings.php:90 COGSGLPostings.php:189 COGSGLPostings.php:305 #: Customers.php:747 Customers.php:750 DiscountMatrix.php:96 -#: DiscountMatrix.php:153 Prices.php:223 PricesByCost.php:262 +#: DiscountMatrix.php:160 Prices.php:223 PricesByCost.php:262 #: SalesAnalRepts.php:32 SalesAnalRepts.php:34 SalesGLPostings.php:112 #: SalesGLPostings.php:224 SalesGLPostings.php:354 SelectOrderItems.php:710 #: api/api_xml-rpc.php:931 api/api_xml-rpc.php:974 @@ -2841,7 +2841,7 @@ msgid "Are you sure you wish to delete this COGS GL posting record?" msgstr "Jste si jisti, že chcete smazat tuto cenu?" -#: COGSGLPostings.php:190 CustomerReceipt.php:956 GLJournal.php:385 +#: COGSGLPostings.php:190 CustomerReceipt.php:1017 GLJournal.php:385 #: GLTransInquiry.php:44 Payments.php:1035 SupplierTransInquiry.php:170 #: TaxAuthorities.php:148 TaxAuthorities.php:149 index.php:1288 msgid "GL Account" @@ -2953,29 +2953,29 @@ msgid "Tax Authority Reference" msgstr "Daňový úřad Reference" -#: CompanyPreferences.php:238 Factors.php:207 +#: CompanyPreferences.php:238 Factors.php:210 msgid "Address Line 1" msgstr "1. řádek adresy" -#: CompanyPreferences.php:243 Factors.php:209 +#: CompanyPreferences.php:243 Factors.php:213 msgid "Address Line 2" msgstr "2. řádek adresy" -#: CompanyPreferences.php:248 Factors.php:211 +#: CompanyPreferences.php:248 Factors.php:217 msgid "Address Line 3" msgstr "3. řádek adresy" -#: CompanyPreferences.php:253 Factors.php:213 +#: CompanyPreferences.php:253 Factors.php:221 msgid "Address Line 4" msgstr "4. řádek adresy" #: CompanyPreferences.php:258 Customers.php:459 Customers.php:704 -#: Customers.php:734 Factors.php:215 +#: Customers.php:734 Factors.php:225 msgid "Address Line 5" msgstr "5. řádek adresy" #: CompanyPreferences.php:263 Customers.php:461 Customers.php:708 -#: Customers.php:738 Factors.php:217 +#: Customers.php:738 Factors.php:229 msgid "Address Line 6" msgstr "6. řádek adresy" @@ -2987,9 +2987,9 @@ msgid "Facsimile Number" msgstr "Faxové číslo" -#: CompanyPreferences.php:278 CustLoginSetup.php:150 Customers.php:449 -#: SuppLoginSetup.php:138 Suppliers.php:679 Suppliers.php:856 -#: WWW_Users.php:445 +#: CompanyPreferences.php:278 CustLoginSetup.php:161 Customers.php:449 +#: SuppLoginSetup.php:147 Suppliers.php:679 Suppliers.php:856 +#: WWW_Users.php:448 msgid "Email Address" msgstr "E-mailová adresa" @@ -3047,7 +3047,7 @@ #: CompanyPreferences.php:519 ConfirmDispatch_Invoice.php:617 #: ConfirmDispatch_Invoice.php:1645 Credit_Invoice.php:1509 -#: FixedAssetItems.php:120 FixedAssetItems.php:573 GLBudgets.php:234 +#: FixedAssetItems.php:123 FixedAssetItems.php:625 GLBudgets.php:234 #: GLTags.php:64 GoodsReceived.php:248 GoodsReceived.php:254 #: GoodsReceived.php:261 GoodsReceived.php:738 Labels.php:259 #: MRPCalendar.php:314 PO_AuthoriseMyOrders.php:138 Payments.php:886 @@ -3177,10 +3177,10 @@ msgid "Confirm Dispatch and Invoice" msgstr "Potvrdit Expedice a faktury" -#: ConfirmDispatch_Invoice.php:248 Contracts.php:772 CustLoginSetup.php:21 -#: CustLoginSetup.php:22 CustomerAllocations.php:327 CustomerBranches.php:363 +#: ConfirmDispatch_Invoice.php:248 Contracts.php:772 CustLoginSetup.php:31 +#: CustLoginSetup.php:32 CustomerAllocations.php:327 CustomerBranches.php:363 #: CustomerBranches.php:532 CustomerBranches.php:579 CustomerInquiry.php:126 -#: CustomerReceipt.php:846 CustomerReceipt.php:897 CustomerReceipt.php:1022 +#: CustomerReceipt.php:894 CustomerReceipt.php:948 CustomerReceipt.php:1096 #: CustomerTransInquiry.php:101 Customers.php:14 Customers.php:325 #: DeliveryDetails.php:804 FTP_RadioBeacon.php:51 PDFOrderStatus.php:275 #: PDFOrdersInvoiced.php:305 PricesByCost.php:153 SalesGraph.php:180 @@ -3202,14 +3202,14 @@ #: ConfirmDispatch_Invoice.php:248 CustEDISetup.php:93 Customers.php:440 #: Customers.php:643 Customers.php:678 DeliveryDetails.php:804 #: OrderDetails.php:67 SalesAnalRepts.php:27 SalesAnalRepts.php:29 -#: WWW_Users.php:272 WWW_Users.php:491 Z_ChangeBranchCode.php:199 +#: WWW_Users.php:275 WWW_Users.php:494 Z_ChangeBranchCode.php:201 #: includes/PDFStatementPageHeader.inc:112 includes/PDFTransPageHeader.inc:46 #: includes/PDFTransPageHeaderPortrait.inc:55 msgid "Customer Code" msgstr "Kód zákazníka" -#: ConfirmDispatch_Invoice.php:249 CustEDISetup.php:96 CustomerReceipt.php:235 -#: CustomerReceipt.php:1041 Customers.php:443 Customers.php:684 +#: ConfirmDispatch_Invoice.php:249 CustEDISetup.php:96 CustomerReceipt.php:248 +#: CustomerReceipt.php:1123 Customers.php:443 Customers.php:684 #: Customers.php:714 DeliveryDetails.php:805 OrderDetails.php:69 #: POReport.php:494 POReport.php:1268 SalesInquiry.php:754 #: SalesInquiry.php:764 SalesInquiry.php:788 SalesInquiry.php:932 @@ -3311,7 +3311,7 @@ msgstr "Cena" #: ConfirmDispatch_Invoice.php:272 CounterSales.php:736 Credit_Invoice.php:275 -#: CustomerReceipt.php:845 DeliveryDetails.php:828 OrderDetails.php:167 +#: CustomerReceipt.php:893 DeliveryDetails.php:828 OrderDetails.php:167 #: PrintCustTrans.php:865 PrintCustTrans.php:954 PrintCustTrans.php:1003 #: PrintCustTransPortrait.php:912 PrintCustTransPortrait.php:1010 #: PrintCustTransPortrait.php:1067 RecurringSalesOrders.php:323 @@ -3864,7 +3864,7 @@ msgstr "Nelze načíst mbflag" #: ConfirmDispatch_Invoice.php:925 CounterSales.php:1317 -#: FixedAssetItems.php:574 SalesAnalReptCols.php:328 Stocks.php:1199 +#: FixedAssetItems.php:627 SalesAnalReptCols.php:328 Stocks.php:1199 #: Suppliers.php:965 includes/MiscFunctions.php:36 msgid "WARNING" msgstr "UPOZORNĚNÍ" @@ -3893,7 +3893,7 @@ #: ConfirmDispatch_Invoice.php:959 CounterSales.php:1352 #: Credit_Invoice.php:696 EDIMessageFormat.php:43 EDISendInvoices.php:105 -#: FixedAssetCategories.php:86 FixedAssetCategories.php:105 +#: FixedAssetCategories.php:90 FixedAssetCategories.php:109 #: PricesBasedOnMarkUp.php:334 PricesBasedOnMarkUp.php:350 #: SelectCreditItems.php:1407 SpecialOrder.php:493 StockCategories.php:23 #: StockCategories.php:84 StockCategories.php:155 Z_ReApplyCostToSA.php:62 @@ -4175,7 +4175,7 @@ #: ConfirmDispatch_Invoice.php:1601 ConfirmDispatch_Invoice.php:1603 #: ContractBOM.php:293 CounterSales.php:1969 CounterSales.php:1971 -#: CustomerReceipt.php:528 DeliveryDetails.php:577 DeliveryDetails.php:581 +#: CustomerReceipt.php:542 DeliveryDetails.php:577 DeliveryDetails.php:581 #: DeliveryDetails.php:779 DeliveryDetails.php:782 GLBalanceSheet.php:18 #: GLProfit_Loss.php:22 GLTagProfit_Loss.php:22 GLTagProfit_Loss.php:519 #: GLTags.php:51 GLTransInquiry.php:36 PDFStockLocTransfer.php:28 @@ -4282,7 +4282,7 @@ msgstr "To je problém výběru část záznamy k zobrazení, protože" #: ContractBOM.php:140 PO_Items.php:989 SupplierTenders.php:471 -#: Z_ChangeStockCategory.php:63 Z_ChangeStockCode.php:92 +#: Z_ChangeStockCategory.php:63 Z_ChangeStockCode.php:104 msgid "The SQL statement that failed was" msgstr "Příkazu SQL, který byl neúspěšný" @@ -4391,13 +4391,13 @@ msgid "Create a New Stock Item" msgstr "Vytvoření nové položky skladem" -#: ContractBOM.php:348 FixedAssetItems.php:473 Stocks.php:838 +#: ContractBOM.php:348 FixedAssetItems.php:490 Stocks.php:838 #: SupplierTenders.php:492 msgid "Image" msgstr "Obrázek" -#: ContractBOM.php:368 CounterSales.php:2029 FixedAssetItems.php:468 -#: FixedAssetItems.php:472 PO_Items.php:1098 SalesCategories.php:248 +#: ContractBOM.php:368 CounterSales.php:2029 FixedAssetItems.php:485 +#: FixedAssetItems.php:489 PO_Items.php:1098 SalesCategories.php:248 #: SelectCreditItems.php:1017 SelectOrderItems.php:1489 #: SelectOrderItems.php:1667 Stocks.php:832 Stocks.php:836 #: SupplierTenders.php:518 WorkOrderEntry.php:643 WorkOrderIssue.php:709 @@ -4505,7 +4505,7 @@ #: PO_SelectOSPurchOrder.php:480 PO_SelectPurchOrder.php:431 PurchData.php:164 #: ReprintGRN.php:78 SelectProduct.php:349 SelectSupplier.php:143 #: ShipmentCosting.php:531 ShipmentCosting.php:608 Shipt_Select.php:293 -#: ShiptsList.php:11 SuppCreditGRNs.php:269 SuppLoginSetup.php:24 +#: ShiptsList.php:11 SuppCreditGRNs.php:269 SuppLoginSetup.php:33 #: SuppPriceList.php:205 SuppPriceList.php:276 SupplierAllocations.php:566 #: SupplierAllocations.php:641 SupplierCredit.php:262 SupplierInquiry.php:118 #: SupplierInvoice.php:234 SupplierTransInquiry.php:104 @@ -5018,7 +5018,7 @@ "Alespoň jednoho zákazníka Obor Název klíčového slova nebo výpis z oboru " "zákazníka kódu nebo pobočky telefonní číslo musí být zapsány na vyhledávání" -#: Contracts.php:663 CustomerReceipt.php:574 SelectCustomer.php:163 +#: Contracts.php:663 CustomerReceipt.php:592 SelectCustomer.php:163 #: SelectOrderItems.php:327 msgid "The searched customer records requested cannot be retrieved because" msgstr "Hledali záznamy zákazníků požadovaná nelze načíst, protože" @@ -5125,12 +5125,12 @@ msgid "Branch" msgstr "Větev" -#: Contracts.php:774 Factors.php:260 SelectCreditItems.php:240 +#: Contracts.php:774 Factors.php:289 SelectCreditItems.php:240 #: SelectCustomer.php:415 SelectOrderItems.php:603 SupplierContacts.php:226 msgid "Contact" msgstr "Kontakt" -#: Contracts.php:776 EmailConfirmation.php:160 Factors.php:223 +#: Contracts.php:776 EmailConfirmation.php:160 Factors.php:241 #: PDFCustomerList.php:342 PDFRemittanceAdvice.php:241 #: SelectCreditItems.php:242 SelectCustomer.php:418 SelectOrderItems.php:605 #: includes/PDFOrderPageHeader_generic.inc:32 @@ -5143,7 +5143,7 @@ msgid "Fax" msgstr "Fax" -#: Contracts.php:824 CustomerInquiry.php:126 CustomerReceipt.php:897 +#: Contracts.php:824 CustomerInquiry.php:126 CustomerReceipt.php:948 #: PDFRemittanceAdvice.php:267 PO_Header.php:600 PrintCustTrans.php:847 #: PrintCustTransPortrait.php:893 SupplierInquiry.php:118 #: includes/PDFQuotationPageHeader.inc:86 @@ -5174,7 +5174,7 @@ msgid "The stock categories could not be retrieved because" msgstr "Populace kategorie se nepodařilo získat, protože" -#: Contracts.php:850 FixedAssetItems.php:485 PricesBasedOnMarkUp.php:109 +#: Contracts.php:850 FixedAssetItems.php:504 PricesBasedOnMarkUp.php:109 #: SpecialOrder.php:690 Stocks.php:848 msgid "The SQL used to retrieve stock categories and failed was" msgstr "SQL slouží k načtení zásob kategorií a neúspěšný byl" @@ -5233,7 +5233,7 @@ msgid "Contract Status" msgstr "Stav zakázky" -#: Contracts.php:923 SuppLoginSetup.php:20 WWW_Users.php:21 index.php:20 +#: Contracts.php:923 SuppLoginSetup.php:29 WWW_Users.php:21 index.php:20 msgid "Setup" msgstr "Nastavení" @@ -5532,8 +5532,8 @@ msgid "Net" msgstr "Čistý" -#: CounterSales.php:816 CustomerReceipt.php:831 CustomerReceipt.php:848 -#: CustomerReceipt.php:1011 GLAccountInquiry.php:155 GLAccountReport.php:341 +#: CounterSales.php:816 CustomerReceipt.php:869 CustomerReceipt.php:896 +#: CustomerReceipt.php:1079 GLAccountInquiry.php:155 GLAccountReport.php:341 #: GLJournal.php:364 GLJournal.php:388 Payments.php:1036 #: SelectOrderItems.php:1402 SuppContractChgs.php:80 SuppContractChgs.php:167 #: SuppTransGLAnalysis.php:107 SuppTransGLAnalysis.php:199 @@ -5703,7 +5703,7 @@ msgstr "New Work Pořadové číslo" #: CounterSales.php:1212 DeliveryDetails.php:555 EDIMessageFormat.php:127 -#: EDIMessageFormat.php:204 Prices_Customer.php:36 +#: EDIMessageFormat.php:205 Prices_Customer.php:36 #: RecurringSalesOrdersProcess.php:88 ReverseGRN.php:336 SpecialOrder.php:116 #: SpecialOrder.php:119 msgid "for" @@ -5735,42 +5735,42 @@ msgstr "" "SQL, které se nepodařilo vložit GL transakce na vrub bankovního účtu bylo" -#: CounterSales.php:1827 CustomerReceipt.php:442 +#: CounterSales.php:1827 CustomerReceipt.php:456 msgid "Cannot insert a GL transaction for the bank account debit" msgstr "Nelze vložit transakce GL na vrub bankovního účtu" -#: CounterSales.php:1845 CustomerReceipt.php:491 +#: CounterSales.php:1845 CustomerReceipt.php:505 msgid "" "The SQL that failed to insert the GL transaction for the debtors account " "credit was" msgstr "" "SQL, které se nepodařilo vložit GL transakce pro dlužníky účet byl úvěr" -#: CounterSales.php:1846 CustomerReceipt.php:492 +#: CounterSales.php:1846 CustomerReceipt.php:506 msgid "Cannot insert a GL transaction for the debtors account credit" msgstr "Nelze vložit GL transakce pro dlužníky účet kreditní" -#: CounterSales.php:1898 CustomerReceipt.php:469 +#: CounterSales.php:1898 CustomerReceipt.php:483 msgid "The SQL that failed to insert the bank account transaction was" msgstr "SQL, které se nepodařilo vložit na bankovní účet, transakce byla" -#: CounterSales.php:1899 CustomerReceipt.php:470 +#: CounterSales.php:1899 CustomerReceipt.php:484 msgid "Cannot insert a bank transaction" msgstr "Nelze vložit bankovní transakce" -#: CounterSales.php:1927 CustomerReceipt.php:401 +#: CounterSales.php:1927 CustomerReceipt.php:415 msgid "The SQL that failed to insert the customer receipt transaction was" msgstr "SQL, které se nepodařilo vložit zákazníkovi přijetí transakce" -#: CounterSales.php:1928 CustomerReceipt.php:402 +#: CounterSales.php:1928 CustomerReceipt.php:416 msgid "Cannot insert a receipt transaction against the customer because" msgstr "Nelze vložit přijetí transakce vůči zákazníkovi, protože" -#: CounterSales.php:1937 CustomerReceipt.php:410 +#: CounterSales.php:1937 CustomerReceipt.php:424 msgid "The SQL that failed to update the date of the last payment received was" msgstr "SQL, které se nepodařilo aktualizovat datum poslední obdržela platbu," -#: CounterSales.php:1938 CustomerReceipt.php:411 +#: CounterSales.php:1938 CustomerReceipt.php:425 msgid "" "Cannot update the customer record for the date of the last payment received " "because" @@ -6394,9 +6394,9 @@ msgid "The currency code cannot contain any of the following characters" msgstr "Kód měny nemůže obsahovat žádný z těchto znaků" -#: Currencies.php:107 CustEDISetup.php:31 CustLoginSetup.php:40 -#: Customers.php:56 Stocks.php:113 SuppLoginSetup.php:42 TaxCategories.php:31 -#: WWW_Users.php:66 WorkCentres.php:35 Z_ChangeBranchCode.php:28 +#: Currencies.php:107 CustEDISetup.php:31 CustLoginSetup.php:51 +#: Customers.php:56 Stocks.php:113 SuppLoginSetup.php:51 TaxCategories.php:31 +#: WWW_Users.php:68 WorkCentres.php:35 Z_ChangeBranchCode.php:28 #: Z_ImportStocks.php:123 msgid "or a space" msgstr "nebo mezeru" @@ -6622,27 +6622,37 @@ msgid "Customer Login Configuration" msgstr "Přihlášení zákazníka konfigurace" -#: CustLoginSetup.php:22 SelectCustomer.php:210 SuppLoginSetup.php:24 +#: CustLoginSetup.php:15 +#, fuzzy +msgid "A customer must first be selected before logins can be defined for it" +msgstr "Položka musí být nejprve vybrán před tuto stránku se nazývá" + +#: CustLoginSetup.php:15 +#, fuzzy +msgid "Select A Customer" +msgstr "Vybrat zákazníka" + +#: CustLoginSetup.php:32 SelectCustomer.php:210 SuppLoginSetup.php:33 msgid " has been selected" msgstr " byla vybrána" -#: CustLoginSetup.php:37 SuppLoginSetup.php:39 WWW_Users.php:63 +#: CustLoginSetup.php:48 SuppLoginSetup.php:48 WWW_Users.php:65 msgid "The user ID entered must be at least 4 characters long" msgstr "ID uživatele, zadal musí být nejméně 4 znaky dlouhé" -#: CustLoginSetup.php:40 SuppLoginSetup.php:42 WWW_Users.php:66 +#: CustLoginSetup.php:51 SuppLoginSetup.php:51 WWW_Users.php:68 msgid "User names cannot contain any of the following characters" msgstr "Uživatelská jména nesmí obsahovat žádný z následujících znaků" -#: CustLoginSetup.php:44 SuppLoginSetup.php:46 WWW_Users.php:70 +#: CustLoginSetup.php:55 SuppLoginSetup.php:55 WWW_Users.php:72 msgid "The password entered must be at least 5 characters long" msgstr "Zadané heslo musí být minimálně 5 znaků" -#: CustLoginSetup.php:48 SuppLoginSetup.php:50 WWW_Users.php:74 +#: CustLoginSetup.php:59 SuppLoginSetup.php:59 WWW_Users.php:76 msgid "The password cannot contain the user id" msgstr "Heslo nesmí obsahovat uživatelské id" -#: CustLoginSetup.php:51 WWW_Users.php:77 +#: CustLoginSetup.php:62 WWW_Users.php:80 msgid "" "If you enter a Customer Code you must also enter a Branch Code valid for " "this Customer" @@ -6650,109 +6660,109 @@ "Zadáte-li kód zákazníka, musíte také zadat Pobočka kodex platný pro tohoto " "zákazníka" -#: CustLoginSetup.php:61 WWW_Users.php:102 +#: CustLoginSetup.php:72 WWW_Users.php:105 msgid "The check on validity of the customer code and branch failed because" msgstr "Kontrola platnosti kód zákazníka a větve se nezdařilo, protože" -#: CustLoginSetup.php:62 WWW_Users.php:103 +#: CustLoginSetup.php:73 WWW_Users.php:106 msgid "The SQL that was used to check the customer code and branch was" msgstr "SQL, který byl použit ke kontrole kód zákazníka a větev byla" -#: CustLoginSetup.php:66 WWW_Users.php:107 +#: CustLoginSetup.php:77 WWW_Users.php:110 msgid "The entered Branch Code is not valid for the entered Customer Code" msgstr "Vstoupil Pobočka Kód není platný pro zadané kód zákazníka" -#: CustLoginSetup.php:104 SuppLoginSetup.php:93 +#: CustLoginSetup.php:115 SuppLoginSetup.php:102 #, fuzzy msgid "The user could not be added because" msgstr "Aktivum nelze přidat, protože" -#: CustLoginSetup.php:105 SuppLoginSetup.php:94 +#: CustLoginSetup.php:116 SuppLoginSetup.php:103 #, fuzzy msgid "The SQL that was used to insert the new user and failed was" msgstr "SQL, který byl použit k aktualizaci uživatele a neúspěšný byl" -#: CustLoginSetup.php:107 +#: CustLoginSetup.php:118 #, fuzzy msgid "A new customer login has been created" msgstr "Nové práce, aby byla vytvořena pro" -#: CustLoginSetup.php:120 SuppLoginSetup.php:108 WWW_Users.php:268 -#: WWW_Users.php:402 +#: CustLoginSetup.php:131 SuppLoginSetup.php:117 WWW_Users.php:271 +#: WWW_Users.php:405 msgid "User Login" msgstr "Přihlášení uživatele" -#: CustLoginSetup.php:138 SMTPServer.php:59 SuppLoginSetup.php:126 -#: WWW_Users.php:433 includes/Login.php:59 +#: CustLoginSetup.php:149 SMTPServer.php:59 SuppLoginSetup.php:135 +#: WWW_Users.php:436 includes/Login.php:59 msgid "Password" msgstr "Heslo" -#: CustLoginSetup.php:142 SuppLoginSetup.php:130 WWW_Users.php:269 -#: WWW_Users.php:437 +#: CustLoginSetup.php:153 SuppLoginSetup.php:139 WWW_Users.php:272 +#: WWW_Users.php:440 msgid "Full Name" msgstr "Celé jméno" -#: CustLoginSetup.php:146 Locations.php:555 SalesPeople.php:330 -#: SuppLoginSetup.php:134 SupplierContacts.php:262 WWW_Users.php:441 +#: CustLoginSetup.php:157 Locations.php:555 SalesPeople.php:330 +#: SuppLoginSetup.php:143 SupplierContacts.php:262 WWW_Users.php:444 msgid "Telephone No" msgstr "Telefonní číslo" -#: CustLoginSetup.php:155 CustomerBranches.php:545 CustomerBranches.php:582 -#: WWW_Users.php:273 WWW_Users.php:496 +#: CustLoginSetup.php:166 CustomerBranches.php:545 CustomerBranches.php:582 +#: WWW_Users.php:276 WWW_Users.php:499 #: includes/PDFCustomerListPageHeader.inc:84 api/api_xml-rpc.php:244 msgid "Branch Code" msgstr "Kód oboru" -#: CustLoginSetup.php:175 SuppLoginSetup.php:196 WWW_Users.php:530 +#: CustLoginSetup.php:186 SuppLoginSetup.php:205 WWW_Users.php:533 msgid "Reports Page Size" msgstr "Zprávy Velikost stránky" -#: CustLoginSetup.php:179 CustLoginSetup.php:181 EmailConfirmation.php:119 +#: CustLoginSetup.php:190 CustLoginSetup.php:192 EmailConfirmation.php:119 #: PrintCustOrder.php:101 PrintCustOrder_generic.php:111 -#: SuppLoginSetup.php:200 SuppLoginSetup.php:202 WWW_Users.php:534 -#: WWW_Users.php:536 +#: SuppLoginSetup.php:209 SuppLoginSetup.php:211 WWW_Users.php:537 +#: WWW_Users.php:539 msgid "A4" msgstr "A4" -#: CustLoginSetup.php:185 CustLoginSetup.php:187 CustLoginSetup.php:191 -#: CustLoginSetup.php:193 SuppLoginSetup.php:206 SuppLoginSetup.php:208 -#: SuppLoginSetup.php:212 SuppLoginSetup.php:214 WWW_Users.php:540 -#: WWW_Users.php:542 WWW_Users.php:546 WWW_Users.php:548 +#: CustLoginSetup.php:196 CustLoginSetup.php:198 CustLoginSetup.php:202 +#: CustLoginSetup.php:204 SuppLoginSetup.php:215 SuppLoginSetup.php:217 +#: SuppLoginSetup.php:221 SuppLoginSetup.php:223 WWW_Users.php:543 +#: WWW_Users.php:545 WWW_Users.php:549 WWW_Users.php:551 msgid "A3" msgstr "A3" -#: CustLoginSetup.php:191 CustLoginSetup.php:193 CustLoginSetup.php:203 -#: CustLoginSetup.php:205 CustLoginSetup.php:214 CustLoginSetup.php:216 +#: CustLoginSetup.php:202 CustLoginSetup.php:204 CustLoginSetup.php:214 +#: CustLoginSetup.php:216 CustLoginSetup.php:225 CustLoginSetup.php:227 #: EmailConfirmation.php:119 PrintCustOrder.php:101 -#: PrintCustOrder_generic.php:111 SuppLoginSetup.php:212 -#: SuppLoginSetup.php:214 SuppLoginSetup.php:224 SuppLoginSetup.php:226 -#: SuppLoginSetup.php:235 SuppLoginSetup.php:237 WWW_Users.php:546 -#: WWW_Users.php:548 WWW_Users.php:558 WWW_Users.php:560 WWW_Users.php:569 -#: WWW_Users.php:571 +#: PrintCustOrder_generic.php:111 SuppLoginSetup.php:221 +#: SuppLoginSetup.php:223 SuppLoginSetup.php:233 SuppLoginSetup.php:235 +#: SuppLoginSetup.php:244 SuppLoginSetup.php:246 WWW_Users.php:549 +#: WWW_Users.php:551 WWW_Users.php:561 WWW_Users.php:563 WWW_Users.php:572 +#: WWW_Users.php:574 msgid "landscape" msgstr "na šířku" -#: CustLoginSetup.php:197 CustLoginSetup.php:199 CustLoginSetup.php:203 -#: CustLoginSetup.php:205 SuppLoginSetup.php:218 SuppLoginSetup.php:220 -#: SuppLoginSetup.php:224 SuppLoginSetup.php:226 WWW_Users.php:552 -#: WWW_Users.php:554 WWW_Users.php:558 WWW_Users.php:560 +#: CustLoginSetup.php:208 CustLoginSetup.php:210 CustLoginSetup.php:214 +#: CustLoginSetup.php:216 SuppLoginSetup.php:227 SuppLoginSetup.php:229 +#: SuppLoginSetup.php:233 SuppLoginSetup.php:235 WWW_Users.php:555 +#: WWW_Users.php:557 WWW_Users.php:561 WWW_Users.php:563 msgid "Letter" msgstr "Dopis" -#: CustLoginSetup.php:209 CustLoginSetup.php:211 CustLoginSetup.php:214 -#: CustLoginSetup.php:216 SuppLoginSetup.php:230 SuppLoginSetup.php:232 -#: SuppLoginSetup.php:235 SuppLoginSetup.php:237 WWW_Users.php:564 -#: WWW_Users.php:566 WWW_Users.php:569 WWW_Users.php:571 +#: CustLoginSetup.php:220 CustLoginSetup.php:222 CustLoginSetup.php:225 +#: CustLoginSetup.php:227 SuppLoginSetup.php:239 SuppLoginSetup.php:241 +#: SuppLoginSetup.php:244 SuppLoginSetup.php:246 WWW_Users.php:567 +#: WWW_Users.php:569 WWW_Users.php:572 WWW_Users.php:574 msgid "Legal" msgstr "Právní" -#: CustLoginSetup.php:222 SuppLoginSetup.php:243 UserSettings.php:146 -#: WWW_Users.php:279 WWW_Users.php:578 +#: CustLoginSetup.php:233 SuppLoginSetup.php:252 UserSettings.php:146 +#: WWW_Users.php:282 WWW_Users.php:581 msgid "Theme" msgstr "Téma" -#: CustLoginSetup.php:244 SuppLoginSetup.php:267 UserSettings.php:127 -#: WWW_Users.php:280 WWW_Users.php:603 +#: CustLoginSetup.php:255 SuppLoginSetup.php:276 UserSettings.php:127 +#: WWW_Users.php:283 WWW_Users.php:606 msgid "Language" msgstr "Jazyk" @@ -6778,7 +6788,7 @@ msgid "The transaction number to be queried must be entered first" msgstr "Číslo transakce, které budou dotazovány musí být zapsány první" -#: CustWhereAlloc.php:87 CustomerTransInquiry.php:90 Z_CheckAllocs.php:51 +#: CustWhereAlloc.php:87 CustomerTransInquiry.php:90 Z_CheckAllocs.php:56 msgid "" "The customer transactions for the selected criteria could not be retrieved " "because" @@ -6797,23 +6807,23 @@ msgstr "Celkem transakce" #: CustWhereAlloc.php:108 CustomerTransInquiry.php:106 -#: SupplierTransInquiry.php:107 Z_CheckAllocs.php:60 +#: SupplierTransInquiry.php:107 Z_CheckAllocs.php:65 msgid "Ex Rate" msgstr "Ex Hodnotit" -#: CustWhereAlloc.php:110 Z_CheckAllocs.php:62 +#: CustWhereAlloc.php:110 Z_CheckAllocs.php:67 msgid "Alloc" msgstr "Alloc" #: CustWhereAlloc.php:128 EmailCustTrans.php:12 SalesInquiry.php:1080 -#: SupplierCredit.php:1113 Z_CheckAllocs.php:80 +#: SupplierCredit.php:1113 Z_CheckAllocs.php:85 msgid "Credit Note" msgstr "Dobropis" #: CustWhereAlloc.php:130 PcAssignCashToTab.php:225 PcAssignCashToTab.php:361 #: PcAuthorizeExpenses.php:93 PcClaimExpensesFromTab.php:215 #: PcClaimExpensesFromTab.php:379 PcReportTab.php:174 PcReportTab.php:328 -#: Z_CheckAllocs.php:82 Z_SalesIntegrityCheck.php:90 +#: Z_CheckAllocs.php:87 Z_SalesIntegrityCheck.php:90 #: Z_SalesIntegrityCheck.php:105 msgid "Receipt" msgstr "Obdržení" @@ -6879,7 +6889,7 @@ msgid "Allocate Receipt" msgstr "Příjem přidělit" -#: CustomerAllocations.php:322 CustomerReceipt.php:529 +#: CustomerAllocations.php:322 CustomerReceipt.php:543 msgid "Allocate Receipts" msgstr "Příjmy přidělit" @@ -6922,7 +6932,7 @@ msgstr "Přesto se" #: CustomerAllocations.php:365 CustomerAllocations.php:491 -#: CustomerAllocations.php:532 CustomerReceipt.php:231 CustomerReceipt.php:529 +#: CustomerAllocations.php:532 CustomerReceipt.php:240 CustomerReceipt.php:543 #: SupplierAllocations.php:458 SupplierAllocations.php:594 #: SupplierAllocations.php:670 #, php-format @@ -6974,7 +6984,7 @@ msgid "Process Allocations" msgstr "Proces Přidělené" -#: CustomerAllocations.php:434 CustomerReceipt.php:1015 Labels.php:265 +#: CustomerAllocations.php:434 CustomerReceipt.php:1086 Labels.php:265 #: Payments.php:1026 PcAssignCashToTab.php:177 PcAssignCashToTab.php:373 #: PcAuthorizeExpenses.php:323 PcClaimExpensesFromTab.php:167 #: PcClaimExpensesFromTab.php:385 PcExpenses.php:344 PcExpensesTypeTab.php:140 @@ -7313,8 +7323,8 @@ msgid "Define Sales People" msgstr "Definice prodejců" -#: CustomerBranches.php:683 DailySalesInquiry.php:40 SalesPeople.php:170 -#: WWW_Users.php:275 +#: CustomerBranches.php:683 DailySalesInquiry.php:41 SalesPeople.php:170 +#: WWW_Users.php:278 msgid "Salesperson" msgstr "Prodejce" @@ -7369,7 +7379,7 @@ msgid "Phone Number" msgstr "Telefonní číslo" -#: CustomerBranches.php:763 Factors.php:262 +#: CustomerBranches.php:763 Factors.php:291 msgid "Fax Number" msgstr "Faxové číslo" @@ -7459,48 +7469,48 @@ msgid "The config value NumberOfMonthMustBeShown cannot be retrieved" msgstr "Config hodnota NumberOfMonthMustBeShown nelze načíst" -#: CustomerInquiry.php:127 CustomerReceipt.php:897 SelectOrderItems.php:711 +#: CustomerInquiry.php:127 CustomerReceipt.php:948 SelectOrderItems.php:711 #: SupplierCredit.php:264 SupplierInquiry.php:120 SupplierInvoice.php:236 msgid "Terms" msgstr "Podmínky" -#: CustomerInquiry.php:127 CustomerReceipt.php:897 Customers.php:512 +#: CustomerInquiry.php:127 CustomerReceipt.php:948 Customers.php:512 #: Customers.php:806 Customers.php:836 msgid "Credit Limit" msgstr "Úvěrový limit" -#: CustomerInquiry.php:128 CustomerReceipt.php:897 Customers.php:533 +#: CustomerInquiry.php:128 CustomerReceipt.php:948 Customers.php:533 #: Customers.php:873 Customers.php:879 Customers.php:897 Customers.php:919 #: Customers.php:924 index.php:1080 msgid "Credit Status" msgstr "Stav úvěru" -#: CustomerInquiry.php:131 CustomerReceipt.php:900 +#: CustomerInquiry.php:131 CustomerReceipt.php:952 msgid "ACCOUNT ON HOLD" msgstr "ÚČET NA HOLD" -#: CustomerInquiry.php:136 CustomerReceipt.php:905 PrintCustStatements.php:362 +#: CustomerInquiry.php:136 CustomerReceipt.php:958 PrintCustStatements.php:362 #: SupplierInquiry.php:142 msgid "Total Balance" msgstr "Celkem Zůstatek" -#: CustomerInquiry.php:137 CustomerReceipt.php:906 PrintCustStatements.php:358 +#: CustomerInquiry.php:137 CustomerReceipt.php:959 PrintCustStatements.php:358 #: SalesPeople.php:206 Shipments.php:396 Stocks.php:977 Stocks.php:979 #: SupplierInquiry.php:143 includes/PDFAgedDebtorsPageHeader.inc:50 #: includes/PDFAgedSuppliersPageHeader.inc:36 msgid "Current" msgstr "Proud" -#: CustomerInquiry.php:138 CustomerReceipt.php:907 SupplierInquiry.php:144 +#: CustomerInquiry.php:138 CustomerReceipt.php:960 SupplierInquiry.php:144 msgid "Now Due" msgstr "Nyní Díky" -#: CustomerInquiry.php:139 CustomerInquiry.php:140 CustomerReceipt.php:908 -#: CustomerReceipt.php:909 SupplierInquiry.php:145 SupplierInquiry.php:146 +#: CustomerInquiry.php:139 CustomerInquiry.php:140 CustomerReceipt.php:961 +#: CustomerReceipt.php:962 SupplierInquiry.php:145 SupplierInquiry.php:146 msgid "Days Overdue" msgstr "Dnů po splatnosti" -#: CustomerInquiry.php:140 CustomerReceipt.php:909 PrintCustStatements.php:361 +#: CustomerInquiry.php:140 CustomerReceipt.php:962 PrintCustStatements.php:361 #: SupplierInquiry.php:146 msgid "Over" msgstr "Přes" @@ -7522,7 +7532,7 @@ msgstr "Neexistují žádné transakce, k zobrazení, protože" #: CustomerInquiry.php:202 SupplierInquiry.php:211 -#: Z_CheckAllocationsFrom.php:29 Z_CheckAllocationsFrom.php:52 +#: Z_CheckAllocationsFrom.php:35 Z_CheckAllocationsFrom.php:60 #: includes/PDFStatementPageHeader.inc:172 msgid "Allocated" msgstr "Přidělených" @@ -7596,31 +7606,31 @@ msgid "Receipt Entry" msgstr "Příjem Vstup" -#: CustomerReceipt.php:32 +#: CustomerReceipt.php:35 msgid "A bank account must be selected for this receipt" msgstr "Bankovní účet, musí být vybrán pro tento příjem" -#: CustomerReceipt.php:47 Payments.php:699 +#: CustomerReceipt.php:54 Payments.php:699 msgid "The bank account name cannot be retrieved because" msgstr "Na bankovní účet, jméno nemůže získat, protože" -#: CustomerReceipt.php:56 Payments.php:709 +#: CustomerReceipt.php:63 Payments.php:709 msgid "The bank account number" msgstr "Číslo bankovního účtu" -#: CustomerReceipt.php:56 +#: CustomerReceipt.php:63 msgid "is not set up as a bank account" msgstr "není nastavena jako bankovní účet" -#: CustomerReceipt.php:69 +#: CustomerReceipt.php:76 msgid "The exchange rate entered should be numeric" msgstr "Směnného kurzu by měla být součástí číselné" -#: CustomerReceipt.php:76 +#: CustomerReceipt.php:83 msgid "The functional exchange rate entered should be numeric" msgstr "Funkční směnný kurz by měl být součástí číselné" -#: CustomerReceipt.php:92 +#: CustomerReceipt.php:99 msgid "" "Changing the currency of the receipt means that existing entries need to be " "re-done - only customers trading in the selected currency can be selected" @@ -7628,71 +7638,71 @@ "Změna měny přijetí znamená, že stávající položky je třeba re-udělat - jen " "zákazníci obchodování ve vybrané měně je možné zvolit" -#: CustomerReceipt.php:160 Payments.php:650 +#: CustomerReceipt.php:167 Payments.php:650 msgid "No General Ledger code has been chosen" msgstr "Č. General Ledger kód byl vybrán" -#: CustomerReceipt.php:160 GLJournal.php:171 Payments.php:633 Payments.php:650 +#: CustomerReceipt.php:167 GLJournal.php:171 Payments.php:633 Payments.php:650 msgid "so this GL analysis item could not be added" msgstr "takže tato analýza GL položky by neměly být přidávány" -#: CustomerReceipt.php:206 +#: CustomerReceipt.php:213 msgid "The company has not yet been set up properly" msgstr "Společnost dosud nebyl správně nastaven" -#: CustomerReceipt.php:206 +#: CustomerReceipt.php:213 msgid "this information is needed to process the batch" msgstr "tato informace je nutná ke zpracování dávky" -#: CustomerReceipt.php:206 +#: CustomerReceipt.php:213 msgid "Processing has been cancelled" msgstr "Zpracování byla zrušena" -#: CustomerReceipt.php:231 +#: CustomerReceipt.php:240 msgid "Summary of Receipt Batch" msgstr "Shrnutí Příjem dávky" -#: CustomerReceipt.php:233 +#: CustomerReceipt.php:246 msgid "Batch Number" msgstr "Číslo šarže" -#: CustomerReceipt.php:234 CustomerReceipt.php:753 +#: CustomerReceipt.php:247 CustomerReceipt.php:779 msgid "Date Banked" msgstr "Datum Uložené" -#: CustomerReceipt.php:236 CustomerReceipt.php:847 +#: CustomerReceipt.php:249 CustomerReceipt.php:895 msgid "GL Code" msgstr "GL kód" -#: CustomerReceipt.php:237 CustomerReceipt.php:996 +#: CustomerReceipt.php:250 CustomerReceipt.php:1061 msgid "Amount of Receipt" msgstr "Výše Příjem" -#: CustomerReceipt.php:260 +#: CustomerReceipt.php:274 msgid "Print a Customer Receipt" msgstr "Tisk účtenek zákazníka" -#: CustomerReceipt.php:284 +#: CustomerReceipt.php:298 msgid "Cannot insert a GL entry for the receipt because" msgstr "Nelze vložit záznam GL pro přijetí, protože" -#: CustomerReceipt.php:285 +#: CustomerReceipt.php:299 msgid "The SQL that failed to insert the receipt GL entry was" msgstr "SQL, které se nepodařilo vložit převzetí GL vstup" -#: CustomerReceipt.php:354 +#: CustomerReceipt.php:368 msgid "Act Transfer" msgstr "Zákon Transfer" -#: CustomerReceipt.php:363 +#: CustomerReceipt.php:377 msgid "The SQL that failed to insert the bank transaction was" msgstr "SQL, které se nepodařilo vložit bankovní transakce" -#: CustomerReceipt.php:364 Payments.php:553 Payments.php:579 +#: CustomerReceipt.php:378 Payments.php:553 Payments.php:579 msgid "Cannot insert a bank transaction using the SQL" msgstr "Nelze vložit bankovní transakce pomocí SQL" -#: CustomerReceipt.php:441 +#: CustomerReceipt.php:455 msgid "" "The SQL that failed to insert the GL transaction fro the bank account debit " "was" @@ -7700,38 +7710,38 @@ "SQL, které se nepodařilo vložit GL transakci spatřují na bankovní účet, " "debetní byl" -#: CustomerReceipt.php:515 +#: CustomerReceipt.php:529 msgid "" "The SQL that failed to insert the GL transaction for the payment discount " "debit was" msgstr "" "SQL, které se nepodařilo vložit GL transakci debetní platební sleva byla" -#: CustomerReceipt.php:516 +#: CustomerReceipt.php:530 msgid "Cannot in... [truncated message content] |
From: <dai...@us...> - 2011-11-08 09:03:16
|
Revision: 4742 http://web-erp.svn.sourceforge.net/web-erp/?rev=4742&view=rev Author: daintree Date: 2011-11-08 09:03:06 +0000 (Tue, 08 Nov 2011) Log Message: ----------- bug fixes Modified Paths: -------------- trunk/CounterSales.php trunk/CustomerReceipt.php trunk/GoodsReceived.php trunk/SelectSupplier.php trunk/Stocks.php trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/Add_SerialItems.php trunk/includes/GetConfig.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/CounterSales.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -39,7 +39,6 @@ foreach ($_POST as $FormVariable => $Quantity) { if (mb_strpos($FormVariable,'OrderQty')!==false) { $NewItemArray[$_POST['StockID' . mb_substr($FormVariable,8)]] = filter_number_format($Quantity); - echo '<br/> The quantitiy entered was ' . filter_number_format($Quantity) . ' the quantity for ' . $_POST['StockID' . mb_substr($FormVariable,8)] . ' unfiltered was: ' . $Quantity; } } } @@ -2022,7 +2021,7 @@ echo $TableHeader; $i = 0; $j = 1; - $k=0; //row colour counter + $k = 0; //row colour counter while ($myrow=DB_fetch_array($result2)) { // This code needs sorting out, but until then : @@ -2097,15 +2096,16 @@ $OnOrder = $PurchQty + $WoQty; $Available = $QOH - $DemandQty + $OnOrder; - + printf('<td>%s</font></td> <td>%s</td> <td>%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td><font size=1><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty%s" value="0" /><input type="hidden" name="StockID%s" value="%s" /> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><input class="number" tabindex="'.strval($j+7).'" type="text" size="6" name="OrderQty%s" value="0" /> + <input type="hidden" name="StockID%s" value="%s" /> </td> </tr>', $myrow['stockid'], @@ -2189,10 +2189,13 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID .'identifier='.$identifier . '" method="post" name="orderform">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; - echo '<tr><td><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; - echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td>'; - echo '<td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; - $TableHeader = '<tr><th>' . _('Code') . '</th> + echo '<tr> + <td><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td> + <td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td> + <td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td> + </tr>'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th> <th>' . _('On Hand') . '</th> @@ -2284,7 +2287,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty%s" value="0" /></font><input type="hidden" name="StockID%s" value="%s" /></td> + <td><input class="number" tabindex="'.strval($j+7).'" type="text" size="6" name="OrderQty%s" value="0" /></font><input type="hidden" name="StockID%s" value="%s" /></td> </tr>', $myrow['stockid'], $myrow['description'], @@ -2300,6 +2303,7 @@ $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; } $j++; + $i++; #end of page full new headings if } #end of while loop Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/CustomerReceipt.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -33,11 +33,11 @@ echo '<br />'; prnMsg(_('A bank account must be selected for this receipt'), 'warn'); - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else if(isset($_GET['NewReceipt'])) { - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else { - $BankAccountEmpty=FALSE; + $BankAccountEmpty=false; } if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ @@ -47,17 +47,21 @@ /*Get the bank account currency and set that too */ $SQL = "SELECT bankaccountname, - currcode + currcode, + decimalplaces FROM bankaccounts + INNER JOIN currencies + ON bankaccounts.currcode=currencies.currabrev WHERE accountcode='" . $_POST['BankAccount']."'"; $ErrMsg =_('The bank account name cannot be retrieved because'); $result= DB_query($SQL,$db,$ErrMsg); if (DB_num_rows($result)==1){ - $myrow = DB_fetch_row($result); - $_SESSION['ReceiptBatch']->BankAccountName = $myrow[0]; - $_SESSION['ReceiptBatch']->AccountCurrency=$myrow[1]; + $myrow = DB_fetch_array($result); + $_SESSION['ReceiptBatch']->BankAccountName = $myrow['bankaccountname']; + $_SESSION['ReceiptBatch']->AccountCurrency=$myrow['currcode']; + $_SESSION['ReceiptBatch']->CurrDecimalPlaces=$myrow['decimalplaces']; unset($result); } elseif (DB_num_rows($result)==0 AND !$BankAccountEmpty){ prnMsg( _('The bank account number') . ' ' . $_POST['BankAccount'] . ' ' . _('is not set up as a bank account'),'error'); Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/GoodsReceived.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -83,7 +83,7 @@ echo '<table class="selection"> <tr> <td>'. _('Date Goods/Service Received'). ':</td> - <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength=10 size=10 onChange="return isDate(this, this.value, '."'". + <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength="10" size="10" onChange="return isDate(this, this.value, '."'". $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_POST['DefaultReceivedDate'] . '"></td> </tr> </table> Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/SelectSupplier.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -321,7 +321,7 @@ } else { echo '<div class="centre"><br />'; echo '<tr><td colspan="2">'; - echo '<table width=45% colspan=2 border=2 cellpadding=4>'; + echo '<table width="45%" class="selection">'; echo '<tr><th width=33%>' . _('Supplier Mapping') . '</th></tr>'; echo '</td><td valign=top>'; /* Mapping */ echo '<div class="centre">' . _('Mapping is enabled, Map will display below.') . '</div>'; @@ -338,13 +338,13 @@ suppliersince, currencies.decimalplaces AS currdecimalplaces FROM suppliers INNER JOIN currencies - ON supplier.currcode=currencies.currabrev + ON suppliers.currcode=currencies.currabrev WHERE suppliers.supplierid ='" . $_SESSION['SupplierID'] . "'"; $ErrMsg = _('An error occurred in retrieving the information'); $DataResult = DB_query($sql, $db, $ErrMsg); $myrow = DB_fetch_array($DataResult); // Select some more data about the supplier - $SQL = "SELECT sum(-ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' and type != '20'"; + $SQL = "SELECT SUM(-ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' and type != '20'"; $Total1Result = DB_query($SQL, $db); $row = DB_fetch_array($Total1Result); echo '<br />'; Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/Stocks.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -754,7 +754,9 @@ discountcategory, taxcatid, decimalplaces, - nextserialno + nextserialno, + pansize, + shrinkfactor FROM stockmaster WHERE stockid = '".$StockID."'"; Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/UpgradeDatabase.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -44,7 +44,9 @@ prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('The webERP code is version') . ' ' . $Version . ' ' . _('and the database version is') . ' ' . $_SESSION['VersionNumber'] . '<br /><a target="_blank" href="' . $rootpath . '/BackupDatabase.php">' ._('Click to do a database backup now before proceeding!') . '</a>','info'); echo '<input type="hidden" name="OldVersion" value="' . $_SESSION['VersionNumber'] . '" />'; - echo '<div class="centre"><input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /></div>'; + echo '<div class="centre"> + <input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /> + </div>'; } } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/doc/Change.log 2011-11-08 09:03:06 UTC (rev 4742) @@ -1,5 +1,9 @@ webERP Change Log +8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim +8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier +8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces + 6/11/11 Release 4.06RC1 30/10/11 Exson: Modification to Stocks.php to avoid losing PanSize and ShrinkFactor Modified: trunk/includes/Add_SerialItems.php =================================================================== --- trunk/includes/Add_SerialItems.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/Add_SerialItems.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -80,7 +80,7 @@ $_POST['Bundles']=0; } //echo count($_POST['Bundles']); - for ($i=0;$i < count($_POST['Bundles']);$i++){ /*there is an entry in the multi select list box */ + for ($i=0;$i < count($_POST['Bundles']) AND $_POST['Bundles']!=0;$i++){ /*there is an entry in the multi select list box */ if ($LineItem->Serialised==1){ /*only if the item is serialised */ $LineItem->SerialItems[$_POST['Bundles'][$i]] = new SerialItem ($_POST['Bundles'][$i], ($InOutModifier>0 ? 1:-1) ); } else { Modified: trunk/includes/GetConfig.php =================================================================== --- trunk/includes/GetConfig.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/GetConfig.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -8,12 +8,12 @@ $sql = "SELECT confname, confvalue FROM config"; $ErrMsg = _('Could not get the configuration parameters from the database because'); $ConfigResult = DB_query($sql,$db,$ErrMsg); - while( $myrow = DB_fetch_row($ConfigResult) ) { - if (is_numeric($myrow[1]) and $myrow[0]!='DefaultPriceList'){ + while( $myrow = DB_fetch_array($ConfigResult) ) { + if (is_numeric($myrow['confvalue']) AND $myrow['confname']!='DefaultPriceList' AND $myrow['confname']!='VersionNumber'){ //the variable name is given by $myrow[0] - $_SESSION[$myrow[0]] = (double) $myrow[1]; + $_SESSION[$myrow['confname']] = (double) $myrow['confvalue']; } else { - $_SESSION[$myrow[0]] = $myrow[1]; + $_SESSION[$myrow['confname']] = $myrow['confvalue']; } } //end loop through all config variables $_SESSION['CompanyDefaultsLoaded'] = true; Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/InputSerialItems.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -48,7 +48,7 @@ $invalid_imports = 0; $valid = true; -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'" enctype="multipart/form-data" >'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'?identifier='.$identifier.'" enctype="multipart/form-data" >'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type=hidden name="LineNo" value="' . $LineNo . '">'; echo '<input type=hidden name="StockID" value="'. $StockID. '">'; @@ -84,9 +84,9 @@ global $tableheader; /* Link to clear the list and start from scratch */ -$EditLink = '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?EditControlled=true&StockID=' . $LineItem->StockID . +$EditLink = '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&EditControlled=true&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Edit'). '</a> | '; -$RemoveLink = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DELETEALL=YES&StockID=' . $LineItem->StockID . +$RemoveLink = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&DELETEALL=YES&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Remove All'). '</a><br /></div>'; $sql="SELECT perishable FROM stockmaster Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/InputSerialItemsKeyed.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -55,9 +55,9 @@ echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } - - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Delete'). '</a></td></tr>'; - + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'&identifier='.$identifier.'">'. _('Delete'). '</a></td> + </tr>'; + $TotalQuantity += $Bundle->BundleQty; } @@ -84,7 +84,7 @@ echo $tableheader; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" name="Ga6uF5Wa" method="post"> +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'" name="Ga6uF5Wa" method="post"> <input type=hidden name="LineNo" value="' . $LineNo . '"> <input type=hidden name="StockID" value="' . $StockID . '"> <input type=hidden name="EntryType" value="KEYED">'; @@ -101,7 +101,8 @@ if ($EditControlled){ foreach ($LineItem->SerialItems as $Bundle){ - echo '<tr><td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" value="' .$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; + echo '<tr> + <td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" value="' .$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; /*if the item is controlled not serialised - batch quantity required so just enter bundle refs into the form for entry of quantities manually */ @@ -110,10 +111,10 @@ echo '<input type=hidden name="Qty' . $StartAddingAt .'" Value=1></TR>'; } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength="10"></tr>'; } else { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength="10"></tr>'; } $StartAddingAt++; @@ -138,13 +139,22 @@ } } -echo '</table>'; -echo '<br /><div class=centre><input type="submit" name="AddBatches" value="'. _('Enter'). '"></div>'; -echo '</form></td><td valign="top">'; +echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="AddBatches" value="'. _('Enter'). '" /> + </div> + + </form> + </td> + <td valign="top">'; if ($ShowExisting){ include('includes/InputSerialItemsExisting.php'); } -echo '</td></tr></table><script type="text/javascript"> +echo '</td> + </tr> + </table> + <script type="text/javascript"> //<![CDATA[ document.Ga6uF5Wa.SerialNo0.focus(); //]]> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-08 09:03:16
|
Revision: 4742 http://web-erp.svn.sourceforge.net/web-erp/?rev=4742&view=rev Author: daintree Date: 2011-11-08 09:03:06 +0000 (Tue, 08 Nov 2011) Log Message: ----------- bug fixes Modified Paths: -------------- trunk/CounterSales.php trunk/CustomerReceipt.php trunk/GoodsReceived.php trunk/SelectSupplier.php trunk/Stocks.php trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/Add_SerialItems.php trunk/includes/GetConfig.php trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/CounterSales.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -39,7 +39,6 @@ foreach ($_POST as $FormVariable => $Quantity) { if (mb_strpos($FormVariable,'OrderQty')!==false) { $NewItemArray[$_POST['StockID' . mb_substr($FormVariable,8)]] = filter_number_format($Quantity); - echo '<br/> The quantitiy entered was ' . filter_number_format($Quantity) . ' the quantity for ' . $_POST['StockID' . mb_substr($FormVariable,8)] . ' unfiltered was: ' . $Quantity; } } } @@ -2022,7 +2021,7 @@ echo $TableHeader; $i = 0; $j = 1; - $k=0; //row colour counter + $k = 0; //row colour counter while ($myrow=DB_fetch_array($result2)) { // This code needs sorting out, but until then : @@ -2097,15 +2096,16 @@ $OnOrder = $PurchQty + $WoQty; $Available = $QOH - $DemandQty + $OnOrder; - + printf('<td>%s</font></td> <td>%s</td> <td>%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td style="text-align:center">%s</td> - <td><font size=1><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty%s" value="0" /><input type="hidden" name="StockID%s" value="%s" /> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td><input class="number" tabindex="'.strval($j+7).'" type="text" size="6" name="OrderQty%s" value="0" /> + <input type="hidden" name="StockID%s" value="%s" /> </td> </tr>', $myrow['stockid'], @@ -2189,10 +2189,13 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . SID .'identifier='.$identifier . '" method="post" name="orderform">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<table class="table1">'; - echo '<tr><td><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td>'; - echo '<td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td>'; - echo '<td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td></tr>'; - $TableHeader = '<tr><th>' . _('Code') . '</th> + echo '<tr> + <td><input type="hidden" name="previous" value="'.strval($Offset-1).'" /><input tabindex="'.strval($j+7).'" type="submit" name="Prev" value="'._('Prev').'" /></td> + <td style="text-align:center" colspan="6"><input type="hidden" name="SelectingOrderItems" value="1" /><input tabindex="'.strval($j+8).'" type="submit" value="'._('Add to Sale').'" /></td> + <td><input type="hidden" name="NextList" value="'.strval($Offset+1).'" /><input tabindex="'.strval($j+9).'" type="submit" name="Next" value="'._('Next').'" /></td> + </tr>'; + $TableHeader = '<tr> + <th>' . _('Code') . '</th> <th>' . _('Description') . '</th> <th>' . _('Units') . '</th> <th>' . _('On Hand') . '</th> @@ -2284,7 +2287,7 @@ <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> - <td><font size="1"><input class="number" tabindex="'.strval($j+7).'" type="textbox" size="6" name="OrderQty%s" value="0" /></font><input type="hidden" name="StockID%s" value="%s" /></td> + <td><input class="number" tabindex="'.strval($j+7).'" type="text" size="6" name="OrderQty%s" value="0" /></font><input type="hidden" name="StockID%s" value="%s" /></td> </tr>', $myrow['stockid'], $myrow['description'], @@ -2300,6 +2303,7 @@ $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; } $j++; + $i++; #end of page full new headings if } #end of while loop Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/CustomerReceipt.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -33,11 +33,11 @@ echo '<br />'; prnMsg(_('A bank account must be selected for this receipt'), 'warn'); - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else if(isset($_GET['NewReceipt'])) { - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else { - $BankAccountEmpty=FALSE; + $BankAccountEmpty=false; } if (!isset($_GET['Delete']) AND isset($_SESSION['ReceiptBatch'])){ @@ -47,17 +47,21 @@ /*Get the bank account currency and set that too */ $SQL = "SELECT bankaccountname, - currcode + currcode, + decimalplaces FROM bankaccounts + INNER JOIN currencies + ON bankaccounts.currcode=currencies.currabrev WHERE accountcode='" . $_POST['BankAccount']."'"; $ErrMsg =_('The bank account name cannot be retrieved because'); $result= DB_query($SQL,$db,$ErrMsg); if (DB_num_rows($result)==1){ - $myrow = DB_fetch_row($result); - $_SESSION['ReceiptBatch']->BankAccountName = $myrow[0]; - $_SESSION['ReceiptBatch']->AccountCurrency=$myrow[1]; + $myrow = DB_fetch_array($result); + $_SESSION['ReceiptBatch']->BankAccountName = $myrow['bankaccountname']; + $_SESSION['ReceiptBatch']->AccountCurrency=$myrow['currcode']; + $_SESSION['ReceiptBatch']->CurrDecimalPlaces=$myrow['decimalplaces']; unset($result); } elseif (DB_num_rows($result)==0 AND !$BankAccountEmpty){ prnMsg( _('The bank account number') . ' ' . $_POST['BankAccount'] . ' ' . _('is not set up as a bank account'),'error'); Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/GoodsReceived.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -83,7 +83,7 @@ echo '<table class="selection"> <tr> <td>'. _('Date Goods/Service Received'). ':</td> - <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength=10 size=10 onChange="return isDate(this, this.value, '."'". + <td><input type="text" class="date" alt="'. $_SESSION['DefaultDateFormat'] .'" maxlength="10" size="10" onChange="return isDate(this, this.value, '."'". $_SESSION['DefaultDateFormat']."'".')" name="DefaultReceivedDate" value="' . $_POST['DefaultReceivedDate'] . '"></td> </tr> </table> Modified: trunk/SelectSupplier.php =================================================================== --- trunk/SelectSupplier.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/SelectSupplier.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -321,7 +321,7 @@ } else { echo '<div class="centre"><br />'; echo '<tr><td colspan="2">'; - echo '<table width=45% colspan=2 border=2 cellpadding=4>'; + echo '<table width="45%" class="selection">'; echo '<tr><th width=33%>' . _('Supplier Mapping') . '</th></tr>'; echo '</td><td valign=top>'; /* Mapping */ echo '<div class="centre">' . _('Mapping is enabled, Map will display below.') . '</div>'; @@ -338,13 +338,13 @@ suppliersince, currencies.decimalplaces AS currdecimalplaces FROM suppliers INNER JOIN currencies - ON supplier.currcode=currencies.currabrev + ON suppliers.currcode=currencies.currabrev WHERE suppliers.supplierid ='" . $_SESSION['SupplierID'] . "'"; $ErrMsg = _('An error occurred in retrieving the information'); $DataResult = DB_query($sql, $db, $ErrMsg); $myrow = DB_fetch_array($DataResult); // Select some more data about the supplier - $SQL = "SELECT sum(-ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' and type != '20'"; + $SQL = "SELECT SUM(-ovamount) AS total FROM supptrans WHERE supplierno = '" . $_SESSION['SupplierID'] . "' and type != '20'"; $Total1Result = DB_query($SQL, $db); $row = DB_fetch_array($Total1Result); echo '<br />'; Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/Stocks.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -754,7 +754,9 @@ discountcategory, taxcatid, decimalplaces, - nextserialno + nextserialno, + pansize, + shrinkfactor FROM stockmaster WHERE stockid = '".$StockID."'"; Modified: trunk/UpgradeDatabase.php =================================================================== --- trunk/UpgradeDatabase.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/UpgradeDatabase.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -44,7 +44,9 @@ prnMsg(_('This script will perform any modifications to the database required to allow the additional functionality in later scripts.') . '<br />' . _('The webERP code is version') . ' ' . $Version . ' ' . _('and the database version is') . ' ' . $_SESSION['VersionNumber'] . '<br /><a target="_blank" href="' . $rootpath . '/BackupDatabase.php">' ._('Click to do a database backup now before proceeding!') . '</a>','info'); echo '<input type="hidden" name="OldVersion" value="' . $_SESSION['VersionNumber'] . '" />'; - echo '<div class="centre"><input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /></div>'; + echo '<div class="centre"> + <input type="submit" name="DoUpgrade" value="' . _('Perform Database Upgrade') . '" /> + </div>'; } } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/doc/Change.log 2011-11-08 09:03:06 UTC (rev 4742) @@ -1,5 +1,9 @@ webERP Change Log +8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim +8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier +8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces + 6/11/11 Release 4.06RC1 30/10/11 Exson: Modification to Stocks.php to avoid losing PanSize and ShrinkFactor Modified: trunk/includes/Add_SerialItems.php =================================================================== --- trunk/includes/Add_SerialItems.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/Add_SerialItems.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -80,7 +80,7 @@ $_POST['Bundles']=0; } //echo count($_POST['Bundles']); - for ($i=0;$i < count($_POST['Bundles']);$i++){ /*there is an entry in the multi select list box */ + for ($i=0;$i < count($_POST['Bundles']) AND $_POST['Bundles']!=0;$i++){ /*there is an entry in the multi select list box */ if ($LineItem->Serialised==1){ /*only if the item is serialised */ $LineItem->SerialItems[$_POST['Bundles'][$i]] = new SerialItem ($_POST['Bundles'][$i], ($InOutModifier>0 ? 1:-1) ); } else { Modified: trunk/includes/GetConfig.php =================================================================== --- trunk/includes/GetConfig.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/GetConfig.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -8,12 +8,12 @@ $sql = "SELECT confname, confvalue FROM config"; $ErrMsg = _('Could not get the configuration parameters from the database because'); $ConfigResult = DB_query($sql,$db,$ErrMsg); - while( $myrow = DB_fetch_row($ConfigResult) ) { - if (is_numeric($myrow[1]) and $myrow[0]!='DefaultPriceList'){ + while( $myrow = DB_fetch_array($ConfigResult) ) { + if (is_numeric($myrow['confvalue']) AND $myrow['confname']!='DefaultPriceList' AND $myrow['confname']!='VersionNumber'){ //the variable name is given by $myrow[0] - $_SESSION[$myrow[0]] = (double) $myrow[1]; + $_SESSION[$myrow['confname']] = (double) $myrow['confvalue']; } else { - $_SESSION[$myrow[0]] = $myrow[1]; + $_SESSION[$myrow['confname']] = $myrow['confvalue']; } } //end loop through all config variables $_SESSION['CompanyDefaultsLoaded'] = true; Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/InputSerialItems.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -48,7 +48,7 @@ $invalid_imports = 0; $valid = true; -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'" enctype="multipart/form-data" >'; +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF']) .'?identifier='.$identifier.'" enctype="multipart/form-data" >'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; echo '<input type=hidden name="LineNo" value="' . $LineNo . '">'; echo '<input type=hidden name="StockID" value="'. $StockID. '">'; @@ -84,9 +84,9 @@ global $tableheader; /* Link to clear the list and start from scratch */ -$EditLink = '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?EditControlled=true&StockID=' . $LineItem->StockID . +$EditLink = '<br /><div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&EditControlled=true&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Edit'). '</a> | '; -$RemoveLink = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DELETEALL=YES&StockID=' . $LineItem->StockID . +$RemoveLink = '<a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'&DELETEALL=YES&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Remove All'). '</a><br /></div>'; $sql="SELECT perishable FROM stockmaster Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-11-06 07:09:21 UTC (rev 4741) +++ trunk/includes/InputSerialItemsKeyed.php 2011-11-08 09:03:06 UTC (rev 4742) @@ -55,9 +55,9 @@ echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } - - echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'">'. _('Delete'). '</a></td></tr>'; - + echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'&identifier='.$identifier.'">'. _('Delete'). '</a></td> + </tr>'; + $TotalQuantity += $Bundle->BundleQty; } @@ -84,7 +84,7 @@ echo $tableheader; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" name="Ga6uF5Wa" method="post"> +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier.'" name="Ga6uF5Wa" method="post"> <input type=hidden name="LineNo" value="' . $LineNo . '"> <input type=hidden name="StockID" value="' . $StockID . '"> <input type=hidden name="EntryType" value="KEYED">'; @@ -101,7 +101,8 @@ if ($EditControlled){ foreach ($LineItem->SerialItems as $Bundle){ - echo '<tr><td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" value="' .$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; + echo '<tr> + <td valign=top><input type="text" name="SerialNo'. $StartAddingAt .'" value="' .$Bundle->BundleRef.'" size="21" maxlength="20" /></td>'; /*if the item is controlled not serialised - batch quantity required so just enter bundle refs into the form for entry of quantities manually */ @@ -110,10 +111,10 @@ echo '<input type=hidden name="Qty' . $StartAddingAt .'" Value=1></TR>'; } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength="10"></tr>'; } else { echo '<td><input type="text" class="number" name="Qty' . $StartAddingAt .'" size=11 - value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength=10></tr>'; + value="'. locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces). '" maxlength="10"></tr>'; } $StartAddingAt++; @@ -138,13 +139,22 @@ } } -echo '</table>'; -echo '<br /><div class=centre><input type="submit" name="AddBatches" value="'. _('Enter'). '"></div>'; -echo '</form></td><td valign="top">'; +echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="AddBatches" value="'. _('Enter'). '" /> + </div> + + </form> + </td> + <td valign="top">'; if ($ShowExisting){ include('includes/InputSerialItemsExisting.php'); } -echo '</td></tr></table><script type="text/javascript"> +echo '</td> + </tr> + </table> + <script type="text/javascript"> //<![CDATA[ document.Ga6uF5Wa.SerialNo0.focus(); //]]> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-10 09:31:00
|
Revision: 4743 http://web-erp.svn.sourceforge.net/web-erp/?rev=4743&view=rev Author: daintree Date: 2011-11-10 09:30:52 +0000 (Thu, 10 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/GLTrialBalance.php trunk/PO_Items.php trunk/Z_DescribeTable.php trunk/doc/Change.log trunk/includes/DateFunctions.inc trunk/includes/LanguageSetup.php trunk/includes/PDFTransPageHeader.inc trunk/includes/SQL_CommonFunctions.inc Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -225,7 +225,7 @@ $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items']->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']); + $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ @@ -395,7 +395,7 @@ echo '</tr>'; if (mb_strlen($LnItm->Narrative)>1){ $Narrative=str_replace('\r\n','<br />', $LnItm->Narrative); - echo $RowStarter . '<td colspan=12>' . stripslashes($Narrative) . '</td></tr>'; + echo $RowStarter . '<td colspan="12">' . stripslashes($Narrative) . '</td></tr>'; } }//end foreach ($line) @@ -523,7 +523,7 @@ /* round the totals to avoid silly entries */ -$TaxTotal = round($TaxTotal,2); +$TaxTotal = round($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces); $_SESSION['Items']->total = round($_SESSION['Items']->total,$_SESSION['Items']->CurrDecimalPlaces); $_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces); @@ -770,9 +770,9 @@ '" . $TaxTotal . "', '" . filter_number_format($_POST['ChargeFreightCost']) . "', '" . $_SESSION['CurrencyRate'] . "', - '" . DB_escape_string($_POST['InvoiceText']) . "', + '" . $_POST['InvoiceText'] . "', '" . $_SESSION['Items']->ShipVia . "', - '" . DB_escape_string($_POST['Consignment']) . "' )"; + '" . $_POST['Consignment'] . "' )"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction record could not be inserted because'); $DbgMsg = _('The following SQL to insert the debtor transaction record was used'); @@ -829,31 +829,30 @@ if (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0){ - $SQL = "INSERT INTO orderdeliverydifferenceslog ( orderno, + $SQL = "INSERT INTO orderdeliverydifferenceslog (orderno, invoiceno, stockid, quantitydiff, debtorno, branch, - can_or_bo ) + can_or_bo) VALUES ( '" . $_SESSION['ProcessingOrder'] . "', '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', - '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "', + '" . ($OrderLine->Quantity - $OrderLine->QtyDispatched) . "', '" . $_SESSION['Items']->DebtorNo . "', '" . $_SESSION['Items']->Branch . "', 'CAN')"; - + $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); $DbgMsg = _('The following SQL to insert the order delivery differences record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } + } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0 + AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d')>0) { - - } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched) >0 AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d') > 0) { - /*The order is being short delivered after the due date - need to insert a delivery differnce log */ $SQL = "INSERT INTO orderdeliverydifferenceslog (orderno, @@ -919,9 +918,9 @@ /* Need to get the current location quantity will need it later for the stock movement */ $SQL="SELECT locstock.quantity - FROM locstock - WHERE locstock.stockid='" . $OrderLine->StockID . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + FROM locstock + WHERE locstock.stockid='" . $OrderLine->StockID . "' + AND loccode= '" . $_SESSION['Items']->Location . "'"; $ErrMsg = _('WARNING') . ': ' . _('Could not retrieve current location stock'); $Result = DB_query($SQL, $db, $ErrMsg); @@ -933,7 +932,8 @@ $QtyOnHandPrior = 0; } - $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " + $SQL = "UPDATE locstock + SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' AND loccode = '" . $_SESSION['Items']->Location . "'"; @@ -949,10 +949,9 @@ $SQL = "SELECT bom.component, bom.quantity, stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost AS standard - FROM bom, - stockmaster - WHERE bom.component=stockmaster.stockid - AND bom.parent='" . $OrderLine->StockID . "' + FROM bom INNER JOIN stockmaster + ON bom.component=stockmaster.stockid + WHERE bom.parent='" . $OrderLine->StockID . "' AND bom.effectiveto >= '" . Date('Y-m-d') . "' AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; @@ -1031,7 +1030,7 @@ } /* end of its an assembly */ // Insert stock movements - with unit cost - $LocalCurrencyPrice = ($OrderLine->Price / $_SESSION['CurrencyRate']); + $LocalCurrencyPrice = round(($OrderLine->Price / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']); if (empty($OrderLine->StandardCost)) { $OrderLine->StandardCost=0; @@ -1205,10 +1204,10 @@ if ($myrow[0]>0){ /*Update the existing record that already exists */ - $SQL = "UPDATE salesanalysis SET amt=amt+" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", - cost=cost+" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . ", + $SQL = "UPDATE salesanalysis SET amt=amt+" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . ", + cost=cost+" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . ", qty=qty +" . $OrderLine->QtyDispatched . ", - disc=disc+" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . " + disc=disc+" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . " WHERE salesanalysis.area='" . $myrow[5] . "' AND salesanalysis.salesperson='" . $myrow[8] . "' AND typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' @@ -1236,12 +1235,12 @@ stkcategory ) SELECT '" . $_SESSION['Items']->DefaultSalesType . "', '" . $PeriodNo . "', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "', + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', + '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $_SESSION['Items']->DebtorNo . "', '" . $_SESSION['Items']->Branch . "', '" . ($OrderLine->QtyDispatched) . "', - '" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $OrderLine->StockID . "', custbranch.area, 1, @@ -1278,7 +1277,7 @@ '" . $PeriodNo . "', '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')"; + '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1301,7 +1300,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . (-$OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')"; + '" . round((-$OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1328,7 +1327,7 @@ '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', - '" . (-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); @@ -1350,7 +1349,7 @@ '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']) . "')"; + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1462,7 +1461,7 @@ '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', - '" . (-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); @@ -1490,14 +1489,14 @@ '" . $PeriodNo . "', '" . Date('Y-m-d') . "', 'disposal', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $DefaultDispatchDate . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The fixed asset transaction could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the fixed asset transaction record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); $SQL = "UPDATE fixedassets - SET disposalproceeds ='" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', + SET disposalproceeds ='" . round(($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', disposaldate ='" . $DefaultDispatchDate . "' WHERE assetid ='" . $AssetNumber . "'"; @@ -1528,7 +1527,7 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']) . "')"; + '" . round((($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1553,7 +1552,7 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1575,13 +1574,14 @@ '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (-$TaxAmount/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$TaxAmount/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + EnsureGLEntriesBalance(10,$InvoiceNo,$db); } /*end of if Sales and GL integrated */ DB_Txn_Commit($db); @@ -1617,36 +1617,39 @@ $_POST['InvoiceText']=''; } $j++; - echo '<table class=selection><tr> - <td>' ._('Date On Invoice'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="10" size="15" - name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" - alt="'.$_SESSION['DefaultDateFormat'].'" class="date"></td> - </tr>'; + echo '<table class="selection"> + <tr> + <td>' ._('Date On Invoice'). ':</td> + <td><input tabindex='.$j.' type="text" maxlength="10" size="15" name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" alt="'.$_SESSION['DefaultDateFormat'].'" class="date"></td> + </tr>'; $j++; echo '<tr> - <td>' . _('Consignment Note Ref'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '"></td> - </tr>'; + <td>' . _('Consignment Note Ref'). ':</td> + <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '"></td> + </tr>'; $j++; echo '<tr> - <td>'._('Action For Balance'). ':</td> - <td><select tabindex='.$j.' name="BOPolicy"><option selected value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> - </tr>'; + <td>'._('Action For Balance'). ':</td> + <td><select tabindex='.$j.' name="BOPolicy"><option 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> - <td>' ._('Invoice Text'). ':</td> - <td><textarea tabindex="'.$j.'" name="InvoiceText" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> - </tr>'; - + <td>' ._('Invoice Text'). ':</td> + <td><textarea tabindex="'.$j.'" name="InvoiceText" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> + </tr>'; + $j++; echo '</table> - <br /><div class="centre"> - <input type=submit tabindex='.$j.' name="Update" value=' . _('Update'). '><br />'; + <br /> + <div class="centre"> + <input type="submit" tabindex="'.$j.'" name="Update" value="' . _('Update'). '" /> + <br />'; $j++; - echo '<br /><input type=submit tabindex='.$j.' name="ProcessInvoice" value="'._('Process Invoice').'"</div>'; - echo '<input type=hidden name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '">'; + echo '<br /> + <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> + </div> + <input type="hidden" name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '" />'; } echo '</form>'; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/CounterSales.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -239,31 +239,31 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decmimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decmimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else if (mb_strlen($_POST['StockCode'])>0){ @@ -273,59 +273,59 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else { if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } @@ -465,6 +465,8 @@ prnMsg(_('Phantom assemblies cannot be sold, these items exist only as bills of materials used in other manufactured items. The following item has not been added to the order:') . ' ' . $NewItem, 'warn'); } else if ($myrow['controlled']==1){ prnMsg(_('The system does not currently cater for counter sales of lot controlled or serialised items'),'warn'); + } else if ($NewItemQty<=0) { + prnMsg(_('Only items entered with a positive quantity can be added to the sale'),'warn'); } else { /*Its not a kit set item*/ include('includes/SelectOrderItems_IntoCart.inc'); $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/GLTrialBalance.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -40,7 +40,8 @@ $DefaultFromDate = Date ('Y-m-d', Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); $FromDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); } - $period=GetPeriod($FromDate, $db); + /*GetPeriod function creates periods if need be the return value is not used */ + $NotUsedPeriodNo = GetPeriod($FromDate, $db); /*Show a form to allow input of criteria for TB to show */ echo '<table class="selection"> @@ -75,14 +76,7 @@ echo '</select></td> </tr>'; if (!isset($_POST['ToPeriod']) OR $_POST['ToPeriod']==''){ - $lastDate = date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))); - $sql = "SELECT periodno - FROM periods - WHERE lastdate_in_period = '" . $lastDate . "'"; - $MaxPrd = DB_query($sql,$db); - $MaxPrdrow = DB_fetch_row($MaxPrd); - $DefaultToPeriod = (int) ($MaxPrdrow[0]); - + $DefaultToPeriod = GetPeriod(date($_SESSION['DefaultDateFormat'],mktime(0,0,0,Date('m')+1,0,Date('Y'))),$db); } else { $DefaultToPeriod = $_POST['ToPeriod']; } Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/PO_Items.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -166,22 +166,22 @@ '" . $_SESSION['PO'.$identifier]->Initiator . "', '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', '" . $_SESSION['PO'.$identifier]->Location . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd1) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd2) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd3) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd4) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd5) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd6) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->Tel) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd1) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd2) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd3) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd4) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd5) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd6) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierContact) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppTel). "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->Contact) . "', + '" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->Tel . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->SupplierContact . "', + '" . $_SESSION['PO'.$identifier]->SuppTel. "', + '" . $_SESSION['PO'.$identifier]->Contact . "', '" . $_SESSION['PO'.$identifier]->Version . "', '" . Date('Y-m-d') . "', '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', @@ -254,7 +254,7 @@ /*Update the purchase order header with any changes */ $sql = "UPDATE purchorders SET supplierno = '" . $_SESSION['PO'.$identifier]->SupplierID . "' , - comments='" . DB_escape_string($_SESSION['PO'.$identifier]->Comments) . "', + comments='" . $_SESSION['PO'.$identifier]->Comments . "', rate='" . $_SESSION['PO'.$identifier]->ExRate . "', initiator='" . $_SESSION['PO'.$identifier]->Initiator . "', requisitionno= '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', @@ -263,26 +263,26 @@ deliverydate='" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', revised= '" . Date('Y-m-d') . "', intostocklocation='" . $_SESSION['PO'.$identifier]->Location . "', - deladd1='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd1) . "', - deladd2='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd2) . "', - deladd3='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd3) . "', - deladd4='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd4) . "', - deladd5='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd5) . "', - deladd6='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd6) . "', - deladd6='" . DB_escape_string($_SESSION['PO'.$identifier]->Tel) . "', - suppdeladdress1='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd1) . "', - suppdeladdress2='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd2) . "', - suppdeladdress3='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd3) . "', - suppdeladdress4='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd4) . "', - suppdeladdress5='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd5) . "', - suppdeladdress6='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd6) . "', - suppliercontact='" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierContact) . "', - supptel='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppTel) . "', - contact='" . DB_escape_string($_SESSION['PO'.$identifier]->Contact) . "', + deladd1='" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + deladd2='" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + deladd3='" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + deladd4='" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + deladd5='" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + deladd6='" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + deladd6='" . $_SESSION['PO'.$identifier]->Tel . "', + suppdeladdress1='" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + suppdeladdress2='" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + suppdeladdress3='" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + suppdeladdress4='" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + suppdeladdress5='" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + suppdeladdress6='" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + suppliercontact='" . $_SESSION['PO'.$identifier]->SupplierContact . "', + supptel='" . $_SESSION['PO'.$identifier]->SuppTel . "', + contact='" . $_SESSION['PO'.$identifier]->Contact . "', paymentterms='" . $_SESSION['PO'.$identifier]->PaymentTerms . "', allowprint='" . $_SESSION['PO'.$identifier]->AllowPrintPO . "', status = '" . $_SESSION['PO'.$identifier]->Status . "', - stat_comment = '" . DB_escape_string($_SESSION['PO'.$identifier]->StatusComments) . "' + stat_comment = '" . $_SESSION['PO'.$identifier]->StatusComments . "' WHERE orderno = '" . $_SESSION['PO'.$identifier]->OrderNo ."'"; $ErrMsg = _('The purchase order could not be updated because'); Modified: trunk/Z_DescribeTable.php =================================================================== --- trunk/Z_DescribeTable.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/Z_DescribeTable.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -//$PageSecurity = 11; - include('includes/session.inc'); $title = _('Database table details'); include('includes/header.inc'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/doc/Change.log 2011-11-10 09:30:52 UTC (rev 4743) @@ -1,5 +1,7 @@ webERP Change Log +10/11/11 Phil: includes/DateFunctions.inc fixed GetPeriod function to create new period when just one month ahead of last period - worried about this can't see how it could have been like this so long without a bug report? +10/11/11 Phil: includes/LanguageSetup.php now sets LC_NUMERIC locale category after LC_ALL to ensure SQL compliant calculations 8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim 8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier 8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/DateFunctions.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -858,6 +858,7 @@ } elseif (mb_strpos ($TransDate,'.')) { $Date_Array = explode('.',$TransDate); } + if (($_SESSION['DefaultDateFormat']=='d/m/Y') or ($_SESSION['DefaultDateFormat']=='d.m.Y')){ $TransDate = mktime(0,0,0,$Date_Array[1],$Date_Array[0],$Date_Array[2]); } elseif ($_SESSION['DefaultDateFormat']=='m/d/Y'){ @@ -879,6 +880,7 @@ $sql = "SELECT MAX(lastdate_in_period), MAX(periodno) from periods"; $result = DB_query($sql, $db); $myrow=DB_fetch_row($result); + if (is_null($myrow[0])){ $InsertFirstPeriodResult = DB_query("INSERT INTO periods VALUES (0,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))) . "')",$db,_('Could not insert first period')); $InsertFirstPeriodResult = DB_query("INSERT INTO periods VALUES (1,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+2,0,Date('Y'))) . "')",$db,_('Could not insert second period')); @@ -886,7 +888,7 @@ $LastPeriodEnd = mktime(0,0,0,Date('m')+2,0,Date('Y')); } else { $Date_Array = explode('-', $myrow[0]); - $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+2,0,(int)$Date_Array[0]); + $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+1,0,(int)$Date_Array[0]); $LastPeriod = $myrow[1]; } /* Find the unix timestamp of the first period end date in periods table */ @@ -900,20 +902,20 @@ /* If the period number doesn't exist */ if (!PeriodExists($TransDate, $db)) { /* if the transaction is after the last period */ + if ($TransDate > $LastPeriodEnd) { + $PeriodEnd = mktime(0,0,0,Date('m', $TransDate)+1, 0, Date('Y', $TransDate)); - $Period = $LastPeriod + 1; + while ($PeriodEnd >= $LastPeriodEnd) { - CreatePeriod($Period, $LastPeriodEnd, $db); - $Period++; if (Date('m', $LastPeriodEnd)<=13) { $LastPeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+2, 0, Date('Y', $LastPeriodEnd)); } else { $LastPeriodEnd = mktime(0,0,0,2, 0, Date('Y', $LastPeriodEnd)+1); } + $LastPeriod++; + CreatePeriod($LastPeriod, $LastPeriodEnd, $db); } - $PeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+1, 0, Date('Y', $LastPeriodEnd)); - CreatePeriod($Period, $PeriodEnd, $db); } else { /* The transaction is before the first period */ $PeriodEnd = mktime(0,0,0,Date('m', $TransDate), 0, Date('Y', $TransDate)); Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/LanguageSetup.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -63,8 +63,9 @@ include('includes/LanguagesArray.php'); } else { include('includes/LanguagesArray.php'); - $LocaleSet = setlocale (LC_NUMERIC, 'en_US','english-us'); + $LocaleSet = setlocale (LC_ALL, $_SESSION['Language'],$LanguagesArray[$_SESSION['Language']]['WindowsLocale']); + $LocaleSet = setlocale (LC_NUMERIC, 'C','en_GB.utf8','en_GB','en_US','english-us'); if (defined('LC_MESSAGES')){ //it's a unix/linux server $LocaleSet = setlocale (LC_MESSAGES, $_SESSION['Language']); @@ -73,6 +74,7 @@ if ($_SESSION['Language']=='tr_TR.utf8') { $Locale = setlocale(LC_CTYPE, 'C'); } + // possibly even if locale fails the language will still switch by using Language instead of locale variable putenv('LANG=' . $_SESSION['Language']); putenv('LANGUAGE=' . $_SESSION['Language']); Modified: trunk/includes/PDFTransPageHeader.inc =================================================================== --- trunk/includes/PDFTransPageHeader.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/PDFTransPageHeader.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -180,14 +180,14 @@ /*Set up headings */ $FontSize=10; $pdf->addText($Left_Margin + 2, $YPos, $FontSize, _('Customer Tax Ref') . ':'); -$pdf->addText($Left_Margin+80, $YPos, $FontSize, $myrow['taxref']); +$pdf->addText($Left_Margin+100, $YPos, $FontSize, $myrow['taxref']); /*Print a vertical line */ $pdf->line($Left_Margin+248, $YPos-10+$line_height+3,$Left_Margin+248, $YPos - 18); if ($InvOrCredit=='Invoice'){ $pdf->addText($Left_Margin + 252, $YPos, $FontSize, _('Customer Order Ref.') . ':'); - $pdf->addText($Left_Margin+340, $YPos, $FontSize, $myrow['customerref']); + $pdf->addText($Left_Margin+370, $YPos, $FontSize, $myrow['customerref']); } /*Print a vertical line */ $pdf->line($Left_Margin+450, $YPos+$line_height-7,$Left_Margin+450,$YPos-18); Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -330,4 +330,35 @@ } +/*Ensures general ledger entries balance for a given transaction */ +function EnsureGLEntriesBalance ($TransType, $TransTypeNo, $db) { + + $result = DB_query("SELECT SUM(amount) + FROM gltrans + WHERE type = '" . $TransType . "' + AND typeno = '" . $TransTypeNo . "'", + $db); + $myrow = DB_fetch_row($result); + $Difference = $myrow[0]; + if (abs($Difference)!=0){ + if (abs($Difference)>0.1){ + prnMsg(_('The general ledger entries created do not balance. See your system administrator'),'error'); + } else { + $result = DB_query("SELECT counterindex, + MAX(amount) + FROM gltrans + WHERE type = '" . $TransType . "' + AND typeno = '" . $TransTypeNo . "' + GROUP BY counterindex", + $db); + $myrow = DB_fetch_array($result); + $TransToAmend = $myrow['counterindex']; + $result = DB_query("UPDATE gltrans SET amount = amount - " . $Difference . " + WHERE counterindex = '" . $TransToAmend . "'", + $db); + + } + } +} + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-10 09:31:03
|
Revision: 4743 http://web-erp.svn.sourceforge.net/web-erp/?rev=4743&view=rev Author: daintree Date: 2011-11-10 09:30:52 +0000 (Thu, 10 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/GLTrialBalance.php trunk/PO_Items.php trunk/Z_DescribeTable.php trunk/doc/Change.log trunk/includes/DateFunctions.inc trunk/includes/LanguageSetup.php trunk/includes/PDFTransPageHeader.inc trunk/includes/SQL_CommonFunctions.inc Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -225,7 +225,7 @@ $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items']->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']); + $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ @@ -395,7 +395,7 @@ echo '</tr>'; if (mb_strlen($LnItm->Narrative)>1){ $Narrative=str_replace('\r\n','<br />', $LnItm->Narrative); - echo $RowStarter . '<td colspan=12>' . stripslashes($Narrative) . '</td></tr>'; + echo $RowStarter . '<td colspan="12">' . stripslashes($Narrative) . '</td></tr>'; } }//end foreach ($line) @@ -523,7 +523,7 @@ /* round the totals to avoid silly entries */ -$TaxTotal = round($TaxTotal,2); +$TaxTotal = round($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces); $_SESSION['Items']->total = round($_SESSION['Items']->total,$_SESSION['Items']->CurrDecimalPlaces); $_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces); @@ -770,9 +770,9 @@ '" . $TaxTotal . "', '" . filter_number_format($_POST['ChargeFreightCost']) . "', '" . $_SESSION['CurrencyRate'] . "', - '" . DB_escape_string($_POST['InvoiceText']) . "', + '" . $_POST['InvoiceText'] . "', '" . $_SESSION['Items']->ShipVia . "', - '" . DB_escape_string($_POST['Consignment']) . "' )"; + '" . $_POST['Consignment'] . "' )"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction record could not be inserted because'); $DbgMsg = _('The following SQL to insert the debtor transaction record was used'); @@ -829,31 +829,30 @@ if (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0){ - $SQL = "INSERT INTO orderdeliverydifferenceslog ( orderno, + $SQL = "INSERT INTO orderdeliverydifferenceslog (orderno, invoiceno, stockid, quantitydiff, debtorno, branch, - can_or_bo ) + can_or_bo) VALUES ( '" . $_SESSION['ProcessingOrder'] . "', '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', - '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "', + '" . ($OrderLine->Quantity - $OrderLine->QtyDispatched) . "', '" . $_SESSION['Items']->DebtorNo . "', '" . $_SESSION['Items']->Branch . "', 'CAN')"; - + $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); $DbgMsg = _('The following SQL to insert the order delivery differences record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } + } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0 + AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d')>0) { - - } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched) >0 AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d') > 0) { - /*The order is being short delivered after the due date - need to insert a delivery differnce log */ $SQL = "INSERT INTO orderdeliverydifferenceslog (orderno, @@ -919,9 +918,9 @@ /* Need to get the current location quantity will need it later for the stock movement */ $SQL="SELECT locstock.quantity - FROM locstock - WHERE locstock.stockid='" . $OrderLine->StockID . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + FROM locstock + WHERE locstock.stockid='" . $OrderLine->StockID . "' + AND loccode= '" . $_SESSION['Items']->Location . "'"; $ErrMsg = _('WARNING') . ': ' . _('Could not retrieve current location stock'); $Result = DB_query($SQL, $db, $ErrMsg); @@ -933,7 +932,8 @@ $QtyOnHandPrior = 0; } - $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " + $SQL = "UPDATE locstock + SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' AND loccode = '" . $_SESSION['Items']->Location . "'"; @@ -949,10 +949,9 @@ $SQL = "SELECT bom.component, bom.quantity, stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost AS standard - FROM bom, - stockmaster - WHERE bom.component=stockmaster.stockid - AND bom.parent='" . $OrderLine->StockID . "' + FROM bom INNER JOIN stockmaster + ON bom.component=stockmaster.stockid + WHERE bom.parent='" . $OrderLine->StockID . "' AND bom.effectiveto >= '" . Date('Y-m-d') . "' AND bom.effectiveafter < '" . Date('Y-m-d') . "'"; @@ -1031,7 +1030,7 @@ } /* end of its an assembly */ // Insert stock movements - with unit cost - $LocalCurrencyPrice = ($OrderLine->Price / $_SESSION['CurrencyRate']); + $LocalCurrencyPrice = round(($OrderLine->Price / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']); if (empty($OrderLine->StandardCost)) { $OrderLine->StandardCost=0; @@ -1205,10 +1204,10 @@ if ($myrow[0]>0){ /*Update the existing record that already exists */ - $SQL = "UPDATE salesanalysis SET amt=amt+" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . ", - cost=cost+" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . ", + $SQL = "UPDATE salesanalysis SET amt=amt+" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . ", + cost=cost+" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . ", qty=qty +" . $OrderLine->QtyDispatched . ", - disc=disc+" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . " + disc=disc+" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . " WHERE salesanalysis.area='" . $myrow[5] . "' AND salesanalysis.salesperson='" . $myrow[8] . "' AND typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' @@ -1236,12 +1235,12 @@ stkcategory ) SELECT '" . $_SESSION['Items']->DefaultSalesType . "', '" . $PeriodNo . "', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', - '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "', + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', + '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $_SESSION['Items']->DebtorNo . "', '" . $_SESSION['Items']->Branch . "', '" . ($OrderLine->QtyDispatched) . "', - '" . ($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']) . "', + '" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $OrderLine->StockID . "', custbranch.area, 1, @@ -1278,7 +1277,7 @@ '" . $PeriodNo . "', '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . ($OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')"; + '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1301,7 +1300,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', - '" . (-$OrderLine->StandardCost * $OrderLine->QtyDispatched) . "')"; + '" . round((-$OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1328,7 +1327,7 @@ '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', - '" . (-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); @@ -1350,7 +1349,7 @@ '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']) . "')"; + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1462,7 +1461,7 @@ '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', - '" . (-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the GLTrans record was used'); @@ -1490,14 +1489,14 @@ '" . $PeriodNo . "', '" . Date('Y-m-d') . "', 'disposal', - '" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', + '" . round(($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $DefaultDispatchDate . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The fixed asset transaction could not be inserted because'); $DbgMsg = '<br />' ._('The following SQL to insert the fixed asset transaction record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); $SQL = "UPDATE fixedassets - SET disposalproceeds ='" . ($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "', + SET disposalproceeds ='" . round(($OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', disposaldate ='" . $DefaultDispatchDate . "' WHERE assetid ='" . $AssetNumber . "'"; @@ -1528,7 +1527,7 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']) . "')"; + '" . round((($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1553,7 +1552,7 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1575,13 +1574,14 @@ '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', '" . $_SESSION['Items']->DebtorNo . "', - '" . (-$TaxAmount/$_SESSION['CurrencyRate']) . "')"; + '" . round((-$TaxAmount/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + EnsureGLEntriesBalance(10,$InvoiceNo,$db); } /*end of if Sales and GL integrated */ DB_Txn_Commit($db); @@ -1617,36 +1617,39 @@ $_POST['InvoiceText']=''; } $j++; - echo '<table class=selection><tr> - <td>' ._('Date On Invoice'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="10" size="15" - name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" - alt="'.$_SESSION['DefaultDateFormat'].'" class="date"></td> - </tr>'; + echo '<table class="selection"> + <tr> + <td>' ._('Date On Invoice'). ':</td> + <td><input tabindex='.$j.' type="text" maxlength="10" size="15" name="DispatchDate" value="'.$DefaultDispatchDate.'" id="datepicker" alt="'.$_SESSION['DefaultDateFormat'].'" class="date"></td> + </tr>'; $j++; echo '<tr> - <td>' . _('Consignment Note Ref'). ':</td> - <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '"></td> - </tr>'; + <td>' . _('Consignment Note Ref'). ':</td> + <td><input tabindex='.$j.' type="text" maxlength="15" size="15" name="Consignment" value="' . $_POST['Consignment'] . '"></td> + </tr>'; $j++; echo '<tr> - <td>'._('Action For Balance'). ':</td> - <td><select tabindex='.$j.' name="BOPolicy"><option selected value="BO">'._('Automatically put balance on back order').'</option><option value="CAN">'._('Cancel any quantities not delivered').'</option></select></td> - </tr>'; + <td>'._('Action For Balance'). ':</td> + <td><select tabindex='.$j.' name="BOPolicy"><option 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> - <td>' ._('Invoice Text'). ':</td> - <td><textarea tabindex="'.$j.'" name="InvoiceText" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> - </tr>'; - + <td>' ._('Invoice Text'). ':</td> + <td><textarea tabindex="'.$j.'" name="InvoiceText" cols="31" rows="5">' . reverse_escape($_POST['InvoiceText']) . '</textarea></td> + </tr>'; + $j++; echo '</table> - <br /><div class="centre"> - <input type=submit tabindex='.$j.' name="Update" value=' . _('Update'). '><br />'; + <br /> + <div class="centre"> + <input type="submit" tabindex="'.$j.'" name="Update" value="' . _('Update'). '" /> + <br />'; $j++; - echo '<br /><input type=submit tabindex='.$j.' name="ProcessInvoice" value="'._('Process Invoice').'"</div>'; - echo '<input type=hidden name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '">'; + echo '<br /> + <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> + </div> + <input type="hidden" name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '" />'; } echo '</form>'; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/CounterSales.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -239,31 +239,31 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decmimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decmimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.description " . LIKE . " '" . $SearchString . "' - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.description " . LIKE . " '" . $SearchString . "' + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else if (mb_strlen($_POST['StockCode'])>0){ @@ -273,59 +273,59 @@ if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + AND (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } else { if ($_POST['StockCat']=='All'){ $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + ORDER BY stockmaster.stockid"; } else { $SQL = "SELECT stockmaster.stockid, - stockmaster.description, - stockmaster.units, - stockmaster.decimalplaces - FROM stockmaster INNER JOIN stockcategory - ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') - AND stockmaster.mbflag <>'G' - AND stockmaster.controlled <> 1 - AND stockmaster.discontinued=0 - AND stockmaster.categoryid='" . $_POST['StockCat'] . "' - ORDER BY stockmaster.stockid"; + stockmaster.description, + stockmaster.units, + stockmaster.decimalplaces + FROM stockmaster INNER JOIN stockcategory + ON stockmaster.categoryid=stockcategory.categoryid + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D') + AND stockmaster.mbflag <>'G' + AND stockmaster.controlled <> 1 + AND stockmaster.discontinued=0 + AND stockmaster.categoryid='" . $_POST['StockCat'] . "' + ORDER BY stockmaster.stockid"; } } @@ -465,6 +465,8 @@ prnMsg(_('Phantom assemblies cannot be sold, these items exist only as bills of materials used in other manufactured items. The following item has not been added to the order:') . ' ' . $NewItem, 'warn'); } else if ($myrow['controlled']==1){ prnMsg(_('The system does not currently cater for counter sales of lot controlled or serialised items'),'warn'); + } else if ($NewItemQty<=0) { + prnMsg(_('Only items entered with a positive quantity can be added to the sale'),'warn'); } else { /*Its not a kit set item*/ include('includes/SelectOrderItems_IntoCart.inc'); $_SESSION['Items'.$identifier]->GetTaxes(($_SESSION['Items'.$identifier]->LineCounter - 1)); Modified: trunk/GLTrialBalance.php =================================================================== --- trunk/GLTrialBalance.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/GLTrialBalance.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -40,7 +40,8 @@ $DefaultFromDate = Date ('Y-m-d', Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); $FromDate = Date($_SESSION['DefaultDateFormat'], Mktime(0,0,0,$_SESSION['YearEnd'] + 2,0,Date('Y')-1)); } - $period=GetPeriod($FromDate, $db); + /*GetPeriod function creates periods if need be the return value is not used */ + $NotUsedPeriodNo = GetPeriod($FromDate, $db); /*Show a form to allow input of criteria for TB to show */ echo '<table class="selection"> @@ -75,14 +76,7 @@ echo '</select></td> </tr>'; if (!isset($_POST['ToPeriod']) OR $_POST['ToPeriod']==''){ - $lastDate = date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))); - $sql = "SELECT periodno - FROM periods - WHERE lastdate_in_period = '" . $lastDate . "'"; - $MaxPrd = DB_query($sql,$db); - $MaxPrdrow = DB_fetch_row($MaxPrd); - $DefaultToPeriod = (int) ($MaxPrdrow[0]); - + $DefaultToPeriod = GetPeriod(date($_SESSION['DefaultDateFormat'],mktime(0,0,0,Date('m')+1,0,Date('Y'))),$db); } else { $DefaultToPeriod = $_POST['ToPeriod']; } Modified: trunk/PO_Items.php =================================================================== --- trunk/PO_Items.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/PO_Items.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -166,22 +166,22 @@ '" . $_SESSION['PO'.$identifier]->Initiator . "', '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', '" . $_SESSION['PO'.$identifier]->Location . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd1) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd2) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd3) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd4) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd5) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd6) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->Tel) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd1) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd2) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd3) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd4) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd5) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd6) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierContact) . "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->SuppTel). "', - '" . DB_escape_string($_SESSION['PO'.$identifier]->Contact) . "', + '" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->Tel . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + '" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + '" . $_SESSION['PO'.$identifier]->SupplierContact . "', + '" . $_SESSION['PO'.$identifier]->SuppTel. "', + '" . $_SESSION['PO'.$identifier]->Contact . "', '" . $_SESSION['PO'.$identifier]->Version . "', '" . Date('Y-m-d') . "', '" . $_SESSION['PO'.$identifier]->DeliveryBy . "', @@ -254,7 +254,7 @@ /*Update the purchase order header with any changes */ $sql = "UPDATE purchorders SET supplierno = '" . $_SESSION['PO'.$identifier]->SupplierID . "' , - comments='" . DB_escape_string($_SESSION['PO'.$identifier]->Comments) . "', + comments='" . $_SESSION['PO'.$identifier]->Comments . "', rate='" . $_SESSION['PO'.$identifier]->ExRate . "', initiator='" . $_SESSION['PO'.$identifier]->Initiator . "', requisitionno= '" . $_SESSION['PO'.$identifier]->RequisitionNo . "', @@ -263,26 +263,26 @@ deliverydate='" . FormatDateForSQL($_SESSION['PO'.$identifier]->DeliveryDate) . "', revised= '" . Date('Y-m-d') . "', intostocklocation='" . $_SESSION['PO'.$identifier]->Location . "', - deladd1='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd1) . "', - deladd2='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd2) . "', - deladd3='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd3) . "', - deladd4='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd4) . "', - deladd5='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd5) . "', - deladd6='" . DB_escape_string($_SESSION['PO'.$identifier]->DelAdd6) . "', - deladd6='" . DB_escape_string($_SESSION['PO'.$identifier]->Tel) . "', - suppdeladdress1='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd1) . "', - suppdeladdress2='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd2) . "', - suppdeladdress3='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd3) . "', - suppdeladdress4='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd4) . "', - suppdeladdress5='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd5) . "', - suppdeladdress6='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppDelAdd6) . "', - suppliercontact='" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierContact) . "', - supptel='" . DB_escape_string($_SESSION['PO'.$identifier]->SuppTel) . "', - contact='" . DB_escape_string($_SESSION['PO'.$identifier]->Contact) . "', + deladd1='" . $_SESSION['PO'.$identifier]->DelAdd1 . "', + deladd2='" . $_SESSION['PO'.$identifier]->DelAdd2 . "', + deladd3='" . $_SESSION['PO'.$identifier]->DelAdd3 . "', + deladd4='" . $_SESSION['PO'.$identifier]->DelAdd4 . "', + deladd5='" . $_SESSION['PO'.$identifier]->DelAdd5 . "', + deladd6='" . $_SESSION['PO'.$identifier]->DelAdd6 . "', + deladd6='" . $_SESSION['PO'.$identifier]->Tel . "', + suppdeladdress1='" . $_SESSION['PO'.$identifier]->SuppDelAdd1 . "', + suppdeladdress2='" . $_SESSION['PO'.$identifier]->SuppDelAdd2 . "', + suppdeladdress3='" . $_SESSION['PO'.$identifier]->SuppDelAdd3 . "', + suppdeladdress4='" . $_SESSION['PO'.$identifier]->SuppDelAdd4 . "', + suppdeladdress5='" . $_SESSION['PO'.$identifier]->SuppDelAdd5 . "', + suppdeladdress6='" . $_SESSION['PO'.$identifier]->SuppDelAdd6 . "', + suppliercontact='" . $_SESSION['PO'.$identifier]->SupplierContact . "', + supptel='" . $_SESSION['PO'.$identifier]->SuppTel . "', + contact='" . $_SESSION['PO'.$identifier]->Contact . "', paymentterms='" . $_SESSION['PO'.$identifier]->PaymentTerms . "', allowprint='" . $_SESSION['PO'.$identifier]->AllowPrintPO . "', status = '" . $_SESSION['PO'.$identifier]->Status . "', - stat_comment = '" . DB_escape_string($_SESSION['PO'.$identifier]->StatusComments) . "' + stat_comment = '" . $_SESSION['PO'.$identifier]->StatusComments . "' WHERE orderno = '" . $_SESSION['PO'.$identifier]->OrderNo ."'"; $ErrMsg = _('The purchase order could not be updated because'); Modified: trunk/Z_DescribeTable.php =================================================================== --- trunk/Z_DescribeTable.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/Z_DescribeTable.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -1,8 +1,6 @@ <?php /* $Id$*/ -//$PageSecurity = 11; - include('includes/session.inc'); $title = _('Database table details'); include('includes/header.inc'); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/doc/Change.log 2011-11-10 09:30:52 UTC (rev 4743) @@ -1,5 +1,7 @@ webERP Change Log +10/11/11 Phil: includes/DateFunctions.inc fixed GetPeriod function to create new period when just one month ahead of last period - worried about this can't see how it could have been like this so long without a bug report? +10/11/11 Phil: includes/LanguageSetup.php now sets LC_NUMERIC locale category after LC_ALL to ensure SQL compliant calculations 8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim 8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier 8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces Modified: trunk/includes/DateFunctions.inc =================================================================== --- trunk/includes/DateFunctions.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/DateFunctions.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -858,6 +858,7 @@ } elseif (mb_strpos ($TransDate,'.')) { $Date_Array = explode('.',$TransDate); } + if (($_SESSION['DefaultDateFormat']=='d/m/Y') or ($_SESSION['DefaultDateFormat']=='d.m.Y')){ $TransDate = mktime(0,0,0,$Date_Array[1],$Date_Array[0],$Date_Array[2]); } elseif ($_SESSION['DefaultDateFormat']=='m/d/Y'){ @@ -879,6 +880,7 @@ $sql = "SELECT MAX(lastdate_in_period), MAX(periodno) from periods"; $result = DB_query($sql, $db); $myrow=DB_fetch_row($result); + if (is_null($myrow[0])){ $InsertFirstPeriodResult = DB_query("INSERT INTO periods VALUES (0,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+1,0,Date('Y'))) . "')",$db,_('Could not insert first period')); $InsertFirstPeriodResult = DB_query("INSERT INTO periods VALUES (1,'" . Date('Y-m-d',mktime(0,0,0,Date('m')+2,0,Date('Y'))) . "')",$db,_('Could not insert second period')); @@ -886,7 +888,7 @@ $LastPeriodEnd = mktime(0,0,0,Date('m')+2,0,Date('Y')); } else { $Date_Array = explode('-', $myrow[0]); - $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+2,0,(int)$Date_Array[0]); + $LastPeriodEnd = mktime(0,0,0,$Date_Array[1]+1,0,(int)$Date_Array[0]); $LastPeriod = $myrow[1]; } /* Find the unix timestamp of the first period end date in periods table */ @@ -900,20 +902,20 @@ /* If the period number doesn't exist */ if (!PeriodExists($TransDate, $db)) { /* if the transaction is after the last period */ + if ($TransDate > $LastPeriodEnd) { + $PeriodEnd = mktime(0,0,0,Date('m', $TransDate)+1, 0, Date('Y', $TransDate)); - $Period = $LastPeriod + 1; + while ($PeriodEnd >= $LastPeriodEnd) { - CreatePeriod($Period, $LastPeriodEnd, $db); - $Period++; if (Date('m', $LastPeriodEnd)<=13) { $LastPeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+2, 0, Date('Y', $LastPeriodEnd)); } else { $LastPeriodEnd = mktime(0,0,0,2, 0, Date('Y', $LastPeriodEnd)+1); } + $LastPeriod++; + CreatePeriod($LastPeriod, $LastPeriodEnd, $db); } - $PeriodEnd = mktime(0,0,0,Date('m', $LastPeriodEnd)+1, 0, Date('Y', $LastPeriodEnd)); - CreatePeriod($Period, $PeriodEnd, $db); } else { /* The transaction is before the first period */ $PeriodEnd = mktime(0,0,0,Date('m', $TransDate), 0, Date('Y', $TransDate)); Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/LanguageSetup.php 2011-11-10 09:30:52 UTC (rev 4743) @@ -63,8 +63,9 @@ include('includes/LanguagesArray.php'); } else { include('includes/LanguagesArray.php'); - $LocaleSet = setlocale (LC_NUMERIC, 'en_US','english-us'); + $LocaleSet = setlocale (LC_ALL, $_SESSION['Language'],$LanguagesArray[$_SESSION['Language']]['WindowsLocale']); + $LocaleSet = setlocale (LC_NUMERIC, 'C','en_GB.utf8','en_GB','en_US','english-us'); if (defined('LC_MESSAGES')){ //it's a unix/linux server $LocaleSet = setlocale (LC_MESSAGES, $_SESSION['Language']); @@ -73,6 +74,7 @@ if ($_SESSION['Language']=='tr_TR.utf8') { $Locale = setlocale(LC_CTYPE, 'C'); } + // possibly even if locale fails the language will still switch by using Language instead of locale variable putenv('LANG=' . $_SESSION['Language']); putenv('LANGUAGE=' . $_SESSION['Language']); Modified: trunk/includes/PDFTransPageHeader.inc =================================================================== --- trunk/includes/PDFTransPageHeader.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/PDFTransPageHeader.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -180,14 +180,14 @@ /*Set up headings */ $FontSize=10; $pdf->addText($Left_Margin + 2, $YPos, $FontSize, _('Customer Tax Ref') . ':'); -$pdf->addText($Left_Margin+80, $YPos, $FontSize, $myrow['taxref']); +$pdf->addText($Left_Margin+100, $YPos, $FontSize, $myrow['taxref']); /*Print a vertical line */ $pdf->line($Left_Margin+248, $YPos-10+$line_height+3,$Left_Margin+248, $YPos - 18); if ($InvOrCredit=='Invoice'){ $pdf->addText($Left_Margin + 252, $YPos, $FontSize, _('Customer Order Ref.') . ':'); - $pdf->addText($Left_Margin+340, $YPos, $FontSize, $myrow['customerref']); + $pdf->addText($Left_Margin+370, $YPos, $FontSize, $myrow['customerref']); } /*Print a vertical line */ $pdf->line($Left_Margin+450, $YPos+$line_height-7,$Left_Margin+450,$YPos-18); Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-08 09:03:06 UTC (rev 4742) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-10 09:30:52 UTC (rev 4743) @@ -330,4 +330,35 @@ } +/*Ensures general ledger entries balance for a given transaction */ +function EnsureGLEntriesBalance ($TransType, $TransTypeNo, $db) { + + $result = DB_query("SELECT SUM(amount) + FROM gltrans + WHERE type = '" . $TransType . "' + AND typeno = '" . $TransTypeNo . "'", + $db); + $myrow = DB_fetch_row($result); + $Difference = $myrow[0]; + if (abs($Difference)!=0){ + if (abs($Difference)>0.1){ + prnMsg(_('The general ledger entries created do not balance. See your system administrator'),'error'); + } else { + $result = DB_query("SELECT counterindex, + MAX(amount) + FROM gltrans + WHERE type = '" . $TransType . "' + AND typeno = '" . $TransTypeNo . "' + GROUP BY counterindex", + $db); + $myrow = DB_fetch_array($result); + $TransToAmend = $myrow['counterindex']; + $result = DB_query("UPDATE gltrans SET amount = amount - " . $Difference . " + WHERE counterindex = '" . $TransToAmend . "'", + $db); + + } + } +} + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-12 09:42:42
|
Revision: 4744 http://web-erp.svn.sourceforge.net/web-erp/?rev=4744&view=rev Author: daintree Date: 2011-11-12 09:42:34 +0000 (Sat, 12 Nov 2011) Log Message: ----------- bug fixes and tidy Modified Paths: -------------- trunk/CounterSales.php trunk/Credit_Invoice.php trunk/CustomerReceipt.php trunk/GoodsReceived.php trunk/PDFCustTransListing.php trunk/Payments.php trunk/PrintCheque.php trunk/SelectCreditItems.php trunk/SuppPaymentRun.php trunk/doc/Change.log trunk/includes/DefinePOClass.php trunk/includes/DefinePaymentClass.php trunk/includes/MiscFunctions.php trunk/includes/PDFPaymentRun_PymtFooter.php Removed Paths: ------------- trunk/Numbers/ Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/CounterSales.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -1432,37 +1432,36 @@ $OrderLine->StandardCost=0; } if ($MBFlag=='B' OR $MBFlag=='M'){ - $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost, - newqoh, - narrative ) - VALUES ('" . $OrderLine->StockID . "', - 10, - '" . $InvoiceNo . "', - '" . $_SESSION['Items'.$identifier]->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', - '" . $LocalCurrencyPrice . "', - '" . $PeriodNo . "', - '" . $OrderNo . "', - '" . -$OrderLine->Quantity . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior - $OrderLine->Quantity) . "', - '" . DB_escape_string($OrderLine->Narrative) . "' )"; + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh, + narrative ) + VALUES ('" . $OrderLine->StockID . "', + 10, + '" . $InvoiceNo . "', + '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLine->Quantity . "', + '" . $OrderLine->DiscountPercent . "', + '" . $OrderLine->StandardCost . "', + '" . ($QtyOnHandPrior - $OrderLine->Quantity) . "', + '" . DB_escape_string($OrderLine->Narrative) . "' )"; } else { // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil if (empty($OrderLine->StandardCost)) { @@ -1688,13 +1687,13 @@ /*now the stock entry*/ $StockGLCode = GetStockGLCode($OrderLine->StockID,$db); - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1713,14 +1712,13 @@ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db); - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1735,14 +1733,13 @@ if ($OrderLine->DiscountPercent !=0){ - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1805,6 +1802,9 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + + EnsureGLEntriesBalance(10,$InvoiceNo,$db); + /*Also if GL is linked to debtors need to process the debit to bank and credit to debtors for the payment */ /*Need to figure out the cross rate between customer currency and bank account currency */ @@ -1847,6 +1847,9 @@ $ErrMsg = _('Cannot insert a GL transaction for the debtors account credit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); }//amount paid we not zero + + EnsureGLEntriesBalance(12,$ReceiptNumber,$db); + } /*end of if Sales and GL integrated */ if ($_POST['AmountPaid']!=0){ if (!isset($ReceiptNumber)){ Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/Credit_Invoice.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -20,11 +20,11 @@ exit; } elseif (isset($_GET['InvoiceNumber'])) { - $_GET['InvoiceNumber']=(int)$_GET['InvoiceNumber']; + $_GET['InvoiceNumber']=intval($_GET['InvoiceNumber']); unset($_SESSION['CreditItems']->LineItems); unset($_SESSION['CreditItems']); - $_SESSION['ProcessingCredit'] = $_GET['InvoiceNumber']; + $_SESSION['ProcessingCredit'] = intval($_GET['InvoiceNumber']); $_SESSION['CreditItems'] = new cart; /*read in all the guff from the selected invoice into the Items cart */ @@ -61,7 +61,7 @@ AND stockmoves.type=debtortrans.type INNER JOIN locations ON stockmoves.loccode = locations.loccode - WHERE debtortrans.transno = '" . $_GET['InvoiceNumber'] . "' + WHERE debtortrans.transno = '" . intval($_GET['InvoiceNumber']) . "' AND stockmoves.type=10"; $ErrMsg = _('A credit cannot be produced for the selected invoice') . '. ' . _('The invoice details cannot be retrieved because'); @@ -1414,6 +1414,9 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + + EnsureGLEntriesBalance(11,$CreditNo,$db); + } /*end of if Sales and GL integrated */ $Result = DB_Txn_Commit($db); Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/CustomerReceipt.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -534,6 +534,7 @@ $ErrMsg = _('Cannot insert a GL transaction for the payment discount debit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } //end if there is some discount + EnsureGLEntriesBalance(12,$_SESSION['ReceiptBatch']->BatchNo,$db); } //end if there is GL work to be done - ie config is to link to GL Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/GoodsReceived.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -38,7 +38,7 @@ AND !isset($_POST['Update'])) { /*Update only occurs if the user hits the button to refresh the data and recalc the value of goods recd*/ - $_GET['ModifyOrderNumber'] = (int)$_GET['PONumber']; + $_GET['ModifyOrderNumber'] = intval($_GET['PONumber']); include('includes/PO_ReadInOrder.inc'); } elseif (isset($_POST['Update']) OR isset($_POST['ProcessGoodsReceived'])) { @@ -47,7 +47,7 @@ set from the post to the quantity to be received */ foreach ($_SESSION['PO'.$identifier]->LineItems as $Line) { - $RecvQty = filter_number_format($_POST['RecvQty_' . $Line->LineNo]); + $RecvQty = round(filter_number_format($_POST['RecvQty_' . $Line->LineNo]),$Line->DecimalPlaces); if (!is_numeric($RecvQty)){ $RecvQty = 0; } @@ -612,7 +612,7 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $PeriodNo . "', '" . Date('Y-m-d') . "', - 'cost', + '" . _('cost') . "', '" . $CurrentStandardCost * $OrderLine->ReceiveQty . "')"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); @@ -662,7 +662,7 @@ '" . $OrderLine->GLCode . "', 'PO: " . $_SESSION['PO'.$identifier]->OrderNo . " " . $_SESSION['PO'.$identifier]->SupplierID . " - " . $OrderLine->StockID . " - " . $OrderLine->ItemDescription . " x " . $OrderLine->ReceiveQty . " @ " . - locale_number_format($CurrentStandardCost,2) . "', + locale_number_format($CurrentStandardCost,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $CurrentStandardCost * $OrderLine->ReceiveQty . "' )"; @@ -685,7 +685,7 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['grnact'] . "', - '" . _('PO'.$identifier) . ': ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . $_SESSION['PO'.$identifier]->SupplierID . ' - ' . $OrderLine->StockID . ' - ' . $OrderLine->ItemDescription . ' x ' . $OrderLine->ReceiveQty . ' @ ' . locale_number_format($UnitCost,2) . "', + '" . _('PO'.$identifier) . ': ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . $_SESSION['PO'.$identifier]->SupplierID . ' - ' . $OrderLine->StockID . ' - ' . $OrderLine->ItemDescription . ' x ' . $OrderLine->ReceiveQty . ' @ ' . locale_number_format($UnitCost,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . -$UnitCost * $OrderLine->ReceiveQty . "' )"; @@ -705,8 +705,11 @@ WHERE orderno='" . $_SESSION['PO'.$identifier]->OrderNo . "'"; $result=DB_query($sql,$db); } + + if ($_SESSION['PO'.$identifier]->GLLink==1) { + EnsureGLEntriesBalance(25, $GRN,$db); + } - $Result = DB_Txn_Commit($db); $PONo = $_SESSION['PO'.$identifier]->OrderNo; unset($_SESSION['PO'.$identifier]->LineItems); @@ -714,7 +717,7 @@ unset($_POST['ProcessGoodsReceived']); echo '<br /> - <div class=centre> + <div class="centre"> '. prnMsg(_('GRN number'). ' '. $GRN .' '. _('has been processed'),'success') . ' <br /> <br /> Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/PDFCustTransListing.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -130,7 +130,7 @@ $YPos-=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,locale_number_format($TotalAmount,$_SESSION['CompanyRecord']['decimalplaces']), 'right'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['CurrencyDefault'], 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['currencydefault'], 'left'); $ReportFileName = $_SESSION['DatabaseName'] . '_CustTransListing_' . date('Y-m-d').'.pdf'; $pdf->OutputD($ReportFileName); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/Payments.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -30,10 +30,12 @@ if ((isset($_POST['UpdateHeader']) AND $_POST['BankAccount']=='') OR (isset($_POST['Process']) AND $_POST['BankAccount']=='')) { + prnMsg(_('A bank account must be selected to make this payment from'), 'warn'); - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else { - $BankAccountEmpty=FALSE; + + $BankAccountEmpty=false; } echo '<p class="page_title_text"> @@ -72,7 +74,7 @@ exit; } else { $myrow = DB_fetch_array($Result); - if ($myrow['factorcompanyid'] == 1) { + if ($myrow['factorcompanyid'] == 0) { $_SESSION['PaymentDetail']->SuppName = $myrow['suppname']; $_SESSION['PaymentDetail']->Address1 = $myrow['address1']; $_SESSION['PaymentDetail']->Address2 = $myrow['address2']; @@ -82,6 +84,7 @@ $_SESSION['PaymentDetail']->Address6 = $myrow['address6']; $_SESSION['PaymentDetail']->SupplierID = $_GET['SupplierID']; $_SESSION['PaymentDetail']->Currency = $myrow['currcode']; + $_POST['Currency'] = $_SESSION['PaymentDetail']->Currency; } else { $factorsql= "SELECT coyname, @@ -111,6 +114,7 @@ } if (isset($_POST['BankAccount']) AND $_POST['BankAccount']!=''){ + $_SESSION['PaymentDetail']->Account=$_POST['BankAccount']; /*Get the bank account currency and set that too */ $ErrMsg = _('Could not get the currency of the bank account'); @@ -134,10 +138,10 @@ $_SESSION['PaymentDetail']->DatePaid=$_POST['DatePaid']; } if (isset($_POST['ExRate']) AND $_POST['ExRate']!=''){ - $_SESSION['PaymentDetail']->ExRate=$_POST['ExRate']; //ex rate between payment currency and account currency + $_SESSION['PaymentDetail']->ExRate=filter_number_format($_POST['ExRate']); //ex rate between payment currency and account currency } if (isset($_POST['FunctionalExRate']) AND $_POST['FunctionalExRate']!=''){ - $_SESSION['PaymentDetail']->FunctionalExRate=$_POST['FunctionalExRate']; //ex rate between payment currency and account currency + $_SESSION['PaymentDetail']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); //ex rate between payment currency and account currency } if (isset($_POST['Paymenttype']) AND $_POST['Paymenttype']!=''){ $_SESSION['PaymentDetail']->Paymenttype = $_POST['Paymenttype']; @@ -158,8 +162,8 @@ if ($_SESSION['PaymentDetail']->AccountCurrency==$_SESSION['CompanyRecord']['currencydefault']){ $_POST['FunctionalExRate']=1; $_SESSION['PaymentDetail']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); + $SuggestedExRate = $tableExRate; $SuggestedFunctionalExRate =1; - $SuggestedExRate = $tableExRate; } else { /*To illustrate the rates required @@ -190,8 +194,8 @@ if (isset($_POST['Narrative']) AND $_POST['Narrative']!=''){ $_SESSION['PaymentDetail']->Narrative=$_POST['Narrative']; } -if (isset($_POST['Amount']) AND $_POST['Amount']!=""){ - $_SESSION['PaymentDetail']->Amount=$_POST['Amount']; +if (isset($_POST['Amount']) AND $_POST['Amount']!=''){ + $_SESSION['PaymentDetail']->Amount=filter_number_format($_POST['Amount']); } else { if (!isset($_SESSION['PaymentDetail']->Amount)) { $_SESSION['PaymentDetail']->Amount=0; @@ -275,11 +279,16 @@ echo '<form method=post action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo _('Has the cheque been printed') . '?<br /><br />'; - echo '<input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '" />'; - echo '<input type="hidden" name="BankAccount" value="' . $_POST['BankAccount'] . '" />'; - echo '<input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '" /> '; - echo '<input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; + echo _('Has the cheque been printed') . '? + <br /> + <br /> + <input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '" /> + <input type="hidden" name="BankAccount" value="' . $_POST['BankAccount'] . '" /> + <input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '" /> + <input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; + + echo '<br />Payment amount = ' . $_SESSION['PaymentDetail']->Amount; + } else { //Start a transaction to do the whole lot inside @@ -292,7 +301,7 @@ //its a nominal bank transaction type 1 $TransNo = GetNextTransNo( 1, $db); - $Transtype = 1; + $TransType = 1; if ($_SESSION['CompanyRecord']['gllink_creditors']==1){ /* then enter GLTrans */ $TotalAmount=0; @@ -301,7 +310,7 @@ /*The functional currency amount will be the payment currenct amount / the bank account currency exchange rate - to get to the bank account currency then / the functional currency exchange rate to get to the functional currency */ - if ($PaymentItem->cheque=='') $PaymentItem->cheque=0; + if ($PaymentItem->Cheque=='') $PaymentItem->Cheque=0; $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -318,8 +327,8 @@ '" . $PaymentItem->GLCode . "', '" . $PaymentItem->Narrative . "', '" . ($PaymentItem->Amount/$_SESSION['PaymentDetail']->ExRate/$_SESSION['PaymentDetail']->FunctionalExRate) . "', - '". $PaymentItem->cheque ."', - '" . $PaymentItem->tag . "' + '". $PaymentItem->Cheque ."', + '" . $PaymentItem->Tag . "' )"; $ErrMsg = _('Cannot insert a GL entry for the payment using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,_('The SQL that failed was'),true); @@ -413,7 +422,7 @@ $CreditorTotal = (($_SESSION['PaymentDetail']->Discount + $_SESSION['PaymentDetail']->Amount)/$_SESSION['PaymentDetail']->ExRate)/$_SESSION['PaymentDetail']->FunctionalExRate; $TransNo = GetNextTransNo(22, $db); - $Transtype = 22; + $TransType = 22; /* Create a SuppTrans entry for the supplier payment */ $SQL = "INSERT INTO supptrans (transno, @@ -483,8 +492,8 @@ periodno, account, narrative, - amount) "; - $SQL=$SQL . "VALUES (22, + amount) + VALUES (22, '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -496,6 +505,7 @@ $DbgMsg = _('Cannot insert a GL transaction for the payment discount credit using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } // end if discount + } // end if gl creditors } // end if supplier @@ -510,7 +520,7 @@ account, narrative, amount) - VALUES ('" . $Transtype . "', + VALUES ('" . $TransType . "', '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -522,11 +532,12 @@ $DbgMsg = _('Cannot insert a GL transaction for the bank account credit using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + EnsureGLEntriesBalance($TransType,$TransNo,$db); } } /*now enter the BankTrans entry */ - if ($Transtype==22) { + if ($TransType==22) { $SQL="INSERT INTO banktrans (transno, type, bankact, @@ -538,7 +549,7 @@ amount, currcode) VALUES ('" . $TransNo . "', - '" . $Transtype . "', + '" . $TransType . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', '" . $_SESSION['PaymentDetail']->ExRate . "', @@ -565,7 +576,7 @@ amount, currcode) VALUES ('" . $TransNo . "', - '" . $Transtype . "', + '" . $TransType . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', '" . $_SESSION['PaymentDetail']->ExRate . "', @@ -616,9 +627,10 @@ } elseif (isset($_GET['Delete'])){ /* User hit delete the receipt entry from the batch */ $_SESSION['PaymentDetail']->Remove_GLItem($_GET['Delete']); + } elseif (isset($_POST['Process']) AND !$BankAccountEmpty){ //user hit submit a new GL Analysis line into the payment - $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['cheque'] ."'"; + $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['Cheque'] ."'"; $ChequeNoResult=DB_query($ChequeNoSQL, $db); if (is_numeric($_POST['GLManualCode'])){ @@ -632,7 +644,7 @@ if (DB_num_rows($Result)==0){ prnMsg( _('The manual GL code entered does not exist in the database') . ' - ' . _('so this GL analysis item could not be added'),'warn'); unset($_POST['GLManualCode']); - } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['cheque']!=''){ + } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['Cheque']!=''){ prnMsg( _('The Cheque/Voucher number has already been used') . ' - ' . _('This GL analysis item could not be added'),'error'); } else { $myrow = DB_fetch_array($Result); @@ -640,11 +652,11 @@ $_POST['GLNarrative'], $_POST['GLManualCode'], $myrow['accountname'], - $_POST['tag'], - $_POST['cheque']); + $_POST['Tag'], + $_POST['Cheque']); unset($_POST['GLManualCode']); } - } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['cheque']!=''){ + } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['Cheque']!=''){ prnMsg( _('The cheque number has already been used') . ' - ' . _('This GL analysis item could not be added'),'error'); } else if ($_POST['GLCode'] == '') { prnMsg( _('No General Ledger code has been chosen') . ' - ' . _('so this GL analysis item could not be added'),'warn'); @@ -656,8 +668,8 @@ $_POST['GLNarrative'], $_POST['GLCode'], $myrow['accountname'], - $_POST['tag'], - $_POST['cheque']); + $_POST['Tag'], + $_POST['Cheque']); } /*Make sure the same receipt is not double processed by a page refresh */ @@ -821,7 +833,7 @@ $SuggestedExRateText =''; } if ($_POST['ExRate']==1 AND isset($SuggestedExRate)){ - $_POST['ExRate'] = $SuggestedExRate; + $_POST['ExRate'] = locale_number_format($SuggestedExRate,6); } echo '<tr> <td>' . _('Payment Exchange Rate') . ':</td> @@ -896,10 +908,10 @@ echo '<br /><table class="selection">'; echo '<tr><th colspan="2"><font size="3" color="blue">' . _('General Ledger Payment Analysis Entry') . '</font></th></tr>'; - //Select the tag + //Select the Tag echo '<tr> <td>' . _('Select Tag') . ':</td> - <td><select name="tag">'; + <td><select name="Tag">'; $SQL = "SELECT tagref, tagdescription @@ -909,7 +921,7 @@ $result=DB_query($SQL,$db); echo '<option value=0></option>'; while ($myrow=DB_fetch_array($result)){ - if (isset($_POST['tag']) AND $_POST['tag']==$myrow['tagref']){ + if (isset($_POST['Tag']) AND $_POST['Tag']==$myrow['tagref']){ echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; @@ -917,7 +929,7 @@ } echo '</select></td> </tr>'; -// End select tag +// End select Tag /*now set up a GLCode field to select from avaialble GL accounts */ if (isset($_POST['GLManualCode'])) { @@ -994,7 +1006,7 @@ echo '<tr> <td>'. _('Cheque/Voucher Number') .'</td> - <td><input type="text" name="cheque" maxlength="12" size="12" /></td> + <td><input type="text" name="Cheque" maxlength="12" size="12" /></td> </tr>'; if (isset($_POST['GLNarrative'])) { @@ -1039,21 +1051,21 @@ $PaymentTotal = 0; foreach ($_SESSION['PaymentDetail']->GLItems as $PaymentItem) { - $tagsql="SELECT tagdescription from tags where tagref='" . $PaymentItem->tag . "'"; - $TagResult=DB_query($tagsql, $db); + $Tagsql="SELECT tagdescription from tags where tagref='" . $PaymentItem->Tag . "'"; + $TagResult=DB_query($Tagsql, $db); $TagMyrow=DB_fetch_row($TagResult); - if ($PaymentItem->tag==0) { + if ($PaymentItem->Tag==0) { $TagName='None'; } else { $TagName=$TagMyrow[0]; } echo '<tr> - <td align=left>' . $PaymentItem->cheque . '</td> + <td>' . $PaymentItem->Cheque . '</td> <td class="number">' . locale_number_format($PaymentItem->Amount,$_SESSION['PaymentDetail']->CurrDecimalPlaces) . '</td> <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> <td>' . stripslashes($PaymentItem->Narrative) . '</td> - <td>' . $PaymentItem->tag . ' - ' . $TagName . '</td> + <td>' . $PaymentItem->Tag . ' - ' . $TagName . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> </tr>'; $PaymentTotal += $PaymentItem->Amount; @@ -1077,7 +1089,7 @@ echo '<table class="selection"> <tr> <td>' . _('Amount of Payment') . ' ' . $_SESSION['PaymentDetail']->Currency . ':</td> - <td><input class="number" type="text" name="Amount" maxlength=12 size=13 value=' . $_SESSION['PaymentDetail']->Amount . '></td> + <td><input class="number" type="text" name="Amount" maxlength="12" size="13" value=' . $_SESSION['PaymentDetail']->Amount . '></td> </tr>'; if (isset($_SESSION['PaymentDetail']->SupplierID)){ /*So it is a supplier payment so show the discount entry item */ @@ -1087,7 +1099,7 @@ </tr>'; echo '<input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail']->SuppName . '" />'; } else { - echo '<input type="hidden" name="discount" Value="0" />'; + echo '<input type="hidden" name="Discount" Value="0" />'; } echo '</table><br />'; echo '<input type=submit name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; Modified: trunk/PrintCheque.php =================================================================== --- trunk/PrintCheque.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/PrintCheque.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -2,10 +2,12 @@ /* $Id$*/ +/*Hard coded for currencies with 2 decimal places */ + include('includes/DefinePaymentClass.php'); include('includes/session.inc'); -include('Numbers/Words.php'); + include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Print Cheque')); $pdf->addInfo('Subject', _('Print Cheque')); @@ -14,7 +16,8 @@ $line_height=12; $result = db_query("SELECT hundredsname, - decimalplaces + decimalplaces, + currency FROM currencies WHERE currabrev='" . $_SESSION['PaymentDetail']->Currency . "'",$db); @@ -25,15 +28,23 @@ exit; } -$CurrencyRow = db_fetch_row($result); -$HundredsName = $CurrencyRow[0]; -$CurrDecimalPlaces = $CurrencyRow[1]; +$CurrencyRow = db_fetch_array($result); +$HundredsName = $CurrencyRow['hundredsname']; +$CurrDecimalPlaces = $CurrencyRow['decimalplaces']; +$CurrencyName = mb_strtolower($CurrencyRow['currency']); // cheque $YPos= $Page_Height-5*$line_height; $LeftOvers = $pdf->addTextWrap($Page_Width-75,$YPos,100,$FontSize,$_GET['ChequeNum'], 'left'); $YPos -= 3*$line_height; +$AmountWords = number_to_words($_SESSION['PaymentDetail']->Amount) . ' ' . $CurrencyName; +$Cents = intval(round(($_SESSION['PaymentDetail']->Amount - intval($_SESSION['PaymentDetail']->Amount))*100,0)); +if ($Cents > 0){ + $AmountWords .= ' ' . _('and') . ' ' . strval($Cents) . ' ' . $HundredsName; +} else { + $AmountWords .= ' ' . _('only'); +} $LeftOvers = $pdf->addTextWrap(75,$YPos,475,$FontSize,$AmountWords, 'left'); $YPos -= 1*$line_height; @@ -50,8 +61,6 @@ $Address3 = $_SESSION['PaymentDetail']->Address3 . ' ' . $_SESSION['PaymentDetail']->Address4 . ' ' . $_SESSION['PaymentDetail']->Address5 . ' ' . $_SESSION['PaymentDetail']->Address6; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $Address3, 'left'); -$AmountWords = Numbers_Words::toWords(intval($_SESSION['PaymentDetail']->Amount),$Locale); -$AmountWords .= ' ' . _('and') . ' ' . Numbers_Words::toWords(intval(($_SESSION['PaymentDetail']->Amount - intval($_SESSION['PaymentDetail']->Amount))*100),$Locale) . ' ' . $HundredsName; $YPos -= 2*$line_height; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $AmountWords, 'left'); @@ -88,4 +97,94 @@ $pdf->OutputD($_SESSION['DatabaseName'] . '_Cheque_' . date('Y-m-d') . '_ChequeNum_' . $_GET['ChequeNum'] . '.pdf'); $pdf->__destruct(); + +exit; +/* ****************************************************************************************** */ + +function number_to_words($Number) { + + if (($Number < 0) OR ($Number > 999999999)) { + prnMsg(_('Number is out of the range of numbers that can be expressed in words'),'error'); + return _('error'); + } + + $Millions = floor($Number / 1000000); + $Number -= $Millions * 1000000; + $Thousands = floor($Number / 1000); + $Number -= $Thousands * 1000; + $Hundreds = floor($Number / 100); + $Number -= $Hundreds * 100; + $NoOfTens = floor($Number / 10); + $NoOfOnes = $Number % 10; + + $NumberInWords = ''; + + if ($Millions) { + $NumberInWords .= number_to_words($Millions) . ' ' . _('million'); + } + + if ($Thousands) { + $NumberInWords .= (empty($NumberInWords) ? '' : ' ') . number_to_words($Thousands) . ' ' . _('thousand'); + } + + if ($Hundreds) { + $NumberInWords .= (empty($NumberInWords) ? '' : ' ') . number_to_words($Hundreds) . ' ' . _('hundred'); + } + + $Ones = array( 0 => '', + 1 => _('one'), + 2 => _('two'), + 3 => _('three'), + 4 => _('four'), + 5 => _('five'), + 6 => _('six'), + 7 => _('seven'), + 8 => _('eight'), + 9 => _('nine'), + 10 => _('ten'), + 11 => _('eleven'), + 12 => _('twelve'), + 13 => _('thirteen'), + 14 => _('fourteen'), + 15 => _('fifteen'), + 16 => _('sixteen'), + 17 => _('seventeen'), + 18 => _('eighteen'), + 19 => _('nineteen') ); + + $Tens = array( 0 => '', + 1 => '', + 2 => _('twenty'), + 3 => _('thirty'), + 4 => _('forty'), + 5 => _('fifty'), + 6 => _('sixty'), + 7 => _('seventy'), + 8 => _('eighty'), + 9 => _('ninety') ); + + + if ($NoOfTens OR $NoOfOnes) { + if (!empty($NumberInWords)) { + $NumberInWords .= ' ' . _('and') . ' '; + } + + if ($NoOfTens < 2){ + $NumberInWords .= $Ones[$NoOfTens * 10 + $NoOfOnes]; + } + else { + $NumberInWords .= $Tens[$NoOfTens]; + if ($NoOfOnes) { + $NumberInWords .= '-' . $Ones[$NoOfOnes]; + } + } + } + + if (empty($NumberInWords)){ + $NumberInWords = _('zero'); + } + + return $NumberInWords; +} + ?> \ No newline at end of file Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/SelectCreditItems.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -1553,7 +1553,7 @@ } - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement record to write the stock off could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement record to write the stock off could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement to write off the stock was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1823,9 +1823,9 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); } - } /* end of if GL and stock integrated and standard cost !=0 */ + } /* end of if GL and stock integrated and standard cost !=0 */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, @@ -1849,49 +1849,49 @@ '" . (($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate']) . "' )"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); - $DbgMsg = _('The following SQL to insert the GLTrans record was used'); - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - - if ($CreditLine->DiscountPercent !=0){ - - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', - '" . -(($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "' - )"; - - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - }/* end of if discount not equal to 0 */ - } /*end of if sales integrated with debtors */ + + if ($CreditLine->DiscountPercent !=0){ + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . -(($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "' + )"; + + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); + $DbgMsg = _('The following SQL to insert the GLTrans record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + }/* end of if discount not equal to 0 */ + } /*end of if sales integrated with debtors */ } /*Quantity credited is more than 0 */ - } /*end of CreditLine loop */ + } /*end of CreditLine loop */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post credit note transaction to GL credit debtors, debit freight re-charged and debit sales */ - if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES (11, '" . $CreditNo . "', '" . $SQLCreditDate . "', @@ -1903,8 +1903,8 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting for the credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - } - if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { + } + if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1946,7 +1946,10 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } - } /*end of if Sales and GL integrated */ + + EnsureGLEntriesBalance(11,$CreditNo,$db); + + } /*end of if Sales and GL integrated */ DB_Txn_Commit($db); Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/SuppPaymentRun.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -205,10 +205,11 @@ } /* end while there are suppliers to retrieve transactions for */ if ($SupplierID!=''){ - + /*All the payment processing is in the below file */ include('includes/PDFPaymentRun_PymtFooter.php'); - $ProcessResult = DB_Txn_Commit($db); + $ProcessResult = DB_Txn_Commit($db); + if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); @@ -228,7 +229,7 @@ } - $pdf->OutputD($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputD($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d_Hms') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/doc/Change.log 2011-11-12 09:42:34 UTC (rev 4744) @@ -1,9 +1,13 @@ webERP Change Log +12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines +12/11/11 Phil: Removed old Numbers to words class code - this code was not in keeping with the rest of the system and not PHP 5 compatible anyway. Replaced with a much simpler function. This code is only used for pre-printed cheques - so it is in that script only. The new function may not effective for other languages but will be easily adapted as needed. The PrintCheque.php script needs to be modified specifically for the business stationery. +10/11/11 Phil: added a function in includes/SQL_CommonFunctions.inc EnsureGLTransBalance that looks at the gltrans entries for a given transaction type and type number and if the total is not zero and less than 0.05 it fudges the largest gltrans record to make the gltrans balance in total - added to ConfirmDispatch_Invoice.php Credit_Invoice.php SelectCreditItems.php CounterSales.php Payments.php CustomerReceipt.php 10/11/11 Phil: includes/DateFunctions.inc fixed GetPeriod function to create new period when just one month ahead of last period - worried about this can't see how it could have been like this so long without a bug report? 10/11/11 Phil: includes/LanguageSetup.php now sets LC_NUMERIC locale category after LC_ALL to ensure SQL compliant calculations 8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim 8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier +8/11/11 Phil: CustomerReceipt.php now shows entries made with decimal places of the currency being entered 8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces 6/11/11 Release 4.06RC1 Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/DefinePOClass.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -146,7 +146,7 @@ /* Checks if there have been deliveries or invoiced entered against any of the line items */ if (count($this->LineItems)>0){ foreach ($this->LineItems as $OrderedItems) { - if ($OrderedItems->QtyReceived !=0 OR $OrderedItems->QtyInvoiced !=0){ + if ($OrderedItems->QtyReceived !=0 OR $OrderedItems->QtyInv !=0){ return 1; } } @@ -167,7 +167,9 @@ function Order_Value() { $TotalValue=0; foreach ($this->LineItems as $OrderedItems) { - $TotalValue += ($OrderedItems->Price)*($OrderedItems->Quantity); + if ($OrderedItems->Deleted = False){ + $TotalValue += ($OrderedItems->Price)*($OrderedItems->Quantity); + } } return $TotalValue; } Modified: trunk/includes/DefinePaymentClass.php =================================================================== --- trunk/includes/DefinePaymentClass.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/DefinePaymentClass.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -41,10 +41,23 @@ } - function Add_To_GLAnalysis($Amount, $Narrative, $GLCode, $GLActName, $tag, $cheque){ + function Add_To_GLAnalysis($Amount, + $Narrative, + $GLCode, + $GLActName, + $Tag, + $Cheque){ + if (isset($GLCode) AND $Amount!=0){ - $this->GLItems[$this->GLItemCounter] = new PaymentGLAnalysis($Amount, $Narrative, $this->GLItemCounter, $GLCode, $GLActName, $tag, $cheque); + $this->GLItems[$this->GLItemCounter] = new PaymentGLAnalysis($Amount, + $Narrative, + $this->GLItemCounter, + $GLCode, + $GLActName, + $Tag, + $Cheque); $this->GLItemCounter++; + $this->Amount += $Amount; Return 1; } Return 0; @@ -63,10 +76,16 @@ var $GLCode; var $GLActName; var $ID; - var $tag; - var $cheque; + var $Tag; + var $Cheque; - function PaymentGLAnalysis ($Amt, $Narr, $id, $GLCode, $GLActName, $tag, $cheque){ + function PaymentGLAnalysis ($Amt, + $Narr, + $id, + $GLCode, + $GLActName, + $Tag, + $Cheque){ /* Constructor function to add a new PaymentGLAnalysis object with passed params */ $this->Amount =$Amt; @@ -74,8 +93,8 @@ $this->GLCode = $GLCode; $this->GLActName = $GLActName; $this->ID = $id; - $this->tag = $tag; - $this->cheque = $cheque; + $this->Tag = $Tag; + $this->Cheque = $Cheque; } } Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/MiscFunctions.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -238,7 +238,6 @@ }//wikiLink - // Lindsay debug stuff function LogBackTrace( $dest = 0 ) { error_log( "***BEGIN STACK BACKTRACE***", $dest ); @@ -334,4 +333,6 @@ global $ThousandsSeparator; return str_replace($DecimalPoint,'.',str_replace($ThousandsSeparator,'',trim($Number))); } -?> + + +?> \ No newline at end of file Modified: trunk/includes/PDFPaymentRun_PymtFooter.php =================================================================== --- trunk/includes/PDFPaymentRun_PymtFooter.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/PDFPaymentRun_PymtFooter.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -10,14 +10,14 @@ $TotalPayments += $AccumBalance; $TotalAccumDiffOnExch += $AccumDiffOnExch; -$LeftOvers = $pdf->addTextWrap(340,$YPos,60,$FontSize,locale_number_format($AccumBalance,2), 'right'); -$LeftOvers = $pdf->addTextWrap(405,$YPos,60,$FontSize,locale_number_format($AccumDiffOnExch,2), 'right'); +$LeftOvers = $pdf->addTextWrap(340,$YPos,60,$FontSize,locale_number_format($AccumBalance,$CurrDecimalPlaces), 'right'); +$LeftOvers = $pdf->addTextWrap(405,$YPos,60,$FontSize,locale_number_format($AccumDiffOnExch,$CurrDecimalPlaces), 'right'); if (isset($_POST['PrintPDFAndProcess'])){ - if (is_numeric($_POST['Ref'])) { - $PaytReference = $_POST['Ref'] + $RefCounter; + if (is_numeric(filter_number_format($_POST['Ref']))) { + $PaytReference = filter_number_format($_POST['Ref']) + $RefCounter; } else { $PaytReference = $_POST['Ref'] . ($RefCounter + 1); } @@ -36,8 +36,8 @@ rate, ovamount, diffonexch, - alloc) "; - $SQL = $SQL . "VALUES (22, + alloc) + VALUES (22, '" . $SuppPaymentNo . "', '" . $PaytReference . "', '" . $SupplierID . "', @@ -45,18 +45,20 @@ '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', '" . date('Y-m-d H-i-s') . "', 1, - '" . $_POST['ExRate'] . "', + '" . filter_number_format($_POST['ExRate']) . "', '" . -$AccumBalance . "', '" . -$AccumDiffOnExch . "', '" . -$AccumBalance . "')"; + $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed because the payment record for') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _("Back to the menu") . "</A>"; + echo '<br> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - prnMsg(_("The SQL that failed was") . ' ' . $SQL,'error'); + prnMsg(_('The SQL that failed was') . ' ' . $SQL,'error'); } $ProcessResult = DB_Txn_Rollback($db); include('footer.inc'); @@ -84,7 +86,7 @@ $title = _('Payment Processing - Problem Report') . '.... '; include('header.inc'); prnMsg(_('None of the payments will be processed since an allocation record for') . $SupplierName . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo '<BR><A HREF="' . $rootpath . '/index.php">' . _('Back to the menu') . '</A>'; + echo '<br><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . $SQL,'error'); } @@ -104,7 +106,7 @@ amount) "; $SQL = $SQL . "VALUES ( " . $_POST['BankAccount'] . ", '" . $PaytReference . " " . $SupplierID . "', - " . $_POST['ExRate'] . ", + " . filter_number_format($_POST['ExRate']) . ", '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', '" . $_POST['PaytType'] . "', " . -$AccumBalance . ")"; @@ -113,7 +115,8 @@ $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed because the bank account payment record for') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _("Back to the menu") . "</A>"; + echo '<br /> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . ' ' . $SQL,'error'); } @@ -142,16 +145,17 @@ '" . $PeriodNo . "', '" . $_POST['BankAccount'] . "', '" . $SupplierID . " - " . $SupplierName . ' ' . _('payment run on') . ' ' . Date($_SESSION['DefaultDateFormat']) . ' - ' . $PaytReference . "', - '" . (-$AccumBalance/ $_POST['ExRate']) . "')"; + '" . (-$AccumBalance/ filter_number_format($_POST['ExRate'])) . "')"; $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing') . ' - ' . _('Problem Report') . '.... '; include('header.inc'); prnMsg(_('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _('Back to the menu') . '</A>'; + echo '<br /> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - prnMsg(_('The SQL that failed was') . ':<BR>' . $SQL, 'error'); + prnMsg(_('The SQL that failed was') . ':<br />' . $SQL, 'error'); } $ProcessResult = DB_Txn_Rollback($db); include('footer.inc'); @@ -173,19 +177,18 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['creditorsact'] . "', '" . $SupplierID . ' - ' . $SupplierName . ' ' . _('payment run on') . ' ' . Date($_SESSION['DefaultDateFormat']) . ' - ' . $PaytReference . "', - '" . ($AccumBalance/ $_POST['ExRate'] + $AccumDiffOnExch) . "')"; + '" . ($AccumBalance/ filter_number_format($_POST['ExRate']) + $AccumDiffOnExch) . "')"; $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report'); include('header.inc'); - echo '<BR>' . _('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db); - echo "<BR><A HREF='$rootpath/index.php'>" . _('Back to the menu') . '</A>'; + prnMsg(_('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . ':<BR>' . $SQL,'error'); } $ProcessResult = DB_Txn_Rollback($db); - include('footer.inc'); exit; } @@ -193,12 +196,12 @@ /*Do the GL trans for the exch diff */ if ($AccumDiffOnExch != 0){ $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount ) + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES (22, '" . $SuppPaymentNo . "', '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', @@ -212,7 +215,7 @@ $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed since the general ledger posting for the exchange difference on') . ' ' . $SupplierName . ' ' . _('could not be inserted because') .' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='$rootpath/index.php'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was: ') . '<br />' . $SQL,'error'); } @@ -221,6 +224,7 @@ exit; } } + EnsureGLEntriesBalance(22,$SuppPaymentNo,$db); } /*end if GL linked to creditors */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-12 09:42:42
|
Revision: 4744 http://web-erp.svn.sourceforge.net/web-erp/?rev=4744&view=rev Author: daintree Date: 2011-11-12 09:42:34 +0000 (Sat, 12 Nov 2011) Log Message: ----------- bug fixes and tidy Modified Paths: -------------- trunk/CounterSales.php trunk/Credit_Invoice.php trunk/CustomerReceipt.php trunk/GoodsReceived.php trunk/PDFCustTransListing.php trunk/Payments.php trunk/PrintCheque.php trunk/SelectCreditItems.php trunk/SuppPaymentRun.php trunk/doc/Change.log trunk/includes/DefinePOClass.php trunk/includes/DefinePaymentClass.php trunk/includes/MiscFunctions.php trunk/includes/PDFPaymentRun_PymtFooter.php Removed Paths: ------------- trunk/Numbers/ Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/CounterSales.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -1432,37 +1432,36 @@ $OrderLine->StandardCost=0; } if ($MBFlag=='B' OR $MBFlag=='M'){ - $SQL = "INSERT INTO stockmoves ( - stockid, - type, - transno, - loccode, - trandate, - debtorno, - branchcode, - price, - prd, - reference, - qty, - discountpercent, - standardcost, - newqoh, - narrative ) - VALUES ('" . $OrderLine->StockID . "', - 10, - '" . $InvoiceNo . "', - '" . $_SESSION['Items'.$identifier]->Location . "', - '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items'.$identifier]->DebtorNo . "', - '" . $_SESSION['Items'.$identifier]->Branch . "', - '" . $LocalCurrencyPrice . "', - '" . $PeriodNo . "', - '" . $OrderNo . "', - '" . -$OrderLine->Quantity . "', - '" . $OrderLine->DiscountPercent . "', - '" . $OrderLine->StandardCost . "', - '" . ($QtyOnHandPrior - $OrderLine->Quantity) . "', - '" . DB_escape_string($OrderLine->Narrative) . "' )"; + $SQL = "INSERT INTO stockmoves (stockid, + type, + transno, + loccode, + trandate, + debtorno, + branchcode, + price, + prd, + reference, + qty, + discountpercent, + standardcost, + newqoh, + narrative ) + VALUES ('" . $OrderLine->StockID . "', + 10, + '" . $InvoiceNo . "', + '" . $_SESSION['Items'.$identifier]->Location . "', + '" . $DefaultDispatchDate . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', + '" . $LocalCurrencyPrice . "', + '" . $PeriodNo . "', + '" . $OrderNo . "', + '" . -$OrderLine->Quantity . "', + '" . $OrderLine->DiscountPercent . "', + '" . $OrderLine->StandardCost . "', + '" . ($QtyOnHandPrior - $OrderLine->Quantity) . "', + '" . DB_escape_string($OrderLine->Narrative) . "' )"; } else { // its an assembly or dummy and assemblies/dummies always have nil stock (by definition they are made up at the time of dispatch so new qty on hand will be nil if (empty($OrderLine->StandardCost)) { @@ -1688,13 +1687,13 @@ /*now the stock entry*/ $StockGLCode = GetStockGLCode($OrderLine->StockID,$db); - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1713,14 +1712,13 @@ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db); - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1735,14 +1733,13 @@ if ($OrderLine->DiscountPercent !=0){ - $SQL = "INSERT INTO gltrans ( type, - typeno, - trandate, - periodno, - account, - narrative, - amount - ) + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES ( 10, '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', @@ -1805,6 +1802,9 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + + EnsureGLEntriesBalance(10,$InvoiceNo,$db); + /*Also if GL is linked to debtors need to process the debit to bank and credit to debtors for the payment */ /*Need to figure out the cross rate between customer currency and bank account currency */ @@ -1847,6 +1847,9 @@ $ErrMsg = _('Cannot insert a GL transaction for the debtors account credit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); }//amount paid we not zero + + EnsureGLEntriesBalance(12,$ReceiptNumber,$db); + } /*end of if Sales and GL integrated */ if ($_POST['AmountPaid']!=0){ if (!isset($ReceiptNumber)){ Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/Credit_Invoice.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -20,11 +20,11 @@ exit; } elseif (isset($_GET['InvoiceNumber'])) { - $_GET['InvoiceNumber']=(int)$_GET['InvoiceNumber']; + $_GET['InvoiceNumber']=intval($_GET['InvoiceNumber']); unset($_SESSION['CreditItems']->LineItems); unset($_SESSION['CreditItems']); - $_SESSION['ProcessingCredit'] = $_GET['InvoiceNumber']; + $_SESSION['ProcessingCredit'] = intval($_GET['InvoiceNumber']); $_SESSION['CreditItems'] = new cart; /*read in all the guff from the selected invoice into the Items cart */ @@ -61,7 +61,7 @@ AND stockmoves.type=debtortrans.type INNER JOIN locations ON stockmoves.loccode = locations.loccode - WHERE debtortrans.transno = '" . $_GET['InvoiceNumber'] . "' + WHERE debtortrans.transno = '" . intval($_GET['InvoiceNumber']) . "' AND stockmoves.type=10"; $ErrMsg = _('A credit cannot be produced for the selected invoice') . '. ' . _('The invoice details cannot be retrieved because'); @@ -1414,6 +1414,9 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } + + EnsureGLEntriesBalance(11,$CreditNo,$db); + } /*end of if Sales and GL integrated */ $Result = DB_Txn_Commit($db); Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/CustomerReceipt.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -534,6 +534,7 @@ $ErrMsg = _('Cannot insert a GL transaction for the payment discount debit'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } //end if there is some discount + EnsureGLEntriesBalance(12,$_SESSION['ReceiptBatch']->BatchNo,$db); } //end if there is GL work to be done - ie config is to link to GL Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/GoodsReceived.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -38,7 +38,7 @@ AND !isset($_POST['Update'])) { /*Update only occurs if the user hits the button to refresh the data and recalc the value of goods recd*/ - $_GET['ModifyOrderNumber'] = (int)$_GET['PONumber']; + $_GET['ModifyOrderNumber'] = intval($_GET['PONumber']); include('includes/PO_ReadInOrder.inc'); } elseif (isset($_POST['Update']) OR isset($_POST['ProcessGoodsReceived'])) { @@ -47,7 +47,7 @@ set from the post to the quantity to be received */ foreach ($_SESSION['PO'.$identifier]->LineItems as $Line) { - $RecvQty = filter_number_format($_POST['RecvQty_' . $Line->LineNo]); + $RecvQty = round(filter_number_format($_POST['RecvQty_' . $Line->LineNo]),$Line->DecimalPlaces); if (!is_numeric($RecvQty)){ $RecvQty = 0; } @@ -612,7 +612,7 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $PeriodNo . "', '" . Date('Y-m-d') . "', - 'cost', + '" . _('cost') . "', '" . $CurrentStandardCost * $OrderLine->ReceiveQty . "')"; $ErrMsg = _('CRITICAL ERROR! NOTE DOWN THIS ERROR AND SEEK ASSISTANCE The fixed asset transaction could not be inserted because'); $DbgMsg = _('The following SQL to insert the fixed asset transaction record was used'); @@ -662,7 +662,7 @@ '" . $OrderLine->GLCode . "', 'PO: " . $_SESSION['PO'.$identifier]->OrderNo . " " . $_SESSION['PO'.$identifier]->SupplierID . " - " . $OrderLine->StockID . " - " . $OrderLine->ItemDescription . " x " . $OrderLine->ReceiveQty . " @ " . - locale_number_format($CurrentStandardCost,2) . "', + locale_number_format($CurrentStandardCost,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $CurrentStandardCost * $OrderLine->ReceiveQty . "' )"; @@ -685,7 +685,7 @@ '" . $_POST['DefaultReceivedDate'] . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['grnact'] . "', - '" . _('PO'.$identifier) . ': ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . $_SESSION['PO'.$identifier]->SupplierID . ' - ' . $OrderLine->StockID . ' - ' . $OrderLine->ItemDescription . ' x ' . $OrderLine->ReceiveQty . ' @ ' . locale_number_format($UnitCost,2) . "', + '" . _('PO'.$identifier) . ': ' . $_SESSION['PO'.$identifier]->OrderNo . ' ' . $_SESSION['PO'.$identifier]->SupplierID . ' - ' . $OrderLine->StockID . ' - ' . $OrderLine->ItemDescription . ' x ' . $OrderLine->ReceiveQty . ' @ ' . locale_number_format($UnitCost,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . -$UnitCost * $OrderLine->ReceiveQty . "' )"; @@ -705,8 +705,11 @@ WHERE orderno='" . $_SESSION['PO'.$identifier]->OrderNo . "'"; $result=DB_query($sql,$db); } + + if ($_SESSION['PO'.$identifier]->GLLink==1) { + EnsureGLEntriesBalance(25, $GRN,$db); + } - $Result = DB_Txn_Commit($db); $PONo = $_SESSION['PO'.$identifier]->OrderNo; unset($_SESSION['PO'.$identifier]->LineItems); @@ -714,7 +717,7 @@ unset($_POST['ProcessGoodsReceived']); echo '<br /> - <div class=centre> + <div class="centre"> '. prnMsg(_('GRN number'). ' '. $GRN .' '. _('has been processed'),'success') . ' <br /> <br /> Modified: trunk/PDFCustTransListing.php =================================================================== --- trunk/PDFCustTransListing.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/PDFCustTransListing.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -130,7 +130,7 @@ $YPos-=$line_height; $LeftOvers = $pdf->addTextWrap($Left_Margin+452,$YPos,70,$FontSize,locale_number_format($TotalAmount,$_SESSION['CompanyRecord']['decimalplaces']), 'right'); -$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['CurrencyDefault'], 'left'); +$LeftOvers = $pdf->addTextWrap($Left_Margin+265,$YPos,300,$FontSize,_('Total') . ' ' . _('Transactions') . ' ' . $_SESSION['CompanyRecord']['currencydefault'], 'left'); $ReportFileName = $_SESSION['DatabaseName'] . '_CustTransListing_' . date('Y-m-d').'.pdf'; $pdf->OutputD($ReportFileName); Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/Payments.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -30,10 +30,12 @@ if ((isset($_POST['UpdateHeader']) AND $_POST['BankAccount']=='') OR (isset($_POST['Process']) AND $_POST['BankAccount']=='')) { + prnMsg(_('A bank account must be selected to make this payment from'), 'warn'); - $BankAccountEmpty=TRUE; + $BankAccountEmpty=true; } else { - $BankAccountEmpty=FALSE; + + $BankAccountEmpty=false; } echo '<p class="page_title_text"> @@ -72,7 +74,7 @@ exit; } else { $myrow = DB_fetch_array($Result); - if ($myrow['factorcompanyid'] == 1) { + if ($myrow['factorcompanyid'] == 0) { $_SESSION['PaymentDetail']->SuppName = $myrow['suppname']; $_SESSION['PaymentDetail']->Address1 = $myrow['address1']; $_SESSION['PaymentDetail']->Address2 = $myrow['address2']; @@ -82,6 +84,7 @@ $_SESSION['PaymentDetail']->Address6 = $myrow['address6']; $_SESSION['PaymentDetail']->SupplierID = $_GET['SupplierID']; $_SESSION['PaymentDetail']->Currency = $myrow['currcode']; + $_POST['Currency'] = $_SESSION['PaymentDetail']->Currency; } else { $factorsql= "SELECT coyname, @@ -111,6 +114,7 @@ } if (isset($_POST['BankAccount']) AND $_POST['BankAccount']!=''){ + $_SESSION['PaymentDetail']->Account=$_POST['BankAccount']; /*Get the bank account currency and set that too */ $ErrMsg = _('Could not get the currency of the bank account'); @@ -134,10 +138,10 @@ $_SESSION['PaymentDetail']->DatePaid=$_POST['DatePaid']; } if (isset($_POST['ExRate']) AND $_POST['ExRate']!=''){ - $_SESSION['PaymentDetail']->ExRate=$_POST['ExRate']; //ex rate between payment currency and account currency + $_SESSION['PaymentDetail']->ExRate=filter_number_format($_POST['ExRate']); //ex rate between payment currency and account currency } if (isset($_POST['FunctionalExRate']) AND $_POST['FunctionalExRate']!=''){ - $_SESSION['PaymentDetail']->FunctionalExRate=$_POST['FunctionalExRate']; //ex rate between payment currency and account currency + $_SESSION['PaymentDetail']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); //ex rate between payment currency and account currency } if (isset($_POST['Paymenttype']) AND $_POST['Paymenttype']!=''){ $_SESSION['PaymentDetail']->Paymenttype = $_POST['Paymenttype']; @@ -158,8 +162,8 @@ if ($_SESSION['PaymentDetail']->AccountCurrency==$_SESSION['CompanyRecord']['currencydefault']){ $_POST['FunctionalExRate']=1; $_SESSION['PaymentDetail']->FunctionalExRate=filter_number_format($_POST['FunctionalExRate']); + $SuggestedExRate = $tableExRate; $SuggestedFunctionalExRate =1; - $SuggestedExRate = $tableExRate; } else { /*To illustrate the rates required @@ -190,8 +194,8 @@ if (isset($_POST['Narrative']) AND $_POST['Narrative']!=''){ $_SESSION['PaymentDetail']->Narrative=$_POST['Narrative']; } -if (isset($_POST['Amount']) AND $_POST['Amount']!=""){ - $_SESSION['PaymentDetail']->Amount=$_POST['Amount']; +if (isset($_POST['Amount']) AND $_POST['Amount']!=''){ + $_SESSION['PaymentDetail']->Amount=filter_number_format($_POST['Amount']); } else { if (!isset($_SESSION['PaymentDetail']->Amount)) { $_SESSION['PaymentDetail']->Amount=0; @@ -275,11 +279,16 @@ echo '<form method=post action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo _('Has the cheque been printed') . '?<br /><br />'; - echo '<input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '" />'; - echo '<input type="hidden" name="BankAccount" value="' . $_POST['BankAccount'] . '" />'; - echo '<input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '" /> '; - echo '<input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; + echo _('Has the cheque been printed') . '? + <br /> + <br /> + <input type="hidden" name="CommitBatch" value="' . $_POST['CommitBatch'] . '" /> + <input type="hidden" name="BankAccount" value="' . $_POST['BankAccount'] . '" /> + <input type="submit" name="ChequePrinted" value="' . _('Yes / Continue') . '" /> + <input type="submit" name="PaymentCancelled" value="' . _('No / Cancel Payment') . '" />'; + + echo '<br />Payment amount = ' . $_SESSION['PaymentDetail']->Amount; + } else { //Start a transaction to do the whole lot inside @@ -292,7 +301,7 @@ //its a nominal bank transaction type 1 $TransNo = GetNextTransNo( 1, $db); - $Transtype = 1; + $TransType = 1; if ($_SESSION['CompanyRecord']['gllink_creditors']==1){ /* then enter GLTrans */ $TotalAmount=0; @@ -301,7 +310,7 @@ /*The functional currency amount will be the payment currenct amount / the bank account currency exchange rate - to get to the bank account currency then / the functional currency exchange rate to get to the functional currency */ - if ($PaymentItem->cheque=='') $PaymentItem->cheque=0; + if ($PaymentItem->Cheque=='') $PaymentItem->Cheque=0; $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -318,8 +327,8 @@ '" . $PaymentItem->GLCode . "', '" . $PaymentItem->Narrative . "', '" . ($PaymentItem->Amount/$_SESSION['PaymentDetail']->ExRate/$_SESSION['PaymentDetail']->FunctionalExRate) . "', - '". $PaymentItem->cheque ."', - '" . $PaymentItem->tag . "' + '". $PaymentItem->Cheque ."', + '" . $PaymentItem->Tag . "' )"; $ErrMsg = _('Cannot insert a GL entry for the payment using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,_('The SQL that failed was'),true); @@ -413,7 +422,7 @@ $CreditorTotal = (($_SESSION['PaymentDetail']->Discount + $_SESSION['PaymentDetail']->Amount)/$_SESSION['PaymentDetail']->ExRate)/$_SESSION['PaymentDetail']->FunctionalExRate; $TransNo = GetNextTransNo(22, $db); - $Transtype = 22; + $TransType = 22; /* Create a SuppTrans entry for the supplier payment */ $SQL = "INSERT INTO supptrans (transno, @@ -483,8 +492,8 @@ periodno, account, narrative, - amount) "; - $SQL=$SQL . "VALUES (22, + amount) + VALUES (22, '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -496,6 +505,7 @@ $DbgMsg = _('Cannot insert a GL transaction for the payment discount credit using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } // end if discount + } // end if gl creditors } // end if supplier @@ -510,7 +520,7 @@ account, narrative, amount) - VALUES ('" . $Transtype . "', + VALUES ('" . $TransType . "', '" . $TransNo . "', '" . FormatDateForSQL($_SESSION['PaymentDetail']->DatePaid) . "', '" . $PeriodNo . "', @@ -522,11 +532,12 @@ $DbgMsg = _('Cannot insert a GL transaction for the bank account credit using the SQL'); $result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); + EnsureGLEntriesBalance($TransType,$TransNo,$db); } } /*now enter the BankTrans entry */ - if ($Transtype==22) { + if ($TransType==22) { $SQL="INSERT INTO banktrans (transno, type, bankact, @@ -538,7 +549,7 @@ amount, currcode) VALUES ('" . $TransNo . "', - '" . $Transtype . "', + '" . $TransType . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', '" . $_SESSION['PaymentDetail']->ExRate . "', @@ -565,7 +576,7 @@ amount, currcode) VALUES ('" . $TransNo . "', - '" . $Transtype . "', + '" . $TransType . "', '" . $_SESSION['PaymentDetail']->Account . "', '" . $_SESSION['PaymentDetail']->Narrative . "', '" . $_SESSION['PaymentDetail']->ExRate . "', @@ -616,9 +627,10 @@ } elseif (isset($_GET['Delete'])){ /* User hit delete the receipt entry from the batch */ $_SESSION['PaymentDetail']->Remove_GLItem($_GET['Delete']); + } elseif (isset($_POST['Process']) AND !$BankAccountEmpty){ //user hit submit a new GL Analysis line into the payment - $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['cheque'] ."'"; + $ChequeNoSQL="SELECT account FROM gltrans WHERE chequeno='" . $_POST['Cheque'] ."'"; $ChequeNoResult=DB_query($ChequeNoSQL, $db); if (is_numeric($_POST['GLManualCode'])){ @@ -632,7 +644,7 @@ if (DB_num_rows($Result)==0){ prnMsg( _('The manual GL code entered does not exist in the database') . ' - ' . _('so this GL analysis item could not be added'),'warn'); unset($_POST['GLManualCode']); - } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['cheque']!=''){ + } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['Cheque']!=''){ prnMsg( _('The Cheque/Voucher number has already been used') . ' - ' . _('This GL analysis item could not be added'),'error'); } else { $myrow = DB_fetch_array($Result); @@ -640,11 +652,11 @@ $_POST['GLNarrative'], $_POST['GLManualCode'], $myrow['accountname'], - $_POST['tag'], - $_POST['cheque']); + $_POST['Tag'], + $_POST['Cheque']); unset($_POST['GLManualCode']); } - } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['cheque']!=''){ + } else if (DB_num_rows($ChequeNoResult)!=0 AND $_POST['Cheque']!=''){ prnMsg( _('The cheque number has already been used') . ' - ' . _('This GL analysis item could not be added'),'error'); } else if ($_POST['GLCode'] == '') { prnMsg( _('No General Ledger code has been chosen') . ' - ' . _('so this GL analysis item could not be added'),'warn'); @@ -656,8 +668,8 @@ $_POST['GLNarrative'], $_POST['GLCode'], $myrow['accountname'], - $_POST['tag'], - $_POST['cheque']); + $_POST['Tag'], + $_POST['Cheque']); } /*Make sure the same receipt is not double processed by a page refresh */ @@ -821,7 +833,7 @@ $SuggestedExRateText =''; } if ($_POST['ExRate']==1 AND isset($SuggestedExRate)){ - $_POST['ExRate'] = $SuggestedExRate; + $_POST['ExRate'] = locale_number_format($SuggestedExRate,6); } echo '<tr> <td>' . _('Payment Exchange Rate') . ':</td> @@ -896,10 +908,10 @@ echo '<br /><table class="selection">'; echo '<tr><th colspan="2"><font size="3" color="blue">' . _('General Ledger Payment Analysis Entry') . '</font></th></tr>'; - //Select the tag + //Select the Tag echo '<tr> <td>' . _('Select Tag') . ':</td> - <td><select name="tag">'; + <td><select name="Tag">'; $SQL = "SELECT tagref, tagdescription @@ -909,7 +921,7 @@ $result=DB_query($SQL,$db); echo '<option value=0></option>'; while ($myrow=DB_fetch_array($result)){ - if (isset($_POST['tag']) AND $_POST['tag']==$myrow['tagref']){ + if (isset($_POST['Tag']) AND $_POST['Tag']==$myrow['tagref']){ echo '<option selected value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; } else { echo '<option value=' . $myrow['tagref'] . '>' . $myrow['tagref'].' - ' .$myrow['tagdescription'] . '</option>'; @@ -917,7 +929,7 @@ } echo '</select></td> </tr>'; -// End select tag +// End select Tag /*now set up a GLCode field to select from avaialble GL accounts */ if (isset($_POST['GLManualCode'])) { @@ -994,7 +1006,7 @@ echo '<tr> <td>'. _('Cheque/Voucher Number') .'</td> - <td><input type="text" name="cheque" maxlength="12" size="12" /></td> + <td><input type="text" name="Cheque" maxlength="12" size="12" /></td> </tr>'; if (isset($_POST['GLNarrative'])) { @@ -1039,21 +1051,21 @@ $PaymentTotal = 0; foreach ($_SESSION['PaymentDetail']->GLItems as $PaymentItem) { - $tagsql="SELECT tagdescription from tags where tagref='" . $PaymentItem->tag . "'"; - $TagResult=DB_query($tagsql, $db); + $Tagsql="SELECT tagdescription from tags where tagref='" . $PaymentItem->Tag . "'"; + $TagResult=DB_query($Tagsql, $db); $TagMyrow=DB_fetch_row($TagResult); - if ($PaymentItem->tag==0) { + if ($PaymentItem->Tag==0) { $TagName='None'; } else { $TagName=$TagMyrow[0]; } echo '<tr> - <td align=left>' . $PaymentItem->cheque . '</td> + <td>' . $PaymentItem->Cheque . '</td> <td class="number">' . locale_number_format($PaymentItem->Amount,$_SESSION['PaymentDetail']->CurrDecimalPlaces) . '</td> <td>' . $PaymentItem->GLCode . ' - ' . $PaymentItem->GLActName . '</td> <td>' . stripslashes($PaymentItem->Narrative) . '</td> - <td>' . $PaymentItem->tag . ' - ' . $TagName . '</td> + <td>' . $PaymentItem->Tag . ' - ' . $TagName . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $PaymentItem->ID . '" onclick="return confirm(\'' . _('Are you sure you wish to delete this payment analysis item?') . '\');">' . _('Delete') . '</a></td> </tr>'; $PaymentTotal += $PaymentItem->Amount; @@ -1077,7 +1089,7 @@ echo '<table class="selection"> <tr> <td>' . _('Amount of Payment') . ' ' . $_SESSION['PaymentDetail']->Currency . ':</td> - <td><input class="number" type="text" name="Amount" maxlength=12 size=13 value=' . $_SESSION['PaymentDetail']->Amount . '></td> + <td><input class="number" type="text" name="Amount" maxlength="12" size="13" value=' . $_SESSION['PaymentDetail']->Amount . '></td> </tr>'; if (isset($_SESSION['PaymentDetail']->SupplierID)){ /*So it is a supplier payment so show the discount entry item */ @@ -1087,7 +1099,7 @@ </tr>'; echo '<input type="hidden" name="SuppName" value="' . $_SESSION['PaymentDetail']->SuppName . '" />'; } else { - echo '<input type="hidden" name="discount" Value="0" />'; + echo '<input type="hidden" name="Discount" Value="0" />'; } echo '</table><br />'; echo '<input type=submit name="CommitBatch" value="' . _('Accept and Process Payment') . '" />'; Modified: trunk/PrintCheque.php =================================================================== --- trunk/PrintCheque.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/PrintCheque.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -2,10 +2,12 @@ /* $Id$*/ +/*Hard coded for currencies with 2 decimal places */ + include('includes/DefinePaymentClass.php'); include('includes/session.inc'); -include('Numbers/Words.php'); + include('includes/PDFStarter.php'); $pdf->addInfo('Title', _('Print Cheque')); $pdf->addInfo('Subject', _('Print Cheque')); @@ -14,7 +16,8 @@ $line_height=12; $result = db_query("SELECT hundredsname, - decimalplaces + decimalplaces, + currency FROM currencies WHERE currabrev='" . $_SESSION['PaymentDetail']->Currency . "'",$db); @@ -25,15 +28,23 @@ exit; } -$CurrencyRow = db_fetch_row($result); -$HundredsName = $CurrencyRow[0]; -$CurrDecimalPlaces = $CurrencyRow[1]; +$CurrencyRow = db_fetch_array($result); +$HundredsName = $CurrencyRow['hundredsname']; +$CurrDecimalPlaces = $CurrencyRow['decimalplaces']; +$CurrencyName = mb_strtolower($CurrencyRow['currency']); // cheque $YPos= $Page_Height-5*$line_height; $LeftOvers = $pdf->addTextWrap($Page_Width-75,$YPos,100,$FontSize,$_GET['ChequeNum'], 'left'); $YPos -= 3*$line_height; +$AmountWords = number_to_words($_SESSION['PaymentDetail']->Amount) . ' ' . $CurrencyName; +$Cents = intval(round(($_SESSION['PaymentDetail']->Amount - intval($_SESSION['PaymentDetail']->Amount))*100,0)); +if ($Cents > 0){ + $AmountWords .= ' ' . _('and') . ' ' . strval($Cents) . ' ' . $HundredsName; +} else { + $AmountWords .= ' ' . _('only'); +} $LeftOvers = $pdf->addTextWrap(75,$YPos,475,$FontSize,$AmountWords, 'left'); $YPos -= 1*$line_height; @@ -50,8 +61,6 @@ $Address3 = $_SESSION['PaymentDetail']->Address3 . ' ' . $_SESSION['PaymentDetail']->Address4 . ' ' . $_SESSION['PaymentDetail']->Address5 . ' ' . $_SESSION['PaymentDetail']->Address6; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $Address3, 'left'); -$AmountWords = Numbers_Words::toWords(intval($_SESSION['PaymentDetail']->Amount),$Locale); -$AmountWords .= ' ' . _('and') . ' ' . Numbers_Words::toWords(intval(($_SESSION['PaymentDetail']->Amount - intval($_SESSION['PaymentDetail']->Amount))*100),$Locale) . ' ' . $HundredsName; $YPos -= 2*$line_height; $LeftOvers = $pdf->addTextWrap(75,$YPos,300,$FontSize, $AmountWords, 'left'); @@ -88,4 +97,94 @@ $pdf->OutputD($_SESSION['DatabaseName'] . '_Cheque_' . date('Y-m-d') . '_ChequeNum_' . $_GET['ChequeNum'] . '.pdf'); $pdf->__destruct(); + +exit; +/* ****************************************************************************************** */ + +function number_to_words($Number) { + + if (($Number < 0) OR ($Number > 999999999)) { + prnMsg(_('Number is out of the range of numbers that can be expressed in words'),'error'); + return _('error'); + } + + $Millions = floor($Number / 1000000); + $Number -= $Millions * 1000000; + $Thousands = floor($Number / 1000); + $Number -= $Thousands * 1000; + $Hundreds = floor($Number / 100); + $Number -= $Hundreds * 100; + $NoOfTens = floor($Number / 10); + $NoOfOnes = $Number % 10; + + $NumberInWords = ''; + + if ($Millions) { + $NumberInWords .= number_to_words($Millions) . ' ' . _('million'); + } + + if ($Thousands) { + $NumberInWords .= (empty($NumberInWords) ? '' : ' ') . number_to_words($Thousands) . ' ' . _('thousand'); + } + + if ($Hundreds) { + $NumberInWords .= (empty($NumberInWords) ? '' : ' ') . number_to_words($Hundreds) . ' ' . _('hundred'); + } + + $Ones = array( 0 => '', + 1 => _('one'), + 2 => _('two'), + 3 => _('three'), + 4 => _('four'), + 5 => _('five'), + 6 => _('six'), + 7 => _('seven'), + 8 => _('eight'), + 9 => _('nine'), + 10 => _('ten'), + 11 => _('eleven'), + 12 => _('twelve'), + 13 => _('thirteen'), + 14 => _('fourteen'), + 15 => _('fifteen'), + 16 => _('sixteen'), + 17 => _('seventeen'), + 18 => _('eighteen'), + 19 => _('nineteen') ); + + $Tens = array( 0 => '', + 1 => '', + 2 => _('twenty'), + 3 => _('thirty'), + 4 => _('forty'), + 5 => _('fifty'), + 6 => _('sixty'), + 7 => _('seventy'), + 8 => _('eighty'), + 9 => _('ninety') ); + + + if ($NoOfTens OR $NoOfOnes) { + if (!empty($NumberInWords)) { + $NumberInWords .= ' ' . _('and') . ' '; + } + + if ($NoOfTens < 2){ + $NumberInWords .= $Ones[$NoOfTens * 10 + $NoOfOnes]; + } + else { + $NumberInWords .= $Tens[$NoOfTens]; + if ($NoOfOnes) { + $NumberInWords .= '-' . $Ones[$NoOfOnes]; + } + } + } + + if (empty($NumberInWords)){ + $NumberInWords = _('zero'); + } + + return $NumberInWords; +} + ?> \ No newline at end of file Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/SelectCreditItems.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -1553,7 +1553,7 @@ } - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement record to write the stock off could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Stock movement record to write the stock off could not be inserted because'); $DbgMsg = _('The following SQL to insert the stock movement to write off the stock was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); @@ -1823,9 +1823,9 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); } - } /* end of if GL and stock integrated and standard cost !=0 */ + } /* end of if GL and stock integrated and standard cost !=0 */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1 AND $CreditLine->Price !=0){ //Post sales transaction to GL credit sales $SalesGLAccounts = GetSalesGLAccount($Area, @@ -1849,49 +1849,49 @@ '" . (($CreditLine->Price * $CreditLine->Quantity)/$_SESSION['CurrencyRate']) . "' )"; - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); - $DbgMsg = _('The following SQL to insert the GLTrans record was used'); - $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - - if ($CreditLine->DiscountPercent !=0){ - - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) - VALUES (11, - '" . $CreditNo . "', - '" . $SQLCreditDate . "', - '" . $PeriodNo . "', - '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', - '" . -(($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "' - )"; - - - $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - }/* end of if discount not equal to 0 */ - } /*end of if sales integrated with debtors */ + + if ($CreditLine->DiscountPercent !=0){ + + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) + VALUES (11, + '" . $CreditNo . "', + '" . $SQLCreditDate . "', + '" . $PeriodNo . "', + '" . $SalesGLAccounts['discountglcode'] . "', + '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . " - " . $CreditLine->StockID . " @ " . ($CreditLine->DiscountPercent * 100) . "%', + '" . -(($CreditLine->Price * $CreditLine->Quantity * $CreditLine->DiscountPercent)/$_SESSION['CurrencyRate']) . "' + )"; + + + $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The credit note discount GL posting could not be inserted because'); + $DbgMsg = _('The following SQL to insert the GLTrans record was used'); + $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); + }/* end of if discount not equal to 0 */ + } /*end of if sales integrated with debtors */ } /*Quantity credited is more than 0 */ - } /*end of CreditLine loop */ + } /*end of CreditLine loop */ - if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ + if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post credit note transaction to GL credit debtors, debit freight re-charged and debit sales */ - if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { - $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount) + if (($_SESSION['CreditItems'.$identifier]->total + $_SESSION['CreditItems'.$identifier]->FreightCost + $TaxTotal) !=0) { + $SQL = "INSERT INTO gltrans (type, + typeno, + trandate, + periodno, + account, + narrative, + amount) VALUES (11, '" . $CreditNo . "', '" . $SQLCreditDate . "', @@ -1903,8 +1903,8 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting for the credit note could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, true); - } - if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { + } + if ($_SESSION['CreditItems'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1946,7 +1946,10 @@ $Result = DB_query($SQL,$db,$ErrMsg,$DbgMsg,true); } } - } /*end of if Sales and GL integrated */ + + EnsureGLEntriesBalance(11,$CreditNo,$db); + + } /*end of if Sales and GL integrated */ DB_Txn_Commit($db); Modified: trunk/SuppPaymentRun.php =================================================================== --- trunk/SuppPaymentRun.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/SuppPaymentRun.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -205,10 +205,11 @@ } /* end while there are suppliers to retrieve transactions for */ if ($SupplierID!=''){ - + /*All the payment processing is in the below file */ include('includes/PDFPaymentRun_PymtFooter.php'); - $ProcessResult = DB_Txn_Commit($db); + $ProcessResult = DB_Txn_Commit($db); + if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report') . '.... '; include('includes/header.inc'); @@ -228,7 +229,7 @@ } - $pdf->OutputD($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d') . '.pdf'); + $pdf->OutputD($_SESSION['DatabaseName'] . '_Payment_Run_' . Date('Y-m-d_Hms') . '.pdf'); $pdf->__destruct(); } else { /*The option to print PDF was not hit */ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/doc/Change.log 2011-11-12 09:42:34 UTC (rev 4744) @@ -1,9 +1,13 @@ webERP Change Log +12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines +12/11/11 Phil: Removed old Numbers to words class code - this code was not in keeping with the rest of the system and not PHP 5 compatible anyway. Replaced with a much simpler function. This code is only used for pre-printed cheques - so it is in that script only. The new function may not effective for other languages but will be easily adapted as needed. The PrintCheque.php script needs to be modified specifically for the business stationery. +10/11/11 Phil: added a function in includes/SQL_CommonFunctions.inc EnsureGLTransBalance that looks at the gltrans entries for a given transaction type and type number and if the total is not zero and less than 0.05 it fudges the largest gltrans record to make the gltrans balance in total - added to ConfirmDispatch_Invoice.php Credit_Invoice.php SelectCreditItems.php CounterSales.php Payments.php CustomerReceipt.php 10/11/11 Phil: includes/DateFunctions.inc fixed GetPeriod function to create new period when just one month ahead of last period - worried about this can't see how it could have been like this so long without a bug report? 10/11/11 Phil: includes/LanguageSetup.php now sets LC_NUMERIC locale category after LC_ALL to ensure SQL compliant calculations 8/11/11 Phil: includes/GetConfig.php no longer casts the VersionNumber to a double - issue highlighted by Tim 8/11/11 Felix Lim: includes/InputSerialItems.php and InputSerialItemsKeyed.php now sends $identifier +8/11/11 Phil: CustomerReceipt.php now shows entries made with decimal places of the currency being entered 8/11/11 Phil: fixed bugs reported by Ron Wong and Don SelectSupplier.php sql error missed "s" off suppliers and CustomerReceipt.php - had not populated new class variable (property) of CurrDecimalPlaces 6/11/11 Release 4.06RC1 Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/DefinePOClass.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -146,7 +146,7 @@ /* Checks if there have been deliveries or invoiced entered against any of the line items */ if (count($this->LineItems)>0){ foreach ($this->LineItems as $OrderedItems) { - if ($OrderedItems->QtyReceived !=0 OR $OrderedItems->QtyInvoiced !=0){ + if ($OrderedItems->QtyReceived !=0 OR $OrderedItems->QtyInv !=0){ return 1; } } @@ -167,7 +167,9 @@ function Order_Value() { $TotalValue=0; foreach ($this->LineItems as $OrderedItems) { - $TotalValue += ($OrderedItems->Price)*($OrderedItems->Quantity); + if ($OrderedItems->Deleted = False){ + $TotalValue += ($OrderedItems->Price)*($OrderedItems->Quantity); + } } return $TotalValue; } Modified: trunk/includes/DefinePaymentClass.php =================================================================== --- trunk/includes/DefinePaymentClass.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/DefinePaymentClass.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -41,10 +41,23 @@ } - function Add_To_GLAnalysis($Amount, $Narrative, $GLCode, $GLActName, $tag, $cheque){ + function Add_To_GLAnalysis($Amount, + $Narrative, + $GLCode, + $GLActName, + $Tag, + $Cheque){ + if (isset($GLCode) AND $Amount!=0){ - $this->GLItems[$this->GLItemCounter] = new PaymentGLAnalysis($Amount, $Narrative, $this->GLItemCounter, $GLCode, $GLActName, $tag, $cheque); + $this->GLItems[$this->GLItemCounter] = new PaymentGLAnalysis($Amount, + $Narrative, + $this->GLItemCounter, + $GLCode, + $GLActName, + $Tag, + $Cheque); $this->GLItemCounter++; + $this->Amount += $Amount; Return 1; } Return 0; @@ -63,10 +76,16 @@ var $GLCode; var $GLActName; var $ID; - var $tag; - var $cheque; + var $Tag; + var $Cheque; - function PaymentGLAnalysis ($Amt, $Narr, $id, $GLCode, $GLActName, $tag, $cheque){ + function PaymentGLAnalysis ($Amt, + $Narr, + $id, + $GLCode, + $GLActName, + $Tag, + $Cheque){ /* Constructor function to add a new PaymentGLAnalysis object with passed params */ $this->Amount =$Amt; @@ -74,8 +93,8 @@ $this->GLCode = $GLCode; $this->GLActName = $GLActName; $this->ID = $id; - $this->tag = $tag; - $this->cheque = $cheque; + $this->Tag = $Tag; + $this->Cheque = $Cheque; } } Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/MiscFunctions.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -238,7 +238,6 @@ }//wikiLink - // Lindsay debug stuff function LogBackTrace( $dest = 0 ) { error_log( "***BEGIN STACK BACKTRACE***", $dest ); @@ -334,4 +333,6 @@ global $ThousandsSeparator; return str_replace($DecimalPoint,'.',str_replace($ThousandsSeparator,'',trim($Number))); } -?> + + +?> \ No newline at end of file Modified: trunk/includes/PDFPaymentRun_PymtFooter.php =================================================================== --- trunk/includes/PDFPaymentRun_PymtFooter.php 2011-11-10 09:30:52 UTC (rev 4743) +++ trunk/includes/PDFPaymentRun_PymtFooter.php 2011-11-12 09:42:34 UTC (rev 4744) @@ -10,14 +10,14 @@ $TotalPayments += $AccumBalance; $TotalAccumDiffOnExch += $AccumDiffOnExch; -$LeftOvers = $pdf->addTextWrap(340,$YPos,60,$FontSize,locale_number_format($AccumBalance,2), 'right'); -$LeftOvers = $pdf->addTextWrap(405,$YPos,60,$FontSize,locale_number_format($AccumDiffOnExch,2), 'right'); +$LeftOvers = $pdf->addTextWrap(340,$YPos,60,$FontSize,locale_number_format($AccumBalance,$CurrDecimalPlaces), 'right'); +$LeftOvers = $pdf->addTextWrap(405,$YPos,60,$FontSize,locale_number_format($AccumDiffOnExch,$CurrDecimalPlaces), 'right'); if (isset($_POST['PrintPDFAndProcess'])){ - if (is_numeric($_POST['Ref'])) { - $PaytReference = $_POST['Ref'] + $RefCounter; + if (is_numeric(filter_number_format($_POST['Ref']))) { + $PaytReference = filter_number_format($_POST['Ref']) + $RefCounter; } else { $PaytReference = $_POST['Ref'] . ($RefCounter + 1); } @@ -36,8 +36,8 @@ rate, ovamount, diffonexch, - alloc) "; - $SQL = $SQL . "VALUES (22, + alloc) + VALUES (22, '" . $SuppPaymentNo . "', '" . $PaytReference . "', '" . $SupplierID . "', @@ -45,18 +45,20 @@ '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', '" . date('Y-m-d H-i-s') . "', 1, - '" . $_POST['ExRate'] . "', + '" . filter_number_format($_POST['ExRate']) . "', '" . -$AccumBalance . "', '" . -$AccumDiffOnExch . "', '" . -$AccumBalance . "')"; + $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed because the payment record for') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _("Back to the menu") . "</A>"; + echo '<br> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - prnMsg(_("The SQL that failed was") . ' ' . $SQL,'error'); + prnMsg(_('The SQL that failed was') . ' ' . $SQL,'error'); } $ProcessResult = DB_Txn_Rollback($db); include('footer.inc'); @@ -84,7 +86,7 @@ $title = _('Payment Processing - Problem Report') . '.... '; include('header.inc'); prnMsg(_('None of the payments will be processed since an allocation record for') . $SupplierName . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo '<BR><A HREF="' . $rootpath . '/index.php">' . _('Back to the menu') . '</A>'; + echo '<br><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . $SQL,'error'); } @@ -104,7 +106,7 @@ amount) "; $SQL = $SQL . "VALUES ( " . $_POST['BankAccount'] . ", '" . $PaytReference . " " . $SupplierID . "', - " . $_POST['ExRate'] . ", + " . filter_number_format($_POST['ExRate']) . ", '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', '" . $_POST['PaytType'] . "', " . -$AccumBalance . ")"; @@ -113,7 +115,8 @@ $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed because the bank account payment record for') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _("Back to the menu") . "</A>"; + echo '<br /> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . ' ' . $SQL,'error'); } @@ -142,16 +145,17 @@ '" . $PeriodNo . "', '" . $_POST['BankAccount'] . "', '" . $SupplierID . " - " . $SupplierName . ' ' . _('payment run on') . ' ' . Date($_SESSION['DefaultDateFormat']) . ' - ' . $PaytReference . "', - '" . (-$AccumBalance/ $_POST['ExRate']) . "')"; + '" . (-$AccumBalance/ filter_number_format($_POST['ExRate'])) . "')"; $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing') . ' - ' . _('Problem Report') . '.... '; include('header.inc'); prnMsg(_('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); - echo "<BR><A HREF='$rootpath/index.php'>" . _('Back to the menu') . '</A>'; + echo '<br /> + <a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ - prnMsg(_('The SQL that failed was') . ':<BR>' . $SQL, 'error'); + prnMsg(_('The SQL that failed was') . ':<br />' . $SQL, 'error'); } $ProcessResult = DB_Txn_Rollback($db); include('footer.inc'); @@ -173,19 +177,18 @@ '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['creditorsact'] . "', '" . $SupplierID . ' - ' . $SupplierName . ' ' . _('payment run on') . ' ' . Date($_SESSION['DefaultDateFormat']) . ' - ' . $PaytReference . "', - '" . ($AccumBalance/ $_POST['ExRate'] + $AccumDiffOnExch) . "')"; + '" . ($AccumBalance/ filter_number_format($_POST['ExRate']) + $AccumDiffOnExch) . "')"; $ProcessResult = DB_query($SQL,$db,'','',false,false); if (DB_error_no($db) !=0) { $title = _('Payment Processing - Problem Report'); include('header.inc'); - echo '<BR>' . _('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db); - echo "<BR><A HREF='$rootpath/index.php'>" . _('Back to the menu') . '</A>'; + prnMsg(_('None of the payments will be processed since the general ledger posting for the payment to') . ' ' . $SupplierName . ' ' . _('could not be inserted because') . ' - ' . DB_error_msg($db),'error'); + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was') . ':<BR>' . $SQL,'error'); } $ProcessResult = DB_Txn_Rollback($db); - include('footer.inc'); exit; } @@ -193,12 +196,12 @@ /*Do the GL trans for the exch diff */ if ($AccumDiffOnExch != 0){ $SQL = "INSERT INTO gltrans (type, - typeno, - trandate, - periodno, - account, - narrative, - amount ) + typeno, + trandate, + periodno, + account, + narrative, + amount ) VALUES (22, '" . $SuppPaymentNo . "', '" . FormatDateForSQL($_POST['AmountsDueBy']) . "', @@ -212,7 +215,7 @@ $title = _('Payment Processing - Problem Report'); include('header.inc'); prnMsg(_('None of the payments will be processed since the general ledger posting for the exchange difference on') . ' ' . $SupplierName . ' ' . _('could not be inserted because') .' - ' . DB_error_msg($db),'error'); - echo "<br /><a href='$rootpath/index.php'>" . _('Back to the menu') . '</a>'; + echo '<br /><a href="' . $rootpath . '/index.php">' . _('Back to the menu') . '</a>'; if ($debug==1){ prnMsg(_('The SQL that failed was: ') . '<br />' . $SQL,'error'); } @@ -221,6 +224,7 @@ exit; } } + EnsureGLEntriesBalance(22,$SuppPaymentNo,$db); } /*end if GL linked to creditors */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-12 21:50:43
|
Revision: 4745 http://web-erp.svn.sourceforge.net/web-erp/?rev=4745&view=rev Author: daintree Date: 2011-11-12 21:50:32 +0000 (Sat, 12 Nov 2011) Log Message: ----------- pre 4.06RC2 Modified Paths: -------------- trunk/doc/Change.log trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/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/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-12 09:42:34 UTC (rev 4744) +++ trunk/doc/Change.log 2011-11-12 21:50:32 UTC (rev 4745) @@ -1,5 +1,7 @@ webERP Change Log +13/11/11 Release 4.06RC2 + 12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines 12/11/11 Phil: Removed old Numbers to words class code - this code was not in keeping with the rest of the system and not PHP 5 compatible anyway. Replaced with a much simpler function. This code is only used for pre-printed cheques - so it is in that script only. The new function may not effective for other languages but will be easily adapted as needed. The PrintCheque.php script needs to be modified specifically for the business stationery. 10/11/11 Phil: added a function in includes/SQL_CommonFunctions.inc EnsureGLTransBalance that looks at the gltrans entries for a given transaction type and type number and if the total is not zero and less than 0.05 it fudges the largest gltrans record to make the gltrans balance in total - added to ConfirmDispatch_Invoice.php Credit_Invoice.php SelectCreditItems.php CounterSales.php Payments.php CustomerReceipt.php Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-12 09:42:34 UTC (rev 4744) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-12 21:50:32 UTC (rev 4745) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-06 19:49+1300\n" +"POT-Creation-Date: 2011-11-13 10:46+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -140,21 +140,22 @@ #: Areas.php:116 Areas.php:125 BankAccounts.php:158 CreditStatus.php:125 #: Currencies.php:166 Currencies.php:174 Currencies.php:182 #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 -#: CustomerBranches.php:316 CustomerTypes.php:147 CustomerTypes.php:157 -#: Customers.php:289 Customers.php:298 Customers.php:306 Customers.php:314 -#: Factors.php:134 FixedAssetCategories.php:133 GLAccounts.php:80 -#: GLAccounts.php:96 Locations.php:237 Locations.php:245 Locations.php:256 -#: Locations.php:265 Locations.php:274 Locations.php:283 Locations.php:292 -#: Locations.php:301 MRPDemandTypes.php:87 PaymentMethods.php:138 -#: PaymentTerms.php:146 PaymentTerms.php:153 PcExpenses.php:158 -#: SalesCategories.php:124 SalesCategories.php:131 SalesPeople.php:150 -#: SalesPeople.php:157 SalesPeople.php:163 SalesTypes.php:140 -#: SalesTypes.php:150 Shippers.php:82 Shippers.php:94 StockCategories.php:181 -#: Stocks.php:615 Stocks.php:624 Stocks.php:632 Stocks.php:640 Stocks.php:648 -#: Stocks.php:656 SupplierTypes.php:145 Suppliers.php:612 Suppliers.php:621 -#: Suppliers.php:629 TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 -#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WWW_Access.php:83 -#: WorkCentres.php:89 WorkCentres.php:95 +#: CustomerBranches.php:316 Customers.php:289 Customers.php:298 +#: Customers.php:306 Customers.php:314 CustomerTypes.php:147 +#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:133 +#: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 +#: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 +#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 +#: PaymentMethods.php:138 PaymentTerms.php:146 PaymentTerms.php:153 +#: PcExpenses.php:158 SalesCategories.php:124 SalesCategories.php:131 +#: SalesPeople.php:150 SalesPeople.php:157 SalesPeople.php:163 +#: SalesTypes.php:140 SalesTypes.php:150 Shippers.php:82 Shippers.php:94 +#: StockCategories.php:181 Stocks.php:615 Stocks.php:624 Stocks.php:632 +#: Stocks.php:640 Stocks.php:648 Stocks.php:656 Suppliers.php:612 +#: Suppliers.php:621 Suppliers.php:629 SupplierTypes.php:145 +#: TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 +#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WorkCentres.php:89 +#: WorkCentres.php:95 WWW_Access.php:83 msgid "There are" msgstr "Jsou zde" @@ -202,25 +203,25 @@ #: AccountGroups.php:223 AccountSections.php:175 AddCustomerContacts.php:25 #: AddCustomerContacts.php:28 AddCustomerNotes.php:103 #: AddCustomerTypeNotes.php:97 AgedDebtors.php:451 AgedSuppliers.php:278 -#: Areas.php:144 AuditTrail.php:11 BOMExtendedQty.php:261 BOMIndented.php:246 -#: BOMIndentedReverse.php:235 BOMInquiry.php:187 BOMListing.php:109 -#: BOMs.php:213 BOMs.php:832 BankReconciliation.php:13 COGSGLPostings.php:18 -#: CompanyPreferences.php:153 CounterSales.php:2010 CounterSales.php:2135 -#: CreditStatus.php:21 Credit_Invoice.php:255 Currencies.php:28 -#: CustEDISetup.php:17 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:125 -#: DiscountCategories.php:10 DiscountCategories.php:131 DiscountMatrix.php:16 -#: EDIMessageFormat.php:104 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:243 -#: FixedAssetTransfer.php:31 FormDesigner.php:129 GLBalanceSheet.php:362 -#: GLBudgets.php:29 GLJournal.php:246 InventoryPlanning.php:374 -#: InventoryPlanningPrefSupplier.php:467 Labels.php:115 Labels.php:270 -#: MRPReport.php:515 OutstandingGRNs.php:160 PDFPickingList.php:28 -#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 POReport.php:60 -#: POReport.php:64 POReport.php:68 PO_AuthorisationLevels.php:10 -#: PO_SelectOSPurchOrder.php:135 PcAssignCashToTab.php:56 -#: PcAssignCashToTab.php:130 PcAssignCashToTab.php:146 -#: PcAssignCashToTab.php:187 Prices.php:30 PricesBasedOnMarkUp.php:8 -#: Prices_Customer.php:34 PurchData.php:137 PurchData.php:258 +#: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 +#: BOMExtendedQty.php:261 BOMIndented.php:246 BOMIndentedReverse.php:235 +#: BOMInquiry.php:187 BOMListing.php:109 BOMs.php:213 BOMs.php:832 +#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2014 +#: CounterSales.php:2140 Credit_Invoice.php:255 CreditStatus.php:21 +#: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:11 +#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 +#: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 +#: FixedAssetLocations.php:9 FixedAssetRegister.php:13 +#: FixedAssetRegister.php:243 FixedAssetTransfer.php:31 FormDesigner.php:129 +#: GLBalanceSheet.php:362 GLBudgets.php:29 GLJournal.php:246 +#: InventoryPlanning.php:374 InventoryPlanningPrefSupplier.php:467 +#: Labels.php:115 Labels.php:270 MRPReport.php:515 OutstandingGRNs.php:160 +#: PcAssignCashToTab.php:56 PcAssignCashToTab.php:130 +#: PcAssignCashToTab.php:146 PcAssignCashToTab.php:187 PDFPickingList.php:28 +#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 +#: PO_AuthorisationLevels.php:10 POReport.php:60 POReport.php:64 +#: POReport.php:68 PO_SelectOSPurchOrder.php:135 PricesBasedOnMarkUp.php:8 +#: Prices_Customer.php:34 Prices.php:30 PurchData.php:137 PurchData.php:258 #: PurchData.php:282 RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 @@ -231,13 +232,13 @@ #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 #: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 -#: StockLocMovements.php:13 StockLocStatus.php:27 SupplierTenders.php:260 -#: SupplierTenders.php:317 SupplierTransInquiry.php:10 Suppliers.php:302 -#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 WWW_Access.php:11 -#: WWW_Users.php:31 WhereUsedInquiry.php:18 WorkCentres.php:111 -#: WorkCentres.php:162 WorkOrderCosting.php:13 WorkOrderEntry.php:11 -#: WorkOrderIssue.php:22 WorkOrderReceive.php:15 WorkOrderStatus.php:42 -#: Z_BottomUpCosts.php:56 +#: StockLocMovements.php:13 StockLocStatus.php:27 Suppliers.php:302 +#: SupplierTenders.php:260 SupplierTenders.php:317 SupplierTransInquiry.php:10 +#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 +#: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:162 +#: WorkOrderCosting.php:13 WorkOrderEntry.php:11 WorkOrderIssue.php:22 +#: WorkOrderReceive.php:15 WorkOrderStatus.php:42 WWW_Access.php:11 +#: WWW_Users.php:31 Z_BottomUpCosts.php:56 msgid "Search" msgstr "Vyhledávání" @@ -271,90 +272,90 @@ #: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:577 #: Customers.php:925 Customers.php:934 Customers.php:937 #: DeliveryDetails.php:1079 DeliveryDetails.php:1118 DeliveryDetails.php:1121 -#: GLTransInquiry.php:69 MRP.php:529 MRP.php:533 MRP.php:537 MRP.php:541 -#: MRPCalendar.php:224 PDFChequeListing.php:63 PDFDIFOT.php:75 -#: PDFDeliveryDifferences.php:75 PO_AuthorisationLevels.php:134 -#: PO_AuthorisationLevels.php:139 PO_Header.php:777 PO_PDFPurchOrder.php:382 -#: PO_PDFPurchOrder.php:385 PaymentMethods.php:197 PaymentMethods.php:198 +#: GLTransInquiry.php:69 MRPCalendar.php:224 MRP.php:529 MRP.php:533 +#: MRP.php:537 MRP.php:541 PaymentMethods.php:197 PaymentMethods.php:198 #: PaymentMethods.php:199 PaymentMethods.php:262 PaymentMethods.php:268 -#: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PurchData.php:189 -#: PurchData.php:514 PurchData.php:517 RecurringSalesOrders.php:482 -#: RecurringSalesOrders.php:485 SalesAnalReptCols.php:284 -#: SalesAnalReptCols.php:419 SalesAnalReptCols.php:422 SalesAnalRepts.php:415 -#: SalesAnalRepts.php:418 SalesAnalRepts.php:443 SalesAnalRepts.php:446 -#: SalesAnalRepts.php:471 SalesAnalRepts.php:474 SalesPeople.php:219 -#: SalesPeople.php:354 SalesPeople.php:356 SelectProduct.php:381 -#: ShipmentCosting.php:663 Stocks.php:1013 Stocks.php:1015 Stocks.php:1038 -#: Stocks.php:1040 SuppContractChgs.php:90 SystemParameters.php:389 -#: SystemParameters.php:412 SystemParameters.php:428 SystemParameters.php:491 -#: SystemParameters.php:499 SystemParameters.php:539 SystemParameters.php:612 -#: SystemParameters.php:621 SystemParameters.php:629 SystemParameters.php:647 -#: SystemParameters.php:654 SystemParameters.php:781 SystemParameters.php:916 -#: SystemParameters.php:918 SystemParameters.php:928 SystemParameters.php:930 -#: SystemParameters.php:984 SystemParameters.php:996 SystemParameters.php:998 -#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 -#: WWW_Users.php:634 +#: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PDFChequeListing.php:63 +#: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75 +#: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 +#: PO_Header.php:777 PO_PDFPurchOrder.php:382 PO_PDFPurchOrder.php:385 +#: PurchData.php:189 PurchData.php:514 PurchData.php:517 +#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 +#: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 +#: SalesAnalReptCols.php:422 SalesAnalRepts.php:415 SalesAnalRepts.php:418 +#: SalesAnalRepts.php:443 SalesAnalRepts.php:446 SalesAnalRepts.php:471 +#: SalesAnalRepts.php:474 SalesPeople.php:219 SalesPeople.php:354 +#: SalesPeople.php:356 SelectProduct.php:381 ShipmentCosting.php:663 +#: Stocks.php:1015 Stocks.php:1017 Stocks.php:1040 Stocks.php:1042 +#: SuppContractChgs.php:90 SystemParameters.php:389 SystemParameters.php:412 +#: SystemParameters.php:428 SystemParameters.php:491 SystemParameters.php:499 +#: SystemParameters.php:539 SystemParameters.php:612 SystemParameters.php:621 +#: SystemParameters.php:629 SystemParameters.php:647 SystemParameters.php:654 +#: SystemParameters.php:781 SystemParameters.php:916 SystemParameters.php:918 +#: SystemParameters.php:928 SystemParameters.php:930 SystemParameters.php:984 +#: SystemParameters.php:996 SystemParameters.php:998 TaxGroups.php:307 +#: TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 WWW_Users.php:634 msgid "Yes" msgstr "Ano" #: AccountGroups.php:253 AccountGroups.php:385 AccountGroups.php:387 -#: BOMs.php:124 BOMs.php:745 BOMs.php:749 BankAccounts.php:210 -#: BankAccounts.php:371 BankAccounts.php:373 BankAccounts.php:377 -#: BankAccounts.php:385 CompanyPreferences.php:475 CompanyPreferences.php:479 +#: BankAccounts.php:210 BankAccounts.php:371 BankAccounts.php:373 +#: BankAccounts.php:377 BankAccounts.php:385 BOMs.php:124 BOMs.php:745 +#: BOMs.php:749 CompanyPreferences.php:475 CompanyPreferences.php:479 #: CompanyPreferences.php:490 CompanyPreferences.php:494 #: CompanyPreferences.php:505 CompanyPreferences.php:509 #: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:576 #: Customers.php:920 Customers.php:933 Customers.php:936 #: DeliveryDetails.php:1080 DeliveryDetails.php:1119 DeliveryDetails.php:1122 -#: GLTransInquiry.php:86 MRP.php:527 MRP.php:531 MRP.php:535 MRP.php:539 -#: MRPCalendar.php:226 PDFChequeListing.php:62 PDFDIFOT.php:74 -#: PDFDeliveryDifferences.php:74 PO_AuthorisationLevels.php:136 -#: PO_AuthorisationLevels.php:141 PO_Header.php:776 PO_PDFPurchOrder.php:383 -#: PO_PDFPurchOrder.php:386 PaymentMethods.php:197 PaymentMethods.php:198 +#: GLTransInquiry.php:86 MRPCalendar.php:226 MRP.php:527 MRP.php:531 +#: MRP.php:535 MRP.php:539 PaymentMethods.php:197 PaymentMethods.php:198 #: PaymentMethods.php:199 PaymentMethods.php:263 PaymentMethods.php:269 -#: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PurchData.php:192 -#: PurchData.php:515 PurchData.php:518 RecurringSalesOrders.php:481 -#: RecurringSalesOrders.php:484 SalesAnalReptCols.php:282 -#: SalesAnalReptCols.php:420 SalesAnalReptCols.php:423 SalesAnalRepts.php:414 -#: SalesAnalRepts.php:417 SalesAnalRepts.php:442 SalesAnalRepts.php:445 -#: SalesAnalRepts.php:470 SalesAnalRepts.php:473 SalesPeople.php:221 -#: SalesPeople.php:359 SalesPeople.php:361 SelectProduct.php:383 -#: ShipmentCosting.php:664 Stocks.php:1008 Stocks.php:1010 Stocks.php:1033 -#: Stocks.php:1035 SuppContractChgs.php:92 SystemParameters.php:390 -#: SystemParameters.php:413 SystemParameters.php:429 SystemParameters.php:492 -#: SystemParameters.php:500 SystemParameters.php:540 SystemParameters.php:613 -#: SystemParameters.php:622 SystemParameters.php:630 SystemParameters.php:648 -#: SystemParameters.php:655 SystemParameters.php:782 SystemParameters.php:915 -#: SystemParameters.php:919 SystemParameters.php:927 SystemParameters.php:931 -#: SystemParameters.php:985 SystemParameters.php:995 SystemParameters.php:999 -#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 -#: WWW_Users.php:635 includes/PDFLowGPPageHeader.inc:44 -#: includes/PDFTaxPageHeader.inc:35 +#: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PDFChequeListing.php:62 +#: PDFDeliveryDifferences.php:74 PDFDIFOT.php:74 +#: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141 +#: PO_Header.php:776 PO_PDFPurchOrder.php:383 PO_PDFPurchOrder.php:386 +#: PurchData.php:192 PurchData.php:515 PurchData.php:518 +#: RecurringSalesOrders.php:481 RecurringSalesOrders.php:484 +#: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 +#: SalesAnalReptCols.php:423 SalesAnalRepts.php:414 SalesAnalRepts.php:417 +#: SalesAnalRepts.php:442 SalesAnalRepts.php:445 SalesAnalRepts.php:470 +#: SalesAnalRepts.php:473 SalesPeople.php:221 SalesPeople.php:359 +#: SalesPeople.php:361 SelectProduct.php:383 ShipmentCosting.php:664 +#: Stocks.php:1010 Stocks.php:1012 Stocks.php:1035 Stocks.php:1037 +#: SuppContractChgs.php:92 SystemParameters.php:390 SystemParameters.php:413 +#: SystemParameters.php:429 SystemParameters.php:492 SystemParameters.php:500 +#: SystemParameters.php:540 SystemParameters.php:613 SystemParameters.php:622 +#: SystemParameters.php:630 SystemParameters.php:648 SystemParameters.php:655 +#: SystemParameters.php:782 SystemParameters.php:915 SystemParameters.php:919 +#: SystemParameters.php:927 SystemParameters.php:931 SystemParameters.php:985 +#: SystemParameters.php:995 SystemParameters.php:999 TaxGroups.php:308 +#: TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 WWW_Users.php:635 +#: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" #: AccountGroups.php:262 AccountSections.php:196 AddCustomerContacts.php:149 #: AddCustomerNotes.php:141 AddCustomerTypeNotes.php:128 Areas.php:164 -#: BOMs.php:149 BankAccounts.php:223 COGSGLPostings.php:108 +#: BankAccounts.php:223 BOMs.php:149 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 -#: CustomerBranches.php:414 CustomerTypes.php:202 Customers.php:1011 -#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:329 +#: CustomerBranches.php:414 Customers.php:1011 Customers.php:1045 +#: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:329 #: FixedAssetCategories.php:186 FixedAssetLocations.php:107 -#: FreightCosts.php:240 GLAccounts.php:312 GLTags.php:91 GeocodeSetup.php:173 -#: Labels.php:411 Locations.php:382 MRPDemandTypes.php:120 MRPDemands.php:306 -#: PO_AuthorisationLevels.php:151 PaymentMethods.php:200 PaymentTerms.php:205 -#: PcAssignCashToTab.php:259 PcClaimExpensesFromTab.php:252 PcExpenses.php:223 -#: PcTabs.php:234 PcTypeTabs.php:172 Prices.php:251 Prices_Customer.php:277 -#: PurchData.php:204 SalesCategories.php:255 SalesGLPostings.php:132 -#: SalesGLPostings.php:245 SalesPeople.php:232 SalesTypes.php:206 -#: SecurityTokens.php:128 SelectCustomer.php:612 SelectCustomer.php:630 -#: SelectCustomer.php:654 SelectCustomer.php:671 SelectCustomer.php:695 -#: SelectCustomer.php:712 Shippers.php:144 StockCategories.php:242 -#: SuppTransGLAnalysis.php:120 SupplierContacts.php:163 SupplierTypes.php:189 -#: TaxAuthorities.php:174 TaxCategories.php:182 TaxGroups.php:188 -#: TaxProvinces.php:180 UnitsOfMeasure.php:185 WWW_Access.php:123 -#: WWW_Users.php:318 WorkCentres.php:141 includes/InputSerialItems.php:88 -#: includes/OutputSerialItems.php:20 +#: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:91 +#: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:120 +#: PaymentMethods.php:200 PaymentTerms.php:205 PcAssignCashToTab.php:259 +#: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:234 +#: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:277 +#: Prices.php:251 PurchData.php:204 SalesCategories.php:255 +#: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232 +#: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:612 +#: SelectCustomer.php:630 SelectCustomer.php:654 SelectCustomer.php:671 +#: SelectCustomer.php:695 SelectCustomer.php:712 Shippers.php:144 +#: StockCategories.php:242 SupplierContacts.php:163 SupplierTypes.php:189 +#: SuppTransGLAnalysis.php:120 TaxAuthorities.php:174 TaxCategories.php:182 +#: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185 +#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:318 +#: includes/InputSerialItems.php:88 includes/OutputSerialItems.php:20 #, php-format msgid "Edit" msgstr "Upravit" @@ -366,32 +367,33 @@ #: AccountGroups.php:263 AccountSections.php:200 AddCustomerContacts.php:150 #: AddCustomerNotes.php:142 AddCustomerTypeNotes.php:129 Areas.php:165 -#: BOMs.php:151 BankAccounts.php:224 COGSGLPostings.php:109 +#: BankAccounts.php:224 BOMs.php:151 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 -#: CounterSales.php:812 CreditStatus.php:175 Credit_Invoice.php:381 -#: Currencies.php:275 CustomerReceipt.php:913 CustomerTypes.php:203 -#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:182 +#: CounterSales.php:813 Credit_Invoice.php:381 CreditStatus.php:175 +#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1046 +#: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:182 #: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 -#: GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 GeocodeSetup.php:174 -#: Labels.php:411 Locations.php:383 MRPDemandTypes.php:121 MRPDemands.php:307 -#: PO_AuthorisationLevels.php:153 PO_Items.php:711 PaymentMethods.php:201 -#: PaymentTerms.php:206 Payments.php:1057 PcAssignCashToTab.php:263 -#: PcClaimExpensesFromTab.php:253 PcExpenses.php:224 PcExpensesTypeTab.php:185 -#: PcTabs.php:235 PcTypeTabs.php:173 Prices.php:252 Prices_Customer.php:278 -#: PurchData.php:205 SalesAnalReptCols.php:299 SalesAnalRepts.php:303 -#: SalesCategories.php:256 SalesGLPostings.php:133 SalesGLPostings.php:246 -#: SalesPeople.php:233 SalesTypes.php:207 SecurityTokens.php:129 -#: SelectCreditItems.php:764 SelectCustomer.php:613 SelectCustomer.php:631 -#: SelectCustomer.php:655 SelectCustomer.php:672 SelectCustomer.php:696 -#: SelectCustomer.php:713 SelectOrderItems.php:1387 Shipments.php:429 -#: Shippers.php:145 SpecialOrder.php:655 StockCategories.php:243 -#: StockCategories.php:554 SuppContractChgs.php:99 SuppCreditGRNs.php:102 -#: SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 SuppShiptChgs.php:90 -#: SuppTransGLAnalysis.php:121 SupplierContacts.php:164 SupplierTypes.php:191 -#: TaxAuthorities.php:175 TaxCategories.php:183 TaxGroups.php:189 -#: TaxProvinces.php:181 UnitsOfMeasure.php:186 WOSerialNos.php:319 -#: WWW_Access.php:124 WWW_Users.php:319 WorkCentres.php:142 -#: includes/InputSerialItemsKeyed.php:59 includes/OutputSerialItems.php:99 +#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 +#: Labels.php:411 Locations.php:383 MRPDemands.php:307 MRPDemandTypes.php:121 +#: PaymentMethods.php:201 Payments.php:1069 PaymentTerms.php:206 +#: PcAssignCashToTab.php:263 PcClaimExpensesFromTab.php:253 PcExpenses.php:224 +#: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 +#: PO_AuthorisationLevels.php:153 PO_Items.php:711 Prices_Customer.php:278 +#: Prices.php:252 PurchData.php:205 SalesAnalReptCols.php:299 +#: SalesAnalRepts.php:303 SalesCategories.php:256 SalesGLPostings.php:133 +#: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207 +#: SecurityTokens.php:129 SelectCreditItems.php:764 SelectCustomer.php:613 +#: SelectCustomer.php:631 SelectCustomer.php:655 SelectCustomer.php:672 +#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1387 +#: Shipments.php:429 Shippers.php:145 SpecialOrder.php:655 +#: StockCategories.php:243 StockCategories.php:554 SuppContractChgs.php:99 +#: SuppCreditGRNs.php:102 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 +#: SupplierContacts.php:164 SupplierTypes.php:191 SuppShiptChgs.php:90 +#: SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 TaxCategories.php:183 +#: TaxGroups.php:189 TaxProvinces.php:181 UnitsOfMeasure.php:186 +#: WorkCentres.php:142 WOSerialNos.php:319 WWW_Access.php:124 +#: WWW_Users.php:319 includes/InputSerialItemsKeyed.php:58 +#: includes/OutputSerialItems.php:99 #, php-format msgid "Delete" msgstr "Smazat" @@ -435,19 +437,19 @@ #: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 #: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 -#: BOMs.php:759 BankAccounts.php:391 COGSGLPostings.php:354 +#: BankAccounts.php:391 BOMs.php:759 COGSGLPostings.php:354 #: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 #: DiscountMatrix.php:141 EDIMessageFormat.php:248 #: FixedAssetCategories.php:344 FixedAssetLocations.php:156 -#: FreightCosts.php:339 GLAccounts.php:262 GeocodeSetup.php:270 -#: Locations.php:597 MRPDemandTypes.php:187 MRPDemands.php:419 -#: OffersReceived.php:56 OffersReceived.php:143 PO_AuthorisationLevels.php:248 -#: PaymentMethods.php:282 PaymentTerms.php:309 Prices_Customer.php:354 +#: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 +#: Locations.php:597 MRPDemands.php:419 MRPDemandTypes.php:187 +#: OffersReceived.php:56 OffersReceived.php:143 PaymentMethods.php:282 +#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:354 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 #: SalesPeople.php:368 Shippers.php:200 StockCategories.php:581 -#: SuppLoginSetup.php:293 SupplierContacts.php:281 TaxAuthorities.php:327 +#: SupplierContacts.php:281 SuppLoginSetup.php:293 TaxAuthorities.php:327 #: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WWW_Users.php:674 WorkCentres.php:279 +#: WorkCentres.php:279 WWW_Users.php:674 msgid "Enter Information" msgstr "Vložit informace" @@ -557,10 +559,10 @@ #: AddCustomerContacts.php:61 AddCustomerNotes.php:52 #: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 #: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:246 -#: MRPCalendar.php:176 PO_Items.php:374 PcAssignCashToTab.php:88 -#: PcClaimExpensesFromTab.php:79 PcExpenses.php:95 PcTabs.php:102 -#: PcTypeTabs.php:60 SalesAnalReptCols.php:129 SalesPeople.php:97 -#: SalesTypes.php:66 Stocks.php:497 SupplierTypes.php:67 Suppliers.php:513 +#: MRPCalendar.php:176 PcAssignCashToTab.php:88 PcClaimExpensesFromTab.php:79 +#: PcExpenses.php:95 PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:374 +#: SalesAnalReptCols.php:129 SalesPeople.php:97 SalesTypes.php:66 +#: Stocks.php:497 Suppliers.php:513 SupplierTypes.php:67 msgid "has been updated" msgstr "byla aktualizována" @@ -575,7 +577,7 @@ #: AddCustomerContacts.php:128 CompanyPreferences.php:223 #: CustomerBranches.php:368 Customers.php:998 Customers.php:1006 #: SalesPeople.php:200 SelectCustomer.php:607 StockDispatch.php:187 -#: StockDispatch.php:199 SuppTransGLAnalysis.php:105 SupplierContacts.php:150 +#: StockDispatch.php:199 SupplierContacts.php:150 SuppTransGLAnalysis.php:105 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 #: includes/PDFTaxPageHeader.inc:37 msgid "Name" @@ -680,15 +682,15 @@ #: CustomerAllocations.php:363 CustomerInquiry.php:196 #: CustomerTransInquiry.php:100 GLAccountInquiry.php:152 #: GLAccountReport.php:338 GLTransInquiry.php:42 MRPCalendar.php:219 -#: PDFRemittanceAdvice.php:300 PaymentAllocations.php:66 -#: PcAssignCashToTab.php:220 PcAuthorizeExpenses.php:88 PrintCustTrans.php:822 -#: PrintCustTransPortrait.php:867 ReverseGRN.php:386 ShipmentCosting.php:534 -#: ShipmentCosting.php:611 Shipments.php:476 StockDispatch.php:189 -#: StockDispatch.php:201 StockLocMovements.php:90 StockMovements.php:94 -#: StockSerialItemResearch.php:81 SupplierAllocations.php:455 -#: SupplierAllocations.php:568 SupplierAllocations.php:643 -#: SupplierInquiry.php:209 SupplierTransInquiry.php:103 -#: includes/PDFQuotationPageHeader.inc:92 +#: PaymentAllocations.php:66 PcAssignCashToTab.php:220 +#: PcAuthorizeExpenses.php:88 PDFRemittanceAdvice.php:300 +#: PrintCustTrans.php:822 PrintCustTransPortrait.php:867 ReverseGRN.php:386 +#: ShipmentCosting.php:534 ShipmentCosting.php:611 Shipments.php:476 +#: StockDispatch.php:189 StockDispatch.php:201 StockLocMovements.php:90 +#: StockMovements.php:94 StockSerialItemResearch.php:81 +#: SupplierAllocations.php:455 SupplierAllocations.php:568 +#: SupplierAllocations.php:643 SupplierInquiry.php:209 +#: SupplierTransInquiry.php:103 includes/PDFQuotationPageHeader.inc:92 #: includes/PDFQuotationPortraitPageHeader.inc:90 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 #: includes/PDFTransPageHeader.inc:48 @@ -697,9 +699,9 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1017 UpgradeDatabase.php:172 UpgradeDatabase.php:175 -#: UpgradeDatabase.php:178 UpgradeDatabase.php:181 UpgradeDatabase.php:184 -#: UpgradeDatabase.php:187 UpgradeDatabase.php:190 UpgradeDatabase.php:193 +#: Stocks.php:1019 UpgradeDatabase.php:174 UpgradeDatabase.php:177 +#: UpgradeDatabase.php:180 UpgradeDatabase.php:183 UpgradeDatabase.php:186 +#: UpgradeDatabase.php:189 UpgradeDatabase.php:192 UpgradeDatabase.php:195 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 #: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 #: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 @@ -796,22 +798,22 @@ #: BOMIndentedReverse.php:140 BOMListing.php:41 BOMListing.php:52 #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:100 #: GLBalanceSheet.php:139 GLProfit_Loss.php:177 GLTagProfit_Loss.php:191 -#: GLTrialBalance.php:165 InventoryPlanning.php:98 InventoryPlanning.php:173 +#: GLTrialBalance.php:159 InventoryPlanning.php:98 InventoryPlanning.php:173 #: InventoryPlanning.php:208 InventoryPlanning.php:256 #: InventoryPlanning.php:294 InventoryPlanningPrefSupplier.php:201 #: InventoryPlanningPrefSupplier.php:269 InventoryPlanningPrefSupplier.php:303 #: InventoryPlanningPrefSupplier.php:348 InventoryPlanningPrefSupplier.php:394 #: InventoryQuantities.php:84 InventoryValuation.php:78 -#: MRPPlannedPurchaseOrders.php:114 MRPPlannedWorkOrders.php:106 -#: MRPReport.php:147 MRPReport.php:508 MRPReschedules.php:45 -#: MRPReschedules.php:57 MRPShortages.php:155 MRPShortages.php:167 -#: MailInventoryValuation.php:114 OutstandingGRNs.php:53 -#: OutstandingGRNs.php:65 PDFCustomerList.php:18 PDFCustomerList.php:230 -#: PDFCustomerList.php:242 PDFLowGP.php:20 PDFStockCheckComparison.php:33 +#: MailInventoryValuation.php:114 MRPPlannedPurchaseOrders.php:114 +#: MRPPlannedWorkOrders.php:106 MRPReport.php:147 MRPReport.php:508 +#: MRPReschedules.php:45 MRPReschedules.php:57 MRPShortages.php:155 +#: MRPShortages.php:167 OutstandingGRNs.php:53 OutstandingGRNs.php:65 +#: PDFCustomerList.php:18 PDFCustomerList.php:230 PDFCustomerList.php:242 +#: PDFLowGP.php:20 PDFStockCheckComparison.php:33 #: PDFStockCheckComparison.php:59 PDFStockCheckComparison.php:264 #: ReorderLevel.php:60 SelectAsset.php:37 SelectProduct.php:39 -#: StockCheck.php:66 StockCheck.php:140 SuppPriceList.php:130 -#: SupplierTenders.php:326 includes/PDFPaymentRun_PymtFooter.php:149 +#: StockCheck.php:66 StockCheck.php:140 SupplierTenders.php:326 +#: SuppPriceList.php:130 includes/PDFPaymentRun_PymtFooter.php:152 msgid "Problem Report" msgstr "Problém" @@ -825,10 +827,10 @@ #: BOMExtendedQty.php:248 BOMIndented.php:153 BOMIndented.php:234 #: BOMIndentedReverse.php:144 BOMIndentedReverse.php:221 BOMListing.php:44 #: Credit_Invoice.php:184 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 -#: FTP_RadioBeacon.php:187 GLBalanceSheet.php:104 GLBalanceSheet.php:142 -#: GLBalanceSheet.php:305 GLProfit_Loss.php:180 GLProfit_Loss.php:192 -#: GLTagProfit_Loss.php:195 GLTagProfit_Loss.php:208 GLTrialBalance.php:168 -#: GLTrialBalance.php:180 GetStockImage.php:150 InventoryPlanning.php:101 +#: FTP_RadioBeacon.php:187 GetStockImage.php:150 GLBalanceSheet.php:104 +#: GLBalanceSheet.php:142 GLBalanceSheet.php:305 GLProfit_Loss.php:180 +#: GLProfit_Loss.php:192 GLTagProfit_Loss.php:195 GLTagProfit_Loss.php:208 +#: GLTrialBalance.php:162 GLTrialBalance.php:174 InventoryPlanning.php:101 #: InventoryPlanning.php:176 InventoryPlanning.php:211 #: InventoryPlanning.php:259 InventoryPlanning.php:297 #: InventoryPlanning.php:360 InventoryPlanningPrefSupplier.php:204 @@ -836,34 +838,35 @@ #: InventoryPlanningPrefSupplier.php:351 InventoryPlanningPrefSupplier.php:397 #: InventoryPlanningPrefSupplier.php:453 InventoryQuantities.php:87 #: InventoryQuantities.php:98 InventoryValuation.php:81 -#: InventoryValuation.php:92 MRPPlannedPurchaseOrders.php:117 +#: InventoryValuation.php:92 MailInventoryValuation.php:117 +#: MailInventoryValuation.php:213 MRPPlannedPurchaseOrders.php:117 #: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:109 #: MRPPlannedWorkOrders.php:120 MRPPlannedWorkOrders.php:308 MRPReport.php:39 #: MRPReport.php:50 MRPReport.php:150 MRPReschedules.php:48 #: MRPReschedules.php:60 MRPShortages.php:158 MRPShortages.php:170 -#: MailInventoryValuation.php:117 MailInventoryValuation.php:213 #: OutstandingGRNs.php:56 OutstandingGRNs.php:68 PDFCustomerList.php:233 #: PDFCustomerList.php:245 PDFGrn.php:123 PDFLowGP.php:59 PDFLowGP.php:71 #: PDFPriceList.php:128 PDFQuotation.php:270 PDFQuotationPortrait.php:268 #: PDFRemittanceAdvice.php:83 PDFStockCheckComparison.php:37 #: PDFStockCheckComparison.php:63 PDFStockCheckComparison.php:268 -#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:152 PrintCustOrder.php:220 -#: PrintCustOrder_generic.php:243 ReorderLevel.php:63 ReorderLevel.php:152 -#: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:30 StockCheck.php:47 -#: StockCheck.php:69 StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 -#: StockCheck.php:195 StockDispatch.php:93 StockDispatch.php:106 -#: SuppPaymentRun.php:112 SuppPaymentRun.php:122 SuppPaymentRun.php:186 -#: SuppPaymentRun.php:216 SuppPriceList.php:134 SupplierBalsAtPeriodEnd.php:54 -#: SupplierBalsAtPeriodEnd.php:65 Tax.php:63 Tax.php:168 Tax.php:277 +#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:152 +#: PrintCustOrder_generic.php:243 PrintCustOrder.php:220 ReorderLevel.php:63 +#: ReorderLevel.php:152 SalesAnalysis_UserDefined.php:28 +#: SelectCreditItems.php:30 StockCheck.php:47 StockCheck.php:69 +#: StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 StockCheck.php:195 +#: StockDispatch.php:93 StockDispatch.php:106 SupplierBalsAtPeriodEnd.php:54 +#: SupplierBalsAtPeriodEnd.php:65 SuppPaymentRun.php:112 +#: SuppPaymentRun.php:122 SuppPaymentRun.php:186 SuppPaymentRun.php:217 +#: SuppPriceList.php:134 Tax.php:63 Tax.php:168 Tax.php:277 #: Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 #: Z_DataExport.php:308 Z_DataExport.php:347 Z_DataExport.php:383 #: Z_DataExport.php:419 Z_DataExport.php:471 Z_poRebuildDefault.php:38 -#: includes/PDFPaymentRun_PymtFooter.php:57 -#: includes/PDFPaymentRun_PymtFooter.php:87 -#: includes/PDFPaymentRun_PymtFooter.php:116 -#: includes/PDFPaymentRun_PymtFooter.php:152 -#: includes/PDFPaymentRun_PymtFooter.php:183 -#: includes/PDFPaymentRun_PymtFooter.php:215 +#: includes/PDFPaymentRun_PymtFooter.php:59 +#: includes/PDFPaymentRun_PymtFooter.php:89 +#: includes/PDFPaymentRun_PymtFooter.php:119 +#: includes/PDFPaymentRun_PymtFooter.php:156 +#: includes/PDFPaymentRun_PymtFooter.php:187 +#: includes/PDFPaymentRun_PymtFooter.php:218 #: includes/ConstructSQLForUserDefinedSalesReport.inc:180 #: includes/ConstructSQLForUserDefinedSalesReport.inc:188 #: includes/ConstructSQLForUserDefinedSalesReport.inc:340 @@ -883,31 +886,30 @@ msgstr "se nepodařilo získat, protože" #: AgedDebtors.php:374 AgedSuppliers.php:201 Areas.php:95 -#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:960 -#: ConfirmDispatch_Invoice.php:974 Contracts.php:580 CounterSales.php:1353 -#: CounterSales.php:1367 Credit_Invoice.php:697 Credit_Invoice.php:718 -#: CustomerReceipt.php:537 CustomerReceipt.php:676 CustomerReceipt.php:704 +#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:959 +#: ConfirmDispatch_Invoice.php:973 Contracts.php:580 CounterSales.php:1354 +#: CounterSales.php:1368 Credit_Invoice.php:697 Credit_Invoice.php:718 +#: CustomerReceipt.php:542 CustomerReceipt.php:681 CustomerReceipt.php:709 #: CustomerTransInquiry.php:91 DeliveryDetails.php:396 GLProfit_Loss.php:596 -#: GLTagProfit_Loss.php:511 PDFRemittanceAdvice.php:85 Payments.php:325 +#: GLTagProfit_Loss.php:511 Payments.php:334 PDFRemittanceAdvice.php:85 #: PurchData.php:86 PurchData.php:104 PurchData.php:245 #: RecurringSalesOrders.php:256 ReverseGRN.php:191 ReverseGRN.php:205 #: ReverseGRN.php:374 SelectCreditItems.php:1408 SelectSalesOrder.php:189 #: SelectSalesOrder.php:353 StockCheck.php:223 StockCostUpdate.php:77 #: StockCostUpdate.php:87 StockLocStatus.php:153 StockMovements.php:87 #: StockQuantityByDate.php:95 StockReorderLevel.php:40 StockStatus.php:265 -#: StockTransfers.php:191 StockUsage.php:139 StockUsageGraph.php:53 -#: SuppPaymentRun.php:114 SuppPaymentRun.php:188 SuppPaymentRun.php:218 +#: StockTransfers.php:191 StockUsageGraph.php:53 StockUsage.php:139 #: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:136 -#: SupplierInquiry.php:190 SupplierTransInquiry.php:95 WOSerialNos.php:47 -#: WorkOrderCosting.php:418 WorkOrderReceive.php:273 -#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:91 -#: Z_DeleteCreditNote.php:58 Z_DeleteInvoice.php:87 -#: includes/PDFPaymentRun_PymtFooter.php:59 -#: includes/PDFPaymentRun_PymtFooter.php:89 -#: includes/PDFPaymentRun_PymtFooter.php:118 -#: includes/PDFPaymentRun_PymtFooter.php:154 -#: includes/PDFPaymentRun_PymtFooter.php:185 includes/ConnectDB_mysql.inc:67 -#: includes/ConnectDB_mysqli.inc:81 +#: SupplierInquiry.php:190 SupplierTransInquiry.php:95 SuppPaymentRun.php:114 +#: SuppPaymentRun.php:188 SuppPaymentRun.php:219 WorkOrderCosting.php:418 +#: WorkOrderReceive.php:273 WOSerialNos.php:47 Z_ChangeBranchCode.php:105 +#: Z_ChangeCustomerCode.php:91 Z_DeleteCreditNote.php:58 +#: Z_DeleteInvoice.php:87 includes/PDFPaymentRun_PymtFooter.php:61 +#: includes/PDFPaymentRun_PymtFooter.php:91 +#: includes/PDFPaymentRun_PymtFooter.php:121 +#: includes/PDFPaymentRun_PymtFooter.php:158 +#: includes/PDFPaymentRun_PymtFooter.php:189 includes/ConnectDB_mysqli.inc:81 +#: includes/ConnectDB_mysql.inc:67 msgid "The SQL that failed was" msgstr "SQL příkaz, který selhal, byl" @@ -980,7 +982,7 @@ #: PDFPriceList.php:307 PDFRemittanceAdvice.php:170 #: PDFStockCheckComparison.php:358 PrintCustTrans.php:540 #: PrintCustTransPortrait.php:578 ReorderLevel.php:228 StockDispatch.php:327 -#: SuppPriceList.php:246 SupplierBalsAtPeriodEnd.php:159 Tax.php:351 +#: SupplierBalsAtPeriodEnd.php:159 SuppPriceList.php:246 Tax.php:351 msgid "Print PDF" msgstr "Tisknout PDF" @@ -1013,12 +1015,12 @@ msgstr "Dodavatel ve věku analýza" #: AgedSuppliers.php:288 OutstandingGRNs.php:168 PDFRemittanceAdvice.php:149 -#: SuppPaymentRun.php:263 SupplierBalsAtPeriodEnd.php:131 +#: SupplierBalsAtPeriodEnd.php:131 SuppPaymentRun.php:264 msgid "From Supplier Code" msgstr "Od kódu dodavatele" #: AgedSuppliers.php:292 OutstandingGRNs.php:172 PDFRemittanceAdvice.php:153 -#: SuppPaymentRun.php:267 SupplierBalsAtPeriodEnd.php:135 +#: SupplierBalsAtPeriodEnd.php:135 SuppPaymentRun.php:268 msgid "To Supplier Code" msgstr "Do kódu dodavatele" @@ -1107,8 +1109,8 @@ #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:166 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:135 -#: SalesTypes.php:156 StockCategories.php:198 SupplierTypes.php:151 -#: Suppliers.php:638 Z_DeleteInvoice.php:146 +#: SalesTypes.php:156 StockCategories.php:198 Suppliers.php:638 +#: SupplierTypes.php:151 Z_DeleteInvoice.php:146 msgid "has been deleted" msgstr "byl zrušen" @@ -1154,13 +1156,13 @@ msgstr "ID uživatele" #: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 -#: CounterSales.php:2141 CounterSales.php:2144 CustomerTransInquiry.php:31 +#: CounterSales.php:2146 CounterSales.php:2149 CustomerTransInquiry.php:31 #: DailySalesInquiry.php:47 DailySalesInquiry.php:49 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:144 #: PDFPeriodStockTransListing.php:59 PDFPriceList.php:198 -#: PDFPrintLabel.php:250 POReport.php:1567 PO_Items.php:1023 +#: PDFPrintLabel.php:250 PO_Items.php:1023 POReport.php:1567 #: ReorderLevel.php:181 ReorderLevel.php:183 ReorderLevel.php:213 #: ReorderLevel.php:215 SalesGraph.php:97 SalesGraph.php:99 SalesGraph.php:119 #: SalesGraph.php:121 SalesGraph.php:143 SalesGraph.php:145 SalesGraph.php:179 @@ -1200,9 +1202,9 @@ msgstr "Uživatel" #: AuditTrail.php:165 BankReconciliation.php:210 BankReconciliation.php:285 -#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 CustomerAllocations.php:361 -#: CustomerInquiry.php:194 CustomerTransInquiry.php:20 -#: CustomerTransInquiry.php:98 DailyBankTransactions.php:112 +#: CustomerAllocations.php:361 CustomerInquiry.php:194 +#: CustomerTransInquiry.php:20 CustomerTransInquiry.php:98 +#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 DailyBankTransactions.php:112 #: GLAccountInquiry.php:150 GLAccountReport.php:336 GLJournal.php:262 #: MRPReschedules.php:191 SalesByTypePeriodInquiry.php:334 #: SelectCustomer.php:416 ShipmentCosting.php:532 ShipmentCosting.php:609 @@ -1230,13 +1232,660 @@ msgid "Value" msgstr "Hodnota" +#: BackupDatabase.php:7 +#, fuzzy +msgid "Backup webERP Database" +msgstr "Upgrade webERP databáze" + +#: BackupDatabase.php:20 +#, fuzzy +msgid "Deleted" +msgstr "Smazat" + +#: BackupDatabase.php:23 +#, fuzzy +msgid "Unable to delete" +msgstr "Nelze najít Reklamní kodex" + +#: BackupDatabase.php:28 +#, fuzzy +msgid "All backup files on the server have been deleted" +msgstr "Prodej vysílání záznam byl odstraněn" + +#: BackupDatabase.php:30 +#, fuzzy +msgid "No backup files on the server were deleted" +msgstr "Nahrát soubor na server" + +#: BackupDatabase.php:34 +msgid "Backup" +msgstr "Zálohovat" + +#: BackupDatabase.php:43 +msgid "" +"The backup file has now been created. You must now download this to your " +"computer because in case the web-server has a disk failure the backup would " +"then not on the same machine. Use the link below" +msgstr "" + +#: BackupDatabase.php:43 +msgid "Download the backup file to your locale machine" +msgstr "" + +#: BackupDatabase.php:44 +msgid "" +"Once you have downloaded the database backup file to your local machine you " +"should use the link below to delete it - backup files can consume a lot of " +"space on your hosting account and will accumulate if not deleted - they also " +"contain sensitive information which would otherwise be available for others " +"to download!" +msgstr "" + +#: BackupDatabase.php:47 +#, fuzzy +msgid "Delete the backup file off the server" +msgstr "Nahrát soubor na server" + +#: BackupDatabase.php:49 +msgid "" +"There was some problem producing a backup using mysqldump. Normally this " +"relates to a permissions issue - the web-server user must have permission to " +"write to the companies directory" +msgstr "" + +#: BankAccounts.php:7 +msgid "Bank Accounts Maintenance" +msgstr "Bankovní účty Údržba" + +#: BankAccounts.php:11 TaxAuthorities.php:150 +msgid "Bank" +msgstr "Banka" + +#: BankAccounts.php:12 +#, fuzzy +msgid "" +"Update Bank Account details. Account Code is for SWIFT or BSB type Bank " +"Codes. Set Default for Invoices to \"Currency Default\" of \"Fallback " +"Default\" to print Account details on Invoices (only one account should be " +"set to \"Fall Back Default\")." +msgstr "" +"Aktualizace Bankovní účet podrobnosti. Kód je účet pro SWIFT nebo BSB typ " +"kód banky. Nastavit výchozí pro faktury \\" + +#: BankAccounts.php:44 +msgid "The bank account code already exists in the database" +msgstr "Na bankovní účet, kód již existuje v databázi" + +#: BankAccounts.php:50 +msgid "The bank account name must be fifty characters or less long" +msgstr "Na bankovní účet, název musí být padesát znaků dlouhé" + +#: BankAccounts.php:56 +msgid "The bank account name may not be empty." +msgstr "Na bankovní účet, jméno nesmí být prázdné." + +#: BankAccounts.php:62 +msgid "The bank account number may not be empty." +msgstr "Číslo bankovního účtu nesmí být prázdný." + +#: BankAccounts.php:68 +msgid "The bank account number must be fifty characters or less long" +msgstr "Číslo bankovního účtu musí být padesát znaků dlouhé" + +#: BankAccounts.php:74 +msgid "The bank address must be fifty characters or less long" +msgstr "Adresa banky je padesát znaků dlouhé" + +#: BankAccounts.php:92 +msgid "" +"Note that it is not possible to change the currency of the account once " +"there are transactions against it" +msgstr "Všimněte si, že není možné změnit měnu účtu, jakmile je operace proti" + +#: BankAccounts.php:104 +msgid "The bank account details have been updated" +msgstr "Údaje o bankovním účtu byly aktualizovány" + +#: BankAccounts.php:123 +msgid "The new bank account has been entered" +msgstr "Nový bankovní účet bylo zapsáno" + +#: BankAccounts.php:128 +msgid "The bank account could not be inserted or modified because" +msgstr "Na bankovní účet, nelze vložit či pozměnit, protože" + +#: BankAccounts.php:129 +msgid "The SQL used to insert/modify the bank account details was" +msgstr "SQL používá vložit / upravit údaje o bankovním účtu bylo" + +#: BankAccounts.php:157 +msgid "" +"Cannot delete this bank account because transactions have been created using " +"this account" +msgstr "" +"Nelze smazat tento bankovní účet, protože transakce byly vytvořeny pomocí " +"tohoto účtu" + +#: BankAccounts.php:158 +msgid "transactions with this bank account code" +msgstr "transakce s tímto kódem bankovní účet" + +#: BankAccounts.php:164 +msgid "Bank account deleted" +msgstr "Bankovní účet smazán" + +#: BankAccounts.php:184 +msgid "The bank accounts set up could not be retrieved because" +msgstr "Bankovní účty zřízené se nepodařilo získat, protože" + +#: BankAccounts.php:185 +msgid "The SQL used to retrieve the bank account details was" +msgstr "SQL používá k načtení údaje o bankovním účtu bylo" + +#: BankAccounts.php:191 GLJournal.php:291 +msgid "GL Account Code" +msgstr "GL kódu účtu" + +#: BankAccounts.php:192 BankAccounts.php:326 +msgid "Bank Account Name" +msgstr "Název bankovního účtu" + +#: BankAccounts.php:193 BankAccounts.php:328 +msgid "Bank Account Code" +msgstr "Bankovní účet kódu" + +#: BankAccounts.php:194 BankAccounts.php:330 +msgid "Bank Account Number" +msgstr "Číslo bankovního účtu" + +#: BankAccounts.php:195 BankAccounts.php:332 +msgid "Bank Address" +msgstr "Adresa banky" + +#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:788 +#: CustomerTransInquiry.php:108 OffersReceived.php:109 PcReportTab.php:267 +#: PcTabs.php:206 PcTabs.php:349 PDFPrintLabel.php:97 +#: PO_AuthorisationLevels.php:126 PO_AuthorisationLevels.php:209 +#: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:115 +#: PO_Header.php:554 PO_SelectOSPurchOrder.php:481 PO_SelectPurchOrder.php:432 +#: PricesByCost.php:274 Prices.php:222 Prices.php:295 PurchData.php:169 +#: PurchData.php:352 PurchData.php:481 SelectSupplier.php:260 +#: SupplierCredit.php:263 SupplierInvoice.php:235 SupplierTransInquiry.php:109 +#: SuppPriceList.php:284 includes/PDFBankingSummaryPageHeader.inc:42 +#: includes/PDFDebtorBalsPageHeader.inc:33 +#: includes/PDFSupplierBalsPageHeader.inc:36 +msgid "Currency" +msgstr "Měna" + +#: BankAccounts.php:197 BankAccounts.php:355 +msgid "Default for Invoices" +msgstr "Výchozí pro Faktury" + +#: BankAccounts.php:212 BankAccounts.php:369 BankAccounts.php:375 +#: BankAccounts.php:379 BankAccounts.php:383 +msgid "Fall Back Default" +msgstr "" + +#: BankAccounts.php:214 BankAccounts.php:370 BankAccounts.php:374 +#: BankAccounts.php:378 BankAccounts.php:384 +#, fuzzy +msgid "Currency Default" +msgstr "Měny " + +#: BankAccounts.php:224 +#, fuzzy, php-format +msgid "Are you sure you wish to delete this bank account?" +msgstr "Jste si jisti, že chcete smazat tento obor?" + +#: BankAccounts.php:248 +msgid "Show All Bank Accounts Defined" +msgstr "Zobrazit všechny bankovní účty definované" + +#: BankAccounts.php:282 BankAccounts.php:287 +msgid "Bank Account GL Code" +msgstr "Bankovní účet GL kód" + +#: BankAccounts.php:334 +msgid "Currency Of Account" +msgstr "Měna účtu" + +#: BankMatching.php:6 +msgid "Bank Account Matching" +msgstr "Bankovní účet odpovídající" + +#: BankMatching.php:15 PDFCustTransListing.php:41 Z_CheckDebtorsControl.php:81 +msgid "Receipts" +msgstr "Příjmy" + +#: BankMatching.php:17 BankMatching.php:25 +msgid "Bank Matching" +msgstr "Banka odpovídající" + +#: BankMatching.php:17 +msgid "Bank Account Matching - Receipts" +msgstr "Bankovní účet odpovídající - Příjmy" + +#: BankMatching.php:24 PaymentAllocations.php:31 PaymentMethods.php:11 +#: PDFSuppTransListing.php:40 +msgid "Payments" +msgstr "Platby" + +#: BankMatching.php:25 +msgid "Bank Account Matching - Payments" +msgstr "Bankovní účet odpovídající - Platby" + +#: BankMatching.php:29 +msgid "This page must be called with a bank transaction type" +msgstr "Tato stránka musí být volána s typem bankovním převodem" + +#: BankMatching.php:29 +msgid "It should not be called directly" +msgstr "To by nemělo být jen přímo" + +#: BankMatching.php:49 +msgid "Could not retrieve transaction information" +msgstr "Nemohu získat informace o transakci" + +#: BankMatching.php:56 +msgid "Could not match off this payment because" +msgstr "Nemohl zápas z této platby, protože" + +#: BankMatching.php:67 +msgid "Could not update the amount matched off this bank transaction because" +msgstr "" +"Nepodařilo se aktualizovat částku uzavřeno z této banky, protože transakce" + +#: BankMatching.php:75 +msgid "Could not unclear this bank transaction because" +msgstr "Nemohu nejasné tento bankovní transakci, protože" + +#: BankMatching.php:83 +msgid "" +"Use this screen to match webERP Receipts and Payments to your Bank " +"Statement. Check your bank statement and click the check-box when you find " +"the matching transaction." +msgstr "" +"Tato obrazovka slouží k zápasu webERP inkasa a platby do svého výpisu z " +"účtu. Zkontrolujte, zda vaše bankovní výpis a klikněte na check-box, když " +"zjistíte, odpovídající transakce." + +#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:754 +#: DailyBankTransactions.php:32 Payments.php:753 PDFChequeListing.php:44 +#: TaxAuthorities.php:151 TaxAuthorities.php:316 +msgid "Bank Account" +msgstr "Bankovní účet" + +#: BankMatching.php:117 +msgid "Show" +msgstr "Zobrazit" + +#: BankMatching.php:117 CounterSales.php:222 CreditItemsControlled.php:78 +#: FreightCosts.php:267 GoodsReceivedControlled.php:68 GoodsReceived.php:73 +#: StockLocTransferReceive.php:423 SupplierAllocations.php:434 +#: SuppShiptChgs.php:136 +msgid "from" +msgstr "od" + +#: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:60 +#: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 +#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:733 +#: PcReportTab.php:102 PDFChequeListing.php:114 PDFChequeListing.php:124 +#: PDFChequeListing.php:199 PDFDeliveryDifferences.php:187 +#: PDFDeliveryDifferences.php:200 PDFDeliveryDifferences.php:296 +#: PDFDIFOT.php:190 PDFDIFOT.php:203 PDFDIFOT.php:307 PDFOrdersInvoiced.php:77 +#: PDFOrdersInvoiced.php:274 PDFOrderStatus.php:82 PDFOrderStatus.php:256 +#: PDFRemittanceAdvice.php:48 PO_PDFPurchOrder.php:332 +#: PricesBasedOnMarkUp.php:213 PricesBasedOnMarkUp.php:352 +#: PrintCustStatements.php:43 PrintCustTrans.php:60 PrintCustTrans.php:63 +#: PrintCustTransPortrait.php:58 PrintCustTransPortrait.php:61 +#: SalesGraph.php:211 SalesGraph.php:240 SalesGraph.php:244 +#: StockLocTransferReceive.php:306 StockLocTransferReceive.php:423 +#: Stocks.php:266 Stocks.php:271 StockStatus.php:306 StockStatus.php:347 +#: StockTransfers.php:436 includes/PDFAgedDebtorsPageHeader.inc:18 +#: includes/PDFAgedSuppliersPageHeader.inc:17 +#: includes/PDFChequeListingPageHeader.inc:17 +#: includes/PDFDeliveryDifferencesPageHeader.inc:19 +#: includes/PDFDeliveryDifferencesPageHeader.inc:21 +#: includes/PDFDIFOTPageHeader.inc:19 includes/PDFDIFOTPageHeader.inc:21 +#: includes/PDFOrdersInvoicedPageHeader.inc:19 +#: includes/PDFOrdersInvoicedPageHeader.inc:21 +#: includes/PDFOrderStatusPageHeader.inc:19 +#: includes/PDFOrderStatusPageHeader.inc:21 +#: includes/PDFPeriodStockTransListingPageHeader.inc:20 +#: includes/PDFStockLocTransferHeader.inc:31 +msgid "to" +msgstr "na" + +#: BankMatching.php:123 +msgid "Choose outstanding" +msgstr "Zvolte vynikající" + +#: BankMatching.php:123 +msgid "only or all" +msgstr "jen nebo všechny" + +#: BankMatching.php:123 BankMatching.php:127 BankMatching.php:130 +#: BankMatching.php:141 BankMatching.php:144 +msgid "in the date range" +msgstr "v rozmezí dat" + +#: BankMatching.php:127 BankMatching.php:130 BankMatching.php:141 +#: BankMatching.php:144 +msgid "Show all" +msgstr "Zobrazit všechny" + +#: BankMatching.php:128 BankMatching.php:131 +msgid "Show unmatched" +msgstr "Zobrazit bezkonkurenční" + +#: BankMatching.php:128 BankMatching.php:131 PrintCheque.php:46 +#: ReverseGRN.php:104 includes/PDFCustomerListPageHeader.inc:46 +#: includes/PDFDeliveryDifferencesPageHeader.inc:24 +#: includes/PDFDIFOTPageHeader.inc:24 +#: includes/PDFOrdersInvoicedPageHeader.inc:24 +#: includes/PDFOrderStatusPageHeader.inc:24 +msgid "only" +msgstr "jen" + +#: BankMatching.php:137 +msgid "Choose to display only the first 20 matching" +msgstr "Vyberte, zda chcete zobrazit pouze prvních 20 odpovídající" + +#: BankMatching.php:138 +msgid "or all" +msgstr "nebo všechny" + +#: BankMatching.php:138 +msgid "meeting the criteria" +msgstr "splňující kritéria" + +#: BankMatching.php:142 BankMatching.php:145 +msgid "Show only the first 20" +msgstr "Zobrazit jen prvních 20" + +#: BankMatching.php:154 +msgid "Show selected" +msgstr "Zobrazit vybrané" + +#: BankMatching.php:156 +msgid "Show reconciliation" +msgstr "Zobrazit usmíření" + +#: BankMatching.php:164 BankMatching.php:170 +msgid "The date entered for the field to show" +msgstr "Datum vstoupil na pole show" + +#: BankMatching.php:164 +msgid "before" +msgstr "před" + +#: BankMatching.php:165 BankMatching.php:171 +msgid "is not entered in a recognised date format" +msgstr "není zapsán v uznávané formátu data" + +#: BankMatching.php:165 BankMatching.php:171 +msgid "Entry is expected in the format" +msgstr "Vstup se očekává ve formátu" + +#: BankMatching.php:170 +msgid "after" +msgstr "po" + +#: BankMatching.php:257 +msgid "The payments with the selected criteria could not be retrieved because" +msgstr "Platby podle zadaných kriterií se nepodařilo získat, protože" + +#: BankMatching.php:261 ShipmentCosting.php:533 ShipmentCosting.php:610 +#: SupplierAllocations.php:456 +msgid "Ref" +msgstr "Ref" + +#: BankMatching.php:264 ConfirmDispatch_Invoice.php:276 Credit_Invoice.php:279 +#: CustomerAllocations.php:364 CustomerReceipt.php:897 +#: CustomerTransInquiry.php:107 CustWhereAlloc.php:109 +#: PaymentAllocations.php:67 Payments.php:1026 Payments.php:1030 +#: Payments.php:1046 PcAssignCashToTab.php:222 PcAssignCashToTab.php:345 +#: PcAuthorizeExpenses.php:90 PcClaimExpensesFromTab.php:212 +#: PcClaimExpensesFromTab.php:365 PcReportTab.php:172 PcReportTab.php:326 +#: PrintCheque.php:77 PrintCheque.php:91 SelectCreditItems.php:681 +#: SuppContractChgs.php:79 SuppContractChgs.php:163 SuppFixedAssetChgs.php:76 +#: SuppFixedAssetChgs.php:149 SupplierAllocations.php:457 +#: SupplierCredit.php:352 SupplierCredit.php:385 SupplierCredit.php:421 +#: SupplierCredit.php:460 SupplierInvoice.php:330 SupplierInvoice.php:371 +#: SupplierInvoice.php:411 SupplierInvoice.php:455 +#: SupplierTransInquiry.php:108 SuppShiptChgs.php:81 SuppShiptChgs.php:146 +#: SuppTransGLAnalysis.php:106 SuppTransGLAnalysis.php:191 +#: Z_CheckAllocs.php:66 includes/PDFBankingSummaryPageHeader.inc:55 +#: includes/PDFChequeListingPageHeader.inc:37 +msgid "Amount" +msgstr "Částka" + +#: BankMatching.php:265 BankReconciliation.php:214 BankReconciliation.php:289 +#: PDFOrdersInvoiced.php:351 PDFOrderStatus.php:322 +#: PO_SelectOSPurchOrder.php:233 PO_SelectPurchOrder.php:214 +#: Shipt_Select.php:192 SuppCreditGRNs.php:267 +#: includes/PDFStatementPageHeader.inc:173 +#: includes/PDFStatementPageHeader.inc:180 +msgid "Outstanding" +msgstr "Vynikající" + +#: BankMatching.php:266 +msgid "Clear" +msgstr "Jasný" + +#: BankMatching.php:266 BankMatching.php:295 +msgid "Unclear" +msgstr "Nejasný" + +#: BankMatching.php:342 +msgid "Update Matching" +msgstr "Odpovídající aktualizace" + +#: BankReconciliation.php:7 +msgid "Bank Reconciliation" +msgstr "Banka usmíření" + +#: BankReconciliation.php:27 +msgid "" +"The entry in the bank statement balance is not numeric. The balance on the " +"bank statement should be entered. The exchange difference has not been " +"calculated and no general ledger journal has been created" +msgstr "" +"Záznam v bilanci banky tvrzení není číselná. Zůstatek na bankovním výpisu by " +"měly být zaneseny. Kurzových rozdílů nebyla vypočtena žádná obecná a knihy " +"časopis byl vytvořen" + +#: BankReconciliation.php:39 +msgid "Could not retrieve the exchange rate for the selected bank account" +msgstr "Nepodařilo se načíst směnný kurz pro vybrané bankovní účet" + +#: BankReconciliation.php:68 BankReconciliation.php:86 +msgid "reconciliation on" +msgstr "usmíření, na" + +#: BankReconciliation.php:71 +msgid "Cannot insert a GL entry for the exchange difference because" +msgstr "Nelze vložit záznam GL pro výměnu rozdíl, protože" + +#: BankReconciliation.php:72 +msgid "The SQL that failed to insert the exchange difference GL entry was" +msgstr "SQL, které se nepodařilo vložit kurzový rozdíl GL vstup" + +#: BankReconciliation.php:92 +msgid "Exchange difference of" +msgstr "Kurzových rozdílů z" + +#: BankReconciliation.php:92 +msgid "has been posted" +msgstr "byl vyslán" + +#: BankReconciliation.php:100 SuppPaymentRun.php:316 +msgid "The bank accounts could not be retrieved by the SQL because" +msgstr "Bankovní účty se nepodařilo získat na SQL, protože" + +#: BankReconciliation.php:101 CustomerReceipt.php:742 +#: DailyBankTransactions.php:28 Payments.php:749 SuppPaymentRun.php:318 +msgid "The SQL used to retrieve the bank accounts was" +msgstr "SQL slouží k získání bankovní ú... [truncated message content] |
From: <dai...@us...> - 2011-11-12 21:50:45
|
Revision: 4745 http://web-erp.svn.sourceforge.net/web-erp/?rev=4745&view=rev Author: daintree Date: 2011-11-12 21:50:32 +0000 (Sat, 12 Nov 2011) Log Message: ----------- pre 4.06RC2 Modified Paths: -------------- trunk/doc/Change.log trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/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/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-12 09:42:34 UTC (rev 4744) +++ trunk/doc/Change.log 2011-11-12 21:50:32 UTC (rev 4745) @@ -1,5 +1,7 @@ webERP Change Log +13/11/11 Release 4.06RC2 + 12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines 12/11/11 Phil: Removed old Numbers to words class code - this code was not in keeping with the rest of the system and not PHP 5 compatible anyway. Replaced with a much simpler function. This code is only used for pre-printed cheques - so it is in that script only. The new function may not effective for other languages but will be easily adapted as needed. The PrintCheque.php script needs to be modified specifically for the business stationery. 10/11/11 Phil: added a function in includes/SQL_CommonFunctions.inc EnsureGLTransBalance that looks at the gltrans entries for a given transaction type and type number and if the total is not zero and less than 0.05 it fudges the largest gltrans record to make the gltrans balance in total - added to ConfirmDispatch_Invoice.php Credit_Invoice.php SelectCreditItems.php CounterSales.php Payments.php CustomerReceipt.php Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-12 09:42:34 UTC (rev 4744) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-12 21:50:32 UTC (rev 4745) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-06 19:49+1300\n" +"POT-Creation-Date: 2011-11-13 10:46+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -140,21 +140,22 @@ #: Areas.php:116 Areas.php:125 BankAccounts.php:158 CreditStatus.php:125 #: Currencies.php:166 Currencies.php:174 Currencies.php:182 #: CustomerBranches.php:286 CustomerBranches.php:296 CustomerBranches.php:306 -#: CustomerBranches.php:316 CustomerTypes.php:147 CustomerTypes.php:157 -#: Customers.php:289 Customers.php:298 Customers.php:306 Customers.php:314 -#: Factors.php:134 FixedAssetCategories.php:133 GLAccounts.php:80 -#: GLAccounts.php:96 Locations.php:237 Locations.php:245 Locations.php:256 -#: Locations.php:265 Locations.php:274 Locations.php:283 Locations.php:292 -#: Locations.php:301 MRPDemandTypes.php:87 PaymentMethods.php:138 -#: PaymentTerms.php:146 PaymentTerms.php:153 PcExpenses.php:158 -#: SalesCategories.php:124 SalesCategories.php:131 SalesPeople.php:150 -#: SalesPeople.php:157 SalesPeople.php:163 SalesTypes.php:140 -#: SalesTypes.php:150 Shippers.php:82 Shippers.php:94 StockCategories.php:181 -#: Stocks.php:615 Stocks.php:624 Stocks.php:632 Stocks.php:640 Stocks.php:648 -#: Stocks.php:656 SupplierTypes.php:145 Suppliers.php:612 Suppliers.php:621 -#: Suppliers.php:629 TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 -#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WWW_Access.php:83 -#: WorkCentres.php:89 WorkCentres.php:95 +#: CustomerBranches.php:316 Customers.php:289 Customers.php:298 +#: Customers.php:306 Customers.php:314 CustomerTypes.php:147 +#: CustomerTypes.php:157 Factors.php:134 FixedAssetCategories.php:133 +#: GLAccounts.php:80 GLAccounts.php:96 Locations.php:237 Locations.php:245 +#: Locations.php:256 Locations.php:265 Locations.php:274 Locations.php:283 +#: Locations.php:292 Locations.php:301 MRPDemandTypes.php:87 +#: PaymentMethods.php:138 PaymentTerms.php:146 PaymentTerms.php:153 +#: PcExpenses.php:158 SalesCategories.php:124 SalesCategories.php:131 +#: SalesPeople.php:150 SalesPeople.php:157 SalesPeople.php:163 +#: SalesTypes.php:140 SalesTypes.php:150 Shippers.php:82 Shippers.php:94 +#: StockCategories.php:181 Stocks.php:615 Stocks.php:624 Stocks.php:632 +#: Stocks.php:640 Stocks.php:648 Stocks.php:656 Suppliers.php:612 +#: Suppliers.php:621 Suppliers.php:629 SupplierTypes.php:145 +#: TaxCategories.php:131 TaxGroups.php:132 TaxGroups.php:140 +#: TaxProvinces.php:129 UnitsOfMeasure.php:135 WorkCentres.php:89 +#: WorkCentres.php:95 WWW_Access.php:83 msgid "There are" msgstr "Jsou zde" @@ -202,25 +203,25 @@ #: AccountGroups.php:223 AccountSections.php:175 AddCustomerContacts.php:25 #: AddCustomerContacts.php:28 AddCustomerNotes.php:103 #: AddCustomerTypeNotes.php:97 AgedDebtors.php:451 AgedSuppliers.php:278 -#: Areas.php:144 AuditTrail.php:11 BOMExtendedQty.php:261 BOMIndented.php:246 -#: BOMIndentedReverse.php:235 BOMInquiry.php:187 BOMListing.php:109 -#: BOMs.php:213 BOMs.php:832 BankReconciliation.php:13 COGSGLPostings.php:18 -#: CompanyPreferences.php:153 CounterSales.php:2010 CounterSales.php:2135 -#: CreditStatus.php:21 Credit_Invoice.php:255 Currencies.php:28 -#: CustEDISetup.php:17 DailyBankTransactions.php:11 DebtorsAtPeriodEnd.php:125 -#: DiscountCategories.php:10 DiscountCategories.php:131 DiscountMatrix.php:16 -#: EDIMessageFormat.php:104 FixedAssetLocations.php:9 -#: FixedAssetRegister.php:13 FixedAssetRegister.php:243 -#: FixedAssetTransfer.php:31 FormDesigner.php:129 GLBalanceSheet.php:362 -#: GLBudgets.php:29 GLJournal.php:246 InventoryPlanning.php:374 -#: InventoryPlanningPrefSupplier.php:467 Labels.php:115 Labels.php:270 -#: MRPReport.php:515 OutstandingGRNs.php:160 PDFPickingList.php:28 -#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 POReport.php:60 -#: POReport.php:64 POReport.php:68 PO_AuthorisationLevels.php:10 -#: PO_SelectOSPurchOrder.php:135 PcAssignCashToTab.php:56 -#: PcAssignCashToTab.php:130 PcAssignCashToTab.php:146 -#: PcAssignCashToTab.php:187 Prices.php:30 PricesBasedOnMarkUp.php:8 -#: Prices_Customer.php:34 PurchData.php:137 PurchData.php:258 +#: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 +#: BOMExtendedQty.php:261 BOMIndented.php:246 BOMIndentedReverse.php:235 +#: BOMInquiry.php:187 BOMListing.php:109 BOMs.php:213 BOMs.php:832 +#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2014 +#: CounterSales.php:2140 Credit_Invoice.php:255 CreditStatus.php:21 +#: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:11 +#: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 +#: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 +#: FixedAssetLocations.php:9 FixedAssetRegister.php:13 +#: FixedAssetRegister.php:243 FixedAssetTransfer.php:31 FormDesigner.php:129 +#: GLBalanceSheet.php:362 GLBudgets.php:29 GLJournal.php:246 +#: InventoryPlanning.php:374 InventoryPlanningPrefSupplier.php:467 +#: Labels.php:115 Labels.php:270 MRPReport.php:515 OutstandingGRNs.php:160 +#: PcAssignCashToTab.php:56 PcAssignCashToTab.php:130 +#: PcAssignCashToTab.php:146 PcAssignCashToTab.php:187 PDFPickingList.php:28 +#: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 +#: PO_AuthorisationLevels.php:10 POReport.php:60 POReport.php:64 +#: POReport.php:68 PO_SelectOSPurchOrder.php:135 PricesBasedOnMarkUp.php:8 +#: Prices_Customer.php:34 Prices.php:30 PurchData.php:137 PurchData.php:258 #: PurchData.php:282 RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 @@ -231,13 +232,13 @@ #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 #: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 -#: StockLocMovements.php:13 StockLocStatus.php:27 SupplierTenders.php:260 -#: SupplierTenders.php:317 SupplierTransInquiry.php:10 Suppliers.php:302 -#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 WWW_Access.php:11 -#: WWW_Users.php:31 WhereUsedInquiry.php:18 WorkCentres.php:111 -#: WorkCentres.php:162 WorkOrderCosting.php:13 WorkOrderEntry.php:11 -#: WorkOrderIssue.php:22 WorkOrderReceive.php:15 WorkOrderStatus.php:42 -#: Z_BottomUpCosts.php:56 +#: StockLocMovements.php:13 StockLocStatus.php:27 Suppliers.php:302 +#: SupplierTenders.php:260 SupplierTenders.php:317 SupplierTransInquiry.php:10 +#: TaxGroups.php:15 TaxProvinces.php:11 TopItems.php:77 +#: WhereUsedInquiry.php:18 WorkCentres.php:111 WorkCentres.php:162 +#: WorkOrderCosting.php:13 WorkOrderEntry.php:11 WorkOrderIssue.php:22 +#: WorkOrderReceive.php:15 WorkOrderStatus.php:42 WWW_Access.php:11 +#: WWW_Users.php:31 Z_BottomUpCosts.php:56 msgid "Search" msgstr "Vyhledávání" @@ -271,90 +272,90 @@ #: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:577 #: Customers.php:925 Customers.php:934 Customers.php:937 #: DeliveryDetails.php:1079 DeliveryDetails.php:1118 DeliveryDetails.php:1121 -#: GLTransInquiry.php:69 MRP.php:529 MRP.php:533 MRP.php:537 MRP.php:541 -#: MRPCalendar.php:224 PDFChequeListing.php:63 PDFDIFOT.php:75 -#: PDFDeliveryDifferences.php:75 PO_AuthorisationLevels.php:134 -#: PO_AuthorisationLevels.php:139 PO_Header.php:777 PO_PDFPurchOrder.php:382 -#: PO_PDFPurchOrder.php:385 PaymentMethods.php:197 PaymentMethods.php:198 +#: GLTransInquiry.php:69 MRPCalendar.php:224 MRP.php:529 MRP.php:533 +#: MRP.php:537 MRP.php:541 PaymentMethods.php:197 PaymentMethods.php:198 #: PaymentMethods.php:199 PaymentMethods.php:262 PaymentMethods.php:268 -#: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PurchData.php:189 -#: PurchData.php:514 PurchData.php:517 RecurringSalesOrders.php:482 -#: RecurringSalesOrders.php:485 SalesAnalReptCols.php:284 -#: SalesAnalReptCols.php:419 SalesAnalReptCols.php:422 SalesAnalRepts.php:415 -#: SalesAnalRepts.php:418 SalesAnalRepts.php:443 SalesAnalRepts.php:446 -#: SalesAnalRepts.php:471 SalesAnalRepts.php:474 SalesPeople.php:219 -#: SalesPeople.php:354 SalesPeople.php:356 SelectProduct.php:381 -#: ShipmentCosting.php:663 Stocks.php:1013 Stocks.php:1015 Stocks.php:1038 -#: Stocks.php:1040 SuppContractChgs.php:90 SystemParameters.php:389 -#: SystemParameters.php:412 SystemParameters.php:428 SystemParameters.php:491 -#: SystemParameters.php:499 SystemParameters.php:539 SystemParameters.php:612 -#: SystemParameters.php:621 SystemParameters.php:629 SystemParameters.php:647 -#: SystemParameters.php:654 SystemParameters.php:781 SystemParameters.php:916 -#: SystemParameters.php:918 SystemParameters.php:928 SystemParameters.php:930 -#: SystemParameters.php:984 SystemParameters.php:996 SystemParameters.php:998 -#: TaxGroups.php:307 TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 -#: WWW_Users.php:634 +#: PaymentMethods.php:275 PcAuthorizeExpenses.php:244 PDFChequeListing.php:63 +#: PDFDeliveryDifferences.php:75 PDFDIFOT.php:75 +#: PO_AuthorisationLevels.php:134 PO_AuthorisationLevels.php:139 +#: PO_Header.php:777 PO_PDFPurchOrder.php:382 PO_PDFPurchOrder.php:385 +#: PurchData.php:189 PurchData.php:514 PurchData.php:517 +#: RecurringSalesOrders.php:482 RecurringSalesOrders.php:485 +#: SalesAnalReptCols.php:284 SalesAnalReptCols.php:419 +#: SalesAnalReptCols.php:422 SalesAnalRepts.php:415 SalesAnalRepts.php:418 +#: SalesAnalRepts.php:443 SalesAnalRepts.php:446 SalesAnalRepts.php:471 +#: SalesAnalRepts.php:474 SalesPeople.php:219 SalesPeople.php:354 +#: SalesPeople.php:356 SelectProduct.php:381 ShipmentCosting.php:663 +#: Stocks.php:1015 Stocks.php:1017 Stocks.php:1040 Stocks.php:1042 +#: SuppContractChgs.php:90 SystemParameters.php:389 SystemParameters.php:412 +#: SystemParameters.php:428 SystemParameters.php:491 SystemParameters.php:499 +#: SystemParameters.php:539 SystemParameters.php:612 SystemParameters.php:621 +#: SystemParameters.php:629 SystemParameters.php:647 SystemParameters.php:654 +#: SystemParameters.php:781 SystemParameters.php:916 SystemParameters.php:918 +#: SystemParameters.php:928 SystemParameters.php:930 SystemParameters.php:984 +#: SystemParameters.php:996 SystemParameters.php:998 TaxGroups.php:307 +#: TaxGroups.php:310 TaxGroups.php:366 WWW_Users.php:632 WWW_Users.php:634 msgid "Yes" msgstr "Ano" #: AccountGroups.php:253 AccountGroups.php:385 AccountGroups.php:387 -#: BOMs.php:124 BOMs.php:745 BOMs.php:749 BankAccounts.php:210 -#: BankAccounts.php:371 BankAccounts.php:373 BankAccounts.php:377 -#: BankAccounts.php:385 CompanyPreferences.php:475 CompanyPreferences.php:479 +#: BankAccounts.php:210 BankAccounts.php:371 BankAccounts.php:373 +#: BankAccounts.php:377 BankAccounts.php:385 BOMs.php:124 BOMs.php:745 +#: BOMs.php:749 CompanyPreferences.php:475 CompanyPreferences.php:479 #: CompanyPreferences.php:490 CompanyPreferences.php:494 #: CompanyPreferences.php:505 CompanyPreferences.php:509 #: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:576 #: Customers.php:920 Customers.php:933 Customers.php:936 #: DeliveryDetails.php:1080 DeliveryDetails.php:1119 DeliveryDetails.php:1122 -#: GLTransInquiry.php:86 MRP.php:527 MRP.php:531 MRP.php:535 MRP.php:539 -#: MRPCalendar.php:226 PDFChequeListing.php:62 PDFDIFOT.php:74 -#: PDFDeliveryDifferences.php:74 PO_AuthorisationLevels.php:136 -#: PO_AuthorisationLevels.php:141 PO_Header.php:776 PO_PDFPurchOrder.php:383 -#: PO_PDFPurchOrder.php:386 PaymentMethods.php:197 PaymentMethods.php:198 +#: GLTransInquiry.php:86 MRPCalendar.php:226 MRP.php:527 MRP.php:531 +#: MRP.php:535 MRP.php:539 PaymentMethods.php:197 PaymentMethods.php:198 #: PaymentMethods.php:199 PaymentMethods.php:263 PaymentMethods.php:269 -#: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PurchData.php:192 -#: PurchData.php:515 PurchData.php:518 RecurringSalesOrders.php:481 -#: RecurringSalesOrders.php:484 SalesAnalReptCols.php:282 -#: SalesAnalReptCols.php:420 SalesAnalReptCols.php:423 SalesAnalRepts.php:414 -#: SalesAnalRepts.php:417 SalesAnalRepts.php:442 SalesAnalRepts.php:445 -#: SalesAnalRepts.php:470 SalesAnalRepts.php:473 SalesPeople.php:221 -#: SalesPeople.php:359 SalesPeople.php:361 SelectProduct.php:383 -#: ShipmentCosting.php:664 Stocks.php:1008 Stocks.php:1010 Stocks.php:1033 -#: Stocks.php:1035 SuppContractChgs.php:92 SystemParameters.php:390 -#: SystemParameters.php:413 SystemParameters.php:429 SystemParameters.php:492 -#: SystemParameters.php:500 SystemParameters.php:540 SystemParameters.php:613 -#: SystemParameters.php:622 SystemParameters.php:630 SystemParameters.php:648 -#: SystemParameters.php:655 SystemParameters.php:782 SystemParameters.php:915 -#: SystemParameters.php:919 SystemParameters.php:927 SystemParameters.php:931 -#: SystemParameters.php:985 SystemParameters.php:995 SystemParameters.php:999 -#: TaxGroups.php:308 TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 -#: WWW_Users.php:635 includes/PDFLowGPPageHeader.inc:44 -#: includes/PDFTaxPageHeader.inc:35 +#: PaymentMethods.php:276 PcAuthorizeExpenses.php:242 PDFChequeListing.php:62 +#: PDFDeliveryDifferences.php:74 PDFDIFOT.php:74 +#: PO_AuthorisationLevels.php:136 PO_AuthorisationLevels.php:141 +#: PO_Header.php:776 PO_PDFPurchOrder.php:383 PO_PDFPurchOrder.php:386 +#: PurchData.php:192 PurchData.php:515 PurchData.php:518 +#: RecurringSalesOrders.php:481 RecurringSalesOrders.php:484 +#: SalesAnalReptCols.php:282 SalesAnalReptCols.php:420 +#: SalesAnalReptCols.php:423 SalesAnalRepts.php:414 SalesAnalRepts.php:417 +#: SalesAnalRepts.php:442 SalesAnalRepts.php:445 SalesAnalRepts.php:470 +#: SalesAnalRepts.php:473 SalesPeople.php:221 SalesPeople.php:359 +#: SalesPeople.php:361 SelectProduct.php:383 ShipmentCosting.php:664 +#: Stocks.php:1010 Stocks.php:1012 Stocks.php:1035 Stocks.php:1037 +#: SuppContractChgs.php:92 SystemParameters.php:390 SystemParameters.php:413 +#: SystemParameters.php:429 SystemParameters.php:492 SystemParameters.php:500 +#: SystemParameters.php:540 SystemParameters.php:613 SystemParameters.php:622 +#: SystemParameters.php:630 SystemParameters.php:648 SystemParameters.php:655 +#: SystemParameters.php:782 SystemParameters.php:915 SystemParameters.php:919 +#: SystemParameters.php:927 SystemParameters.php:931 SystemParameters.php:985 +#: SystemParameters.php:995 SystemParameters.php:999 TaxGroups.php:308 +#: TaxGroups.php:311 TaxGroups.php:368 WWW_Users.php:631 WWW_Users.php:635 +#: includes/PDFLowGPPageHeader.inc:44 includes/PDFTaxPageHeader.inc:35 msgid "No" msgstr "Ne" #: AccountGroups.php:262 AccountSections.php:196 AddCustomerContacts.php:149 #: AddCustomerNotes.php:141 AddCustomerTypeNotes.php:128 Areas.php:164 -#: BOMs.php:149 BankAccounts.php:223 COGSGLPostings.php:108 +#: BankAccounts.php:223 BOMs.php:149 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 -#: CustomerBranches.php:414 CustomerTypes.php:202 Customers.php:1011 -#: Customers.php:1045 EDIMessageFormat.php:150 Factors.php:329 +#: CustomerBranches.php:414 Customers.php:1011 Customers.php:1045 +#: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:329 #: FixedAssetCategories.php:186 FixedAssetLocations.php:107 -#: FreightCosts.php:240 GLAccounts.php:312 GLTags.php:91 GeocodeSetup.php:173 -#: Labels.php:411 Locations.php:382 MRPDemandTypes.php:120 MRPDemands.php:306 -#: PO_AuthorisationLevels.php:151 PaymentMethods.php:200 PaymentTerms.php:205 -#: PcAssignCashToTab.php:259 PcClaimExpensesFromTab.php:252 PcExpenses.php:223 -#: PcTabs.php:234 PcTypeTabs.php:172 Prices.php:251 Prices_Customer.php:277 -#: PurchData.php:204 SalesCategories.php:255 SalesGLPostings.php:132 -#: SalesGLPostings.php:245 SalesPeople.php:232 SalesTypes.php:206 -#: SecurityTokens.php:128 SelectCustomer.php:612 SelectCustomer.php:630 -#: SelectCustomer.php:654 SelectCustomer.php:671 SelectCustomer.php:695 -#: SelectCustomer.php:712 Shippers.php:144 StockCategories.php:242 -#: SuppTransGLAnalysis.php:120 SupplierContacts.php:163 SupplierTypes.php:189 -#: TaxAuthorities.php:174 TaxCategories.php:182 TaxGroups.php:188 -#: TaxProvinces.php:180 UnitsOfMeasure.php:185 WWW_Access.php:123 -#: WWW_Users.php:318 WorkCentres.php:141 includes/InputSerialItems.php:88 -#: includes/OutputSerialItems.php:20 +#: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:91 +#: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:120 +#: PaymentMethods.php:200 PaymentTerms.php:205 PcAssignCashToTab.php:259 +#: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:234 +#: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:277 +#: Prices.php:251 PurchData.php:204 SalesCategories.php:255 +#: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232 +#: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:612 +#: SelectCustomer.php:630 SelectCustomer.php:654 SelectCustomer.php:671 +#: SelectCustomer.php:695 SelectCustomer.php:712 Shippers.php:144 +#: StockCategories.php:242 SupplierContacts.php:163 SupplierTypes.php:189 +#: SuppTransGLAnalysis.php:120 TaxAuthorities.php:174 TaxCategories.php:182 +#: TaxGroups.php:188 TaxProvinces.php:180 UnitsOfMeasure.php:185 +#: WorkCentres.php:141 WWW_Access.php:123 WWW_Users.php:318 +#: includes/InputSerialItems.php:88 includes/OutputSerialItems.php:20 #, php-format msgid "Edit" msgstr "Upravit" @@ -366,32 +367,33 @@ #: AccountGroups.php:263 AccountSections.php:200 AddCustomerContacts.php:150 #: AddCustomerNotes.php:142 AddCustomerTypeNotes.php:129 Areas.php:165 -#: BOMs.php:151 BankAccounts.php:224 COGSGLPostings.php:109 +#: BankAccounts.php:224 BOMs.php:151 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 -#: CounterSales.php:812 CreditStatus.php:175 Credit_Invoice.php:381 -#: Currencies.php:275 CustomerReceipt.php:913 CustomerTypes.php:203 -#: Customers.php:1046 DiscountCategories.php:219 DiscountMatrix.php:182 +#: CounterSales.php:813 Credit_Invoice.php:381 CreditStatus.php:175 +#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1046 +#: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:182 #: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 -#: GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 GeocodeSetup.php:174 -#: Labels.php:411 Locations.php:383 MRPDemandTypes.php:121 MRPDemands.php:307 -#: PO_AuthorisationLevels.php:153 PO_Items.php:711 PaymentMethods.php:201 -#: PaymentTerms.php:206 Payments.php:1057 PcAssignCashToTab.php:263 -#: PcClaimExpensesFromTab.php:253 PcExpenses.php:224 PcExpensesTypeTab.php:185 -#: PcTabs.php:235 PcTypeTabs.php:173 Prices.php:252 Prices_Customer.php:278 -#: PurchData.php:205 SalesAnalReptCols.php:299 SalesAnalRepts.php:303 -#: SalesCategories.php:256 SalesGLPostings.php:133 SalesGLPostings.php:246 -#: SalesPeople.php:233 SalesTypes.php:207 SecurityTokens.php:129 -#: SelectCreditItems.php:764 SelectCustomer.php:613 SelectCustomer.php:631 -#: SelectCustomer.php:655 SelectCustomer.php:672 SelectCustomer.php:696 -#: SelectCustomer.php:713 SelectOrderItems.php:1387 Shipments.php:429 -#: Shippers.php:145 SpecialOrder.php:655 StockCategories.php:243 -#: StockCategories.php:554 SuppContractChgs.php:99 SuppCreditGRNs.php:102 -#: SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 SuppShiptChgs.php:90 -#: SuppTransGLAnalysis.php:121 SupplierContacts.php:164 SupplierTypes.php:191 -#: TaxAuthorities.php:175 TaxCategories.php:183 TaxGroups.php:189 -#: TaxProvinces.php:181 UnitsOfMeasure.php:186 WOSerialNos.php:319 -#: WWW_Access.php:124 WWW_Users.php:319 WorkCentres.php:142 -#: includes/InputSerialItemsKeyed.php:59 includes/OutputSerialItems.php:99 +#: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 +#: Labels.php:411 Locations.php:383 MRPDemands.php:307 MRPDemandTypes.php:121 +#: PaymentMethods.php:201 Payments.php:1069 PaymentTerms.php:206 +#: PcAssignCashToTab.php:263 PcClaimExpensesFromTab.php:253 PcExpenses.php:224 +#: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 +#: PO_AuthorisationLevels.php:153 PO_Items.php:711 Prices_Customer.php:278 +#: Prices.php:252 PurchData.php:205 SalesAnalReptCols.php:299 +#: SalesAnalRepts.php:303 SalesCategories.php:256 SalesGLPostings.php:133 +#: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207 +#: SecurityTokens.php:129 SelectCreditItems.php:764 SelectCustomer.php:613 +#: SelectCustomer.php:631 SelectCustomer.php:655 SelectCustomer.php:672 +#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1387 +#: Shipments.php:429 Shippers.php:145 SpecialOrder.php:655 +#: StockCategories.php:243 StockCategories.php:554 SuppContractChgs.php:99 +#: SuppCreditGRNs.php:102 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 +#: SupplierContacts.php:164 SupplierTypes.php:191 SuppShiptChgs.php:90 +#: SuppTransGLAnalysis.php:121 TaxAuthorities.php:175 TaxCategories.php:183 +#: TaxGroups.php:189 TaxProvinces.php:181 UnitsOfMeasure.php:186 +#: WorkCentres.php:142 WOSerialNos.php:319 WWW_Access.php:124 +#: WWW_Users.php:319 includes/InputSerialItemsKeyed.php:58 +#: includes/OutputSerialItems.php:99 #, php-format msgid "Delete" msgstr "Smazat" @@ -435,19 +437,19 @@ #: AccountGroups.php:397 AccountSections.php:264 AddCustomerContacts.php:258 #: AddCustomerNotes.php:245 AddCustomerTypeNotes.php:210 Areas.php:227 -#: BOMs.php:759 BankAccounts.php:391 COGSGLPostings.php:354 +#: BankAccounts.php:391 BOMs.php:759 COGSGLPostings.php:354 #: CreditStatus.php:257 Currencies.php:401 CustLoginSetup.php:272 #: DiscountMatrix.php:141 EDIMessageFormat.php:248 #: FixedAssetCategories.php:344 FixedAssetLocations.php:156 -#: FreightCosts.php:339 GLAccounts.php:262 GeocodeSetup.php:270 -#: Locations.php:597 MRPDemandTypes.php:187 MRPDemands.php:419 -#: OffersReceived.php:56 OffersReceived.php:143 PO_AuthorisationLevels.php:248 -#: PaymentMethods.php:282 PaymentTerms.php:309 Prices_Customer.php:354 +#: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 +#: Locations.php:597 MRPDemands.php:419 MRPDemandTypes.php:187 +#: OffersReceived.php:56 OffersReceived.php:143 PaymentMethods.php:282 +#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:354 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 #: SalesPeople.php:368 Shippers.php:200 StockCategories.php:581 -#: SuppLoginSetup.php:293 SupplierContacts.php:281 TaxAuthorities.php:327 +#: SupplierContacts.php:281 SuppLoginSetup.php:293 TaxAuthorities.php:327 #: TaxCategories.php:237 TaxProvinces.php:235 UnitsOfMeasure.php:240 -#: WWW_Users.php:674 WorkCentres.php:279 +#: WorkCentres.php:279 WWW_Users.php:674 msgid "Enter Information" msgstr "Vložit informace" @@ -557,10 +559,10 @@ #: AddCustomerContacts.php:61 AddCustomerNotes.php:52 #: AddCustomerTypeNotes.php:49 Areas.php:73 CustomerTypes.php:69 #: DeliveryDetails.php:774 Factors.php:105 FixedAssetItems.php:246 -#: MRPCalendar.php:176 PO_Items.php:374 PcAssignCashToTab.php:88 -#: PcClaimExpensesFromTab.php:79 PcExpenses.php:95 PcTabs.php:102 -#: PcTypeTabs.php:60 SalesAnalReptCols.php:129 SalesPeople.php:97 -#: SalesTypes.php:66 Stocks.php:497 SupplierTypes.php:67 Suppliers.php:513 +#: MRPCalendar.php:176 PcAssignCashToTab.php:88 PcClaimExpensesFromTab.php:79 +#: PcExpenses.php:95 PcTabs.php:102 PcTypeTabs.php:60 PO_Items.php:374 +#: SalesAnalReptCols.php:129 SalesPeople.php:97 SalesTypes.php:66 +#: Stocks.php:497 Suppliers.php:513 SupplierTypes.php:67 msgid "has been updated" msgstr "byla aktualizována" @@ -575,7 +577,7 @@ #: AddCustomerContacts.php:128 CompanyPreferences.php:223 #: CustomerBranches.php:368 Customers.php:998 Customers.php:1006 #: SalesPeople.php:200 SelectCustomer.php:607 StockDispatch.php:187 -#: StockDispatch.php:199 SuppTransGLAnalysis.php:105 SupplierContacts.php:150 +#: StockDispatch.php:199 SupplierContacts.php:150 SuppTransGLAnalysis.php:105 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 #: includes/PDFTaxPageHeader.inc:37 msgid "Name" @@ -680,15 +682,15 @@ #: CustomerAllocations.php:363 CustomerInquiry.php:196 #: CustomerTransInquiry.php:100 GLAccountInquiry.php:152 #: GLAccountReport.php:338 GLTransInquiry.php:42 MRPCalendar.php:219 -#: PDFRemittanceAdvice.php:300 PaymentAllocations.php:66 -#: PcAssignCashToTab.php:220 PcAuthorizeExpenses.php:88 PrintCustTrans.php:822 -#: PrintCustTransPortrait.php:867 ReverseGRN.php:386 ShipmentCosting.php:534 -#: ShipmentCosting.php:611 Shipments.php:476 StockDispatch.php:189 -#: StockDispatch.php:201 StockLocMovements.php:90 StockMovements.php:94 -#: StockSerialItemResearch.php:81 SupplierAllocations.php:455 -#: SupplierAllocations.php:568 SupplierAllocations.php:643 -#: SupplierInquiry.php:209 SupplierTransInquiry.php:103 -#: includes/PDFQuotationPageHeader.inc:92 +#: PaymentAllocations.php:66 PcAssignCashToTab.php:220 +#: PcAuthorizeExpenses.php:88 PDFRemittanceAdvice.php:300 +#: PrintCustTrans.php:822 PrintCustTransPortrait.php:867 ReverseGRN.php:386 +#: ShipmentCosting.php:534 ShipmentCosting.php:611 Shipments.php:476 +#: StockDispatch.php:189 StockDispatch.php:201 StockLocMovements.php:90 +#: StockMovements.php:94 StockSerialItemResearch.php:81 +#: SupplierAllocations.php:455 SupplierAllocations.php:568 +#: SupplierAllocations.php:643 SupplierInquiry.php:209 +#: SupplierTransInquiry.php:103 includes/PDFQuotationPageHeader.inc:92 #: includes/PDFQuotationPortraitPageHeader.inc:90 #: includes/PDFStatementPageHeader.inc:169 includes/PDFTaxPageHeader.inc:36 #: includes/PDFTransPageHeader.inc:48 @@ -697,9 +699,9 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1017 UpgradeDatabase.php:172 UpgradeDatabase.php:175 -#: UpgradeDatabase.php:178 UpgradeDatabase.php:181 UpgradeDatabase.php:184 -#: UpgradeDatabase.php:187 UpgradeDatabase.php:190 UpgradeDatabase.php:193 +#: Stocks.php:1019 UpgradeDatabase.php:174 UpgradeDatabase.php:177 +#: UpgradeDatabase.php:180 UpgradeDatabase.php:183 UpgradeDatabase.php:186 +#: UpgradeDatabase.php:189 UpgradeDatabase.php:192 UpgradeDatabase.php:195 #: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 #: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 #: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 @@ -796,22 +798,22 @@ #: BOMIndentedReverse.php:140 BOMListing.php:41 BOMListing.php:52 #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:100 #: GLBalanceSheet.php:139 GLProfit_Loss.php:177 GLTagProfit_Loss.php:191 -#: GLTrialBalance.php:165 InventoryPlanning.php:98 InventoryPlanning.php:173 +#: GLTrialBalance.php:159 InventoryPlanning.php:98 InventoryPlanning.php:173 #: InventoryPlanning.php:208 InventoryPlanning.php:256 #: InventoryPlanning.php:294 InventoryPlanningPrefSupplier.php:201 #: InventoryPlanningPrefSupplier.php:269 InventoryPlanningPrefSupplier.php:303 #: InventoryPlanningPrefSupplier.php:348 InventoryPlanningPrefSupplier.php:394 #: InventoryQuantities.php:84 InventoryValuation.php:78 -#: MRPPlannedPurchaseOrders.php:114 MRPPlannedWorkOrders.php:106 -#: MRPReport.php:147 MRPReport.php:508 MRPReschedules.php:45 -#: MRPReschedules.php:57 MRPShortages.php:155 MRPShortages.php:167 -#: MailInventoryValuation.php:114 OutstandingGRNs.php:53 -#: OutstandingGRNs.php:65 PDFCustomerList.php:18 PDFCustomerList.php:230 -#: PDFCustomerList.php:242 PDFLowGP.php:20 PDFStockCheckComparison.php:33 +#: MailInventoryValuation.php:114 MRPPlannedPurchaseOrders.php:114 +#: MRPPlannedWorkOrders.php:106 MRPReport.php:147 MRPReport.php:508 +#: MRPReschedules.php:45 MRPReschedules.php:57 MRPShortages.php:155 +#: MRPShortages.php:167 OutstandingGRNs.php:53 OutstandingGRNs.php:65 +#: PDFCustomerList.php:18 PDFCustomerList.php:230 PDFCustomerList.php:242 +#: PDFLowGP.php:20 PDFStockCheckComparison.php:33 #: PDFStockCheckComparison.php:59 PDFStockCheckComparison.php:264 #: ReorderLevel.php:60 SelectAsset.php:37 SelectProduct.php:39 -#: StockCheck.php:66 StockCheck.php:140 SuppPriceList.php:130 -#: SupplierTenders.php:326 includes/PDFPaymentRun_PymtFooter.php:149 +#: StockCheck.php:66 StockCheck.php:140 SupplierTenders.php:326 +#: SuppPriceList.php:130 includes/PDFPaymentRun_PymtFooter.php:152 msgid "Problem Report" msgstr "Problém" @@ -825,10 +827,10 @@ #: BOMExtendedQty.php:248 BOMIndented.php:153 BOMIndented.php:234 #: BOMIndentedReverse.php:144 BOMIndentedReverse.php:221 BOMListing.php:44 #: Credit_Invoice.php:184 DebtorsAtPeriodEnd.php:60 DebtorsAtPeriodEnd.php:72 -#: FTP_RadioBeacon.php:187 GLBalanceSheet.php:104 GLBalanceSheet.php:142 -#: GLBalanceSheet.php:305 GLProfit_Loss.php:180 GLProfit_Loss.php:192 -#: GLTagProfit_Loss.php:195 GLTagProfit_Loss.php:208 GLTrialBalance.php:168 -#: GLTrialBalance.php:180 GetStockImage.php:150 InventoryPlanning.php:101 +#: FTP_RadioBeacon.php:187 GetStockImage.php:150 GLBalanceSheet.php:104 +#: GLBalanceSheet.php:142 GLBalanceSheet.php:305 GLProfit_Loss.php:180 +#: GLProfit_Loss.php:192 GLTagProfit_Loss.php:195 GLTagProfit_Loss.php:208 +#: GLTrialBalance.php:162 GLTrialBalance.php:174 InventoryPlanning.php:101 #: InventoryPlanning.php:176 InventoryPlanning.php:211 #: InventoryPlanning.php:259 InventoryPlanning.php:297 #: InventoryPlanning.php:360 InventoryPlanningPrefSupplier.php:204 @@ -836,34 +838,35 @@ #: InventoryPlanningPrefSupplier.php:351 InventoryPlanningPrefSupplier.php:397 #: InventoryPlanningPrefSupplier.php:453 InventoryQuantities.php:87 #: InventoryQuantities.php:98 InventoryValuation.php:81 -#: InventoryValuation.php:92 MRPPlannedPurchaseOrders.php:117 +#: InventoryValuation.php:92 MailInventoryValuation.php:117 +#: MailInventoryValuation.php:213 MRPPlannedPurchaseOrders.php:117 #: MRPPlannedPurchaseOrders.php:128 MRPPlannedWorkOrders.php:109 #: MRPPlannedWorkOrders.php:120 MRPPlannedWorkOrders.php:308 MRPReport.php:39 #: MRPReport.php:50 MRPReport.php:150 MRPReschedules.php:48 #: MRPReschedules.php:60 MRPShortages.php:158 MRPShortages.php:170 -#: MailInventoryValuation.php:117 MailInventoryValuation.php:213 #: OutstandingGRNs.php:56 OutstandingGRNs.php:68 PDFCustomerList.php:233 #: PDFCustomerList.php:245 PDFGrn.php:123 PDFLowGP.php:59 PDFLowGP.php:71 #: PDFPriceList.php:128 PDFQuotation.php:270 PDFQuotationPortrait.php:268 #: PDFRemittanceAdvice.php:83 PDFStockCheckComparison.php:37 #: PDFStockCheckComparison.php:63 PDFStockCheckComparison.php:268 -#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:152 PrintCustOrder.php:220 -#: PrintCustOrder_generic.php:243 ReorderLevel.php:63 ReorderLevel.php:152 -#: SalesAnalysis_UserDefined.php:28 SelectCreditItems.php:30 StockCheck.php:47 -#: StockCheck.php:69 StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 -#: StockCheck.php:195 StockDispatch.php:93 StockDispatch.php:106 -#: SuppPaymentRun.php:112 SuppPaymentRun.php:122 SuppPaymentRun.php:186 -#: SuppPaymentRun.php:216 SuppPriceList.php:134 SupplierBalsAtPeriodEnd.php:54 -#: SupplierBalsAtPeriodEnd.php:65 Tax.php:63 Tax.php:168 Tax.php:277 +#: PO_PDFPurchOrder.php:31 PO_PDFPurchOrder.php:152 +#: PrintCustOrder_generic.php:243 PrintCustOrder.php:220 ReorderLevel.php:63 +#: ReorderLevel.php:152 SalesAnalysis_UserDefined.php:28 +#: SelectCreditItems.php:30 StockCheck.php:47 StockCheck.php:69 +#: StockCheck.php:100 StockCheck.php:143 StockCheck.php:154 StockCheck.php:195 +#: StockDispatch.php:93 StockDispatch.php:106 SupplierBalsAtPeriodEnd.php:54 +#: SupplierBalsAtPeriodEnd.php:65 SuppPaymentRun.php:112 +#: SuppPaymentRun.php:122 SuppPaymentRun.php:186 SuppPaymentRun.php:217 +#: SuppPriceList.php:134 Tax.php:63 Tax.php:168 Tax.php:277 #: Z_DataExport.php:72 Z_DataExport.php:168 Z_DataExport.php:259 #: Z_DataExport.php:308 Z_DataExport.php:347 Z_DataExport.php:383 #: Z_DataExport.php:419 Z_DataExport.php:471 Z_poRebuildDefault.php:38 -#: includes/PDFPaymentRun_PymtFooter.php:57 -#: includes/PDFPaymentRun_PymtFooter.php:87 -#: includes/PDFPaymentRun_PymtFooter.php:116 -#: includes/PDFPaymentRun_PymtFooter.php:152 -#: includes/PDFPaymentRun_PymtFooter.php:183 -#: includes/PDFPaymentRun_PymtFooter.php:215 +#: includes/PDFPaymentRun_PymtFooter.php:59 +#: includes/PDFPaymentRun_PymtFooter.php:89 +#: includes/PDFPaymentRun_PymtFooter.php:119 +#: includes/PDFPaymentRun_PymtFooter.php:156 +#: includes/PDFPaymentRun_PymtFooter.php:187 +#: includes/PDFPaymentRun_PymtFooter.php:218 #: includes/ConstructSQLForUserDefinedSalesReport.inc:180 #: includes/ConstructSQLForUserDefinedSalesReport.inc:188 #: includes/ConstructSQLForUserDefinedSalesReport.inc:340 @@ -883,31 +886,30 @@ msgstr "se nepodařilo získat, protože" #: AgedDebtors.php:374 AgedSuppliers.php:201 Areas.php:95 -#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:960 -#: ConfirmDispatch_Invoice.php:974 Contracts.php:580 CounterSales.php:1353 -#: CounterSales.php:1367 Credit_Invoice.php:697 Credit_Invoice.php:718 -#: CustomerReceipt.php:537 CustomerReceipt.php:676 CustomerReceipt.php:704 +#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:959 +#: ConfirmDispatch_Invoice.php:973 Contracts.php:580 CounterSales.php:1354 +#: CounterSales.php:1368 Credit_Invoice.php:697 Credit_Invoice.php:718 +#: CustomerReceipt.php:542 CustomerReceipt.php:681 CustomerReceipt.php:709 #: CustomerTransInquiry.php:91 DeliveryDetails.php:396 GLProfit_Loss.php:596 -#: GLTagProfit_Loss.php:511 PDFRemittanceAdvice.php:85 Payments.php:325 +#: GLTagProfit_Loss.php:511 Payments.php:334 PDFRemittanceAdvice.php:85 #: PurchData.php:86 PurchData.php:104 PurchData.php:245 #: RecurringSalesOrders.php:256 ReverseGRN.php:191 ReverseGRN.php:205 #: ReverseGRN.php:374 SelectCreditItems.php:1408 SelectSalesOrder.php:189 #: SelectSalesOrder.php:353 StockCheck.php:223 StockCostUpdate.php:77 #: StockCostUpdate.php:87 StockLocStatus.php:153 StockMovements.php:87 #: StockQuantityByDate.php:95 StockReorderLevel.php:40 StockStatus.php:265 -#: StockTransfers.php:191 StockUsage.php:139 StockUsageGraph.php:53 -#: SuppPaymentRun.php:114 SuppPaymentRun.php:188 SuppPaymentRun.php:218 +#: StockTransfers.php:191 StockUsageGraph.php:53 StockUsage.php:139 #: SupplierInquiry.php:78 SupplierInquiry.php:100 SupplierInquiry.php:136 -#: SupplierInquiry.php:190 SupplierTransInquiry.php:95 WOSerialNos.php:47 -#: WorkOrderCosting.php:418 WorkOrderReceive.php:273 -#: Z_ChangeBranchCode.php:105 Z_ChangeCustomerCode.php:91 -#: Z_DeleteCreditNote.php:58 Z_DeleteInvoice.php:87 -#: includes/PDFPaymentRun_PymtFooter.php:59 -#: includes/PDFPaymentRun_PymtFooter.php:89 -#: includes/PDFPaymentRun_PymtFooter.php:118 -#: includes/PDFPaymentRun_PymtFooter.php:154 -#: includes/PDFPaymentRun_PymtFooter.php:185 includes/ConnectDB_mysql.inc:67 -#: includes/ConnectDB_mysqli.inc:81 +#: SupplierInquiry.php:190 SupplierTransInquiry.php:95 SuppPaymentRun.php:114 +#: SuppPaymentRun.php:188 SuppPaymentRun.php:219 WorkOrderCosting.php:418 +#: WorkOrderReceive.php:273 WOSerialNos.php:47 Z_ChangeBranchCode.php:105 +#: Z_ChangeCustomerCode.php:91 Z_DeleteCreditNote.php:58 +#: Z_DeleteInvoice.php:87 includes/PDFPaymentRun_PymtFooter.php:61 +#: includes/PDFPaymentRun_PymtFooter.php:91 +#: includes/PDFPaymentRun_PymtFooter.php:121 +#: includes/PDFPaymentRun_PymtFooter.php:158 +#: includes/PDFPaymentRun_PymtFooter.php:189 includes/ConnectDB_mysqli.inc:81 +#: includes/ConnectDB_mysql.inc:67 msgid "The SQL that failed was" msgstr "SQL příkaz, který selhal, byl" @@ -980,7 +982,7 @@ #: PDFPriceList.php:307 PDFRemittanceAdvice.php:170 #: PDFStockCheckComparison.php:358 PrintCustTrans.php:540 #: PrintCustTransPortrait.php:578 ReorderLevel.php:228 StockDispatch.php:327 -#: SuppPriceList.php:246 SupplierBalsAtPeriodEnd.php:159 Tax.php:351 +#: SupplierBalsAtPeriodEnd.php:159 SuppPriceList.php:246 Tax.php:351 msgid "Print PDF" msgstr "Tisknout PDF" @@ -1013,12 +1015,12 @@ msgstr "Dodavatel ve věku analýza" #: AgedSuppliers.php:288 OutstandingGRNs.php:168 PDFRemittanceAdvice.php:149 -#: SuppPaymentRun.php:263 SupplierBalsAtPeriodEnd.php:131 +#: SupplierBalsAtPeriodEnd.php:131 SuppPaymentRun.php:264 msgid "From Supplier Code" msgstr "Od kódu dodavatele" #: AgedSuppliers.php:292 OutstandingGRNs.php:172 PDFRemittanceAdvice.php:153 -#: SuppPaymentRun.php:267 SupplierBalsAtPeriodEnd.php:135 +#: SupplierBalsAtPeriodEnd.php:135 SuppPaymentRun.php:268 msgid "To Supplier Code" msgstr "Do kódu dodavatele" @@ -1107,8 +1109,8 @@ #: MRPDemands.php:248 PcAssignCashToTab.php:135 PcClaimExpensesFromTab.php:126 #: PcExpenses.php:166 PcExpensesTypeTab.php:101 PcTabs.php:166 #: PcTypeTabs.php:135 SalesAnalReptCols.php:215 SalesCategories.php:135 -#: SalesTypes.php:156 StockCategories.php:198 SupplierTypes.php:151 -#: Suppliers.php:638 Z_DeleteInvoice.php:146 +#: SalesTypes.php:156 StockCategories.php:198 Suppliers.php:638 +#: SupplierTypes.php:151 Z_DeleteInvoice.php:146 msgid "has been deleted" msgstr "byl zrušen" @@ -1154,13 +1156,13 @@ msgstr "ID uživatele" #: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 -#: CounterSales.php:2141 CounterSales.php:2144 CustomerTransInquiry.php:31 +#: CounterSales.php:2146 CounterSales.php:2149 CustomerTransInquiry.php:31 #: DailySalesInquiry.php:47 DailySalesInquiry.php:49 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 #: MRPReport.php:523 MRPReport.php:525 MRPReschedules.php:144 #: PDFPeriodStockTransListing.php:59 PDFPriceList.php:198 -#: PDFPrintLabel.php:250 POReport.php:1567 PO_Items.php:1023 +#: PDFPrintLabel.php:250 PO_Items.php:1023 POReport.php:1567 #: ReorderLevel.php:181 ReorderLevel.php:183 ReorderLevel.php:213 #: ReorderLevel.php:215 SalesGraph.php:97 SalesGraph.php:99 SalesGraph.php:119 #: SalesGraph.php:121 SalesGraph.php:143 SalesGraph.php:145 SalesGraph.php:179 @@ -1200,9 +1202,9 @@ msgstr "Uživatel" #: AuditTrail.php:165 BankReconciliation.php:210 BankReconciliation.php:285 -#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 CustomerAllocations.php:361 -#: CustomerInquiry.php:194 CustomerTransInquiry.php:20 -#: CustomerTransInquiry.php:98 DailyBankTransactions.php:112 +#: CustomerAllocations.php:361 CustomerInquiry.php:194 +#: CustomerTransInquiry.php:20 CustomerTransInquiry.php:98 +#: CustWhereAlloc.php:18 CustWhereAlloc.php:105 DailyBankTransactions.php:112 #: GLAccountInquiry.php:150 GLAccountReport.php:336 GLJournal.php:262 #: MRPReschedules.php:191 SalesByTypePeriodInquiry.php:334 #: SelectCustomer.php:416 ShipmentCosting.php:532 ShipmentCosting.php:609 @@ -1230,13 +1232,660 @@ msgid "Value" msgstr "Hodnota" +#: BackupDatabase.php:7 +#, fuzzy +msgid "Backup webERP Database" +msgstr "Upgrade webERP databáze" + +#: BackupDatabase.php:20 +#, fuzzy +msgid "Deleted" +msgstr "Smazat" + +#: BackupDatabase.php:23 +#, fuzzy +msgid "Unable to delete" +msgstr "Nelze najít Reklamní kodex" + +#: BackupDatabase.php:28 +#, fuzzy +msgid "All backup files on the server have been deleted" +msgstr "Prodej vysílání záznam byl odstraněn" + +#: BackupDatabase.php:30 +#, fuzzy +msgid "No backup files on the server were deleted" +msgstr "Nahrát soubor na server" + +#: BackupDatabase.php:34 +msgid "Backup" +msgstr "Zálohovat" + +#: BackupDatabase.php:43 +msgid "" +"The backup file has now been created. You must now download this to your " +"computer because in case the web-server has a disk failure the backup would " +"then not on the same machine. Use the link below" +msgstr "" + +#: BackupDatabase.php:43 +msgid "Download the backup file to your locale machine" +msgstr "" + +#: BackupDatabase.php:44 +msgid "" +"Once you have downloaded the database backup file to your local machine you " +"should use the link below to delete it - backup files can consume a lot of " +"space on your hosting account and will accumulate if not deleted - they also " +"contain sensitive information which would otherwise be available for others " +"to download!" +msgstr "" + +#: BackupDatabase.php:47 +#, fuzzy +msgid "Delete the backup file off the server" +msgstr "Nahrát soubor na server" + +#: BackupDatabase.php:49 +msgid "" +"There was some problem producing a backup using mysqldump. Normally this " +"relates to a permissions issue - the web-server user must have permission to " +"write to the companies directory" +msgstr "" + +#: BankAccounts.php:7 +msgid "Bank Accounts Maintenance" +msgstr "Bankovní účty Údržba" + +#: BankAccounts.php:11 TaxAuthorities.php:150 +msgid "Bank" +msgstr "Banka" + +#: BankAccounts.php:12 +#, fuzzy +msgid "" +"Update Bank Account details. Account Code is for SWIFT or BSB type Bank " +"Codes. Set Default for Invoices to \"Currency Default\" of \"Fallback " +"Default\" to print Account details on Invoices (only one account should be " +"set to \"Fall Back Default\")." +msgstr "" +"Aktualizace Bankovní účet podrobnosti. Kód je účet pro SWIFT nebo BSB typ " +"kód banky. Nastavit výchozí pro faktury \\" + +#: BankAccounts.php:44 +msgid "The bank account code already exists in the database" +msgstr "Na bankovní účet, kód již existuje v databázi" + +#: BankAccounts.php:50 +msgid "The bank account name must be fifty characters or less long" +msgstr "Na bankovní účet, název musí být padesát znaků dlouhé" + +#: BankAccounts.php:56 +msgid "The bank account name may not be empty." +msgstr "Na bankovní účet, jméno nesmí být prázdné." + +#: BankAccounts.php:62 +msgid "The bank account number may not be empty." +msgstr "Číslo bankovního účtu nesmí být prázdný." + +#: BankAccounts.php:68 +msgid "The bank account number must be fifty characters or less long" +msgstr "Číslo bankovního účtu musí být padesát znaků dlouhé" + +#: BankAccounts.php:74 +msgid "The bank address must be fifty characters or less long" +msgstr "Adresa banky je padesát znaků dlouhé" + +#: BankAccounts.php:92 +msgid "" +"Note that it is not possible to change the currency of the account once " +"there are transactions against it" +msgstr "Všimněte si, že není možné změnit měnu účtu, jakmile je operace proti" + +#: BankAccounts.php:104 +msgid "The bank account details have been updated" +msgstr "Údaje o bankovním účtu byly aktualizovány" + +#: BankAccounts.php:123 +msgid "The new bank account has been entered" +msgstr "Nový bankovní účet bylo zapsáno" + +#: BankAccounts.php:128 +msgid "The bank account could not be inserted or modified because" +msgstr "Na bankovní účet, nelze vložit či pozměnit, protože" + +#: BankAccounts.php:129 +msgid "The SQL used to insert/modify the bank account details was" +msgstr "SQL používá vložit / upravit údaje o bankovním účtu bylo" + +#: BankAccounts.php:157 +msgid "" +"Cannot delete this bank account because transactions have been created using " +"this account" +msgstr "" +"Nelze smazat tento bankovní účet, protože transakce byly vytvořeny pomocí " +"tohoto účtu" + +#: BankAccounts.php:158 +msgid "transactions with this bank account code" +msgstr "transakce s tímto kódem bankovní účet" + +#: BankAccounts.php:164 +msgid "Bank account deleted" +msgstr "Bankovní účet smazán" + +#: BankAccounts.php:184 +msgid "The bank accounts set up could not be retrieved because" +msgstr "Bankovní účty zřízené se nepodařilo získat, protože" + +#: BankAccounts.php:185 +msgid "The SQL used to retrieve the bank account details was" +msgstr "SQL používá k načtení údaje o bankovním účtu bylo" + +#: BankAccounts.php:191 GLJournal.php:291 +msgid "GL Account Code" +msgstr "GL kódu účtu" + +#: BankAccounts.php:192 BankAccounts.php:326 +msgid "Bank Account Name" +msgstr "Název bankovního účtu" + +#: BankAccounts.php:193 BankAccounts.php:328 +msgid "Bank Account Code" +msgstr "Bankovní účet kódu" + +#: BankAccounts.php:194 BankAccounts.php:330 +msgid "Bank Account Number" +msgstr "Číslo bankovního účtu" + +#: BankAccounts.php:195 BankAccounts.php:332 +msgid "Bank Address" +msgstr "Adresa banky" + +#: BankAccounts.php:196 CustomerAllocations.php:333 CustomerReceipt.php:788 +#: CustomerTransInquiry.php:108 OffersReceived.php:109 PcReportTab.php:267 +#: PcTabs.php:206 PcTabs.php:349 PDFPrintLabel.php:97 +#: PO_AuthorisationLevels.php:126 PO_AuthorisationLevels.php:209 +#: PO_AuthorisationLevels.php:214 PO_AuthoriseMyOrders.php:115 +#: PO_Header.php:554 PO_SelectOSPurchOrder.php:481 PO_SelectPurchOrder.php:432 +#: PricesByCost.php:274 Prices.php:222 Prices.php:295 PurchData.php:169 +#: PurchData.php:352 PurchData.php:481 SelectSupplier.php:260 +#: SupplierCredit.php:263 SupplierInvoice.php:235 SupplierTransInquiry.php:109 +#: SuppPriceList.php:284 includes/PDFBankingSummaryPageHeader.inc:42 +#: includes/PDFDebtorBalsPageHeader.inc:33 +#: includes/PDFSupplierBalsPageHeader.inc:36 +msgid "Currency" +msgstr "Měna" + +#: BankAccounts.php:197 BankAccounts.php:355 +msgid "Default for Invoices" +msgstr "Výchozí pro Faktury" + +#: BankAccounts.php:212 BankAccounts.php:369 BankAccounts.php:375 +#: BankAccounts.php:379 BankAccounts.php:383 +msgid "Fall Back Default" +msgstr "" + +#: BankAccounts.php:214 BankAccounts.php:370 BankAccounts.php:374 +#: BankAccounts.php:378 BankAccounts.php:384 +#, fuzzy +msgid "Currency Default" +msgstr "Měny " + +#: BankAccounts.php:224 +#, fuzzy, php-format +msgid "Are you sure you wish to delete this bank account?" +msgstr "Jste si jisti, že chcete smazat tento obor?" + +#: BankAccounts.php:248 +msgid "Show All Bank Accounts Defined" +msgstr "Zobrazit všechny bankovní účty definované" + +#: BankAccounts.php:282 BankAccounts.php:287 +msgid "Bank Account GL Code" +msgstr "Bankovní účet GL kód" + +#: BankAccounts.php:334 +msgid "Currency Of Account" +msgstr "Měna účtu" + +#: BankMatching.php:6 +msgid "Bank Account Matching" +msgstr "Bankovní účet odpovídající" + +#: BankMatching.php:15 PDFCustTransListing.php:41 Z_CheckDebtorsControl.php:81 +msgid "Receipts" +msgstr "Příjmy" + +#: BankMatching.php:17 BankMatching.php:25 +msgid "Bank Matching" +msgstr "Banka odpovídající" + +#: BankMatching.php:17 +msgid "Bank Account Matching - Receipts" +msgstr "Bankovní účet odpovídající - Příjmy" + +#: BankMatching.php:24 PaymentAllocations.php:31 PaymentMethods.php:11 +#: PDFSuppTransListing.php:40 +msgid "Payments" +msgstr "Platby" + +#: BankMatching.php:25 +msgid "Bank Account Matching - Payments" +msgstr "Bankovní účet odpovídající - Platby" + +#: BankMatching.php:29 +msgid "This page must be called with a bank transaction type" +msgstr "Tato stránka musí být volána s typem bankovním převodem" + +#: BankMatching.php:29 +msgid "It should not be called directly" +msgstr "To by nemělo být jen přímo" + +#: BankMatching.php:49 +msgid "Could not retrieve transaction information" +msgstr "Nemohu získat informace o transakci" + +#: BankMatching.php:56 +msgid "Could not match off this payment because" +msgstr "Nemohl zápas z této platby, protože" + +#: BankMatching.php:67 +msgid "Could not update the amount matched off this bank transaction because" +msgstr "" +"Nepodařilo se aktualizovat částku uzavřeno z této banky, protože transakce" + +#: BankMatching.php:75 +msgid "Could not unclear this bank transaction because" +msgstr "Nemohu nejasné tento bankovní transakci, protože" + +#: BankMatching.php:83 +msgid "" +"Use this screen to match webERP Receipts and Payments to your Bank " +"Statement. Check your bank statement and click the check-box when you find " +"the matching transaction." +msgstr "" +"Tato obrazovka slouží k zápasu webERP inkasa a platby do svého výpisu z " +"účtu. Zkontrolujte, zda vaše bankovní výpis a klikněte na check-box, když " +"zjistíte, odpovídající transakce." + +#: BankMatching.php:92 BankReconciliation.php:104 CustomerReceipt.php:754 +#: DailyBankTransactions.php:32 Payments.php:753 PDFChequeListing.php:44 +#: TaxAuthorities.php:151 TaxAuthorities.php:316 +msgid "Bank Account" +msgstr "Bankovní účet" + +#: BankMatching.php:117 +msgid "Show" +msgstr "Zobrazit" + +#: BankMatching.php:117 CounterSales.php:222 CreditItemsControlled.php:78 +#: FreightCosts.php:267 GoodsReceivedControlled.php:68 GoodsReceived.php:73 +#: StockLocTransferReceive.php:423 SupplierAllocations.php:434 +#: SuppShiptChgs.php:136 +msgid "from" +msgstr "od" + +#: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:60 +#: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 +#: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:733 +#: PcReportTab.php:102 PDFChequeListing.php:114 PDFChequeListing.php:124 +#: PDFChequeListing.php:199 PDFDeliveryDifferences.php:187 +#: PDFDeliveryDifferences.php:200 PDFDeliveryDifferences.php:296 +#: PDFDIFOT.php:190 PDFDIFOT.php:203 PDFDIFOT.php:307 PDFOrdersInvoiced.php:77 +#: PDFOrdersInvoiced.php:274 PDFOrderStatus.php:82 PDFOrderStatus.php:256 +#: PDFRemittanceAdvice.php:48 PO_PDFPurchOrder.php:332 +#: PricesBasedOnMarkUp.php:213 PricesBasedOnMarkUp.php:352 +#: PrintCustStatements.php:43 PrintCustTrans.php:60 PrintCustTrans.php:63 +#: PrintCustTransPortrait.php:58 PrintCustTransPortrait.php:61 +#: SalesGraph.php:211 SalesGraph.php:240 SalesGraph.php:244 +#: StockLocTransferReceive.php:306 StockLocTransferReceive.php:423 +#: Stocks.php:266 Stocks.php:271 StockStatus.php:306 StockStatus.php:347 +#: StockTransfers.php:436 includes/PDFAgedDebtorsPageHeader.inc:18 +#: includes/PDFAgedSuppliersPageHeader.inc:17 +#: includes/PDFChequeListingPageHeader.inc:17 +#: includes/PDFDeliveryDifferencesPageHeader.inc:19 +#: includes/PDFDeliveryDifferencesPageHeader.inc:21 +#: includes/PDFDIFOTPageHeader.inc:19 includes/PDFDIFOTPageHeader.inc:21 +#: includes/PDFOrdersInvoicedPageHeader.inc:19 +#: includes/PDFOrdersInvoicedPageHeader.inc:21 +#: includes/PDFOrderStatusPageHeader.inc:19 +#: includes/PDFOrderStatusPageHeader.inc:21 +#: includes/PDFPeriodStockTransListingPageHeader.inc:20 +#: includes/PDFStockLocTransferHeader.inc:31 +msgid "to" +msgstr "na" + +#: BankMatching.php:123 +msgid "Choose outstanding" +msgstr "Zvolte vynikající" + +#: BankMatching.php:123 +msgid "only or all" +msgstr "jen nebo všechny" + +#: BankMatching.php:123 BankMatching.php:127 BankMatching.php:130 +#: BankMatching.php:141 BankMatching.php:144 +msgid "in the date range" +msgstr "v rozmezí dat" + +#: BankMatching.php:127 BankMatching.php:130 BankMatching.php:141 +#: BankMatching.php:144 +msgid "Show all" +msgstr "Zobrazit všechny" + +#: BankMatching.php:128 BankMatching.php:131 +msgid "Show unmatched" +msgstr "Zobrazit bezkonkurenční" + +#: BankMatching.php:128 BankMatching.php:131 PrintCheque.php:46 +#: ReverseGRN.php:104 includes/PDFCustomerListPageHeader.inc:46 +#: includes/PDFDeliveryDifferencesPageHeader.inc:24 +#: includes/PDFDIFOTPageHeader.inc:24 +#: includes/PDFOrdersInvoicedPageHeader.inc:24 +#: includes/PDFOrderStatusPageHeader.inc:24 +msgid "only" +msgstr "jen" + +#: BankMatching.php:137 +msgid "Choose to display only the first 20 matching" +msgstr "Vyberte, zda chcete zobrazit pouze prvních 20 odpovídající" + +#: BankMatching.php:138 +msgid "or all" +msgstr "nebo všechny" + +#: BankMatching.php:138 +msgid "meeting the criteria" +msgstr "splňující kritéria" + +#: BankMatching.php:142 BankMatching.php:145 +msgid "Show only the first 20" +msgstr "Zobrazit jen prvních 20" + +#: BankMatching.php:154 +msgid "Show selected" +msgstr "Zobrazit vybrané" + +#: BankMatching.php:156 +msgid "Show reconciliation" +msgstr "Zobrazit usmíření" + +#: BankMatching.php:164 BankMatching.php:170 +msgid "The date entered for the field to show" +msgstr "Datum vstoupil na pole show" + +#: BankMatching.php:164 +msgid "before" +msgstr "před" + +#: BankMatching.php:165 BankMatching.php:171 +msgid "is not entered in a recognised date format" +msgstr "není zapsán v uznávané formátu data" + +#: BankMatching.php:165 BankMatching.php:171 +msgid "Entry is expected in the format" +msgstr "Vstup se očekává ve formátu" + +#: BankMatching.php:170 +msgid "after" +msgstr "po" + +#: BankMatching.php:257 +msgid "The payments with the selected criteria could not be retrieved because" +msgstr "Platby podle zadaných kriterií se nepodařilo získat, protože" + +#: BankMatching.php:261 ShipmentCosting.php:533 ShipmentCosting.php:610 +#: SupplierAllocations.php:456 +msgid "Ref" +msgstr "Ref" + +#: BankMatching.php:264 ConfirmDispatch_Invoice.php:276 Credit_Invoice.php:279 +#: CustomerAllocations.php:364 CustomerReceipt.php:897 +#: CustomerTransInquiry.php:107 CustWhereAlloc.php:109 +#: PaymentAllocations.php:67 Payments.php:1026 Payments.php:1030 +#: Payments.php:1046 PcAssignCashToTab.php:222 PcAssignCashToTab.php:345 +#: PcAuthorizeExpenses.php:90 PcClaimExpensesFromTab.php:212 +#: PcClaimExpensesFromTab.php:365 PcReportTab.php:172 PcReportTab.php:326 +#: PrintCheque.php:77 PrintCheque.php:91 SelectCreditItems.php:681 +#: SuppContractChgs.php:79 SuppContractChgs.php:163 SuppFixedAssetChgs.php:76 +#: SuppFixedAssetChgs.php:149 SupplierAllocations.php:457 +#: SupplierCredit.php:352 SupplierCredit.php:385 SupplierCredit.php:421 +#: SupplierCredit.php:460 SupplierInvoice.php:330 SupplierInvoice.php:371 +#: SupplierInvoice.php:411 SupplierInvoice.php:455 +#: SupplierTransInquiry.php:108 SuppShiptChgs.php:81 SuppShiptChgs.php:146 +#: SuppTransGLAnalysis.php:106 SuppTransGLAnalysis.php:191 +#: Z_CheckAllocs.php:66 includes/PDFBankingSummaryPageHeader.inc:55 +#: includes/PDFChequeListingPageHeader.inc:37 +msgid "Amount" +msgstr "Částka" + +#: BankMatching.php:265 BankReconciliation.php:214 BankReconciliation.php:289 +#: PDFOrdersInvoiced.php:351 PDFOrderStatus.php:322 +#: PO_SelectOSPurchOrder.php:233 PO_SelectPurchOrder.php:214 +#: Shipt_Select.php:192 SuppCreditGRNs.php:267 +#: includes/PDFStatementPageHeader.inc:173 +#: includes/PDFStatementPageHeader.inc:180 +msgid "Outstanding" +msgstr "Vynikající" + +#: BankMatching.php:266 +msgid "Clear" +msgstr "Jasný" + +#: BankMatching.php:266 BankMatching.php:295 +msgid "Unclear" +msgstr "Nejasný" + +#: BankMatching.php:342 +msgid "Update Matching" +msgstr "Odpovídající aktualizace" + +#: BankReconciliation.php:7 +msgid "Bank Reconciliation" +msgstr "Banka usmíření" + +#: BankReconciliation.php:27 +msgid "" +"The entry in the bank statement balance is not numeric. The balance on the " +"bank statement should be entered. The exchange difference has not been " +"calculated and no general ledger journal has been created" +msgstr "" +"Záznam v bilanci banky tvrzení není číselná. Zůstatek na bankovním výpisu by " +"měly být zaneseny. Kurzových rozdílů nebyla vypočtena žádná obecná a knihy " +"časopis byl vytvořen" + +#: BankReconciliation.php:39 +msgid "Could not retrieve the exchange rate for the selected bank account" +msgstr "Nepodařilo se načíst směnný kurz pro vybrané bankovní účet" + +#: BankReconciliation.php:68 BankReconciliation.php:86 +msgid "reconciliation on" +msgstr "usmíření, na" + +#: BankReconciliation.php:71 +msgid "Cannot insert a GL entry for the exchange difference because" +msgstr "Nelze vložit záznam GL pro výměnu rozdíl, protože" + +#: BankReconciliation.php:72 +msgid "The SQL that failed to insert the exchange difference GL entry was" +msgstr "SQL, které se nepodařilo vložit kurzový rozdíl GL vstup" + +#: BankReconciliation.php:92 +msgid "Exchange difference of" +msgstr "Kurzových rozdílů z" + +#: BankReconciliation.php:92 +msgid "has been posted" +msgstr "byl vyslán" + +#: BankReconciliation.php:100 SuppPaymentRun.php:316 +msgid "The bank accounts could not be retrieved by the SQL because" +msgstr "Bankovní účty se nepodařilo získat na SQL, protože" + +#: BankReconciliation.php:101 CustomerReceipt.php:742 +#: DailyBankTransactions.php:28 Payments.php:749 SuppPaymentRun.php:318 +msgid "The SQL used to retrieve the bank accounts was" +msgstr "SQL slouží k získání bankovní ú... [truncated message content] |
From: <dai...@us...> - 2011-11-16 07:04:31
|
Revision: 4746 http://web-erp.svn.sourceforge.net/web-erp/?rev=4746&view=rev Author: daintree Date: 2011-11-16 07:04:20 +0000 (Wed, 16 Nov 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/AgedDebtors.php trunk/Customers.php trunk/Prices_Customer.php trunk/StockAdjustments.php trunk/StockSerialItems.php trunk/doc/Change.log trunk/doc/Manual/ManualContributors.html trunk/doc/README.txt trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/LanguageSetup.php trunk/includes/session.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/ReportCreator.php Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/AgedDebtors.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -46,7 +46,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END ) AS due, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -57,7 +57,7 @@ ELSE 0 END END ) AS overdue1, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") @@ -92,7 +92,7 @@ holdreasons.dissallowinvoices, holdreasons.reasondescription HAVING - Sum(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) <>0"; + ABS(SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)) >0.005"; } elseif ($_POST['All_Or_Overdues']=='OverduesOnly') { @@ -165,7 +165,7 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -176,7 +176,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END - ) > 0"; + ) > 0.01"; } elseif ($_POST['All_Or_Overdues']=='HeldOnly'){ @@ -254,13 +254,12 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING ABS(SUM( debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - - debtortrans.alloc - ) <>0"; + debtortrans.alloc)) >0.005"; } $CustomerResult = DB_query($SQL,$db,'','',False,False); /*dont trap errors handled below*/ Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Customers.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -501,18 +501,27 @@ <td><input tabindex=10 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" value="' . $DateString . '" size=12 maxlength=10></td></tr>'; echo '</table></td> - <td><table class="selection">'; - - echo '<tr><td>' . _('Discount Percent') . ':</td> - <td><input tabindex=11 type="textbox" class="number" name="Discount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Discount Code') . ':</td> - <td><input tabindex=12 type="text" name="DiscountCode" size=3 maxlength=2></td></tr>'; - echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input tabindex=13 type="textbox" class ="number" name="PymtDiscount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input tabindex=14 type="text" class="number" name="CreditLimit" value=' . $_SESSION['DefaultCreditLimit'] . ' size=16 maxlength=14></td></tr>'; - echo '<tr><td>' . _('Tax Reference') . ':</td> - <td><input tabindex=15 type="text" name="TaxRef" size=22 maxlength=20></td></tr>'; + <td><table class="selection"> + <tr> + <td>' . _('Discount Percent') . ':</td> + <td><input tabindex="11" type="textbox" class="number" name="Discount" value=0 size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Discount Code') . ':</td> + <td><input tabindex="12" type="text" name="DiscountCode" size="3" maxlength="2" /></td> + </tr> + <tr> + <td>' . _('Payment Discount Percent') . ':</td> + <td><input tabindex="13" type="textbox" class ="number" name="PymtDiscount" value="0" size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Credit Limit') . ':</td> + <td><input tabindex="14" type="text" class="number" name="CreditLimit" value="' . locale_number_format($_SESSION['DefaultCreditLimit'],0) . '" size="16" maxlength="14" /></td> + </tr> + <tr> + <td>' . _('Tax Reference') . ':</td> + <td><input tabindex=15 type="text" name="TaxRef" size="22" maxlength="20" /></td> + </tr>'; $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); if (DB_num_rows($result)==0){ @@ -520,8 +529,9 @@ echo '<tr><td colspan=2>' . prnMsg(_('There are no payment terms currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; } else { - echo '<tr><td>' . _('Payment Terms') . ':</td> - <td><select tabindex=15 name="PaymentTerms">'; + echo '<tr> + <td>' . _('Payment Terms') . ':</td> + <td><select tabindex=15 name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; @@ -530,12 +540,16 @@ echo '</select></td></tr>'; } - echo '<tr><td>' . _('Credit Status') . ':</td><td><select tabindex=16 name="HoldReason">'; + echo '<tr> + <td>' . _('Credit Status') . ':</td> + <td><select tabindex="16" name="HoldReason">'; $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; @@ -547,7 +561,9 @@ $result=DB_query("SELECT currency, currabrev FROM currencies",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { if (!isset($_POST['CurrCode'])){ $CurrResult = DB_query("SELECT currencydefault FROM companies WHERE coycode=1",$db); @@ -573,8 +589,8 @@ echo '<tr> <td>' . _('Customer PO Line on SO') . ':</td> <td><select tabindex="18" name="CustomerPOLine"> - <option selected value=0>' . _('No') . '</option> - <option value=1>' . _('Yes') . '</option> + <option selected value="0">' . _('No') . '</option> + <option value="1">' . _('Yes') . '</option> </select> </td> </tr> @@ -957,11 +973,11 @@ <td>' . _('Invoice Addressing') . ':</td> <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ - echo '<option selected value=0>' . _('Address to HO') . '</option>'; - echo '<option value=1>' . _('Address to Branch') . '</option>'; + echo '<option selected value="0">' . _('Address to HO') . '</option>'; + echo '<option value="1">' . _('Address to Branch') . '</option>'; } else { - echo '<option value=0>' . _('Address to HO') . '</option>'; - echo '<option selected value=1>' . _('Address to Branch') . '</option>'; + echo '<option value="0">' . _('Address to HO') . '</option>'; + echo '<option selected value="1">' . _('Address to Branch') . '</option>'; } } @@ -1009,7 +1025,7 @@ <th>' . _('Email') . '</th> <th>' . _('Notes') . '</th> <th>' . _('Edit') . '</th> - <th colspan="2"><input type="Submit" name="AddContact" value="' . _('Add Contact') . '" /></th> + <th colspan="2"><input type="submit" name="AddContact" value="' . _('Add Contact') . '" /></th> </tr>'; } $k=0; //row colour counter Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Prices_Customer.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -7,7 +7,8 @@ debtorsmaster.currcode, debtorsmaster.salestype, currencies.decimalplaces AS currdecimalplaces - FROM debtorsmaster + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev WHERE debtorsmaster.debtorno='" . $_SESSION['CustomerID'] . "'",$db); $myrow = DB_fetch_array($result); @@ -267,15 +268,16 @@ $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } echo '<tr bgcolor="#CCCCCC"> - <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> - <td>' . $Branch.'</td> - <td>'.$myrow['units'].'</td> - <td class="number">'.$myrow['conversionfactor'].'</td> - <td>'.ConvertSQLDate($myrow['startdate']).'</td> - <td>'.$EndDateDisplay.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. - '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td></tr>'; + <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> + <td>' . $Branch.'</td> + <td>'.$myrow['units'].'</td> + <td class="number">'.$myrow['conversionfactor'].'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td> + </tr>'; } //END WHILE LIST LOOP Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockAdjustments.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -27,7 +27,8 @@ $result = DB_query("SELECT description, controlled, serialised, - decimalplaces + decimalplaces, + perishable FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); $myrow = DB_fetch_array($result); @@ -213,13 +214,14 @@ loccode, serialno, qualitytext, - quantity) + quantity, + expirationdate) VALUES ('" . $_SESSION['Adjustment']->StockID . "', '" . $_SESSION['Adjustment']->StockLocation . "', '" . $Item->BundleRef . "', '', - '" . $Item->BundleQty . "' - )"; + '" . $Item->BundleQty . "', + '" . FormatDateForSQL($Item->ExpiryDate) ."')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); $DbgMsg = _('The following SQL to update the serial stock item record was used'); @@ -471,4 +473,4 @@ echo '</div></form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -85,7 +85,7 @@ <th colspan="11"><font color="navy" size="2">' . $StockID .'-'. $Description .'</b> (' . _('In units of') . ' ' . $UOM . ')</font></th> </tr>'; -if ($Serialised == 1){ +if ($Serialised == 1 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Serial Number') . '</th> <th></th> @@ -93,6 +93,15 @@ <th></th> <th>' . _('Serial Number') . '</th> </tr>'; +} else if ($Serialised == 1 and $Perishable==1){ + $tableheader = '<tr> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + </tr>'; } else if ($Serialised == 0 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Batch/Bundle Ref') . '</th> @@ -136,9 +145,12 @@ $TotalQuantity += $myrow['quantity']; - if ($Serialised == 1){ + if ($Serialised == 1 and $Perishable==0){ echo '<td>'.$myrow['serialno'].'</td>'; echo '<th></th>'; + } else if ($Serialised == 1 and $Perishable==1) { + echo '<td>'.$myrow['serialno'].'</td> + echo '<td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; } else if ($Serialised == 0 and $Perishable==0) { echo '<td>'.$myrow['serialno'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces).'</td>'; @@ -168,4 +180,4 @@ echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Change.log 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,11 @@ webERP Change Log +16/11/11 Phil: Prices_Customer.php sql error had neglected to include currencies table to get the number of decimalplaces to show +16/11/11 Phil: reportwriter/WriteReport.inc modified to use OutputD function in class.pdf.inc +15/11/11 Phil: includes/LanguageSetup.php was not including LanguagesArray.php in reportwriter as PathPrefix was not prepended +14/11/11 Don Grames: AgedDebtors.php now ignores balances with an absolute value of < 0.005 +14/11/11 Dafydd Crosby: Allow serialised perishible items to have expiration dates. + 13/11/11 Release 4.06RC2 12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines Modified: trunk/doc/Manual/ManualContributors.html =================================================================== --- trunk/doc/Manual/ManualContributors.html 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Manual/ManualContributors.html 2011-11-16 07:04:20 UTC (rev 4746) @@ -17,6 +17,8 @@ <br /><br /> Danie Brink <br /><br /> +Daffyd Crosby +<br /><br /> Phil Daintree <br /><br /> Murray Dancey Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/README.txt 2011-11-16 07:04:20 UTC (rev 4746) @@ -4,7 +4,7 @@ Version 4.x of webERP -Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. +Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. Also, this release comes with an automated database upgrade system, so that database changes in later versions will be applied automatically on upgrade of the scripts. @@ -38,7 +38,7 @@ DEVELOPING -Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. +Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. This can be done directly on the wiki at http://www.weberp.org by any registered user of the wiki. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. Guidelines for contributing code are in the document at http://www.weberp.org/wikidocs/ContributingtowebERP developers should read this document carefully and follow the guidelines therein. Standards and conventions used in the code are rigorously applied in the interests of consistency and readability. Code submitted that does not conform to these standards will be changed so it does where possible. If the job to make the code conform to webERP standards is too large then the code will not be included. TRANSLATIONS Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -95,9 +95,16 @@ $myrow=DB_fetch_array($result); $Perishable=$myrow['perishable']; if ($LineItem->Serialised==1){ - $tableheader .= '<tr> - <th>'. _('Serial No').'</th> - </tr>'; + if ($Perishable==0) { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + </tr>'; + } else { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + <th>'. _('Expiry Date'). '<th> + </tr>'; + } } else if ($LineItem->Serialised==0 AND $Perishable==1){ $tableheader = '<tr> <th>'. _('Batch/Roll/Bundle'). ' #</th> @@ -119,4 +126,4 @@ } else { /*KEYED or BARCODE */ include('includes/InputSerialItemsKeyed.php'); } -?> \ No newline at end of file +?> Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItemsKeyed.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -49,10 +49,10 @@ echo '<td>' . $Bundle->BundleRef . '</td>'; - if ($LineItem->Serialised==0 and $Perishable==0){ + if ($LineItem->Serialised==0){ echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; - } else if ($LineItem->Serialised==0 and $Perishable==1){ - echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; + } + if ($Perishable==1){ echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'&identifier='.$identifier.'">'. _('Delete'). '</a></td> @@ -129,7 +129,12 @@ into the form for entry of quantities manually */ if ($LineItem->Serialised==1){ - echo '<input type=hidden name="Qty' . ($StartAddingAt+$i) .'" value=1></td></tr>'; + if ($Perishable==0) { + echo '<input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /></tr>'; + } else { + echo '<td><input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size="11" + value="" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" /></td></tr>'; + } } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$i) .'" size=11 maxlength="10" /></td>'; echo '<td><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size=11 @@ -159,4 +164,4 @@ document.Ga6uF5Wa.SerialNo0.focus(); //]]> </script>'; /*end of nested table */ -?> \ No newline at end of file +?> Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/LanguageSetup.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -60,9 +60,9 @@ return $text; } } - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); } else { - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); $LocaleSet = setlocale (LC_ALL, $_SESSION['Language'],$LanguagesArray[$_SESSION['Language']]['WindowsLocale']); $LocaleSet = setlocale (LC_NUMERIC, 'C','en_GB.utf8','en_GB','en_US','english-us'); Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/session.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -73,6 +73,7 @@ include($PathPrefix . 'includes/LanguageSetup.php'); + if (!isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */ Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/WriteReport.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -583,18 +583,8 @@ function GeneratePDFFile($Data, $Prefs) { $pdf=new PDF(); $pdf->ReportTable($Data); - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); $ReportName = ReplaceNonAllowedCharacters($Prefs['reportname']) .'.pdf'; - - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename="' . $ReportName . '"'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Stream($ReportName); + $pdf->OutputD($ReportName); exit(); // needs to be here to properly render the pdf file. } Modified: trunk/reportwriter/admin/ReportCreator.php =================================================================== --- trunk/reportwriter/admin/ReportCreator.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/admin/ReportCreator.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,4 @@ <?php -/* $Revision: 1.6 $ */ /* This script has the responsibility to gather basic information necessary to retrieve data for reports. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-16 07:04:31
|
Revision: 4746 http://web-erp.svn.sourceforge.net/web-erp/?rev=4746&view=rev Author: daintree Date: 2011-11-16 07:04:20 +0000 (Wed, 16 Nov 2011) Log Message: ----------- fix Modified Paths: -------------- trunk/AgedDebtors.php trunk/Customers.php trunk/Prices_Customer.php trunk/StockAdjustments.php trunk/StockSerialItems.php trunk/doc/Change.log trunk/doc/Manual/ManualContributors.html trunk/doc/README.txt trunk/includes/InputSerialItems.php trunk/includes/InputSerialItemsKeyed.php trunk/includes/LanguageSetup.php trunk/includes/session.inc trunk/reportwriter/WriteReport.inc trunk/reportwriter/admin/ReportCreator.php Modified: trunk/AgedDebtors.php =================================================================== --- trunk/AgedDebtors.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/AgedDebtors.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -46,7 +46,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END ) AS due, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -57,7 +57,7 @@ ELSE 0 END END ) AS overdue1, - Sum( + SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN (TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate)) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays2'] . ") @@ -92,7 +92,7 @@ holdreasons.dissallowinvoices, holdreasons.reasondescription HAVING - Sum(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc) <>0"; + ABS(SUM(debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc)) >0.005"; } elseif ($_POST['All_Or_Overdues']=='OverduesOnly') { @@ -165,7 +165,7 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING SUM( CASE WHEN (paymentterms.daysbeforedue > 0) THEN CASE WHEN TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) > paymentterms.daysbeforedue AND TO_DAYS(Now()) - TO_DAYS(debtortrans.trandate) >= (paymentterms.daysbeforedue + " . $_SESSION['PastDueDays1'] . ") @@ -176,7 +176,7 @@ THEN debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - debtortrans.alloc ELSE 0 END END - ) > 0"; + ) > 0.01"; } elseif ($_POST['All_Or_Overdues']=='HeldOnly'){ @@ -254,13 +254,12 @@ debtorsmaster.creditlimit, holdreasons.dissallowinvoices, holdreasons.reasondescription - HAVING Sum( + HAVING ABS(SUM( debtortrans.ovamount + debtortrans.ovgst + debtortrans.ovfreight + debtortrans.ovdiscount - - debtortrans.alloc - ) <>0"; + debtortrans.alloc)) >0.005"; } $CustomerResult = DB_query($SQL,$db,'','',False,False); /*dont trap errors handled below*/ Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Customers.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -501,18 +501,27 @@ <td><input tabindex=10 type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" name="ClientSince" value="' . $DateString . '" size=12 maxlength=10></td></tr>'; echo '</table></td> - <td><table class="selection">'; - - echo '<tr><td>' . _('Discount Percent') . ':</td> - <td><input tabindex=11 type="textbox" class="number" name="Discount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Discount Code') . ':</td> - <td><input tabindex=12 type="text" name="DiscountCode" size=3 maxlength=2></td></tr>'; - echo '<tr><td>' . _('Payment Discount Percent') . ':</td> - <td><input tabindex=13 type="textbox" class ="number" name="PymtDiscount" value=0 size=5 maxlength=4></td></tr>'; - echo '<tr><td>' . _('Credit Limit') . ':</td> - <td><input tabindex=14 type="text" class="number" name="CreditLimit" value=' . $_SESSION['DefaultCreditLimit'] . ' size=16 maxlength=14></td></tr>'; - echo '<tr><td>' . _('Tax Reference') . ':</td> - <td><input tabindex=15 type="text" name="TaxRef" size=22 maxlength=20></td></tr>'; + <td><table class="selection"> + <tr> + <td>' . _('Discount Percent') . ':</td> + <td><input tabindex="11" type="textbox" class="number" name="Discount" value=0 size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Discount Code') . ':</td> + <td><input tabindex="12" type="text" name="DiscountCode" size="3" maxlength="2" /></td> + </tr> + <tr> + <td>' . _('Payment Discount Percent') . ':</td> + <td><input tabindex="13" type="textbox" class ="number" name="PymtDiscount" value="0" size="5" maxlength="4" /></td> + </tr> + <tr> + <td>' . _('Credit Limit') . ':</td> + <td><input tabindex="14" type="text" class="number" name="CreditLimit" value="' . locale_number_format($_SESSION['DefaultCreditLimit'],0) . '" size="16" maxlength="14" /></td> + </tr> + <tr> + <td>' . _('Tax Reference') . ':</td> + <td><input tabindex=15 type="text" name="TaxRef" size="22" maxlength="20" /></td> + </tr>'; $result=DB_query("SELECT terms, termsindicator FROM paymentterms",$db); if (DB_num_rows($result)==0){ @@ -520,8 +529,9 @@ echo '<tr><td colspan=2>' . prnMsg(_('There are no payment terms currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; } else { - echo '<tr><td>' . _('Payment Terms') . ':</td> - <td><select tabindex=15 name="PaymentTerms">'; + echo '<tr> + <td>' . _('Payment Terms') . ':</td> + <td><select tabindex=15 name="PaymentTerms">'; while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['termsindicator'] . '">' . $myrow['terms'] . '</option>'; @@ -530,12 +540,16 @@ echo '</select></td></tr>'; } - echo '<tr><td>' . _('Credit Status') . ':</td><td><select tabindex=16 name="HoldReason">'; + echo '<tr> + <td>' . _('Credit Status') . ':</td> + <td><select tabindex="16" name="HoldReason">'; $result=DB_query("SELECT reasoncode, reasondescription FROM holdreasons",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no credit statuses currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { while ($myrow = DB_fetch_array($result)) { echo '<option value="'. $myrow['reasoncode'] . '">' . $myrow['reasondescription'] . '</option>'; @@ -547,7 +561,9 @@ $result=DB_query("SELECT currency, currabrev FROM currencies",$db); if (DB_num_rows($result)==0){ $DataError =1; - echo '<tr><td colspan=2>' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td></tr>'; + echo '<tr> + <td colspan="2">' . prnMsg(_('There are no currencies currently defined - go to the setup tab of the main menu and set at least one up first'),'error') . '</td> + </tr>'; } else { if (!isset($_POST['CurrCode'])){ $CurrResult = DB_query("SELECT currencydefault FROM companies WHERE coycode=1",$db); @@ -573,8 +589,8 @@ echo '<tr> <td>' . _('Customer PO Line on SO') . ':</td> <td><select tabindex="18" name="CustomerPOLine"> - <option selected value=0>' . _('No') . '</option> - <option value=1>' . _('Yes') . '</option> + <option selected value="0">' . _('No') . '</option> + <option value="1">' . _('Yes') . '</option> </select> </td> </tr> @@ -957,11 +973,11 @@ <td>' . _('Invoice Addressing') . ':</td> <td><select name="AddrInvBranch">'; if ($_POST['InvAddrBranch']==0){ - echo '<option selected value=0>' . _('Address to HO') . '</option>'; - echo '<option value=1>' . _('Address to Branch') . '</option>'; + echo '<option selected value="0">' . _('Address to HO') . '</option>'; + echo '<option value="1">' . _('Address to Branch') . '</option>'; } else { - echo '<option value=0>' . _('Address to HO') . '</option>'; - echo '<option selected value=1>' . _('Address to Branch') . '</option>'; + echo '<option value="0">' . _('Address to HO') . '</option>'; + echo '<option selected value="1">' . _('Address to Branch') . '</option>'; } } @@ -1009,7 +1025,7 @@ <th>' . _('Email') . '</th> <th>' . _('Notes') . '</th> <th>' . _('Edit') . '</th> - <th colspan="2"><input type="Submit" name="AddContact" value="' . _('Add Contact') . '" /></th> + <th colspan="2"><input type="submit" name="AddContact" value="' . _('Add Contact') . '" /></th> </tr>'; } $k=0; //row colour counter Modified: trunk/Prices_Customer.php =================================================================== --- trunk/Prices_Customer.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/Prices_Customer.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -7,7 +7,8 @@ debtorsmaster.currcode, debtorsmaster.salestype, currencies.decimalplaces AS currdecimalplaces - FROM debtorsmaster + FROM debtorsmaster INNER JOIN currencies + ON debtorsmaster.currcode=currencies.currabrev WHERE debtorsmaster.debtorno='" . $_SESSION['CustomerID'] . "'",$db); $myrow = DB_fetch_array($result); @@ -267,15 +268,16 @@ $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } echo '<tr bgcolor="#CCCCCC"> - <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> - <td>' . $Branch.'</td> - <td>'.$myrow['units'].'</td> - <td class="number">'.$myrow['conversionfactor'].'</td> - <td>'.ConvertSQLDate($myrow['startdate']).'</td> - <td>'.$EndDateDisplay.'</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. - '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> - <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td></tr>'; + <td class="number">'.locale_number_format($myrow['price'],$CurrDecimalPlaces).'</td> + <td>' . $Branch.'</td> + <td>'.$myrow['units'].'</td> + <td class="number">'.$myrow['conversionfactor'].'</td> + <td>'.ConvertSQLDate($myrow['startdate']).'</td> + <td>'.$EndDateDisplay.'</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Price='.$myrow['price'].'&Branch='.$myrow['branchcode']. + '&StartDate='.$myrow['startdate'].'&EndDate='.$myrow['enddate'].'&Edit=1">' . _('Edit') . '</td> + <td><a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?Item='.$Item.'&Branch='.$myrow['branchcode'].'&StartDate='.$myrow['startdate'] .'&EndDate='.$myrow['enddate'].'&delete=yes" onclick="return confirm(\'' . _('Are you sure you wish to delete this price?') . '\');">' . _('Delete') . '</td> + </tr>'; } //END WHILE LIST LOOP Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockAdjustments.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -27,7 +27,8 @@ $result = DB_query("SELECT description, controlled, serialised, - decimalplaces + decimalplaces, + perishable FROM stockmaster WHERE stockid='" . $_SESSION['Adjustment']->StockID . "'",$db); $myrow = DB_fetch_array($result); @@ -213,13 +214,14 @@ loccode, serialno, qualitytext, - quantity) + quantity, + expirationdate) VALUES ('" . $_SESSION['Adjustment']->StockID . "', '" . $_SESSION['Adjustment']->StockLocation . "', '" . $Item->BundleRef . "', '', - '" . $Item->BundleQty . "' - )"; + '" . $Item->BundleQty . "', + '" . FormatDateForSQL($Item->ExpiryDate) ."')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); $DbgMsg = _('The following SQL to update the serial stock item record was used'); @@ -471,4 +473,4 @@ echo '</div></form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/StockSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -85,7 +85,7 @@ <th colspan="11"><font color="navy" size="2">' . $StockID .'-'. $Description .'</b> (' . _('In units of') . ' ' . $UOM . ')</font></th> </tr>'; -if ($Serialised == 1){ +if ($Serialised == 1 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Serial Number') . '</th> <th></th> @@ -93,6 +93,15 @@ <th></th> <th>' . _('Serial Number') . '</th> </tr>'; +} else if ($Serialised == 1 and $Perishable==1){ + $tableheader = '<tr> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + <th>' . _('Serial Number') . '</th> + <th>' . _('Expiry Date') . '</th> + </tr>'; } else if ($Serialised == 0 and $Perishable==0){ $tableheader = '<tr> <th>' . _('Batch/Bundle Ref') . '</th> @@ -136,9 +145,12 @@ $TotalQuantity += $myrow['quantity']; - if ($Serialised == 1){ + if ($Serialised == 1 and $Perishable==0){ echo '<td>'.$myrow['serialno'].'</td>'; echo '<th></th>'; + } else if ($Serialised == 1 and $Perishable==1) { + echo '<td>'.$myrow['serialno'].'</td> + echo '<td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; } else if ($Serialised == 0 and $Perishable==0) { echo '<td>'.$myrow['serialno'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces).'</td>'; @@ -168,4 +180,4 @@ echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Change.log 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,11 @@ webERP Change Log +16/11/11 Phil: Prices_Customer.php sql error had neglected to include currencies table to get the number of decimalplaces to show +16/11/11 Phil: reportwriter/WriteReport.inc modified to use OutputD function in class.pdf.inc +15/11/11 Phil: includes/LanguageSetup.php was not including LanguagesArray.php in reportwriter as PathPrefix was not prepended +14/11/11 Don Grames: AgedDebtors.php now ignores balances with an absolute value of < 0.005 +14/11/11 Dafydd Crosby: Allow serialised perishible items to have expiration dates. + 13/11/11 Release 4.06RC2 12/11/11 Phil: Purchase order Order_Value in includes/DefinePOClass.php now only looks at the value of lines left on the order after deleted lines Modified: trunk/doc/Manual/ManualContributors.html =================================================================== --- trunk/doc/Manual/ManualContributors.html 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/Manual/ManualContributors.html 2011-11-16 07:04:20 UTC (rev 4746) @@ -17,6 +17,8 @@ <br /><br /> Danie Brink <br /><br /> +Daffyd Crosby +<br /><br /> Phil Daintree <br /><br /> Murray Dancey Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/doc/README.txt 2011-11-16 07:04:20 UTC (rev 4746) @@ -4,7 +4,7 @@ Version 4.x of webERP -Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. +Now fully utf-8 compatible. Now reports can be created in any language using the utf-8 character set, the resultant pdf reports use Adobe CID fonts and the fonts that come with the Adobe Acrobat reader on client computers. This avoids the problem of large pdf downloads on the creation of reports as the alternative is to bundle the enormous utf-8 fonts with the reports. Also, this release comes with an automated database upgrade system, so that database changes in later versions will be applied automatically on upgrade of the scripts. @@ -38,7 +38,7 @@ DEVELOPING -Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. +Contributions of code are documents including HOW-TOs with screen-shots etc are encouraged. This can be done directly on the wiki at http://www.weberp.org by any registered user of the wiki. Contributions in the form of bug reports or other feedback through the mainling lists above are also encouraged. Guidelines for contributing code are in the document at http://www.weberp.org/wikidocs/ContributingtowebERP developers should read this document carefully and follow the guidelines therein. Standards and conventions used in the code are rigorously applied in the interests of consistency and readability. Code submitted that does not conform to these standards will be changed so it does where possible. If the job to make the code conform to webERP standards is too large then the code will not be included. TRANSLATIONS Modified: trunk/includes/InputSerialItems.php =================================================================== --- trunk/includes/InputSerialItems.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItems.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -95,9 +95,16 @@ $myrow=DB_fetch_array($result); $Perishable=$myrow['perishable']; if ($LineItem->Serialised==1){ - $tableheader .= '<tr> - <th>'. _('Serial No').'</th> - </tr>'; + if ($Perishable==0) { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + </tr>'; + } else { + $tableheader .= '<tr> + <th>'. _('Serial No'). '</th> + <th>'. _('Expiry Date'). '<th> + </tr>'; + } } else if ($LineItem->Serialised==0 AND $Perishable==1){ $tableheader = '<tr> <th>'. _('Batch/Roll/Bundle'). ' #</th> @@ -119,4 +126,4 @@ } else { /*KEYED or BARCODE */ include('includes/InputSerialItemsKeyed.php'); } -?> \ No newline at end of file +?> Modified: trunk/includes/InputSerialItemsKeyed.php =================================================================== --- trunk/includes/InputSerialItemsKeyed.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/InputSerialItemsKeyed.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -49,10 +49,10 @@ echo '<td>' . $Bundle->BundleRef . '</td>'; - if ($LineItem->Serialised==0 and $Perishable==0){ + if ($LineItem->Serialised==0){ echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; - } else if ($LineItem->Serialised==0 and $Perishable==1){ - echo '<td class="number">' . locale_number_format($Bundle->BundleQty, $LineItem->DecimalPlaces) . '</td>'; + } + if ($Perishable==1){ echo '<td class="number">' . $Bundle->ExpiryDate . '</td>'; } echo '<td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $Bundle->BundleRef . '&StockID=' . $LineItem->StockID . '&LineNo=' . $LineNo .'&identifier='.$identifier.'">'. _('Delete'). '</a></td> @@ -129,7 +129,12 @@ into the form for entry of quantities manually */ if ($LineItem->Serialised==1){ - echo '<input type=hidden name="Qty' . ($StartAddingAt+$i) .'" value=1></td></tr>'; + if ($Perishable==0) { + echo '<input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /></tr>'; + } else { + echo '<td><input type="hidden" name="Qty' . ($StartAddingAt+$i) .'" value="1" /><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size="11" + value="" alt="'.$_SESSION['DefaultDateFormat'].'" maxlength="10" /></td></tr>'; + } } else if ($LineItem->Serialised==0 and $Perishable==1) { echo '<td><input type="text" class="number" name="Qty' . ($StartAddingAt+$i) .'" size=11 maxlength="10" /></td>'; echo '<td><input type="text" class="date" name="ExpiryDate' . ($StartAddingAt+$i) .'" size=11 @@ -159,4 +164,4 @@ document.Ga6uF5Wa.SerialNo0.focus(); //]]> </script>'; /*end of nested table */ -?> \ No newline at end of file +?> Modified: trunk/includes/LanguageSetup.php =================================================================== --- trunk/includes/LanguageSetup.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/LanguageSetup.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -60,9 +60,9 @@ return $text; } } - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); } else { - include('includes/LanguagesArray.php'); + include($PathPrefix . 'includes/LanguagesArray.php'); $LocaleSet = setlocale (LC_ALL, $_SESSION['Language'],$LanguagesArray[$_SESSION['Language']]['WindowsLocale']); $LocaleSet = setlocale (LC_NUMERIC, 'C','en_GB.utf8','en_GB','en_US','english-us'); Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/includes/session.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -73,6 +73,7 @@ include($PathPrefix . 'includes/LanguageSetup.php'); + if (!isset($AllowAnyone)){ /* only do security checks if AllowAnyone is not true */ include $PathPrefix . 'includes/UserLogin.php'; /* Login checking and setup */ Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/WriteReport.inc 2011-11-16 07:04:20 UTC (rev 4746) @@ -583,18 +583,8 @@ function GeneratePDFFile($Data, $Prefs) { $pdf=new PDF(); $pdf->ReportTable($Data); - $pdfcode = $pdf->output(); - $len = mb_strlen($pdfcode); $ReportName = ReplaceNonAllowedCharacters($Prefs['reportname']) .'.pdf'; - - header('Content-type: application/pdf'); - header('Content-Length: ' . $len); - header('Content-Disposition: inline; filename="' . $ReportName . '"'); - header('Expires: 0'); - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - - $pdf->Stream($ReportName); + $pdf->OutputD($ReportName); exit(); // needs to be here to properly render the pdf file. } Modified: trunk/reportwriter/admin/ReportCreator.php =================================================================== --- trunk/reportwriter/admin/ReportCreator.php 2011-11-12 21:50:32 UTC (rev 4745) +++ trunk/reportwriter/admin/ReportCreator.php 2011-11-16 07:04:20 UTC (rev 4746) @@ -1,5 +1,4 @@ <?php -/* $Revision: 1.6 $ */ /* This script has the responsibility to gather basic information necessary to retrieve data for reports. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-16 09:23:09
|
Revision: 4747 http://web-erp.svn.sourceforge.net/web-erp/?rev=4747&view=rev Author: daintree Date: 2011-11-16 09:23:02 +0000 (Wed, 16 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/SelectOrderItems.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-11-16 07:04:20 UTC (rev 4746) +++ trunk/SelectOrderItems.php 2011-11-16 09:23:02 UTC (rev 4747) @@ -294,7 +294,9 @@ } //Customer logins are not allowed to select other customers henc in_array(2,$_SESSION['AllowedPageSecurityTokens']) -if (isset($_POST['SearchCust']) AND $_SESSION['RequireCustomerSelection']==1 AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ +if (isset($_POST['SearchCust']) + AND $_SESSION['RequireCustomerSelection']==1 + AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ if (($_POST['CustKeywords']=='') AND ($_POST['CustCode']=='') AND ($_POST['CustPhone']=='')) { prnMsg(_('At least one Customer Branch Name keyword OR an extract of a Customer Branch Code or Branch Phone Number must be entered for the search'), 'warn'); @@ -339,7 +341,7 @@ if (isset($_POST['JustSelectedACustomer'])){ /*Need to figure out the number of the form variable that the user clicked on */ - for ($i=1;$i<count($_POST);$i++){ //loop through the returned customers + for ($i=0;$i<count($_POST);$i++){ //loop through the returned customers if(isset($_POST['SubmitCustomerSelection'.$i])){ break; } @@ -547,20 +549,20 @@ $DbgMsg = _('SQL used to retrieve the branch details was'); $result =DB_query($sql,$db,$ErrMsg, $DbgMsg); - $myrow = DB_fetch_row($result); - $_SESSION['Items'.$identifier]->DeliverTo = $myrow[0]; - $_SESSION['Items'.$identifier]->DelAdd1 = $myrow[1]; - $_SESSION['Items'.$identifier]->DelAdd2 = $myrow[2]; - $_SESSION['Items'.$identifier]->DelAdd3 = $myrow[3]; - $_SESSION['Items'.$identifier]->DelAdd4 = $myrow[4]; - $_SESSION['Items'.$identifier]->DelAdd5 = $myrow[5]; - $_SESSION['Items'.$identifier]->DelAdd6 = $myrow[6]; - $_SESSION['Items'.$identifier]->PhoneNo = $myrow[7]; - $_SESSION['Items'.$identifier]->Email = $myrow[8]; - $_SESSION['Items'.$identifier]->Location = $myrow[9]; - $_SESSION['Items'.$identifier]->DeliverBlind = $myrow[10]; - $_SESSION['Items'.$identifier]->DeliveryDays = $myrow[11]; - $_SESSION['Items'.$identifier]->LocationName = $myrow[12]; + $myrow = DB_fetch_array($result); + $_SESSION['Items'.$identifier]->DeliverTo = $myrow['brname']; + $_SESSION['Items'.$identifier]->DelAdd1 = $myrow['braddress1']; + $_SESSION['Items'.$identifier]->DelAdd2 = $myrow['braddress2']; + $_SESSION['Items'.$identifier]->DelAdd3 = $myrow['braddress3']; + $_SESSION['Items'.$identifier]->DelAdd4 = $myrow['braddress4']; + $_SESSION['Items'.$identifier]->DelAdd5 = $myrow['braddress5']; + $_SESSION['Items'.$identifier]->DelAdd6 = $myrow['braddress6']; + $_SESSION['Items'.$identifier]->PhoneNo = $myrow['phoneno']; + $_SESSION['Items'.$identifier]->Email = $myrow['email']; + $_SESSION['Items'.$identifier]->Location = $myrow['defaultlocation']; + $_SESSION['Items'.$identifier]->DeliverBlind = $myrow['deliverblind']; + $_SESSION['Items'.$identifier]->DeliveryDays = $myrow['estdeliverydays']; + $_SESSION['Items'.$identifier]->LocationName = $myrow['locationname']; } else { prnMsg(_('Sorry, your account has been put on hold for some reason, please contact the credit control personnel.'),'warn'); include('includes/footer.inc'); @@ -581,21 +583,21 @@ echo '<table cellpadding="3" colspan="4" class="selection"> <tr> <td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td> - <td><input tabindex=1 type="Text" name="CustKeywords" size=20 maxlength=25></td> + <td><input tabindex="1" type="text" name="CustKeywords" size="20" maxlength="25" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Customer Branch Code') . ':</h5></td> - <td><input tabindex=2 type="text" name="CustCode" size=15 maxlength=18></td> + <td><input tabindex=2 type="text" name="CustCode" size="15" maxlength="18" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Branch Phone Number') . ':</h5></td> - <td><input tabindex=3 type="text" name="CustPhone" size=15 maxlength=18></td> + <td><input tabindex=3 type="text" name="CustPhone" size="15" maxlength="18" /></td> </tr> </table> - <br /><div class="centre"><input tabindex=4 type="submit" name="SearchCust" value="' . _('Search Now') . '" /> - <input tabindex=5 type="submit" action="reset" value="' . _('Reset') . '"></div>'; + <br /><div class="centre"><input tabindex="4" type="submit" name="SearchCust" value="' . _('Search Now') . '" /> + <input tabindex=5 type="submit" action="reset" value="' . _('Reset') . '" /></div>'; if (isset($result_CustSelect)) { - echo '<table cellpadding=2 colspan=7>'; + echo '<table class="selection">'; $TableHeader = '<br /><tr> <th>' . _('Customer') . '</th> @@ -625,8 +627,9 @@ } else { echo '<td></td>'; } - echo '<td><input tabindex='.($j+5).' type=submit name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '"></td> - <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> + echo '<td><input tabindex="'.strval($j+5).'" type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '" /></td> + <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'" /> + <input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> <td>'.$myrow['contactname'].'</td> <td>'.$myrow['phoneno'].'</td> <td>'.$myrow['faxno'].'</td> @@ -636,7 +639,7 @@ //end of page full new headings if } //end of while loop - echo '<input type="hidden" name="JustSelectedACustomer" value="Yes">'; + echo '<input type="hidden" name="JustSelectedACustomer" value="Yes" />'; echo '</table></form>'; }//end if results to show @@ -1094,7 +1097,7 @@ prnMsg( _('You are attempting to make the quantity ordered a quantity less than has already been invoiced') . '. ' . _('The quantity delivered and invoiced cannot be modified retrospectively'),'warn'); } elseif ($OrderLine->Quantity !=$Quantity OR $OrderLine->Price != $Price - OR ABS($OrderLine->DiscountPercent -$DiscountPercentage/100) >0.001 + OR ABS($OrderLine->DiscountPercent - $DiscountPercentage/100) >0.001 OR $OrderLine->Narrative != $Narrative OR $OrderLine->ItemDue != $_POST['ItemDue_' . $OrderLine->LineNumber] OR $OrderLine->POLine != $_POST['POLine_' . $OrderLine->LineNumber]) { @@ -1356,17 +1359,17 @@ echo $RowStarter; if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){ //show the input field only if required - echo '<td><input tabindex=1 type="text" name="POLine_' . $OrderLine->LineNumber . '" size=20 maxlength=20 value=' . $OrderLine->POLine . '></td>'; + echo '<td><input tabindex="1" type="text" name="POLine_' . $OrderLine->LineNumber . '" size="20" maxlength="20" value="' . $OrderLine->POLine . '" /></td>'; } else { - echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="">'; + echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />'; } echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> <td>' . $OrderLine->ItemDescription . '</td>'; - echo '<td><input class="number" tabindex=2 type=tect name="Quantity_' . $OrderLine->LineNumber . '" size=6 maxlength=6 value=' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '>'; + echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '" />'; if ($QtyRemain != $QtyOrdered){ - echo '<br />'.locale_number_format($OrderLine->QtyInv,$OrderLine->DecimalPlaces) .' of '.locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces).' invoiced'; + echo '<br />'.locale_number_format($OrderLine->QtyInv,$OrderLine->DecimalPlaces) .' ' . _('of') . ' ' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces).' ' . _('invoiced'); } echo '</td> <td class="number">' . locale_number_format($OrderLine->QOHatLoc,$OrderLine->DecimalPlaces) . '</td> @@ -1374,12 +1377,12 @@ if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ /*OK to display with discount if it is an internal user with appropriate permissions */ - echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size=16 maxlength=16 value=' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '></td> - <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size=5 maxlength=4 value=' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '></td> - <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size=3 maxlength=40 value=' . locale_number_format($OrderLine->GPPercent,2) . '></td>'; + echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td> + <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '" /></td> + <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="4" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" /></td>'; } else { echo '<td class="number">' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td><td></td>'; - echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value=' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '>'; + echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" />'; } if ($_SESSION['Items'.$identifier]->Some_Already_Delivered($OrderLine->LineNumber)){ $RemTxt = _('Clear Remaining'); @@ -1434,8 +1437,8 @@ echo '<br /> <div class="centre"> - <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '"> - <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"> + <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> + <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '" /> </div> <hr />'; } # end of if lines Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-16 07:04:20 UTC (rev 4746) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-16 09:23:02 UTC (rev 4747) @@ -128,7 +128,7 @@ if (DB_num_rows($GetAccountBalanceResult)==1){ $myrow = DB_fetch_array($GetAccountBalanceResult); - $CreditAvailable = filter_number_format($myrow['creditlimit'] - $myrow['balance']); + $CreditAvailable = $myrow['creditlimit'] - $myrow['balance']; } else { $sql = "SELECT creditlimit FROM debtorsmaster @@ -180,7 +180,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['adjglact'] . "', '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') . ' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . filter_number_format(-$ValueOfChange) . "')"; + '" . -$ValueOfChange . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL credit for the stock cost adjustment posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -199,7 +199,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') .' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . filter_number_format($ValueOfChange) . "')"; + '" . $ValueOfChange . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL debit for stock cost adjustment posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -248,7 +248,7 @@ } /* Accepts work order information and iterates through the bom, inserting real components (dissolving phantom assemblies) */ -function WoRealRequirements($db, $WO, $LocCode, $StockID, $Qty=1, $ParentID="") { +function WoRealRequirements($db, $WO, $LocCode, $StockID, $Qty=1, $ParentID='') { // remember, 'G' is for ghost (phantom part type) @@ -267,7 +267,7 @@ SELECT '" . $WO . "', '" . $ParentID . "', bom.component, - bom.quantity*" . filter_number_format($Qty) . ", + bom.quantity*" . $Qty . ", materialcost+labourcost+overheadcost, bom.autoissue FROM bom INNER JOIN stockmaster This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-16 09:23:13
|
Revision: 4747 http://web-erp.svn.sourceforge.net/web-erp/?rev=4747&view=rev Author: daintree Date: 2011-11-16 09:23:02 +0000 (Wed, 16 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/SelectOrderItems.php trunk/includes/SQL_CommonFunctions.inc Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-11-16 07:04:20 UTC (rev 4746) +++ trunk/SelectOrderItems.php 2011-11-16 09:23:02 UTC (rev 4747) @@ -294,7 +294,9 @@ } //Customer logins are not allowed to select other customers henc in_array(2,$_SESSION['AllowedPageSecurityTokens']) -if (isset($_POST['SearchCust']) AND $_SESSION['RequireCustomerSelection']==1 AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ +if (isset($_POST['SearchCust']) + AND $_SESSION['RequireCustomerSelection']==1 + AND in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ if (($_POST['CustKeywords']=='') AND ($_POST['CustCode']=='') AND ($_POST['CustPhone']=='')) { prnMsg(_('At least one Customer Branch Name keyword OR an extract of a Customer Branch Code or Branch Phone Number must be entered for the search'), 'warn'); @@ -339,7 +341,7 @@ if (isset($_POST['JustSelectedACustomer'])){ /*Need to figure out the number of the form variable that the user clicked on */ - for ($i=1;$i<count($_POST);$i++){ //loop through the returned customers + for ($i=0;$i<count($_POST);$i++){ //loop through the returned customers if(isset($_POST['SubmitCustomerSelection'.$i])){ break; } @@ -547,20 +549,20 @@ $DbgMsg = _('SQL used to retrieve the branch details was'); $result =DB_query($sql,$db,$ErrMsg, $DbgMsg); - $myrow = DB_fetch_row($result); - $_SESSION['Items'.$identifier]->DeliverTo = $myrow[0]; - $_SESSION['Items'.$identifier]->DelAdd1 = $myrow[1]; - $_SESSION['Items'.$identifier]->DelAdd2 = $myrow[2]; - $_SESSION['Items'.$identifier]->DelAdd3 = $myrow[3]; - $_SESSION['Items'.$identifier]->DelAdd4 = $myrow[4]; - $_SESSION['Items'.$identifier]->DelAdd5 = $myrow[5]; - $_SESSION['Items'.$identifier]->DelAdd6 = $myrow[6]; - $_SESSION['Items'.$identifier]->PhoneNo = $myrow[7]; - $_SESSION['Items'.$identifier]->Email = $myrow[8]; - $_SESSION['Items'.$identifier]->Location = $myrow[9]; - $_SESSION['Items'.$identifier]->DeliverBlind = $myrow[10]; - $_SESSION['Items'.$identifier]->DeliveryDays = $myrow[11]; - $_SESSION['Items'.$identifier]->LocationName = $myrow[12]; + $myrow = DB_fetch_array($result); + $_SESSION['Items'.$identifier]->DeliverTo = $myrow['brname']; + $_SESSION['Items'.$identifier]->DelAdd1 = $myrow['braddress1']; + $_SESSION['Items'.$identifier]->DelAdd2 = $myrow['braddress2']; + $_SESSION['Items'.$identifier]->DelAdd3 = $myrow['braddress3']; + $_SESSION['Items'.$identifier]->DelAdd4 = $myrow['braddress4']; + $_SESSION['Items'.$identifier]->DelAdd5 = $myrow['braddress5']; + $_SESSION['Items'.$identifier]->DelAdd6 = $myrow['braddress6']; + $_SESSION['Items'.$identifier]->PhoneNo = $myrow['phoneno']; + $_SESSION['Items'.$identifier]->Email = $myrow['email']; + $_SESSION['Items'.$identifier]->Location = $myrow['defaultlocation']; + $_SESSION['Items'.$identifier]->DeliverBlind = $myrow['deliverblind']; + $_SESSION['Items'.$identifier]->DeliveryDays = $myrow['estdeliverydays']; + $_SESSION['Items'.$identifier]->LocationName = $myrow['locationname']; } else { prnMsg(_('Sorry, your account has been put on hold for some reason, please contact the credit control personnel.'),'warn'); include('includes/footer.inc'); @@ -581,21 +583,21 @@ echo '<table cellpadding="3" colspan="4" class="selection"> <tr> <td><h5>' . _('Part of the Customer Branch Name') . ':</h5></td> - <td><input tabindex=1 type="Text" name="CustKeywords" size=20 maxlength=25></td> + <td><input tabindex="1" type="text" name="CustKeywords" size="20" maxlength="25" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Customer Branch Code') . ':</h5></td> - <td><input tabindex=2 type="text" name="CustCode" size=15 maxlength=18></td> + <td><input tabindex=2 type="text" name="CustCode" size="15" maxlength="18" /></td> <td><h2><b>' . _('OR') . '</b></h2></td> <td><h5>' . _('Part of the Branch Phone Number') . ':</h5></td> - <td><input tabindex=3 type="text" name="CustPhone" size=15 maxlength=18></td> + <td><input tabindex=3 type="text" name="CustPhone" size="15" maxlength="18" /></td> </tr> </table> - <br /><div class="centre"><input tabindex=4 type="submit" name="SearchCust" value="' . _('Search Now') . '" /> - <input tabindex=5 type="submit" action="reset" value="' . _('Reset') . '"></div>'; + <br /><div class="centre"><input tabindex="4" type="submit" name="SearchCust" value="' . _('Search Now') . '" /> + <input tabindex=5 type="submit" action="reset" value="' . _('Reset') . '" /></div>'; if (isset($result_CustSelect)) { - echo '<table cellpadding=2 colspan=7>'; + echo '<table class="selection">'; $TableHeader = '<br /><tr> <th>' . _('Customer') . '</th> @@ -625,8 +627,9 @@ } else { echo '<td></td>'; } - echo '<td><input tabindex='.($j+5).' type=submit name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '"></td> - <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'"><input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> + echo '<td><input tabindex="'.strval($j+5).'" type="submit" name="SubmitCustomerSelection' . $j .'" value="' . htmlentities($myrow['brname'], ENT_QUOTES,'UTF-8'). '" /></td> + <input type="hidden" name="SelectedCustomer' . $j .'" value="'.$myrow['debtorno'].'" /> + <input type="hidden" name="SelectedBranch' . $j .'" value="'. $myrow['branchcode'].'" /> <td>'.$myrow['contactname'].'</td> <td>'.$myrow['phoneno'].'</td> <td>'.$myrow['faxno'].'</td> @@ -636,7 +639,7 @@ //end of page full new headings if } //end of while loop - echo '<input type="hidden" name="JustSelectedACustomer" value="Yes">'; + echo '<input type="hidden" name="JustSelectedACustomer" value="Yes" />'; echo '</table></form>'; }//end if results to show @@ -1094,7 +1097,7 @@ prnMsg( _('You are attempting to make the quantity ordered a quantity less than has already been invoiced') . '. ' . _('The quantity delivered and invoiced cannot be modified retrospectively'),'warn'); } elseif ($OrderLine->Quantity !=$Quantity OR $OrderLine->Price != $Price - OR ABS($OrderLine->DiscountPercent -$DiscountPercentage/100) >0.001 + OR ABS($OrderLine->DiscountPercent - $DiscountPercentage/100) >0.001 OR $OrderLine->Narrative != $Narrative OR $OrderLine->ItemDue != $_POST['ItemDue_' . $OrderLine->LineNumber] OR $OrderLine->POLine != $_POST['POLine_' . $OrderLine->LineNumber]) { @@ -1356,17 +1359,17 @@ echo $RowStarter; if($_SESSION['Items'.$identifier]->DefaultPOLine ==1){ //show the input field only if required - echo '<td><input tabindex=1 type="text" name="POLine_' . $OrderLine->LineNumber . '" size=20 maxlength=20 value=' . $OrderLine->POLine . '></td>'; + echo '<td><input tabindex="1" type="text" name="POLine_' . $OrderLine->LineNumber . '" size="20" maxlength="20" value="' . $OrderLine->POLine . '" /></td>'; } else { - echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="">'; + echo '<input type="hidden" name="POLine_' . $OrderLine->LineNumber . '" value="" />'; } echo '<td><a target="_blank" href="' . $rootpath . '/StockStatus.php?identifier='.$identifier . '&StockID=' . $OrderLine->StockID . '&DebtorNo=' . $_SESSION['Items'.$identifier]->DebtorNo . '">' . $OrderLine->StockID . '</a></td> <td>' . $OrderLine->ItemDescription . '</td>'; - echo '<td><input class="number" tabindex=2 type=tect name="Quantity_' . $OrderLine->LineNumber . '" size=6 maxlength=6 value=' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '>'; + echo '<td><input class="number" tabindex="2" type="text" name="Quantity_' . $OrderLine->LineNumber . '" size="6" maxlength="6" value="' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces) . '" />'; if ($QtyRemain != $QtyOrdered){ - echo '<br />'.locale_number_format($OrderLine->QtyInv,$OrderLine->DecimalPlaces) .' of '.locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces).' invoiced'; + echo '<br />'.locale_number_format($OrderLine->QtyInv,$OrderLine->DecimalPlaces) .' ' . _('of') . ' ' . locale_number_format($OrderLine->Quantity,$OrderLine->DecimalPlaces).' ' . _('invoiced'); } echo '</td> <td class="number">' . locale_number_format($OrderLine->QOHatLoc,$OrderLine->DecimalPlaces) . '</td> @@ -1374,12 +1377,12 @@ if (in_array(2,$_SESSION['AllowedPageSecurityTokens'])){ /*OK to display with discount if it is an internal user with appropriate permissions */ - echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size=16 maxlength=16 value=' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '></td> - <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size=5 maxlength=4 value=' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '></td> - <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size=3 maxlength=40 value=' . locale_number_format($OrderLine->GPPercent,2) . '></td>'; + echo '<td><input class="number" type="text" name="Price_' . $OrderLine->LineNumber . '" size="16" maxlength="16" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td> + <td><input class="number" type="text" name="Discount_' . $OrderLine->LineNumber . '" size="5" maxlength="4" value="' . locale_number_format(($OrderLine->DiscountPercent * 100),2) . '" /></td> + <td><input class="number" type="text" name="GPPercent_' . $OrderLine->LineNumber . '" size="4" maxlength="40" value="' . locale_number_format($OrderLine->GPPercent,2) . '" /></td>'; } else { echo '<td class="number">' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td><td></td>'; - echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value=' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '>'; + echo '<input type="hidden" name="Price_' . $OrderLine->LineNumber . '" value="' . locale_number_format($OrderLine->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" />'; } if ($_SESSION['Items'.$identifier]->Some_Already_Delivered($OrderLine->LineNumber)){ $RemTxt = _('Clear Remaining'); @@ -1434,8 +1437,8 @@ echo '<br /> <div class="centre"> - <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '"> - <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '"> + <input type="submit" name="Recalculate" value="' . _('Re-Calculate') . '" /> + <input type="submit" name="DeliveryDetails" value="' . _('Enter Delivery Details and Confirm Order') . '" /> </div> <hr />'; } # end of if lines Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-16 07:04:20 UTC (rev 4746) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-16 09:23:02 UTC (rev 4747) @@ -128,7 +128,7 @@ if (DB_num_rows($GetAccountBalanceResult)==1){ $myrow = DB_fetch_array($GetAccountBalanceResult); - $CreditAvailable = filter_number_format($myrow['creditlimit'] - $myrow['balance']); + $CreditAvailable = $myrow['creditlimit'] - $myrow['balance']; } else { $sql = "SELECT creditlimit FROM debtorsmaster @@ -180,7 +180,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['adjglact'] . "', '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') . ' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . filter_number_format(-$ValueOfChange) . "')"; + '" . -$ValueOfChange . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL credit for the stock cost adjustment posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -199,7 +199,7 @@ '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', '" . $StockID . ' ' . _('cost was') . ' ' . $OldCost . ' ' . _('changed to') .' ' . $NewCost . ' x ' . _('Quantity on hand of') . ' ' . $QOH . "', - '" . filter_number_format($ValueOfChange) . "')"; + '" . $ValueOfChange . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The GL debit for stock cost adjustment posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -248,7 +248,7 @@ } /* Accepts work order information and iterates through the bom, inserting real components (dissolving phantom assemblies) */ -function WoRealRequirements($db, $WO, $LocCode, $StockID, $Qty=1, $ParentID="") { +function WoRealRequirements($db, $WO, $LocCode, $StockID, $Qty=1, $ParentID='') { // remember, 'G' is for ghost (phantom part type) @@ -267,7 +267,7 @@ SELECT '" . $WO . "', '" . $ParentID . "', bom.component, - bom.quantity*" . filter_number_format($Qty) . ", + bom.quantity*" . $Qty . ", materialcost+labourcost+overheadcost, bom.autoissue FROM bom INNER JOIN stockmaster This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-19 04:00:31
|
Revision: 4748 http://web-erp.svn.sourceforge.net/web-erp/?rev=4748&view=rev Author: daintree Date: 2011-11-19 04:00:22 +0000 (Sat, 19 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/CustomerAllocations.php trunk/SelectOrderItems.php trunk/SupplierAllocations.php trunk/SupplierInvoice.php trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/ConnectDB.inc trunk/includes/DefineCartClass.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsFile.php trunk/includes/MiscFunctions.php trunk/sql/mysql/upgrade4.05-4.06.sql Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/ConfirmDispatchControlled_Invoice.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -10,6 +10,14 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); + +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (isset($_GET['LineNo'])){ $LineNo = (int)$_GET['LineNo']; } elseif (isset($_POST['LineNo'])){ Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -13,6 +13,14 @@ include('includes/FreightCalculation.inc'); include('includes/GetSalesTransGLCodes.inc'); + +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (!isset($_GET['OrderNumber']) AND !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with an order number for invoicing*/ echo '<div class="centre"> @@ -25,12 +33,12 @@ exit; } elseif (isset($_GET['OrderNumber']) and $_GET['OrderNumber']>0) { - unset($_SESSION['Items']->LineItems); - unset ($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset ($_SESSION['Items'.$identifier]); $_SESSION['ProcessingOrder']=(int)$_GET['OrderNumber']; $_GET['OrderNumber']=(int)$_GET['OrderNumber']; - $_SESSION['Items'] = new cart; + $_SESSION['Items'.$identifier] = new cart; /*read in all the guff from the selected order into the Items cart */ @@ -81,41 +89,41 @@ $myrow = DB_fetch_array($GetOrdHdrResult); - $_SESSION['Items']->DebtorNo = $myrow['debtorno']; - $_SESSION['Items']->OrderNo = $myrow['orderno']; - $_SESSION['Items']->Branch = $myrow['branchcode']; - $_SESSION['Items']->CustomerName = $myrow['name']; - $_SESSION['Items']->CustRef = $myrow['customerref']; - $_SESSION['Items']->Comments = $myrow['comments']; - $_SESSION['Items']->DefaultSalesType =$myrow['ordertype']; - $_SESSION['Items']->DefaultCurrency = $myrow['currcode']; - $_SESSION['Items']->CurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['Items'.$identifier]->DebtorNo = $myrow['debtorno']; + $_SESSION['Items'.$identifier]->OrderNo = $myrow['orderno']; + $_SESSION['Items'.$identifier]->Branch = $myrow['branchcode']; + $_SESSION['Items'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['Items'.$identifier]->CustRef = $myrow['customerref']; + $_SESSION['Items'.$identifier]->Comments = $myrow['comments']; + $_SESSION['Items'.$identifier]->DefaultSalesType =$myrow['ordertype']; + $_SESSION['Items'.$identifier]->DefaultCurrency = $myrow['currcode']; + $_SESSION['Items'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; $BestShipper = $myrow['shipvia']; - $_SESSION['Items']->ShipVia = $myrow['shipvia']; + $_SESSION['Items'.$identifier]->ShipVia = $myrow['shipvia']; if (is_null($BestShipper)){ $BestShipper=0; } - $_SESSION['Items']->DeliverTo = $myrow['deliverto']; - $_SESSION['Items']->DeliveryDate = ConvertSQLDate($myrow['deliverydate']); - $_SESSION['Items']->BrAdd1 = $myrow['deladd1']; - $_SESSION['Items']->BrAdd2 = $myrow['deladd2']; - $_SESSION['Items']->BrAdd3 = $myrow['deladd3']; - $_SESSION['Items']->BrAdd4 = $myrow['deladd4']; - $_SESSION['Items']->BrAdd5 = $myrow['deladd5']; - $_SESSION['Items']->BrAdd6 = $myrow['deladd6']; - $_SESSION['Items']->PhoneNo = $myrow['contactphone']; - $_SESSION['Items']->Email = $myrow['contactemail']; - $_SESSION['Items']->Location = $myrow['fromstkloc']; - $_SESSION['Items']->FreightCost = $myrow['freightcost']; + $_SESSION['Items'.$identifier]->DeliverTo = $myrow['deliverto']; + $_SESSION['Items'.$identifier]->DeliveryDate = ConvertSQLDate($myrow['deliverydate']); + $_SESSION['Items'.$identifier]->BrAdd1 = $myrow['deladd1']; + $_SESSION['Items'.$identifier]->BrAdd2 = $myrow['deladd2']; + $_SESSION['Items'.$identifier]->BrAdd3 = $myrow['deladd3']; + $_SESSION['Items'.$identifier]->BrAdd4 = $myrow['deladd4']; + $_SESSION['Items'.$identifier]->BrAdd5 = $myrow['deladd5']; + $_SESSION['Items'.$identifier]->BrAdd6 = $myrow['deladd6']; + $_SESSION['Items'.$identifier]->PhoneNo = $myrow['contactphone']; + $_SESSION['Items'.$identifier]->Email = $myrow['contactemail']; + $_SESSION['Items'.$identifier]->Location = $myrow['fromstkloc']; + $_SESSION['Items'.$identifier]->FreightCost = $myrow['freightcost']; $_SESSION['Old_FreightCost'] = $myrow['freightcost']; // $_POST['ChargeFreightCost'] = $_SESSION['Old_FreightCost']; - $_SESSION['Items']->Orig_OrderDate = $myrow['orddate']; + $_SESSION['Items'.$identifier]->Orig_OrderDate = $myrow['orddate']; $_SESSION['CurrencyRate'] = $myrow['currency_rate']; - $_SESSION['Items']->TaxGroup = $myrow['taxgroupid']; - $_SESSION['Items']->DispatchTaxProvince = $myrow['taxprovinceid']; - $_SESSION['Items']->GetFreightTaxes(); - $_SESSION['Items']->SpecialInstructions = $myrow['specialinstructions']; + $_SESSION['Items'.$identifier]->TaxGroup = $myrow['taxgroupid']; + $_SESSION['Items'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['Items'.$identifier]->GetFreightTaxes(); + $_SESSION['Items'.$identifier]->SpecialInstructions = $myrow['specialinstructions']; DB_free_result($GetOrdHdrResult); @@ -156,7 +164,7 @@ while ($myrow=db_fetch_array($LineItemsResult)) { - $_SESSION['Items']->add_to_cart($myrow['stkcode'], + $_SESSION['Items'.$identifier]->add_to_cart($myrow['stkcode'], $myrow['quantity'], $myrow['description'], $myrow['unitprice'], @@ -183,7 +191,7 @@ /*Calculate the taxes applicable to this line item from the customer branch Tax Group and Item Tax Category */ - $_SESSION['Items']->GetTaxes($myrow['orderlineno']); + $_SESSION['Items'.$identifier]->GetTaxes($myrow['orderlineno']); } /* line items from sales order details */ } else { /* there are no line items that have a quantity to deliver */ @@ -207,29 +215,29 @@ /* if processing, a dispatch page has been called and ${$StkItm->LineNumber} would have been set from the post set all the necessary session variables changed by the POST */ if (isset($_POST['ShipVia'])){ - $_SESSION['Items']->ShipVia = $_POST['ShipVia']; + $_SESSION['Items'.$identifier]->ShipVia = $_POST['ShipVia']; } if (isset($_POST['ChargeFreightCost'])){ - $_SESSION['Items']->FreightCost = filter_number_format($_POST['ChargeFreightCost']); + $_SESSION['Items'.$identifier]->FreightCost = filter_number_format($_POST['ChargeFreightCost']); } - foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if (isset($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])){ - $_SESSION['Items']->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; + $_SESSION['Items'.$identifier]->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; } } - foreach ($_SESSION['Items']->LineItems as $Itm) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $Itm) { if (sizeOf($Itm->SerialItems) > 0) { - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched foreach ($Itm->SerialItems as $SerialItem) { //calculate QtyDispatched from bundle quantities - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } - } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items']->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); + } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv)){ + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; } } } //end foreach lineitem @@ -238,23 +246,23 @@ /* Always display dispatch quantities and recalc freight for items being dispatched */ -if ($_SESSION['Items']->SpecialInstructions) { - prnMsg($_SESSION['Items']->SpecialInstructions,'warn'); +if ($_SESSION['Items'.$identifier]->SpecialInstructions) { + prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'warn'); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Confirm Invoice') . '" alt="" />' . ' ' . _('Confirm Dispatch and Invoice'). '</p>'; echo '<table class="selection"> <tr> - <th><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items']->DebtorNo.'</b></th> - <th>' . _('Customer Name') . ' :<b> ' . $_SESSION['Items']->CustomerName. '</b></th> + <th><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items'.$identifier]->DebtorNo.'</b></th> + <th>' . _('Customer Name') . ' :<b> ' . $_SESSION['Items'.$identifier]->CustomerName. '</b></th> </tr> <tr> - <th colspan ="2"><b>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items']->DefaultCurrency . '</b></th> + <th colspan ="2"><b>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items'.$identifier]->DefaultCurrency . '</b></th> </tr> </table> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*************************************************************** @@ -277,9 +285,9 @@ <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> </tr>'; -$_SESSION['Items']->total = 0; -$_SESSION['Items']->totalVolume = 0; -$_SESSION['Items']->totalWeight = 0; +$_SESSION['Items'.$identifier]->total = 0; +$_SESSION['Items'.$identifier]->totalVolume = 0; +$_SESSION['Items'.$identifier]->totalWeight = 0; $TaxTotals = array(); $TaxGLCodes = array(); $TaxTotal =0; @@ -288,7 +296,7 @@ $k=0; //row colour counter $j=0; -foreach ($_SESSION['Items']->LineItems as $LnItm) { +foreach ($_SESSION['Items'.$identifier]->LineItems as $LnItm) { $j++; if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; @@ -300,9 +308,9 @@ $LineTotal = $LnItm->QtyDispatched * $LnItm->Price * (1 - $LnItm->DiscountPercent); - $_SESSION['Items']->total += $LineTotal; - $_SESSION['Items']->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); - $_SESSION['Items']->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); + $_SESSION['Items'.$identifier]->total += $LineTotal; + $_SESSION['Items'.$identifier]->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); + $_SESSION['Items'.$identifier]->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); echo '<td>'.$LnItm->StockID.'</td> <td>'.$LnItm->ItemDescription.'</td> @@ -315,7 +323,7 @@ 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?LineNo='. $LnItm->LineNumber.'">' .locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</a></td>'; + 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>'; } } else { if (isset($_POST['ProcessInvoice'])) { @@ -325,8 +333,8 @@ } } $DisplayDiscountPercent = locale_number_format($LnItm->DiscountPercent*100,2) . '%'; - $DisplayLineNetTotal = locale_number_format($LineTotal,$_SESSION['Items']->CurrDecimalPlaces); - $DisplayPrice = locale_number_format($LnItm->Price,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayLineNetTotal = locale_number_format($LineTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); + $DisplayPrice = locale_number_format($LnItm->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<td class="number">'.$DisplayPrice.'</td> <td class="number">'.$DisplayDiscountPercent.'</td> <td class="number">'.$DisplayLineNetTotal.'</td>'; @@ -334,7 +342,7 @@ /*Need to list the taxes applicable to this line */ echo '<td>'; $i=0; - foreach ($_SESSION['Items']->LineItems[$LnItm->LineNumber]->Taxes AS $Tax) { + foreach ($_SESSION['Items'.$identifier]->LineItems[$LnItm->LineNumber]->Taxes AS $Tax) { if ($i>0){ echo '<br />'; } @@ -374,9 +382,9 @@ $TaxTotal += $TaxLineTotal; - $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); - $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<td class="number">'.$DisplayTaxAmount.'</td> <td class="number">'.$DisplayGrossLineTotal.'</td>'; @@ -404,16 +412,16 @@ It seems unfair to charge the customer twice for freight if the order was not fully delivered the first time ?? */ -if(!isset($_SESSION['Items']->FreightCost)) { +if(!isset($_SESSION['Items'.$identifier]->FreightCost)) { if ($_SESSION['DoFreightCalc']==True){ - list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items']->total, - $_SESSION['Items']->BrAdd2, - $_SESSION['Items']->BrAdd3, - $_SESSION['Items']->totalVolume, - $_SESSION['Items']->totalWeight, - $_SESSION['Items']->Location, + list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items'.$identifier]->total, + $_SESSION['Items'.$identifier]->BrAdd2, + $_SESSION['Items'.$identifier]->BrAdd3, + $_SESSION['Items'.$identifier]->totalVolume, + $_SESSION['Items'.$identifier]->totalWeight, + $_SESSION['Items'.$identifier]->Location, $db); - $_SESSION['Items']->ShipVia = $BestShipper; + $_SESSION['Items'.$identifier]->ShipVia = $BestShipper; } if (is_numeric($FreightCost)){ $FreightCost = $FreightCost / $_SESSION['CurrencyRate']; @@ -447,11 +455,11 @@ echo '<tr> <td colspan="5" class="number">' . _('Order Freight Cost'). '</td> - <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; if ($_SESSION['DoFreightCalc']==True){ echo '<td colspan="2" class="number">' ._('Recalculated Freight Cost'). '</td> - <td class="number">' . locale_number_format($FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + <td class="number">' . locale_number_format($FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { // echo '<td colspan="1"></td>'; } @@ -459,18 +467,18 @@ if (!isset($_POST['ChargeFreightCost'])) { $_POST['ChargeFreightCost']=0; } -if ($_SESSION['Items']->Any_Already_Delivered()==1 and (!isset($_SESSION['Items']->FreightCost) or $_POST['ChargeFreightCost']==0)) { +if ($_SESSION['Items'.$identifier]->Any_Already_Delivered()==1 and (!isset($_SESSION['Items'.$identifier]->FreightCost) or $_POST['ChargeFreightCost']==0)) { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td> <td><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0"></td>'; - $_SESSION['Items']->FreightCost=0; + $_SESSION['Items'.$identifier]->FreightCost=0; } else { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td>'; if (isset($_POST['ProcessInvoice'])) { - echo '<td class="number">' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + echo '<td class="number">' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '" /></td>'; + echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; } - $_POST['ChargeFreightCost'] = $_SESSION['Items']->FreightCost; + $_POST['ChargeFreightCost'] = $_SESSION['Items'.$identifier]->FreightCost; } $FreightTaxTotal =0; //initialise tax total @@ -478,7 +486,7 @@ echo '<td>'; $i=0; // initialise the number of taxes iterated through -foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { +foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -489,7 +497,7 @@ echo '</td><td class="number">'; $i=0; -foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { +foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -498,41 +506,41 @@ echo $FreightTaxLine->TaxRate * 100 ; } else { echo '<input type="text" class="number" name="FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . - '" maxlength="4" size="4" value="' . locale_number_format($FreightTaxLine->TaxRate * 100,$_SESSION['Items']->CurrDecimalPlaces) . '" />'; + '" maxlength="4" size="4" value="' . locale_number_format($FreightTaxLine->TaxRate * 100,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" />'; } if ($FreightTaxLine->TaxOnTax ==1){ - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['Items']->FreightCost + $FreightTaxTotal)); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['Items']->FreightCost + $FreightTaxTotal)); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['Items'.$identifier]->FreightCost + $FreightTaxTotal)); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['Items'.$identifier]->FreightCost + $FreightTaxTotal)); } else { - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['Items']->FreightCost); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['Items']->FreightCost); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['Items'.$identifier]->FreightCost); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['Items'.$identifier]->FreightCost); } $i++; $TaxGLCodes[$FreightTaxLine->TaxAuthID] = $FreightTaxLine->TaxGLCode; } echo '</td>'; -echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</td> - <td class="number">' . locale_number_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td> +echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> </tr>'; $TaxTotal += $FreightTaxTotal; -$DisplaySubTotal = locale_number_format(($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces); +$DisplaySubTotal = locale_number_format(($_SESSION['Items'.$identifier]->total + $_POST['ChargeFreightCost']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces); /* round the totals to avoid silly entries */ -$TaxTotal = round($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces); -$_SESSION['Items']->total = round($_SESSION['Items']->total,$_SESSION['Items']->CurrDecimalPlaces); -$_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces); +$TaxTotal = round($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); +$_SESSION['Items'.$identifier]->total = round($_SESSION['Items'.$identifier]->total,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); +$_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<tr> <td colspan="10" class="number">' . _('Invoice Totals'). '</td> <td class="number:><hr><b>'.$DisplaySubTotal.'</b><hr></td> <td colspan="2"></td> - <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td> - <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td> + <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</b><hr></td> + <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['Items'.$identifier]->total + $_POST['ChargeFreightCost']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</b><hr></td> </tr>'; if (! isset($_POST['DispatchDate']) OR ! Is_Date($_POST['DispatchDate'])){ @@ -552,7 +560,7 @@ $QuantityInvoicedIsPositive = false; - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { if ($OrderLine->QtyDispatched > 0){ $QuantityInvoicedIsPositive =true; } @@ -566,7 +574,7 @@ if ($_SESSION['ProhibitNegativeStock']==1){ // checks for negative stock after processing invoice //sadly this check does not combine quantities occuring twice on and order and each line is considered individually :-( $NegativesFound = false; - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { $SQL = "SELECT stockmaster.description, locstock.quantity, stockmaster.mbflag @@ -574,7 +582,7 @@ INNER JOIN stockmaster ON stockmaster.stockid=locstock.stockid WHERE stockmaster.stockid='" . $OrderLine->StockID . "' - AND locstock.loccode='" . $_SESSION['Items']->Location . "'"; + AND locstock.loccode='" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$db,$ErrMsg); @@ -596,7 +604,7 @@ INNER JOIN stockmaster ON stockmaster.stockid=bom.component WHERE bom.parent='" . $OrderLine->StockID . "' - AND locstock.loccode='" . $_SESSION['Items']->Location . "' + AND locstock.loccode='" . $_SESSION['Items'.$identifier]->Location . "' AND effectiveafter <'" . Date('Y-m-d') . "' AND effectiveto >='" . Date('Y-m-d') . "'"; @@ -627,8 +635,8 @@ $SQL = "SELECT area, defaultshipvia FROM custbranch - WHERE custbranch.debtorno ='". $_SESSION['Items']->DebtorNo . "' - AND custbranch.branchcode = '" . $_SESSION['Items']->Branch . "'"; + WHERE custbranch.debtorno ='". $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch.branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "'"; $ErrMsg = _('We were unable to load Area where the Sale is to from the BRANCHES table') . '. ' . _('Please remedy this'); $Result = DB_query($SQL,$db, $ErrMsg); @@ -658,21 +666,21 @@ $Result = DB_query($SQL,$db); - if (DB_num_rows($Result) != count($_SESSION['Items']->LineItems)){ + if (DB_num_rows($Result) != count($_SESSION['Items'.$identifier]->LineItems)){ /*there should be the same number of items returned from this query as there are lines on the invoice - if not then someone has already invoiced or credited some lines */ if ($debug==1){ echo '<br />'.$SQL; echo '<br />' . _('Number of rows returned by SQL') . ':' . DB_num_rows($Result); - echo '<br />' . _('Count of items in the session') . ' ' . count($_SESSION['Items']->LineItems); + echo '<br />' . _('Count of items in the session') . ' ' . count($_SESSION['Items'.$identifier]->LineItems); } echo '<br />'; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . '. ' . _('Processing halted') . '. ' . _('To enter and confirm this dispatch') . '/' . _('invoice the order must be re-selected and re-read again to update the changes made by the other user'), 'error'); - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); include('includes/footer.inc'); exit; } @@ -681,10 +689,10 @@ while ($myrow = DB_fetch_array($Result)) { - if ($_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity != $myrow['quantity'] - OR $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv != $myrow['qtyinvoiced']) { + if ($_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->Quantity != $myrow['quantity'] + OR $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->QtyInv != $myrow['qtyinvoiced']) { - echo '<br />'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . $myrow['quantity'] . ' '. _('and an invoiced qty of'). ' ' . $myrow['qtyinvoiced'] . ' '. _('the session shows quantity of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv; + echo '<br />'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . $myrow['quantity'] . ' '. _('and an invoiced qty of'). ' ' . $myrow['qtyinvoiced'] . ' '. _('the session shows quantity of'). ' ' . $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->QtyInv; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . ' ' . _('Processing halted.') . ' ' . _('To enter and confirm this dispatch, it must be re-selected and re-read again to update the changes made by the other user'), 'error'); @@ -692,8 +700,8 @@ echo '<div class="centre"><a href="'. $rootpath . '/SelectSalesOrder.php">'. _('Select a sales order for confirming deliveries and invoicing'). '</a></div>'; - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); include('includes/footer.inc'); exit; @@ -715,11 +723,11 @@ DB_Txn_Begin($db); - if ($DefaultShipVia != $_SESSION['Items']->ShipVia){ + if ($DefaultShipVia != $_SESSION['Items'.$identifier]->ShipVia){ $SQL = "UPDATE custbranch - SET defaultshipvia ='" . $_SESSION['Items']->ShipVia . "' - WHERE debtorno='" . $_SESSION['Items']->DebtorNo . "' - AND branchcode='" . $_SESSION['Items']->Branch . "'"; + SET defaultshipvia ='" . $_SESSION['Items'.$identifier]->ShipVia . "' + WHERE debtorno='" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND branchcode='" . $_SESSION['Items'.$identifier]->Branch . "'"; $ErrMsg = _('Could not update the default shipping carrier for this branch because'); $DbgMsg = _('The SQL used to update the branch default carrier was'); $result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); @@ -758,20 +766,20 @@ VALUES ( '". $InvoiceNo . "', 10, - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $DefaultDispatchDate . "', '" . date('Y-m-d H-i-s') . "', '" . $PeriodNo . "', '', - '" . $_SESSION['Items']->DefaultSalesType . "', + '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $_SESSION['ProcessingOrder'] . "', - '" . $_SESSION['Items']->total . "', + '" . $_SESSION['Items'.$identifier]->total . "', '" . $TaxTotal . "', '" . filter_number_format($_POST['ChargeFreightCost']) . "', '" . $_SESSION['CurrencyRate'] . "', '" . $_POST['InvoiceText'] . "', - '" . $_SESSION['Items']->ShipVia . "', + '" . $_SESSION['Items'.$identifier]->ShipVia . "', '" . $_POST['Consignment'] . "' )"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction record could not be inserted because'); @@ -798,7 +806,7 @@ /* If balance of the order cancelled update sales order details quantity. Also insert log records for OrderDeliveryDifferencesLog */ - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { /*Test to see if the item being sold is an asset */ if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ @@ -841,8 +849,8 @@ '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', '" . ($OrderLine->Quantity - $OrderLine->QtyDispatched) . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', 'CAN')"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); @@ -851,7 +859,7 @@ } } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0 - AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d')>0) { + AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items'.$identifier]->DeliveryDate,'d')>0) { /*The order is being short delivered after the due date - need to insert a delivery differnce log */ @@ -868,8 +876,8 @@ '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', 'BO' )"; @@ -920,7 +928,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $OrderLine->StockID . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('WARNING') . ': ' . _('Could not retrieve current location stock'); $Result = DB_query($SQL, $db, $ErrMsg); @@ -935,7 +943,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the location stock record was used'); @@ -967,7 +975,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $AssParts['component'] . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Can not retrieve assembly components location stock quantities because '); $DbgMsg = _('The SQL that failed was'); @@ -998,10 +1006,10 @@ VALUES ('" . $AssParts['component'] . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $PeriodNo . "', '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "', '" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "', @@ -1017,7 +1025,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . ($AssParts['quantity'] * $OrderLine->QtyDispatched) . " WHERE locstock.stockid = '" . $AssParts['component'] . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated for an assembly component because'); $DbgMsg = _('The following SQL to update the locations stock record for the component was used'); @@ -1025,7 +1033,7 @@ } /* end of assembly explosion and updates */ /*Update the cart with the recalculated standard cost from the explosion of the assembly's components*/ - $_SESSION['Items']->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; + $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; $OrderLine->StandardCost = $StandardCost; } /* end of its an assembly */ @@ -1054,10 +1062,10 @@ VALUES ('" . $OrderLine->StockID . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['ProcessingOrder'] . "', @@ -1088,10 +1096,10 @@ VALUES ('" . $OrderLine->StockID . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['ProcessingOrder'] . "', @@ -1137,7 +1145,7 @@ $SQL = "UPDATE stockserialitems SET quantity= quantity - " . $Item->BundleQty . " WHERE stockid='" . $OrderLine->StockID . "' - AND loccode='" . $_SESSION['Items']->Location . "' + AND loccode='" . $_SESSION['Items'.$identifier]->Location . "' AND serialno='" . DB_escape_string($Item->BundleRef) . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -1181,10 +1189,10 @@ AND salesanalysis.custbranch=custbranch.branchcode AND salesanalysis.area=custbranch.area AND salesanalysis.salesperson=custbranch.salesman - AND salesanalysis.typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' AND salesanalysis.stockid " . LIKE . " '" . $OrderLine->StockID . "' AND salesanalysis.budgetoractual=1 GROUP BY salesanalysis.stockid, @@ -1210,10 +1218,10 @@ disc=disc+" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . " WHERE salesanalysis.area='" . $myrow[5] . "' AND salesanalysis.salesperson='" . $myrow[8] . "' - AND typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' AND periodno = '" . $PeriodNo . "' - AND cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' AND stockid " . LIKE . " '" . $OrderLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[2] . "' AND budgetoractual=1"; @@ -1233,12 +1241,12 @@ budgetoractual, salesperson, stkcategory ) - SELECT '" . $_SESSION['Items']->DefaultSalesType . "', + SELECT '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $PeriodNo . "', '" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . ($OrderLine->QtyDispatched) . "', '" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $OrderLine->StockID . "', @@ -1249,8 +1257,8 @@ FROM stockmaster, custbranch WHERE stockmaster.stockid = '" . $OrderLine->StockID . "' - AND custbranch.debtorno = '" . $_SESSION['Items']->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['Items']->Branch . "'"; + AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "'"; } $ErrMsg = _('Sales analysis record could not be added or updated because'); @@ -1275,8 +1283,8 @@ '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', - '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', + '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db) . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); @@ -1299,7 +1307,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', '" . round((-$OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because'); @@ -1311,7 +1319,7 @@ if (!$IsAsset){ // its a normal stock item //Post sales transaction to GL credit sales - $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db); + $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1326,7 +1334,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); @@ -1348,7 +1356,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', '" . round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); @@ -1394,7 +1402,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['accumdepnact'] . "', - '" . $_SESSION['Items']->DebtorNo . ' - ' . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . ' - ' . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['accumdpen'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of accumulated depreciation GL posting on disposal could not be inserted because'); @@ -1416,7 +1424,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['costact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['cost'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of asset cost on dispoal GL posting could not be inserted because'); @@ -1438,7 +1446,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . ($DisposalRow['cost']-$DisposalRow['accumdepn']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal net book value GL posting could not be inserted because'); @@ -1460,7 +1468,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because'); @@ -1512,7 +1520,7 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post debtors transaction to GL debit debtors, credit freight re-charged and credit sales */ - if (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal) !=0) { + if (($_SESSION['Items'.$identifier]->total + $_SESSION['Items'.$identifier]->FreightCost + $TaxTotal) !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1526,8 +1534,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . round((($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . round((($_SESSION['Items'.$identifier]->total + $_SESSION['Items'.$identifier]->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1536,7 +1544,7 @@ /*Could do with setting up a more flexible freight posting schema that looks at the sales type and area of the customer branch to determine where to post the freight recovery */ - if ($_SESSION['Items']->FreightCost !=0) { + if ($_SESSION['Items'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans ( type, typeno, @@ -1551,8 +1559,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . round((-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . round((-$_SESSION['Items'.$identifier]->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1573,7 +1581,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', - '" . $_SESSION['Items']->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . round((-$TaxAmount/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); @@ -1589,8 +1597,8 @@ // 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 // ************************************************************************* - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); echo prnMsg( _('Invoice number'). ' '. $InvoiceNo .' '. _('processed'), 'success'); @@ -1649,7 +1657,7 @@ echo '<br /> <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> </div> - <input type="hidden" name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '" />'; + <input type="hidden" name="ShipVia" value="' . $_SESSION['Items'.$identifier]->ShipVia . '" />'; } echo '</form>'; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/CounterSales.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -488,27 +488,35 @@ if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){ - $Quantity = filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]); + $Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces); - if (abs($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ - $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); - $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); - } else if (abs($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.001) { - //then do a recalculation of the price at this new GP Percentage - $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); - } else { - $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); - } - $DiscountPercentage = filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]); - if ($_SESSION['AllowOrderLineItemNarrative'] == 1) { - $Narrative = $_POST['Narrative_' . $OrderLine->LineNumber]; - } else { - $Narrative = ''; - } + if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ + /*There is a new price being input for the line item */ + + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); + $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); + + } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) { + /* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */ + + + prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); + + + $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); + } else { + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); + } + $DiscountPercentage = filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]); + if ($_SESSION['AllowOrderLineItemNarrative'] == 1) { + $Narrative = $_POST['Narrative_' . $OrderLine->LineNumber]; + } else { + $Narrative = ''; + } - if (!isset($OrderLine->DiscountPercent)) { - $OrderLine->DiscountPercent = 0; - } + if (!isset($OrderLine->DiscountPercent)) { + $OrderLine->DiscountPercent = 0; + } if ($Quantity<0 or $Price <0 or $DiscountPercentage >100 or $DiscountPercentage <0){ prnMsg(_('The item could not be updated because you are attempting to set the quantity ordered to less than 0 or the price less than 0 or the discount more than 100% or less than 0%'),'warn'); @@ -871,7 +879,9 @@ $BankAccountsResult = DB_query("SELECT bankaccountname, accountcode FROM bankaccounts",$db); - echo '<tr><td>' . _('Banked to') . ':</td><td><select name="BankAccount">'; + echo '<tr> + <td>' . _('Banked to') . ':</td> + <td><select name="BankAccount">'; while ($BankAccountsRow = DB_fetch_array($BankAccountsResult)){ if (isset($_POST['BankAccount']) AND $_POST['BankAccount'] == $BankAccountsRow['accountcode']){ echo '<option selected="True" value="' . $BankAccountsRow['accountcode'] . '">' . $BankAccountsRow['bankaccountname'] . '</option>'; @@ -879,12 +889,13 @@ echo '<option value="' . $BankAccountsRow['accountcode'] . '">' . $BankAccountsRow['bankaccountname'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; if (!isset($_POST['AmountPaid'])){ $_POST['AmountPaid'] =0; } - echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . filter_number_format($_POST['AmountPaid']) . '" /></td></tr>'; + echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . $_POST['AmountPaid'] . '" /></td></tr>'; echo '</table>'; //end the sub table in the second column of master table echo '</th></tr></table>'; //end of column/row/master table Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/CustomerAllocations.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -582,17 +582,17 @@ if (!isset($Balance)) { $Balance=0; } - echo '<tr class="OddTableRows"> - <td colspan="7" class="number"><b>' . locale_number_format($Balance,$CurrDecimalPlaces) .'</b></td> - <td><b>' . $CurrCode . '</b></td> - <td><b>' . _('Balance') . '</b></td> - </tr> - </table> - <br />'; - if ($NoOfUnallocatedTrans == 0) { prnMsg(_('There are no allocations to be done'),'info'); + } else { + echo '<tr class="OddTableRows"> + <td colspan="7" class="number"><b>' . locale_number_format($Balance,$CurrDecimalPlaces) .'</b></td> + <td><b>' . $CurrCode . '</b></td> + <td><b>' . _('Balance') . '</b></td> + </tr>'; } + echo '</table> + <br />'; } echo '</td> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/SelectOrderItems.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -1061,10 +1061,18 @@ $Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces); if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ + /*There is a new price being input for the line item */ + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); - } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.001) { - //then do a recalculation of the price at this new GP Percentage + + } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) { + /* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */ + + + prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); + + ... [truncated message content] |
From: <dai...@us...> - 2011-11-19 04:00:31
|
Revision: 4748 http://web-erp.svn.sourceforge.net/web-erp/?rev=4748&view=rev Author: daintree Date: 2011-11-19 04:00:22 +0000 (Sat, 19 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/CounterSales.php trunk/CustomerAllocations.php trunk/SelectOrderItems.php trunk/SupplierAllocations.php trunk/SupplierInvoice.php trunk/UpgradeDatabase.php trunk/doc/Change.log trunk/includes/ConnectDB.inc trunk/includes/DefineCartClass.php trunk/includes/InputSerialItemsExisting.php trunk/includes/InputSerialItemsFile.php trunk/includes/MiscFunctions.php trunk/sql/mysql/upgrade4.05-4.06.sql Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/ConfirmDispatchControlled_Invoice.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -10,6 +10,14 @@ /* Session started in header.inc for password checking and authorisation level check */ include('includes/header.inc'); + +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (isset($_GET['LineNo'])){ $LineNo = (int)$_GET['LineNo']; } elseif (isset($_POST['LineNo'])){ Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -13,6 +13,14 @@ include('includes/FreightCalculation.inc'); include('includes/GetSalesTransGLCodes.inc'); + +if (empty($_GET['identifier'])) { + /*unique session identifier to ensure that there is no conflict with other order entry sessions on the same machine */ + $identifier=date('U'); +} else { + $identifier=$_GET['identifier']; +} + if (!isset($_GET['OrderNumber']) AND !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with an order number for invoicing*/ echo '<div class="centre"> @@ -25,12 +33,12 @@ exit; } elseif (isset($_GET['OrderNumber']) and $_GET['OrderNumber']>0) { - unset($_SESSION['Items']->LineItems); - unset ($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset ($_SESSION['Items'.$identifier]); $_SESSION['ProcessingOrder']=(int)$_GET['OrderNumber']; $_GET['OrderNumber']=(int)$_GET['OrderNumber']; - $_SESSION['Items'] = new cart; + $_SESSION['Items'.$identifier] = new cart; /*read in all the guff from the selected order into the Items cart */ @@ -81,41 +89,41 @@ $myrow = DB_fetch_array($GetOrdHdrResult); - $_SESSION['Items']->DebtorNo = $myrow['debtorno']; - $_SESSION['Items']->OrderNo = $myrow['orderno']; - $_SESSION['Items']->Branch = $myrow['branchcode']; - $_SESSION['Items']->CustomerName = $myrow['name']; - $_SESSION['Items']->CustRef = $myrow['customerref']; - $_SESSION['Items']->Comments = $myrow['comments']; - $_SESSION['Items']->DefaultSalesType =$myrow['ordertype']; - $_SESSION['Items']->DefaultCurrency = $myrow['currcode']; - $_SESSION['Items']->CurrDecimalPlaces = $myrow['decimalplaces']; + $_SESSION['Items'.$identifier]->DebtorNo = $myrow['debtorno']; + $_SESSION['Items'.$identifier]->OrderNo = $myrow['orderno']; + $_SESSION['Items'.$identifier]->Branch = $myrow['branchcode']; + $_SESSION['Items'.$identifier]->CustomerName = $myrow['name']; + $_SESSION['Items'.$identifier]->CustRef = $myrow['customerref']; + $_SESSION['Items'.$identifier]->Comments = $myrow['comments']; + $_SESSION['Items'.$identifier]->DefaultSalesType =$myrow['ordertype']; + $_SESSION['Items'.$identifier]->DefaultCurrency = $myrow['currcode']; + $_SESSION['Items'.$identifier]->CurrDecimalPlaces = $myrow['decimalplaces']; $BestShipper = $myrow['shipvia']; - $_SESSION['Items']->ShipVia = $myrow['shipvia']; + $_SESSION['Items'.$identifier]->ShipVia = $myrow['shipvia']; if (is_null($BestShipper)){ $BestShipper=0; } - $_SESSION['Items']->DeliverTo = $myrow['deliverto']; - $_SESSION['Items']->DeliveryDate = ConvertSQLDate($myrow['deliverydate']); - $_SESSION['Items']->BrAdd1 = $myrow['deladd1']; - $_SESSION['Items']->BrAdd2 = $myrow['deladd2']; - $_SESSION['Items']->BrAdd3 = $myrow['deladd3']; - $_SESSION['Items']->BrAdd4 = $myrow['deladd4']; - $_SESSION['Items']->BrAdd5 = $myrow['deladd5']; - $_SESSION['Items']->BrAdd6 = $myrow['deladd6']; - $_SESSION['Items']->PhoneNo = $myrow['contactphone']; - $_SESSION['Items']->Email = $myrow['contactemail']; - $_SESSION['Items']->Location = $myrow['fromstkloc']; - $_SESSION['Items']->FreightCost = $myrow['freightcost']; + $_SESSION['Items'.$identifier]->DeliverTo = $myrow['deliverto']; + $_SESSION['Items'.$identifier]->DeliveryDate = ConvertSQLDate($myrow['deliverydate']); + $_SESSION['Items'.$identifier]->BrAdd1 = $myrow['deladd1']; + $_SESSION['Items'.$identifier]->BrAdd2 = $myrow['deladd2']; + $_SESSION['Items'.$identifier]->BrAdd3 = $myrow['deladd3']; + $_SESSION['Items'.$identifier]->BrAdd4 = $myrow['deladd4']; + $_SESSION['Items'.$identifier]->BrAdd5 = $myrow['deladd5']; + $_SESSION['Items'.$identifier]->BrAdd6 = $myrow['deladd6']; + $_SESSION['Items'.$identifier]->PhoneNo = $myrow['contactphone']; + $_SESSION['Items'.$identifier]->Email = $myrow['contactemail']; + $_SESSION['Items'.$identifier]->Location = $myrow['fromstkloc']; + $_SESSION['Items'.$identifier]->FreightCost = $myrow['freightcost']; $_SESSION['Old_FreightCost'] = $myrow['freightcost']; // $_POST['ChargeFreightCost'] = $_SESSION['Old_FreightCost']; - $_SESSION['Items']->Orig_OrderDate = $myrow['orddate']; + $_SESSION['Items'.$identifier]->Orig_OrderDate = $myrow['orddate']; $_SESSION['CurrencyRate'] = $myrow['currency_rate']; - $_SESSION['Items']->TaxGroup = $myrow['taxgroupid']; - $_SESSION['Items']->DispatchTaxProvince = $myrow['taxprovinceid']; - $_SESSION['Items']->GetFreightTaxes(); - $_SESSION['Items']->SpecialInstructions = $myrow['specialinstructions']; + $_SESSION['Items'.$identifier]->TaxGroup = $myrow['taxgroupid']; + $_SESSION['Items'.$identifier]->DispatchTaxProvince = $myrow['taxprovinceid']; + $_SESSION['Items'.$identifier]->GetFreightTaxes(); + $_SESSION['Items'.$identifier]->SpecialInstructions = $myrow['specialinstructions']; DB_free_result($GetOrdHdrResult); @@ -156,7 +164,7 @@ while ($myrow=db_fetch_array($LineItemsResult)) { - $_SESSION['Items']->add_to_cart($myrow['stkcode'], + $_SESSION['Items'.$identifier]->add_to_cart($myrow['stkcode'], $myrow['quantity'], $myrow['description'], $myrow['unitprice'], @@ -183,7 +191,7 @@ /*Calculate the taxes applicable to this line item from the customer branch Tax Group and Item Tax Category */ - $_SESSION['Items']->GetTaxes($myrow['orderlineno']); + $_SESSION['Items'.$identifier]->GetTaxes($myrow['orderlineno']); } /* line items from sales order details */ } else { /* there are no line items that have a quantity to deliver */ @@ -207,29 +215,29 @@ /* if processing, a dispatch page has been called and ${$StkItm->LineNumber} would have been set from the post set all the necessary session variables changed by the POST */ if (isset($_POST['ShipVia'])){ - $_SESSION['Items']->ShipVia = $_POST['ShipVia']; + $_SESSION['Items'.$identifier]->ShipVia = $_POST['ShipVia']; } if (isset($_POST['ChargeFreightCost'])){ - $_SESSION['Items']->FreightCost = filter_number_format($_POST['ChargeFreightCost']); + $_SESSION['Items'.$identifier]->FreightCost = filter_number_format($_POST['ChargeFreightCost']); } - foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { + foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if (isset($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])){ - $_SESSION['Items']->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; + $_SESSION['Items'.$identifier]->FreightTaxes[$FreightTaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST['FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder])/100; } } - foreach ($_SESSION['Items']->LineItems as $Itm) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $Itm) { if (sizeOf($Itm->SerialItems) > 0) { - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = 0; //initialise QtyDispatched foreach ($Itm->SerialItems as $SerialItem) { //calculate QtyDispatched from bundle quantities - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } - } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items']->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); + } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv)){ + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ - $_SESSION['Items']->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Taxes[$TaxLine->TaxCalculationOrder]->TaxRate = filter_number_format($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])/100; } } } //end foreach lineitem @@ -238,23 +246,23 @@ /* Always display dispatch quantities and recalc freight for items being dispatched */ -if ($_SESSION['Items']->SpecialInstructions) { - prnMsg($_SESSION['Items']->SpecialInstructions,'warn'); +if ($_SESSION['Items'.$identifier]->SpecialInstructions) { + prnMsg($_SESSION['Items'.$identifier]->SpecialInstructions,'warn'); } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/inventory.png" title="' . _('Confirm Invoice') . '" alt="" />' . ' ' . _('Confirm Dispatch and Invoice'). '</p>'; echo '<table class="selection"> <tr> - <th><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items']->DebtorNo.'</b></th> - <th>' . _('Customer Name') . ' :<b> ' . $_SESSION['Items']->CustomerName. '</b></th> + <th><img src="'.$rootpath.'/css/'.$theme.'/images/customer.png" title="' . _('Customer') . '" alt="" />' . ' ' . _('Customer Code') . ' :<b> ' . $_SESSION['Items'.$identifier]->DebtorNo.'</b></th> + <th>' . _('Customer Name') . ' :<b> ' . $_SESSION['Items'.$identifier]->CustomerName. '</b></th> </tr> <tr> - <th colspan ="2"><b>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items']->DefaultCurrency . '</b></th> + <th colspan ="2"><b>' . _('Invoice amounts stated in') . ' ' . $_SESSION['Items'.$identifier]->DefaultCurrency . '</b></th> </tr> </table> <br />'; -echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="post">'; +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?identifier='.$identifier . '" method="post">'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; /*************************************************************** @@ -277,9 +285,9 @@ <th>' . _('Total') . '<br />' . _('Incl Tax') . '</th> </tr>'; -$_SESSION['Items']->total = 0; -$_SESSION['Items']->totalVolume = 0; -$_SESSION['Items']->totalWeight = 0; +$_SESSION['Items'.$identifier]->total = 0; +$_SESSION['Items'.$identifier]->totalVolume = 0; +$_SESSION['Items'.$identifier]->totalWeight = 0; $TaxTotals = array(); $TaxGLCodes = array(); $TaxTotal =0; @@ -288,7 +296,7 @@ $k=0; //row colour counter $j=0; -foreach ($_SESSION['Items']->LineItems as $LnItm) { +foreach ($_SESSION['Items'.$identifier]->LineItems as $LnItm) { $j++; if ($k==1){ $RowStarter = '<tr class="EvenTableRows">'; @@ -300,9 +308,9 @@ $LineTotal = $LnItm->QtyDispatched * $LnItm->Price * (1 - $LnItm->DiscountPercent); - $_SESSION['Items']->total += $LineTotal; - $_SESSION['Items']->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); - $_SESSION['Items']->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); + $_SESSION['Items'.$identifier]->total += $LineTotal; + $_SESSION['Items'.$identifier]->totalVolume += ($LnItm->QtyDispatched * $LnItm->Volume); + $_SESSION['Items'.$identifier]->totalWeight += ($LnItm->QtyDispatched * $LnItm->Weight); echo '<td>'.$LnItm->StockID.'</td> <td>'.$LnItm->ItemDescription.'</td> @@ -315,7 +323,7 @@ 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?LineNo='. $LnItm->LineNumber.'">' .locale_number_format($LnItm->QtyDispatched,$LnItm->DecimalPlaces) . '</a></td>'; + 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>'; } } else { if (isset($_POST['ProcessInvoice'])) { @@ -325,8 +333,8 @@ } } $DisplayDiscountPercent = locale_number_format($LnItm->DiscountPercent*100,2) . '%'; - $DisplayLineNetTotal = locale_number_format($LineTotal,$_SESSION['Items']->CurrDecimalPlaces); - $DisplayPrice = locale_number_format($LnItm->Price,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayLineNetTotal = locale_number_format($LineTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); + $DisplayPrice = locale_number_format($LnItm->Price,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<td class="number">'.$DisplayPrice.'</td> <td class="number">'.$DisplayDiscountPercent.'</td> <td class="number">'.$DisplayLineNetTotal.'</td>'; @@ -334,7 +342,7 @@ /*Need to list the taxes applicable to this line */ echo '<td>'; $i=0; - foreach ($_SESSION['Items']->LineItems[$LnItm->LineNumber]->Taxes AS $Tax) { + foreach ($_SESSION['Items'.$identifier]->LineItems[$LnItm->LineNumber]->Taxes AS $Tax) { if ($i>0){ echo '<br />'; } @@ -374,9 +382,9 @@ $TaxTotal += $TaxLineTotal; - $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayTaxAmount = locale_number_format($TaxLineTotal ,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); - $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['Items']->CurrDecimalPlaces); + $DisplayGrossLineTotal = locale_number_format($LineTotal+ $TaxLineTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<td class="number">'.$DisplayTaxAmount.'</td> <td class="number">'.$DisplayGrossLineTotal.'</td>'; @@ -404,16 +412,16 @@ It seems unfair to charge the customer twice for freight if the order was not fully delivered the first time ?? */ -if(!isset($_SESSION['Items']->FreightCost)) { +if(!isset($_SESSION['Items'.$identifier]->FreightCost)) { if ($_SESSION['DoFreightCalc']==True){ - list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items']->total, - $_SESSION['Items']->BrAdd2, - $_SESSION['Items']->BrAdd3, - $_SESSION['Items']->totalVolume, - $_SESSION['Items']->totalWeight, - $_SESSION['Items']->Location, + list ($FreightCost, $BestShipper) = CalcFreightCost($_SESSION['Items'.$identifier]->total, + $_SESSION['Items'.$identifier]->BrAdd2, + $_SESSION['Items'.$identifier]->BrAdd3, + $_SESSION['Items'.$identifier]->totalVolume, + $_SESSION['Items'.$identifier]->totalWeight, + $_SESSION['Items'.$identifier]->Location, $db); - $_SESSION['Items']->ShipVia = $BestShipper; + $_SESSION['Items'.$identifier]->ShipVia = $BestShipper; } if (is_numeric($FreightCost)){ $FreightCost = $FreightCost / $_SESSION['CurrencyRate']; @@ -447,11 +455,11 @@ echo '<tr> <td colspan="5" class="number">' . _('Order Freight Cost'). '</td> - <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + <td class="number">' . locale_number_format($_SESSION['Old_FreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; if ($_SESSION['DoFreightCalc']==True){ echo '<td colspan="2" class="number">' ._('Recalculated Freight Cost'). '</td> - <td class="number">' . locale_number_format($FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + <td class="number">' . locale_number_format($FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { // echo '<td colspan="1"></td>'; } @@ -459,18 +467,18 @@ if (!isset($_POST['ChargeFreightCost'])) { $_POST['ChargeFreightCost']=0; } -if ($_SESSION['Items']->Any_Already_Delivered()==1 and (!isset($_SESSION['Items']->FreightCost) or $_POST['ChargeFreightCost']==0)) { +if ($_SESSION['Items'.$identifier]->Any_Already_Delivered()==1 and (!isset($_SESSION['Items'.$identifier]->FreightCost) or $_POST['ChargeFreightCost']==0)) { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td> <td><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0"></td>'; - $_SESSION['Items']->FreightCost=0; + $_SESSION['Items'.$identifier]->FreightCost=0; } else { echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td>'; if (isset($_POST['ProcessInvoice'])) { - echo '<td class="number">' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '</td>'; + echo '<td class="number">' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td>'; } else { - echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items']->FreightCost,$_SESSION['Items']->CurrDecimalPlaces) . '" /></td>'; + echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; } - $_POST['ChargeFreightCost'] = $_SESSION['Items']->FreightCost; + $_POST['ChargeFreightCost'] = $_SESSION['Items'.$identifier]->FreightCost; } $FreightTaxTotal =0; //initialise tax total @@ -478,7 +486,7 @@ echo '<td>'; $i=0; // initialise the number of taxes iterated through -foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { +foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -489,7 +497,7 @@ echo '</td><td class="number">'; $i=0; -foreach ($_SESSION['Items']->FreightTaxes as $FreightTaxLine) { +foreach ($_SESSION['Items'.$identifier]->FreightTaxes as $FreightTaxLine) { if ($i>0){ echo '<br />'; } @@ -498,41 +506,41 @@ echo $FreightTaxLine->TaxRate * 100 ; } else { echo '<input type="text" class="number" name="FreightTaxRate' . $FreightTaxLine->TaxCalculationOrder . - '" maxlength="4" size="4" value="' . locale_number_format($FreightTaxLine->TaxRate * 100,$_SESSION['Items']->CurrDecimalPlaces) . '" />'; + '" maxlength="4" size="4" value="' . locale_number_format($FreightTaxLine->TaxRate * 100,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" />'; } if ($FreightTaxLine->TaxOnTax ==1){ - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['Items']->FreightCost + $FreightTaxTotal)); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['Items']->FreightCost + $FreightTaxTotal)); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * ($_SESSION['Items'.$identifier]->FreightCost + $FreightTaxTotal)); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * ($_SESSION['Items'.$identifier]->FreightCost + $FreightTaxTotal)); } else { - $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['Items']->FreightCost); - $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['Items']->FreightCost); + $TaxTotals[$FreightTaxLine->TaxAuthID] += ($FreightTaxLine->TaxRate * $_SESSION['Items'.$identifier]->FreightCost); + $FreightTaxTotal += ($FreightTaxLine->TaxRate * $_SESSION['Items'.$identifier]->FreightCost); } $i++; $TaxGLCodes[$FreightTaxLine->TaxAuthID] = $FreightTaxLine->TaxGLCode; } echo '</td>'; -echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</td> - <td class="number">' . locale_number_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces) . '</td> +echo '<td class="number">' . locale_number_format($FreightTaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($FreightTaxTotal+ $_POST['ChargeFreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</td> </tr>'; $TaxTotal += $FreightTaxTotal; -$DisplaySubTotal = locale_number_format(($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces); +$DisplaySubTotal = locale_number_format(($_SESSION['Items'.$identifier]->total + $_POST['ChargeFreightCost']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces); /* round the totals to avoid silly entries */ -$TaxTotal = round($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces); -$_SESSION['Items']->total = round($_SESSION['Items']->total,$_SESSION['Items']->CurrDecimalPlaces); -$_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items']->CurrDecimalPlaces); +$TaxTotal = round($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); +$_SESSION['Items'.$identifier]->total = round($_SESSION['Items'.$identifier]->total,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); +$_POST['ChargeFreightCost'] = round($_POST['ChargeFreightCost'],$_SESSION['Items'.$identifier]->CurrDecimalPlaces); echo '<tr> <td colspan="10" class="number">' . _('Invoice Totals'). '</td> <td class="number:><hr><b>'.$DisplaySubTotal.'</b><hr></td> <td colspan="2"></td> - <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td> - <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['Items']->total + $_POST['ChargeFreightCost']),$_SESSION['Items']->CurrDecimalPlaces) . '</b><hr></td> + <td class="number"><hr><b>' . locale_number_format($TaxTotal,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</b><hr></td> + <td class="number"><hr><b>' . locale_number_format($TaxTotal+($_SESSION['Items'.$identifier]->total + $_POST['ChargeFreightCost']),$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '</b><hr></td> </tr>'; if (! isset($_POST['DispatchDate']) OR ! Is_Date($_POST['DispatchDate'])){ @@ -552,7 +560,7 @@ $QuantityInvoicedIsPositive = false; - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { if ($OrderLine->QtyDispatched > 0){ $QuantityInvoicedIsPositive =true; } @@ -566,7 +574,7 @@ if ($_SESSION['ProhibitNegativeStock']==1){ // checks for negative stock after processing invoice //sadly this check does not combine quantities occuring twice on and order and each line is considered individually :-( $NegativesFound = false; - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { $SQL = "SELECT stockmaster.description, locstock.quantity, stockmaster.mbflag @@ -574,7 +582,7 @@ INNER JOIN stockmaster ON stockmaster.stockid=locstock.stockid WHERE stockmaster.stockid='" . $OrderLine->StockID . "' - AND locstock.loccode='" . $_SESSION['Items']->Location . "'"; + AND locstock.loccode='" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('Could not retrieve the quantity left at the location once this order is invoiced (for the purposes of checking that stock will not go negative because)'); $Result = DB_query($SQL,$db,$ErrMsg); @@ -596,7 +604,7 @@ INNER JOIN stockmaster ON stockmaster.stockid=bom.component WHERE bom.parent='" . $OrderLine->StockID . "' - AND locstock.loccode='" . $_SESSION['Items']->Location . "' + AND locstock.loccode='" . $_SESSION['Items'.$identifier]->Location . "' AND effectiveafter <'" . Date('Y-m-d') . "' AND effectiveto >='" . Date('Y-m-d') . "'"; @@ -627,8 +635,8 @@ $SQL = "SELECT area, defaultshipvia FROM custbranch - WHERE custbranch.debtorno ='". $_SESSION['Items']->DebtorNo . "' - AND custbranch.branchcode = '" . $_SESSION['Items']->Branch . "'"; + WHERE custbranch.debtorno ='". $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch.branchcode = '" . $_SESSION['Items'.$identifier]->Branch . "'"; $ErrMsg = _('We were unable to load Area where the Sale is to from the BRANCHES table') . '. ' . _('Please remedy this'); $Result = DB_query($SQL,$db, $ErrMsg); @@ -658,21 +666,21 @@ $Result = DB_query($SQL,$db); - if (DB_num_rows($Result) != count($_SESSION['Items']->LineItems)){ + if (DB_num_rows($Result) != count($_SESSION['Items'.$identifier]->LineItems)){ /*there should be the same number of items returned from this query as there are lines on the invoice - if not then someone has already invoiced or credited some lines */ if ($debug==1){ echo '<br />'.$SQL; echo '<br />' . _('Number of rows returned by SQL') . ':' . DB_num_rows($Result); - echo '<br />' . _('Count of items in the session') . ' ' . count($_SESSION['Items']->LineItems); + echo '<br />' . _('Count of items in the session') . ' ' . count($_SESSION['Items'.$identifier]->LineItems); } echo '<br />'; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . '. ' . _('Processing halted') . '. ' . _('To enter and confirm this dispatch') . '/' . _('invoice the order must be re-selected and re-read again to update the changes made by the other user'), 'error'); - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); include('includes/footer.inc'); exit; } @@ -681,10 +689,10 @@ while ($myrow = DB_fetch_array($Result)) { - if ($_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity != $myrow['quantity'] - OR $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv != $myrow['qtyinvoiced']) { + if ($_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->Quantity != $myrow['quantity'] + OR $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->QtyInv != $myrow['qtyinvoiced']) { - echo '<br />'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . $myrow['quantity'] . ' '. _('and an invoiced qty of'). ' ' . $myrow['qtyinvoiced'] . ' '. _('the session shows quantity of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items']->LineItems[$myrow['orderlineno']]->QtyInv; + echo '<br />'. _('Orig order for'). ' ' . $myrow['orderlineno'] . ' '. _('has a quantity of'). ' ' . $myrow['quantity'] . ' '. _('and an invoiced qty of'). ' ' . $myrow['qtyinvoiced'] . ' '. _('the session shows quantity of'). ' ' . $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->Quantity . ' ' . _('and quantity invoice of'). ' ' . $_SESSION['Items'.$identifier]->LineItems[$myrow['orderlineno']]->QtyInv; prnMsg( _('This order has been changed or invoiced since this delivery was started to be confirmed') . ' ' . _('Processing halted.') . ' ' . _('To enter and confirm this dispatch, it must be re-selected and re-read again to update the changes made by the other user'), 'error'); @@ -692,8 +700,8 @@ echo '<div class="centre"><a href="'. $rootpath . '/SelectSalesOrder.php">'. _('Select a sales order for confirming deliveries and invoicing'). '</a></div>'; - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); include('includes/footer.inc'); exit; @@ -715,11 +723,11 @@ DB_Txn_Begin($db); - if ($DefaultShipVia != $_SESSION['Items']->ShipVia){ + if ($DefaultShipVia != $_SESSION['Items'.$identifier]->ShipVia){ $SQL = "UPDATE custbranch - SET defaultshipvia ='" . $_SESSION['Items']->ShipVia . "' - WHERE debtorno='" . $_SESSION['Items']->DebtorNo . "' - AND branchcode='" . $_SESSION['Items']->Branch . "'"; + SET defaultshipvia ='" . $_SESSION['Items'.$identifier]->ShipVia . "' + WHERE debtorno='" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND branchcode='" . $_SESSION['Items'.$identifier]->Branch . "'"; $ErrMsg = _('Could not update the default shipping carrier for this branch because'); $DbgMsg = _('The SQL used to update the branch default carrier was'); $result = DB_query($SQL,$db, $ErrMsg, $DbgMsg, true); @@ -758,20 +766,20 @@ VALUES ( '". $InvoiceNo . "', 10, - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $DefaultDispatchDate . "', '" . date('Y-m-d H-i-s') . "', '" . $PeriodNo . "', '', - '" . $_SESSION['Items']->DefaultSalesType . "', + '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $_SESSION['ProcessingOrder'] . "', - '" . $_SESSION['Items']->total . "', + '" . $_SESSION['Items'.$identifier]->total . "', '" . $TaxTotal . "', '" . filter_number_format($_POST['ChargeFreightCost']) . "', '" . $_SESSION['CurrencyRate'] . "', '" . $_POST['InvoiceText'] . "', - '" . $_SESSION['Items']->ShipVia . "', + '" . $_SESSION['Items'.$identifier]->ShipVia . "', '" . $_POST['Consignment'] . "' )"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The debtor transaction record could not be inserted because'); @@ -798,7 +806,7 @@ /* If balance of the order cancelled update sales order details quantity. Also insert log records for OrderDeliveryDifferencesLog */ - foreach ($_SESSION['Items']->LineItems as $OrderLine) { + foreach ($_SESSION['Items'.$identifier]->LineItems as $OrderLine) { /*Test to see if the item being sold is an asset */ if (mb_substr($OrderLine->StockID,0,6)=='ASSET-'){ @@ -841,8 +849,8 @@ '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', '" . ($OrderLine->Quantity - $OrderLine->QtyDispatched) . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', 'CAN')"; $ErrMsg =_('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The order delivery differences log record could not be inserted because'); @@ -851,7 +859,7 @@ } } elseif (($OrderLine->Quantity - $OrderLine->QtyDispatched)>0 - AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items']->DeliveryDate,'d')>0) { + AND DateDiff(ConvertSQLDate($DefaultDispatchDate),$_SESSION['Items'.$identifier]->DeliveryDate,'d')>0) { /*The order is being short delivered after the due date - need to insert a delivery differnce log */ @@ -868,8 +876,8 @@ '" . $InvoiceNo . "', '" . $OrderLine->StockID . "', '" . $OrderLine->Quantity - $OrderLine->QtyDispatched . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', 'BO' )"; @@ -920,7 +928,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $OrderLine->StockID . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('WARNING') . ': ' . _('Could not retrieve current location stock'); $Result = DB_query($SQL, $db, $ErrMsg); @@ -935,7 +943,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . $OrderLine->QtyDispatched . " WHERE locstock.stockid = '" . $OrderLine->StockID . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated because'); $DbgMsg = _('The following SQL to update the location stock record was used'); @@ -967,7 +975,7 @@ $SQL="SELECT locstock.quantity FROM locstock WHERE locstock.stockid='" . $AssParts['component'] . "' - AND loccode= '" . $_SESSION['Items']->Location . "'"; + AND loccode= '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Can not retrieve assembly components location stock quantities because '); $DbgMsg = _('The SQL that failed was'); @@ -998,10 +1006,10 @@ VALUES ('" . $AssParts['component'] . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $PeriodNo . "', '" . _('Assembly') . ': ' . $OrderLine->StockID . ' ' . _('Order') . ': ' . $_SESSION['ProcessingOrder'] . "', '" . -$AssParts['quantity'] * $OrderLine->QtyDispatched . "', @@ -1017,7 +1025,7 @@ $SQL = "UPDATE locstock SET quantity = locstock.quantity - " . ($AssParts['quantity'] * $OrderLine->QtyDispatched) . " WHERE locstock.stockid = '" . $AssParts['component'] . "' - AND loccode = '" . $_SESSION['Items']->Location . "'"; + AND loccode = '" . $_SESSION['Items'.$identifier]->Location . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('Location stock record could not be updated for an assembly component because'); $DbgMsg = _('The following SQL to update the locations stock record for the component was used'); @@ -1025,7 +1033,7 @@ } /* end of assembly explosion and updates */ /*Update the cart with the recalculated standard cost from the explosion of the assembly's components*/ - $_SESSION['Items']->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; + $_SESSION['Items'.$identifier]->LineItems[$OrderLine->LineNumber]->StandardCost = $StandardCost; $OrderLine->StandardCost = $StandardCost; } /* end of its an assembly */ @@ -1054,10 +1062,10 @@ VALUES ('" . $OrderLine->StockID . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['ProcessingOrder'] . "', @@ -1088,10 +1096,10 @@ VALUES ('" . $OrderLine->StockID . "', 10, '" . $InvoiceNo . "', - '" . $_SESSION['Items']->Location . "', + '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['ProcessingOrder'] . "', @@ -1137,7 +1145,7 @@ $SQL = "UPDATE stockserialitems SET quantity= quantity - " . $Item->BundleQty . " WHERE stockid='" . $OrderLine->StockID . "' - AND loccode='" . $_SESSION['Items']->Location . "' + AND loccode='" . $_SESSION['Items'.$identifier]->Location . "' AND serialno='" . DB_escape_string($Item->BundleRef) . "'"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock item record could not be updated because'); @@ -1181,10 +1189,10 @@ AND salesanalysis.custbranch=custbranch.branchcode AND salesanalysis.area=custbranch.area AND salesanalysis.salesperson=custbranch.salesman - AND salesanalysis.typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND salesanalysis.typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' AND salesanalysis.periodno='" . $PeriodNo . "' - AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND salesanalysis.cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND salesanalysis.custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' AND salesanalysis.stockid " . LIKE . " '" . $OrderLine->StockID . "' AND salesanalysis.budgetoractual=1 GROUP BY salesanalysis.stockid, @@ -1210,10 +1218,10 @@ disc=disc+" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . " WHERE salesanalysis.area='" . $myrow[5] . "' AND salesanalysis.salesperson='" . $myrow[8] . "' - AND typeabbrev ='" . $_SESSION['Items']->DefaultSalesType . "' + AND typeabbrev ='" . $_SESSION['Items'.$identifier]->DefaultSalesType . "' AND periodno = '" . $PeriodNo . "' - AND cust " . LIKE . " '" . $_SESSION['Items']->DebtorNo . "' - AND custbranch " . LIKE . " '" . $_SESSION['Items']->Branch . "' + AND cust " . LIKE . " '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch " . LIKE . " '" . $_SESSION['Items'.$identifier]->Branch . "' AND stockid " . LIKE . " '" . $OrderLine->StockID . "' AND salesanalysis.stkcategory ='" . $myrow[2] . "' AND budgetoractual=1"; @@ -1233,12 +1241,12 @@ budgetoractual, salesperson, stkcategory ) - SELECT '" . $_SESSION['Items']->DefaultSalesType . "', + SELECT '" . $_SESSION['Items'.$identifier]->DefaultSalesType . "', '" . $PeriodNo . "', '" . round(($OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . $_SESSION['Items']->Branch . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->Branch . "', '" . ($OrderLine->QtyDispatched) . "', '" . round(($OrderLine->DiscountPercent * $OrderLine->Price * $OrderLine->QtyDispatched / $_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . $OrderLine->StockID . "', @@ -1249,8 +1257,8 @@ FROM stockmaster, custbranch WHERE stockmaster.stockid = '" . $OrderLine->StockID . "' - AND custbranch.debtorno = '" . $_SESSION['Items']->DebtorNo . "' - AND custbranch.branchcode='" . $_SESSION['Items']->Branch . "'"; + AND custbranch.debtorno = '" . $_SESSION['Items'.$identifier]->DebtorNo . "' + AND custbranch.branchcode='" . $_SESSION['Items'.$identifier]->Branch . "'"; } $ErrMsg = _('Sales analysis record could not be added or updated because'); @@ -1275,8 +1283,8 @@ '" . $InvoiceNo . "', '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', - '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db) . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', + '" . GetCOGSGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db) . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', '" . round(($OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The cost of sales GL posting could not be inserted because'); @@ -1299,7 +1307,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $StockGLCode['stockact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->StandardCost . "', '" . round((-$OrderLine->StandardCost * $OrderLine->QtyDispatched),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The stock side of the cost of sales GL posting could not be inserted because'); @@ -1311,7 +1319,7 @@ if (!$IsAsset){ // its a normal stock item //Post sales transaction to GL credit sales - $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items']->DefaultSalesType, $db); + $SalesGLAccounts = GetSalesGLAccount($Area, $OrderLine->StockID, $_SESSION['Items'.$identifier]->DefaultSalesType, $db); $SQL = "INSERT INTO gltrans (type, typeno, @@ -1326,7 +1334,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['salesglcode'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " x " . $OrderLine->QtyDispatched . " @ " . $OrderLine->Price . "', '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales GL posting could not be inserted because'); @@ -1348,7 +1356,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $SalesGLAccounts['discountglcode'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . " @ " . ($OrderLine->DiscountPercent * 100) . "%', '" . round(($OrderLine->Price * $OrderLine->QtyDispatched * $OrderLine->DiscountPercent/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The sales discount GL posting could not be inserted because'); @@ -1394,7 +1402,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['accumdepnact'] . "', - '" . $_SESSION['Items']->DebtorNo . ' - ' . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . ' - ' . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['accumdpen'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of accumulated depreciation GL posting on disposal could not be inserted because'); @@ -1416,7 +1424,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['costact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . -$DisposalRow['cost'] . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The reversal of asset cost on dispoal GL posting could not be inserted because'); @@ -1438,7 +1446,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . ($DisposalRow['cost']-$DisposalRow['accumdepn']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal net book value GL posting could not be inserted because'); @@ -1460,7 +1468,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $DisposalRow['disposalact'] . "', - '" . $_SESSION['Items']->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . " - " . $OrderLine->StockID . ' ' . _('disposal') . "', '" . round((-$OrderLine->Price * $OrderLine->QtyDispatched* (1 - $OrderLine->DiscountPercent)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The disposal proceeds GL posting could not be inserted because'); @@ -1512,7 +1520,7 @@ if ($_SESSION['CompanyRecord']['gllink_debtors']==1){ /*Post debtors transaction to GL debit debtors, credit freight re-charged and credit sales */ - if (($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal) !=0) { + if (($_SESSION['Items'.$identifier]->total + $_SESSION['Items'.$identifier]->FreightCost + $TaxTotal) !=0) { $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -1526,8 +1534,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['debtorsact'] . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . round((($_SESSION['Items']->total + $_SESSION['Items']->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . round((($_SESSION['Items'.$identifier]->total + $_SESSION['Items'.$identifier]->FreightCost + $TaxTotal)/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The total debtor GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the total debtors control GLTrans record was used'); @@ -1536,7 +1544,7 @@ /*Could do with setting up a more flexible freight posting schema that looks at the sales type and area of the customer branch to determine where to post the freight recovery */ - if ($_SESSION['Items']->FreightCost !=0) { + if ($_SESSION['Items'.$identifier]->FreightCost !=0) { $SQL = "INSERT INTO gltrans ( type, typeno, @@ -1551,8 +1559,8 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['freightact'] . "', - '" . $_SESSION['Items']->DebtorNo . "', - '" . round((-$_SESSION['Items']->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', + '" . round((-$_SESSION['Items'.$identifier]->FreightCost/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The freight GL posting could not be inserted because'); $DbgMsg = _('The following SQL to insert the GLTrans record was used'); @@ -1573,7 +1581,7 @@ '" . $DefaultDispatchDate . "', '" . $PeriodNo . "', '" . $TaxGLCodes[$TaxAuthID] . "', - '" . $_SESSION['Items']->DebtorNo . "', + '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . round((-$TaxAmount/$_SESSION['CurrencyRate']),$_SESSION['CompanyRecord']['decimalplaces']) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The tax GL posting could not be inserted because'); @@ -1589,8 +1597,8 @@ // 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 // ************************************************************************* - unset($_SESSION['Items']->LineItems); - unset($_SESSION['Items']); + unset($_SESSION['Items'.$identifier]->LineItems); + unset($_SESSION['Items'.$identifier]); unset($_SESSION['ProcessingOrder']); echo prnMsg( _('Invoice number'). ' '. $InvoiceNo .' '. _('processed'), 'success'); @@ -1649,7 +1657,7 @@ echo '<br /> <input type="submit" tabindex="'.$j.'" name="ProcessInvoice" value="'._('Process Invoice').'" /> </div> - <input type="hidden" name="ShipVia" value="' . $_SESSION['Items']->ShipVia . '" />'; + <input type="hidden" name="ShipVia" value="' . $_SESSION['Items'.$identifier]->ShipVia . '" />'; } echo '</form>'; Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/CounterSales.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -488,27 +488,35 @@ if (isset($_POST['Quantity_' . $OrderLine->LineNumber])){ - $Quantity = filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]); + $Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces); - if (abs($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ - $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); - $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); - } else if (abs($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.001) { - //then do a recalculation of the price at this new GP Percentage - $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); - } else { - $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); - } - $DiscountPercentage = filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]); - if ($_SESSION['AllowOrderLineItemNarrative'] == 1) { - $Narrative = $_POST['Narrative_' . $OrderLine->LineNumber]; - } else { - $Narrative = ''; - } + if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ + /*There is a new price being input for the line item */ + + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); + $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); + + } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) { + /* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */ + + + prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); + + + $Price = ($OrderLine->StandardCost*$ExRate)/(1 -((filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]) + filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100)); + } else { + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); + } + $DiscountPercentage = filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]); + if ($_SESSION['AllowOrderLineItemNarrative'] == 1) { + $Narrative = $_POST['Narrative_' . $OrderLine->LineNumber]; + } else { + $Narrative = ''; + } - if (!isset($OrderLine->DiscountPercent)) { - $OrderLine->DiscountPercent = 0; - } + if (!isset($OrderLine->DiscountPercent)) { + $OrderLine->DiscountPercent = 0; + } if ($Quantity<0 or $Price <0 or $DiscountPercentage >100 or $DiscountPercentage <0){ prnMsg(_('The item could not be updated because you are attempting to set the quantity ordered to less than 0 or the price less than 0 or the discount more than 100% or less than 0%'),'warn'); @@ -871,7 +879,9 @@ $BankAccountsResult = DB_query("SELECT bankaccountname, accountcode FROM bankaccounts",$db); - echo '<tr><td>' . _('Banked to') . ':</td><td><select name="BankAccount">'; + echo '<tr> + <td>' . _('Banked to') . ':</td> + <td><select name="BankAccount">'; while ($BankAccountsRow = DB_fetch_array($BankAccountsResult)){ if (isset($_POST['BankAccount']) AND $_POST['BankAccount'] == $BankAccountsRow['accountcode']){ echo '<option selected="True" value="' . $BankAccountsRow['accountcode'] . '">' . $BankAccountsRow['bankaccountname'] . '</option>'; @@ -879,12 +889,13 @@ echo '<option value="' . $BankAccountsRow['accountcode'] . '">' . $BankAccountsRow['bankaccountname'] . '</option>'; } } - echo '</select></td></tr>'; + echo '</select></td> + </tr>'; if (!isset($_POST['AmountPaid'])){ $_POST['AmountPaid'] =0; } - echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . filter_number_format($_POST['AmountPaid']) . '" /></td></tr>'; + echo '<tr><td>' . _('Amount Paid') . ':</td><td><input type="text" class="number" name="AmountPaid" maxlength="12" size="12" value="' . $_POST['AmountPaid'] . '" /></td></tr>'; echo '</table>'; //end the sub table in the second column of master table echo '</th></tr></table>'; //end of column/row/master table Modified: trunk/CustomerAllocations.php =================================================================== --- trunk/CustomerAllocations.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/CustomerAllocations.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -582,17 +582,17 @@ if (!isset($Balance)) { $Balance=0; } - echo '<tr class="OddTableRows"> - <td colspan="7" class="number"><b>' . locale_number_format($Balance,$CurrDecimalPlaces) .'</b></td> - <td><b>' . $CurrCode . '</b></td> - <td><b>' . _('Balance') . '</b></td> - </tr> - </table> - <br />'; - if ($NoOfUnallocatedTrans == 0) { prnMsg(_('There are no allocations to be done'),'info'); + } else { + echo '<tr class="OddTableRows"> + <td colspan="7" class="number"><b>' . locale_number_format($Balance,$CurrDecimalPlaces) .'</b></td> + <td><b>' . $CurrCode . '</b></td> + <td><b>' . _('Balance') . '</b></td> + </tr>'; } + echo '</table> + <br />'; } echo '</td> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2011-11-16 09:23:02 UTC (rev 4747) +++ trunk/SelectOrderItems.php 2011-11-19 04:00:22 UTC (rev 4748) @@ -1061,10 +1061,18 @@ $Quantity = round(filter_number_format($_POST['Quantity_' . $OrderLine->LineNumber]),$OrderLine->DecimalPlaces); if (ABS($OrderLine->Price - filter_number_format($_POST['Price_' . $OrderLine->LineNumber]))>0.01){ + /*There is a new price being input for the line item */ + $Price = filter_number_format($_POST['Price_' . $OrderLine->LineNumber]); $_POST['GPPercent_' . $OrderLine->LineNumber] = (($Price*(1-(filter_number_format($_POST['Discount_' . $OrderLine->LineNumber])/100))) - $OrderLine->StandardCost*$ExRate)/($Price *(1-filter_number_format($_POST['Discount_' . $OrderLine->LineNumber]))/100); - } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.001) { - //then do a recalculation of the price at this new GP Percentage + + } elseif (ABS($OrderLine->GPPercent - filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]))>=0.01) { + /* A GP % has been input so need to do a recalculation of the price at this new GP Percentage */ + + + prnMsg(_('Recalculated the price from the GP % entered - the GP % was') . ' ' . $OrderLine->GPPercent . ' the new GP % is ' . filter_number_format($_POST['GPPercent_' . $OrderLine->LineNumber]),'info'); + + ... [truncated message content] |
From: <dai...@us...> - 2011-11-21 09:22:13
|
Revision: 4749 http://web-erp.svn.sourceforge.net/web-erp/?rev=4749&view=rev Author: daintree Date: 2011-11-21 09:22:06 +0000 (Mon, 21 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/CustLoginSetup.php trunk/DiscountMatrix.php trunk/GoodsReceived.php trunk/PO_Header.php trunk/Shipments.php trunk/SuppLoginSetup.php trunk/UserSettings.php trunk/WWW_Users.php trunk/doc/Change.log trunk/includes/DefinePOClass.php trunk/includes/DefineShiptClass.php Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/CustLoginSetup.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -43,7 +43,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID']) OR mb_strstr($_POST['UserID'],' ')) { Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/DiscountMatrix.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -138,7 +138,7 @@ </table> <br /> <div class="centre"> - <input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"> + <input tabindex="5" type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> <br />'; @@ -155,7 +155,7 @@ $result = DB_query($sql,$db); -echo '<table class=selection>'; +echo '<table class="selection">'; echo '<tr> <th>' . _('Sales Type') . '</th> <th>' . _('Discount Category') . '</th> Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/GoodsReceived.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -154,7 +154,8 @@ //Now Display LineItem - echo '<td>' . $LnItm->StockID . '</td> + + echo '<td><a href="' . $rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg" target="_blank">'. $LnItm->StockID . '</a></td> <td>' . $LnItm->ItemDescription . '</td> <td class="number">' . $DisplaySupplierQtyOrd . '</td> <td>' . $LnItm->SuppliersUnit . '</td> Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/PO_Header.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -106,6 +106,11 @@ _('Prices cannot be altered for lines that have already been received') .' '. _('and quantities cannot be reduced below the quantity already received'),'warn'); } + $ShipmentExists = $_SESSION['PO'.$identifier]->Any_Lines_On_A_Shipment(); + if ($ShipmentExists != false){ + $OKToUpdateStatus = 0; //not ok to update the status + prnMsg( _('This order cannot be cancelled or rejected because there is at least one line that is allocated to a shipment') . '. ' . _('See shipment number') . ' ' . $ShipmentExists,'warn'); + } } if ($OKToUpdateStatus==1){ // none of the order has been received if ($AuthorityLevel>$OrderTotal) { Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/Shipments.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -84,18 +84,18 @@ $LineItemsSQL = "SELECT purchorderdetails.podetailitem, purchorders.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.deliverydate, - purchorderdetails.glcode, - purchorderdetails.qtyinvoiced, - purchorderdetails.unitprice, - stockmaster.units, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.stdcostunit, - stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, - purchorders.intostocklocation + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.deliverydate, + purchorderdetails.glcode, + purchorderdetails.qtyinvoiced, + purchorderdetails.unitprice, + stockmaster.units, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.stdcostunit, + stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, + purchorders.intostocklocation FROM purchorderdetails INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid INNER JOIN purchorders @@ -120,17 +120,18 @@ $StandardCost =$myrow['stdcostunit']; } - $_SESSION['Shipment']->LineItems[$myrow['podetailitem']] = new LineDetails($myrow['podetailitem'], - $myrow['orderno'], - $myrow['itemcode'], - $myrow['itemdescription'], - $myrow['qtyinvoiced'], - $myrow['unitprice'], - $myrow['units'], - $myrow['deliverydate'], - $myrow['quantityord'], - $myrow['quantityrecd'], - $StandardCost); + $_SESSION['Shipment']->LineItems[$myrow['podetailitem']] = new LineDetails( + $myrow['podetailitem'], + $myrow['orderno'], + $myrow['itemcode'], + $myrow['itemdescription'], + $myrow['qtyinvoiced'], + $myrow['unitprice'], + $myrow['units'], + $myrow['deliverydate'], + $myrow['quantityord'], + $myrow['quantityrecd'], + $StandardCost); } /* line Shipment from shipment details */ DB_data_Seek($LineItemsResult,0); @@ -147,28 +148,31 @@ $_SESSION['Shipment'] = new Shipment; $sql = "SELECT suppname, - currcode - FROM suppliers + currcode, + decimalplaces AS currdecimalplaces + FROM suppliers INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev WHERE supplierid='" . $_SESSION['SupplierID'] . "'"; $ErrMsg = _('The supplier details for the shipment could not be retrieved because'); $result = DB_query($sql,$db,$ErrMsg); - $myrow = DB_fetch_row($result); + $myrow = DB_fetch_array($result); $_SESSION['Shipment']->SupplierID = $_SESSION['SupplierID']; - $_SESSION['Shipment']->SupplierName = $myrow[0]; - $_SESSION['Shipment']->CurrCode = $myrow[1]; + $_SESSION['Shipment']->SupplierName = $myrow['suppname']; + $_SESSION['Shipment']->CurrCode = $myrow['currcode']; + $_SESSION['Shipment']->CurrDecimalPlaces = $myrow['currdecimalplaces']; $_SESSION['Shipment']->ShiptRef = GetNextTransNo (31, $db); } -if (isset($_POST['Update']) OR (isset($_GET['Add']) AND $_SESSION['Shipment']->Closed==0)) { //user hit the update button +if (isset($_POST['Update']) + OR (isset($_GET['Add']) + AND $_SESSION['Shipment']->Closed==0)) { //user hit the update button $InputError = 0; if (isset($_POST['Update'])){ - $_SESSION['Shipment']->Vessel = $_POST['Vessel']; - $_SESSION['Shipment']->VoyageRef = $_POST['VoyageRef']; if (!Is_Date($_POST['ETA'])){ $InputError=1; @@ -186,19 +190,24 @@ if (mb_strlen($_POST['VoyageRef'])<2){ prnMsg( _('A reference to the voyage (or HAWB in the case of air-freight) of more than 2 characters is expected'), 'error'); } - } elseif(mb_strlen($_SESSION['Shipment']->Vessel)<2 OR mb_strlen($_SESSION['Shipment']->VoyageRef)<2){ + } elseif(mb_strlen($_SESSION['Shipment']->Vessel)<2 + OR mb_strlen($_SESSION['Shipment']->VoyageRef)<2){ prnMsg(_('Cannot add purchase order lines to the shipment unless the shipment is first initiated - hit update to setup the shipment first'),'info'); $InputError = 1; } /*The user hit the update the shipment button and there are some lines on the shipment*/ if ($InputError == 0 AND (count($_SESSION['Shipment']->LineItems) > 0 OR isset($_GET['Add']))){ + + $_SESSION['Shipment']->Vessel = $_POST['Vessel']; + $_SESSION['Shipment']->VoyageRef = $_POST['VoyageRef']; + $sql = "SELECT shiptref FROM shipments WHERE shiptref =" . $_SESSION['Shipment']->ShiptRef; $result = DB_query($sql,$db); if (DB_num_rows($result)==1){ $sql = "UPDATE shipments SET vessel='" . $_SESSION['Shipment']->Vessel . "', - voyageref='". $_SESSION['Shipment']->VoyageRef . "', - eta='" . $_SESSION['Shipment']->ETA . "' + voyageref='". $_SESSION['Shipment']->VoyageRef . "', + eta='" . $_SESSION['Shipment']->ETA . "' WHERE shiptref ='" . $_SESSION['Shipment']->ShiptRef . "'"; } else { @@ -225,12 +234,11 @@ $sql = "UPDATE purchorderdetails SET deliverydate ='" . $_SESSION['Shipment']->ETA . "' - WHERE podetailitem='" . $LnItm->PODetailItem . "'"; + WHERE podetailitem='" . $LnItm->PODetailItem . "'"; $result = DB_query($sql,$db); $_SESSION['Shipment']->LineItems[$LnItm->PODetailItem]->DelDate = $_SESSION['Shipment']->ETA; - } } prnMsg( _('Updated the shipment record and delivery dates of order lines as necessary'), 'success'); @@ -239,23 +247,25 @@ } //user hit Update -if (isset($_GET['Add']) AND $_SESSION['Shipment']->Closed==0 AND $InputError==0){ +if (isset($_GET['Add']) + AND $_SESSION['Shipment']->Closed==0 + AND $InputError==0){ $sql = "SELECT purchorderdetails.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.unitprice, - purchorderdetails.stdcostunit, - stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.deliverydate, - stockmaster.units, - stockmaster.decimalplaces, - purchorderdetails.qtyinvoiced - FROM purchorderdetails INNER JOIN stockmaster + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.unitprice, + purchorderdetails.stdcostunit, + stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.deliverydate, + stockmaster.units, + stockmaster.decimalplaces, + purchorderdetails.qtyinvoiced + FROM purchorderdetails INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid - WHERE purchorderdetails.podetailitem='" . $_GET['Add'] . "'"; + WHERE purchorderdetails.podetailitem='" . $_GET['Add'] . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_array($result); @@ -268,7 +278,7 @@ $StandardCost = $myrow['stdcostunit']; } - $_SESSION['Shipment']->add_to_shipment($_GET['Add'], + $_SESSION['Shipment']->Add_To_Shipment($_GET['Add'], $myrow['orderno'], $myrow['itemcode'], $myrow['itemdescription'], @@ -283,7 +293,7 @@ } if (isset($_GET['Delete']) AND $_SESSION['Shipment']->Closed==0){ //shipment is open and user hit delete on a line - $_SESSION['Shipment']->remove_from_shipment($_GET['Delete'],$db); + $_SESSION['Shipment']->Remove_From_Shipment($_GET['Delete'],$db); } @@ -315,24 +325,24 @@ if (isset($_SESSION['Shipment']->ETA)) { echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" maxlength="10" size="10" value="' . $ETA . '" /></td>'; } else { - echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>'; + echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>'; } echo '<td>'. _('Into').' '; if (count($_SESSION['Shipment']->LineItems)>0){ - if (!isset($_SESSION['Shipment']->StockLocation)){ + if (!isset($_SESSION['Shipment']->StockLocation)){ - $sql = "SELECT purchorders.intostocklocation - FROM purchorders INNER JOIN purchorderdetails - ON purchorders.orderno=purchorderdetails.orderno and podetailitem = '" . key($_SESSION['Shipment']->LineItems) . "'"; + $sql = "SELECT purchorders.intostocklocation + FROM purchorders INNER JOIN purchorderdetails + ON purchorders.orderno=purchorderdetails.orderno AND podetailitem = '" . key($_SESSION['Shipment']->LineItems) . "'"; + + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + + $_SESSION['Shipment']->StockLocation = $myrow[0]; + $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; - $result = DB_query($sql,$db); - $myrow = DB_fetch_row($result); - - $_SESSION['Shipment']->StockLocation = $myrow[0]; - $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; - } else { $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; @@ -373,7 +383,7 @@ $sql = "SELECT locationname FROM locations WHERE loccode='" . $_SESSION['Shipment']->StockLocation . "'"; $resultStkLocs = DB_query($sql,$db); $myrow=DB_fetch_array($resultStkLocs); - echo '<input type=hidden name=StockLocation value='.$_SESSION['Shipment']->StockLocation.'>'; + echo '<input type="hidden" name="StockLocation" value="'.$_SESSION['Shipment']->StockLocation.'" />'; echo $myrow['locationname']; } @@ -382,18 +392,19 @@ if (count($_SESSION['Shipment']->LineItems)>0){ /* Always display all shipment lines */ - echo '<br /><table cellpadding=2 colspan=7 class="selection">'; + echo '<br /><table class="selection">'; echo '<tr><th colspan="9"><font color="navy" size="3">'. _('Order Lines On This Shipment'). '</font></th></tr>'; $TableHeader = '<tr> - <th>'. _('Order'). '</th> - <th>'. _('Item'). '</th> - <th>'. _('Quantity'). '<br />'. _('Ordered'). '</th> - <th>'. _('Units'). '</th> - <th>'. _('Quantity').'<br />'. _('Received'). '</th> - <th>'. _('Quantity').'<br />'. _('Invoiced'). '</th> - <th>'. $_SESSION['Shipment']->CurrCode .' '. _('Price') . '</th> - <th>'. _('Current'). '<br />'. _('Std Cost'). '</th></tr>'; + <th>'. _('Order'). '</th> + <th>'. _('Item'). '</th> + <th>'. _('Quantity'). '<br />'. _('Ordered'). '</th> + <th>'. _('Units'). '</th> + <th>'. _('Quantity').'<br />'. _('Received'). '</th> + <th>'. _('Quantity').'<br />'. _('Invoiced'). '</th> + <th>'. $_SESSION['Shipment']->CurrCode .' '. _('Price') . '</th> + <th>'. _('Current'). '<br />'. _('Std Cost'). '</th> + </tr>'; echo $TableHeader; @@ -420,12 +431,12 @@ echo '<td>'.$LnItm->OrderNo.'</td> - <td>'. $LnItm->StockID .' - '. $LnItm->ItemDescription. '</td><td class="number">' . locale_number_format($LnItm->QuantityOrd,2) . '</td> + <td>'. $LnItm->StockID .' - '. $LnItm->ItemDescription. '</td><td class="number">' . locale_number_format($LnItm->QuantityOrd,$LnItm->DecimalPlaces) . '</td> <td>'. $LnItm->UOM .'</td> - <td class="number">' . locale_number_format($LnItm->QuantityRecd,2) . '</td> - <td class="number">' . locale_number_format($LnItm->QtyInvoiced,2) . '</td> - <td class="number">' . locale_number_format($LnItm->UnitPrice,2) . '</td> - <td class="number">' . locale_number_format($LnItm->StdCostUnit,2) . '</td> + <td class="number">' . locale_number_format($LnItm->QuantityRecd,$LnItm->DecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->QtyInvoiced,$LnItm->DecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->UnitPrice, $_SESSION['Shipment']->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->StdCostUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $LnItm->PODetailItem . '">'. _('Delete'). '</a></td> </tr>'; }//for each line on the shipment @@ -442,39 +453,43 @@ } $sql = "SELECT purchorderdetails.podetailitem, - purchorders.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.unitprice, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.deliverydate, - stockmaster.units, - stockmaster.decimalplaces - FROM purchorderdetails INNER JOIN purchorders - ON purchorderdetails.orderno=purchorders.orderno - INNER JOIN stockmaster + purchorders.orderno, + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.unitprice, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.deliverydate, + stockmaster.units, + stockmaster.decimalplaces + FROM purchorderdetails INNER JOIN purchorders + ON purchorderdetails.orderno=purchorders.orderno + INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid - WHERE qtyinvoiced=0 - AND purchorders.supplierno ='" . $_SESSION['Shipment']->SupplierID . "' - AND purchorderdetails.shiptref=0 - AND purchorders.intostocklocation='" . $_POST['StockLocation'] . "'"; + WHERE qtyinvoiced=0 + AND purchorderdetails.completed=0 + AND purchorders.status='Authorised' + AND purchorders.supplierno ='" . $_SESSION['Shipment']->SupplierID . "' + AND purchorderdetails.shiptref=0 + AND purchorders.intostocklocation='" . $_POST['StockLocation'] . "'"; $result = DB_query($sql,$db); if (DB_num_rows($result)>0){ echo '<table cellpadding="2" colspan="7" class="selection">'; - echo '<tr><th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th></tr>'; + echo '<tr> + <th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th> + </tr>'; $TableHeader = '<tr> - <th>'. _('Order').'</th> - <th>'. _('Item').'</th> - <th>'. _('Quantity').'<br />'. _('Ordered').'</th> - <th>'. _('Units').'</th> - <th>'. _('Quantity').'<br />'. _('Received').'</th> - <th>'. _('Delivery').'<br />'. _('Date').'</th> - </tr>'; + <th>'. _('Order').'</th> + <th>'. _('Item').'</th> + <th>'. _('Quantity').'<br />'. _('Ordered').'</th> + <th>'. _('Units').'</th> + <th>'. _('Quantity').'<br />'. _('Received').'</th> + <th>'. _('Delivery').'<br />'. _('Date').'</th> + </tr>'; echo $TableHeader; @@ -500,12 +515,12 @@ } echo '<td>' . $myrow['orderno'] . '</td> - <td>' . $myrow['itemcode'] . ' - ' . $myrow['itemdescription'] . '</td> - <td class="number">' . locale_number_format($myrow['quantityord'],$myrow['decimalplaces']) . '</td> - <td>' . $myrow['units'] . '</td> - <td class="number">' . locale_number_format($myrow['quantityrecd'],,$myrow['decimalplaces']) . '</td> - <td class="number">' . ConvertSQLDate($myrow['deliverydate']) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . 'Add=' . $myrow['podetailitem'] . '">'. _('Add').'</a></td> + <td>' . $myrow['itemcode'] . ' - ' . $myrow['itemdescription'] . '</td> + <td class="number">' . locale_number_format($myrow['quantityord'],$myrow['decimalplaces']) . '</td> + <td>' . $myrow['units'] . '</td> + <td class="number">' . locale_number_format($myrow['quantityrecd'],$myrow['decimalplaces']) . '</td> + <td class="number">' . ConvertSQLDate($myrow['deliverydate']) . '</td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . 'Add=' . $myrow['podetailitem'] . '">'. _('Add').'</a></td> </tr>'; } Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/SuppLoginSetup.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -43,7 +43,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { Modified: trunk/UserSettings.php =================================================================== --- trunk/UserSettings.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/UserSettings.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -34,27 +34,34 @@ prnMsg(_('Cannot change password in the demo or others would be locked out!'),'warn'); } */ - $update_pw = 'N'; - if ($_POST['pass'] != ''){ - if ($_POST['pass'] != $_POST['passcheck']){ + $UpdatePassword = 'N'; + if ($_POST['Password'] != ''){ + if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); }else{ - $update_pw = 'Y'; + $UpdatePassword = 'Y'; } } - if ($_POST['passcheck'] != ''){ - if ($_POST['pass'] != $_POST['passcheck']){ + if ($_POST['PasswordCheck'] != ''){ + if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); }else{ - $update_pw = 'Y'; + $UpdatePassword = 'Y'; } } + if (mb_strlen($_POST['Password'])<5){ + $InputError = 1; + prnMsg(_('The password entered must be at least 5 characters long'),'error'); + } elseif (mb_strstr($_POST['Password'],$_SESSION['UserID'])!= False){ + $InputError = 1; + prnMsg(_('The password cannot contain the user id'),'error'); + } if ($InputError != 1) { // no errors - if ($update_pw != 'Y'){ + if ($UpdatePassword != 'Y'){ $sql = "UPDATE www_users SET displayrecordsmax='" . $_POST['DisplayRecordsMax'] . "', theme='" . $_POST['Theme'] . "', @@ -76,7 +83,7 @@ language='" . $_POST['Language'] . "', email='". $_POST['email'] ."', pdflanguage='" . $_POST['PDFLanguage'] . "', - password='" . CryptPass($_POST['pass']) . "' + password='" . CryptPass($_POST['Password']) . "' WHERE userid = '" . $_SESSION['UserID'] . "'"; $ErrMsg = _('The user alterations could not be processed because'); @@ -161,20 +168,20 @@ } } -if (!isset($_POST['passcheck'])) { - $_POST['passcheck']=''; +if (!isset($_POST['PasswordCheck'])) { + $_POST['PasswordCheck']=''; } -if (!isset($_POST['pass'])) { - $_POST['pass']=''; +if (!isset($_POST['Password'])) { + $_POST['Password']=''; } echo '</select></td></tr> <tr> <td>' . _('New Password') . ':</td> - <td><input type="password" name="pass" size=20 value="' . $_POST['pass'] . '"></td> + <td><input type="password" name="Password" size="20" value="' . $_POST['Password'] . '" /></td> </tr> <tr> <td>' . _('Confirm Password') . ':</td> - <td><input type="password" name="passcheck" size="20" value="' . $_POST['passcheck'] . '"></td> + <td><input type="password" name="PasswordCheck" size="20" value="' . $_POST['PasswordCheck'] . '" /></td> </tr> <tr> <td colspan=2 align="center"><i>' . _('If you leave the password boxes empty your password will not change') . '</i></td> @@ -189,7 +196,7 @@ $_POST['email'] = $myrow['email']; } -echo '<td><input type="text" name="email" size=40 value="' . $_POST['email'] . '"></td> +echo '<td><input type="text" name="email" size=40 value="' . $_POST['email'] . '" /></td> </tr>'; if (!isset($_POST['PDFLanguage'])){ Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/WWW_Users.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -60,7 +60,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { @@ -391,19 +391,23 @@ $_POST['Blocked'] = $myrow['blocked']; $_POST['PDFLanguage'] = $myrow['pdflanguage']; - echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" /'; + echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />'; echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '" />'; echo '<input type="hidden" name="ModulesAllowed" value="' . $_POST['ModulesAllowed'] . '" />'; - echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; - echo $_POST['UserID'] . '</td></tr>'; + echo '<table class="selection"> + <tr> + <td>' . _('User code') . ':</td> + <td>' . $_POST['UserID'] . '</td> + </tr>'; } else { //end of if $SelectedUser only do the else when a new record is being entered echo '<table class="selection"> <tr> <td>' . _('User Login') . ':</td> - <td><input type="text" name="UserID" size="22" maxlength="20" /></td></tr>'; + <td><input type="text" name="UserID" size="22" maxlength="20" /></td> + </tr>'; /*set the default modules to show to all this had trapped a few people previously*/ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/doc/Change.log 2011-11-21 09:22:06 UTC (rev 4749) @@ -1,5 +1,8 @@ webERP Change Log +21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids +21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > + 19/11/11 Release 4.06RC3 - 4.06.1 19/11/11 Phil: SupplierAllocations.php fixes for number_formatting Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/includes/DefinePOClass.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -154,6 +154,17 @@ return 0; } + function Any_Lines_On_A_Shipment(){ + /* Checks if any of the line items are on a shipment */ + if (count($this->LineItems)>0){ + foreach ($this->LineItems as $OrderedItems) { + if ($OrderedItems->ShiptRef !=''){ + return $OrderedItems->ShiptRef; + } + } + } + return 0; + } function Some_Already_Received($LineNo){ /* Checks if there have been deliveries or amounts invoiced against a specific line item */ if (count($this->LineItems)>0 and isset($this->LineItems[$LineNo])){ Modified: trunk/includes/DefineShiptClass.php =================================================================== --- trunk/includes/DefineShiptClass.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/includes/DefineShiptClass.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -4,17 +4,17 @@ Class Shipment { - Var $ShiptRef; /*unqique identifier for the shipment */ - + var $ShiptRef; /*unqique identifier for the shipment */ var $LineItems; /*array of objects of class LineDetails using the product id as the pointer */ - Var $SupplierID; + var $SupplierID; var $SupplierName; var $CurrCode; var $VoyageRef; - Var $Vessel; - Var $ETA; - Var $StockLocation; - Var $Closed; + var $Vessel; + var $ETA; + var $StockLocation; + var $Closed; + var $CurrDecimalPlaces; function Shipment(){ /*Constructor function initialises a new Shipment object */ @@ -23,20 +23,32 @@ $this->Closed =0; } - function add_to_shipment($PODetailItem, - $OrderNo, - $StockID, - $ItemDescr, - $QtyInvoiced, - $UnitPrice, - $UOM, - $DelDate, - $QuantityOrd, - $QuantityRecd, - $StdCostUnit, - &$db){ + function Add_To_Shipment($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces, + &$db){ - $this->LineItems[$PODetailItem]= new LineDetails($PODetailItem,$OrderNo,$StockID,$ItemDescr, $QtyInvoiced, $UnitPrice, $UOM, $DelDate, $QuantityOrd, $QuantityRecd, $StdCostUnit); + $this->LineItems[$PODetailItem]= new LineDetails($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces); $sql = "UPDATE purchorderdetails SET shiptref = '" . $this->ShiptRef . "' WHERE podetailitem = '" . $PODetailItem . "'"; @@ -47,7 +59,7 @@ } - function remove_from_shipment($PODetailItem,&$db){ + function Remove_From_Shipment($PODetailItem,&$db){ if ($this->LineItems[$PODetailItem]->QtyInvoiced==0){ @@ -63,20 +75,32 @@ Class LineDetails { - Var $PODetailItem; - Var $OrderNo; - Var $StockID; - Var $ItemDescription; - Var $QtyInvoiced; - Var $UnitPrice; - Var $UOM; - Var $DelDate; - Var $QuantityOrd; - Var $QuantityRecd; - Var $StdCostUnit; + var $PODetailItem; + var $OrderNo; + var $StockID; + var $ItemDescription; + var $QtyInvoiced; + var $UnitPrice; + var $UOM; + var $DelDate; + var $QuantityOrd; + var $QuantityRecd; + var $StdCostUnit; + var $DecimalPlaces; - function LineDetails ($PODetailItem, $OrderNo, $StockID, $ItemDescr, $QtyInvoiced, $UnitPrice, $UOM, $DelDate, $QuantityOrd, $QuantityRecd, $StdCostUnit){ + function LineDetails ($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces=2){ /* Constructor function to add a new LineDetail object with passed params */ $this->PODetailItem = $PODetailItem; @@ -90,6 +114,7 @@ $this->QuantityRecd = $QuantityRecd; $this->QuantityOrd = $QuantityOrd; $this->StdCostUnit = $StdCostUnit; + $this->DecimalPlaces = $DecimalPlaces; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-21 09:22:13
|
Revision: 4749 http://web-erp.svn.sourceforge.net/web-erp/?rev=4749&view=rev Author: daintree Date: 2011-11-21 09:22:06 +0000 (Mon, 21 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/CustLoginSetup.php trunk/DiscountMatrix.php trunk/GoodsReceived.php trunk/PO_Header.php trunk/Shipments.php trunk/SuppLoginSetup.php trunk/UserSettings.php trunk/WWW_Users.php trunk/doc/Change.log trunk/includes/DefinePOClass.php trunk/includes/DefineShiptClass.php Modified: trunk/CustLoginSetup.php =================================================================== --- trunk/CustLoginSetup.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/CustLoginSetup.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -43,7 +43,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID']) OR mb_strstr($_POST['UserID'],' ')) { Modified: trunk/DiscountMatrix.php =================================================================== --- trunk/DiscountMatrix.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/DiscountMatrix.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -138,7 +138,7 @@ </table> <br /> <div class="centre"> - <input tabindex=5 type="submit" name="submit" value="' . _('Enter Information') . '"> + <input tabindex="5" type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> <br />'; @@ -155,7 +155,7 @@ $result = DB_query($sql,$db); -echo '<table class=selection>'; +echo '<table class="selection">'; echo '<tr> <th>' . _('Sales Type') . '</th> <th>' . _('Discount Category') . '</th> Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/GoodsReceived.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -154,7 +154,8 @@ //Now Display LineItem - echo '<td>' . $LnItm->StockID . '</td> + + echo '<td><a href="' . $rootpath . '/' . $_SESSION['part_pics_dir'] . '/' . $StockID . '.jpg" target="_blank">'. $LnItm->StockID . '</a></td> <td>' . $LnItm->ItemDescription . '</td> <td class="number">' . $DisplaySupplierQtyOrd . '</td> <td>' . $LnItm->SuppliersUnit . '</td> Modified: trunk/PO_Header.php =================================================================== --- trunk/PO_Header.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/PO_Header.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -106,6 +106,11 @@ _('Prices cannot be altered for lines that have already been received') .' '. _('and quantities cannot be reduced below the quantity already received'),'warn'); } + $ShipmentExists = $_SESSION['PO'.$identifier]->Any_Lines_On_A_Shipment(); + if ($ShipmentExists != false){ + $OKToUpdateStatus = 0; //not ok to update the status + prnMsg( _('This order cannot be cancelled or rejected because there is at least one line that is allocated to a shipment') . '. ' . _('See shipment number') . ' ' . $ShipmentExists,'warn'); + } } if ($OKToUpdateStatus==1){ // none of the order has been received if ($AuthorityLevel>$OrderTotal) { Modified: trunk/Shipments.php =================================================================== --- trunk/Shipments.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/Shipments.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -84,18 +84,18 @@ $LineItemsSQL = "SELECT purchorderdetails.podetailitem, purchorders.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.deliverydate, - purchorderdetails.glcode, - purchorderdetails.qtyinvoiced, - purchorderdetails.unitprice, - stockmaster.units, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.stdcostunit, - stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, - purchorders.intostocklocation + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.deliverydate, + purchorderdetails.glcode, + purchorderdetails.qtyinvoiced, + purchorderdetails.unitprice, + stockmaster.units, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.stdcostunit, + stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, + purchorders.intostocklocation FROM purchorderdetails INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid INNER JOIN purchorders @@ -120,17 +120,18 @@ $StandardCost =$myrow['stdcostunit']; } - $_SESSION['Shipment']->LineItems[$myrow['podetailitem']] = new LineDetails($myrow['podetailitem'], - $myrow['orderno'], - $myrow['itemcode'], - $myrow['itemdescription'], - $myrow['qtyinvoiced'], - $myrow['unitprice'], - $myrow['units'], - $myrow['deliverydate'], - $myrow['quantityord'], - $myrow['quantityrecd'], - $StandardCost); + $_SESSION['Shipment']->LineItems[$myrow['podetailitem']] = new LineDetails( + $myrow['podetailitem'], + $myrow['orderno'], + $myrow['itemcode'], + $myrow['itemdescription'], + $myrow['qtyinvoiced'], + $myrow['unitprice'], + $myrow['units'], + $myrow['deliverydate'], + $myrow['quantityord'], + $myrow['quantityrecd'], + $StandardCost); } /* line Shipment from shipment details */ DB_data_Seek($LineItemsResult,0); @@ -147,28 +148,31 @@ $_SESSION['Shipment'] = new Shipment; $sql = "SELECT suppname, - currcode - FROM suppliers + currcode, + decimalplaces AS currdecimalplaces + FROM suppliers INNER JOIN currencies + ON suppliers.currcode=currencies.currabrev WHERE supplierid='" . $_SESSION['SupplierID'] . "'"; $ErrMsg = _('The supplier details for the shipment could not be retrieved because'); $result = DB_query($sql,$db,$ErrMsg); - $myrow = DB_fetch_row($result); + $myrow = DB_fetch_array($result); $_SESSION['Shipment']->SupplierID = $_SESSION['SupplierID']; - $_SESSION['Shipment']->SupplierName = $myrow[0]; - $_SESSION['Shipment']->CurrCode = $myrow[1]; + $_SESSION['Shipment']->SupplierName = $myrow['suppname']; + $_SESSION['Shipment']->CurrCode = $myrow['currcode']; + $_SESSION['Shipment']->CurrDecimalPlaces = $myrow['currdecimalplaces']; $_SESSION['Shipment']->ShiptRef = GetNextTransNo (31, $db); } -if (isset($_POST['Update']) OR (isset($_GET['Add']) AND $_SESSION['Shipment']->Closed==0)) { //user hit the update button +if (isset($_POST['Update']) + OR (isset($_GET['Add']) + AND $_SESSION['Shipment']->Closed==0)) { //user hit the update button $InputError = 0; if (isset($_POST['Update'])){ - $_SESSION['Shipment']->Vessel = $_POST['Vessel']; - $_SESSION['Shipment']->VoyageRef = $_POST['VoyageRef']; if (!Is_Date($_POST['ETA'])){ $InputError=1; @@ -186,19 +190,24 @@ if (mb_strlen($_POST['VoyageRef'])<2){ prnMsg( _('A reference to the voyage (or HAWB in the case of air-freight) of more than 2 characters is expected'), 'error'); } - } elseif(mb_strlen($_SESSION['Shipment']->Vessel)<2 OR mb_strlen($_SESSION['Shipment']->VoyageRef)<2){ + } elseif(mb_strlen($_SESSION['Shipment']->Vessel)<2 + OR mb_strlen($_SESSION['Shipment']->VoyageRef)<2){ prnMsg(_('Cannot add purchase order lines to the shipment unless the shipment is first initiated - hit update to setup the shipment first'),'info'); $InputError = 1; } /*The user hit the update the shipment button and there are some lines on the shipment*/ if ($InputError == 0 AND (count($_SESSION['Shipment']->LineItems) > 0 OR isset($_GET['Add']))){ + + $_SESSION['Shipment']->Vessel = $_POST['Vessel']; + $_SESSION['Shipment']->VoyageRef = $_POST['VoyageRef']; + $sql = "SELECT shiptref FROM shipments WHERE shiptref =" . $_SESSION['Shipment']->ShiptRef; $result = DB_query($sql,$db); if (DB_num_rows($result)==1){ $sql = "UPDATE shipments SET vessel='" . $_SESSION['Shipment']->Vessel . "', - voyageref='". $_SESSION['Shipment']->VoyageRef . "', - eta='" . $_SESSION['Shipment']->ETA . "' + voyageref='". $_SESSION['Shipment']->VoyageRef . "', + eta='" . $_SESSION['Shipment']->ETA . "' WHERE shiptref ='" . $_SESSION['Shipment']->ShiptRef . "'"; } else { @@ -225,12 +234,11 @@ $sql = "UPDATE purchorderdetails SET deliverydate ='" . $_SESSION['Shipment']->ETA . "' - WHERE podetailitem='" . $LnItm->PODetailItem . "'"; + WHERE podetailitem='" . $LnItm->PODetailItem . "'"; $result = DB_query($sql,$db); $_SESSION['Shipment']->LineItems[$LnItm->PODetailItem]->DelDate = $_SESSION['Shipment']->ETA; - } } prnMsg( _('Updated the shipment record and delivery dates of order lines as necessary'), 'success'); @@ -239,23 +247,25 @@ } //user hit Update -if (isset($_GET['Add']) AND $_SESSION['Shipment']->Closed==0 AND $InputError==0){ +if (isset($_GET['Add']) + AND $_SESSION['Shipment']->Closed==0 + AND $InputError==0){ $sql = "SELECT purchorderdetails.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.unitprice, - purchorderdetails.stdcostunit, - stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.deliverydate, - stockmaster.units, - stockmaster.decimalplaces, - purchorderdetails.qtyinvoiced - FROM purchorderdetails INNER JOIN stockmaster + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.unitprice, + purchorderdetails.stdcostunit, + stockmaster.materialcost+stockmaster.labourcost+stockmaster.overheadcost as stdcost, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.deliverydate, + stockmaster.units, + stockmaster.decimalplaces, + purchorderdetails.qtyinvoiced + FROM purchorderdetails INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid - WHERE purchorderdetails.podetailitem='" . $_GET['Add'] . "'"; + WHERE purchorderdetails.podetailitem='" . $_GET['Add'] . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_array($result); @@ -268,7 +278,7 @@ $StandardCost = $myrow['stdcostunit']; } - $_SESSION['Shipment']->add_to_shipment($_GET['Add'], + $_SESSION['Shipment']->Add_To_Shipment($_GET['Add'], $myrow['orderno'], $myrow['itemcode'], $myrow['itemdescription'], @@ -283,7 +293,7 @@ } if (isset($_GET['Delete']) AND $_SESSION['Shipment']->Closed==0){ //shipment is open and user hit delete on a line - $_SESSION['Shipment']->remove_from_shipment($_GET['Delete'],$db); + $_SESSION['Shipment']->Remove_From_Shipment($_GET['Delete'],$db); } @@ -315,24 +325,24 @@ if (isset($_SESSION['Shipment']->ETA)) { echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" maxlength="10" size="10" value="' . $ETA . '" /></td>'; } else { - echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" maxlength=10 size=10 value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>'; + echo '<td><input type="text class="date" alt='.$_SESSION['DefaultDateFormat'].' name="ETA" maxlength="10" size="10" value="' . Date($_SESSION['DefaultDateFormat']) . '" /></td>'; } echo '<td>'. _('Into').' '; if (count($_SESSION['Shipment']->LineItems)>0){ - if (!isset($_SESSION['Shipment']->StockLocation)){ + if (!isset($_SESSION['Shipment']->StockLocation)){ - $sql = "SELECT purchorders.intostocklocation - FROM purchorders INNER JOIN purchorderdetails - ON purchorders.orderno=purchorderdetails.orderno and podetailitem = '" . key($_SESSION['Shipment']->LineItems) . "'"; + $sql = "SELECT purchorders.intostocklocation + FROM purchorders INNER JOIN purchorderdetails + ON purchorders.orderno=purchorderdetails.orderno AND podetailitem = '" . key($_SESSION['Shipment']->LineItems) . "'"; + + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + + $_SESSION['Shipment']->StockLocation = $myrow[0]; + $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; - $result = DB_query($sql,$db); - $myrow = DB_fetch_row($result); - - $_SESSION['Shipment']->StockLocation = $myrow[0]; - $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; - } else { $_POST['StockLocation']=$_SESSION['Shipment']->StockLocation; @@ -373,7 +383,7 @@ $sql = "SELECT locationname FROM locations WHERE loccode='" . $_SESSION['Shipment']->StockLocation . "'"; $resultStkLocs = DB_query($sql,$db); $myrow=DB_fetch_array($resultStkLocs); - echo '<input type=hidden name=StockLocation value='.$_SESSION['Shipment']->StockLocation.'>'; + echo '<input type="hidden" name="StockLocation" value="'.$_SESSION['Shipment']->StockLocation.'" />'; echo $myrow['locationname']; } @@ -382,18 +392,19 @@ if (count($_SESSION['Shipment']->LineItems)>0){ /* Always display all shipment lines */ - echo '<br /><table cellpadding=2 colspan=7 class="selection">'; + echo '<br /><table class="selection">'; echo '<tr><th colspan="9"><font color="navy" size="3">'. _('Order Lines On This Shipment'). '</font></th></tr>'; $TableHeader = '<tr> - <th>'. _('Order'). '</th> - <th>'. _('Item'). '</th> - <th>'. _('Quantity'). '<br />'. _('Ordered'). '</th> - <th>'. _('Units'). '</th> - <th>'. _('Quantity').'<br />'. _('Received'). '</th> - <th>'. _('Quantity').'<br />'. _('Invoiced'). '</th> - <th>'. $_SESSION['Shipment']->CurrCode .' '. _('Price') . '</th> - <th>'. _('Current'). '<br />'. _('Std Cost'). '</th></tr>'; + <th>'. _('Order'). '</th> + <th>'. _('Item'). '</th> + <th>'. _('Quantity'). '<br />'. _('Ordered'). '</th> + <th>'. _('Units'). '</th> + <th>'. _('Quantity').'<br />'. _('Received'). '</th> + <th>'. _('Quantity').'<br />'. _('Invoiced'). '</th> + <th>'. $_SESSION['Shipment']->CurrCode .' '. _('Price') . '</th> + <th>'. _('Current'). '<br />'. _('Std Cost'). '</th> + </tr>'; echo $TableHeader; @@ -420,12 +431,12 @@ echo '<td>'.$LnItm->OrderNo.'</td> - <td>'. $LnItm->StockID .' - '. $LnItm->ItemDescription. '</td><td class="number">' . locale_number_format($LnItm->QuantityOrd,2) . '</td> + <td>'. $LnItm->StockID .' - '. $LnItm->ItemDescription. '</td><td class="number">' . locale_number_format($LnItm->QuantityOrd,$LnItm->DecimalPlaces) . '</td> <td>'. $LnItm->UOM .'</td> - <td class="number">' . locale_number_format($LnItm->QuantityRecd,2) . '</td> - <td class="number">' . locale_number_format($LnItm->QtyInvoiced,2) . '</td> - <td class="number">' . locale_number_format($LnItm->UnitPrice,2) . '</td> - <td class="number">' . locale_number_format($LnItm->StdCostUnit,2) . '</td> + <td class="number">' . locale_number_format($LnItm->QuantityRecd,$LnItm->DecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->QtyInvoiced,$LnItm->DecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->UnitPrice, $_SESSION['Shipment']->CurrDecimalPlaces) . '</td> + <td class="number">' . locale_number_format($LnItm->StdCostUnit,$_SESSION['CompanyRecord']['decimalplaces']) . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?Delete=' . $LnItm->PODetailItem . '">'. _('Delete'). '</a></td> </tr>'; }//for each line on the shipment @@ -442,39 +453,43 @@ } $sql = "SELECT purchorderdetails.podetailitem, - purchorders.orderno, - purchorderdetails.itemcode, - purchorderdetails.itemdescription, - purchorderdetails.unitprice, - purchorderdetails.quantityord, - purchorderdetails.quantityrecd, - purchorderdetails.deliverydate, - stockmaster.units, - stockmaster.decimalplaces - FROM purchorderdetails INNER JOIN purchorders - ON purchorderdetails.orderno=purchorders.orderno - INNER JOIN stockmaster + purchorders.orderno, + purchorderdetails.itemcode, + purchorderdetails.itemdescription, + purchorderdetails.unitprice, + purchorderdetails.quantityord, + purchorderdetails.quantityrecd, + purchorderdetails.deliverydate, + stockmaster.units, + stockmaster.decimalplaces + FROM purchorderdetails INNER JOIN purchorders + ON purchorderdetails.orderno=purchorders.orderno + INNER JOIN stockmaster ON purchorderdetails.itemcode=stockmaster.stockid - WHERE qtyinvoiced=0 - AND purchorders.supplierno ='" . $_SESSION['Shipment']->SupplierID . "' - AND purchorderdetails.shiptref=0 - AND purchorders.intostocklocation='" . $_POST['StockLocation'] . "'"; + WHERE qtyinvoiced=0 + AND purchorderdetails.completed=0 + AND purchorders.status='Authorised' + AND purchorders.supplierno ='" . $_SESSION['Shipment']->SupplierID . "' + AND purchorderdetails.shiptref=0 + AND purchorders.intostocklocation='" . $_POST['StockLocation'] . "'"; $result = DB_query($sql,$db); if (DB_num_rows($result)>0){ echo '<table cellpadding="2" colspan="7" class="selection">'; - echo '<tr><th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th></tr>'; + echo '<tr> + <th colspan="7"><font color="navy" size="3">'. _('Possible Order Lines To Add To This Shipment').'</font></th> + </tr>'; $TableHeader = '<tr> - <th>'. _('Order').'</th> - <th>'. _('Item').'</th> - <th>'. _('Quantity').'<br />'. _('Ordered').'</th> - <th>'. _('Units').'</th> - <th>'. _('Quantity').'<br />'. _('Received').'</th> - <th>'. _('Delivery').'<br />'. _('Date').'</th> - </tr>'; + <th>'. _('Order').'</th> + <th>'. _('Item').'</th> + <th>'. _('Quantity').'<br />'. _('Ordered').'</th> + <th>'. _('Units').'</th> + <th>'. _('Quantity').'<br />'. _('Received').'</th> + <th>'. _('Delivery').'<br />'. _('Date').'</th> + </tr>'; echo $TableHeader; @@ -500,12 +515,12 @@ } echo '<td>' . $myrow['orderno'] . '</td> - <td>' . $myrow['itemcode'] . ' - ' . $myrow['itemdescription'] . '</td> - <td class="number">' . locale_number_format($myrow['quantityord'],$myrow['decimalplaces']) . '</td> - <td>' . $myrow['units'] . '</td> - <td class="number">' . locale_number_format($myrow['quantityrecd'],,$myrow['decimalplaces']) . '</td> - <td class="number">' . ConvertSQLDate($myrow['deliverydate']) . '</td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . 'Add=' . $myrow['podetailitem'] . '">'. _('Add').'</a></td> + <td>' . $myrow['itemcode'] . ' - ' . $myrow['itemdescription'] . '</td> + <td class="number">' . locale_number_format($myrow['quantityord'],$myrow['decimalplaces']) . '</td> + <td>' . $myrow['units'] . '</td> + <td class="number">' . locale_number_format($myrow['quantityrecd'],$myrow['decimalplaces']) . '</td> + <td class="number">' . ConvertSQLDate($myrow['deliverydate']) . '</td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?' . 'Add=' . $myrow['podetailitem'] . '">'. _('Add').'</a></td> </tr>'; } Modified: trunk/SuppLoginSetup.php =================================================================== --- trunk/SuppLoginSetup.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/SuppLoginSetup.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -43,7 +43,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { Modified: trunk/UserSettings.php =================================================================== --- trunk/UserSettings.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/UserSettings.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -34,27 +34,34 @@ prnMsg(_('Cannot change password in the demo or others would be locked out!'),'warn'); } */ - $update_pw = 'N'; - if ($_POST['pass'] != ''){ - if ($_POST['pass'] != $_POST['passcheck']){ + $UpdatePassword = 'N'; + if ($_POST['Password'] != ''){ + if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); }else{ - $update_pw = 'Y'; + $UpdatePassword = 'Y'; } } - if ($_POST['passcheck'] != ''){ - if ($_POST['pass'] != $_POST['passcheck']){ + if ($_POST['PasswordCheck'] != ''){ + if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); }else{ - $update_pw = 'Y'; + $UpdatePassword = 'Y'; } } + if (mb_strlen($_POST['Password'])<5){ + $InputError = 1; + prnMsg(_('The password entered must be at least 5 characters long'),'error'); + } elseif (mb_strstr($_POST['Password'],$_SESSION['UserID'])!= False){ + $InputError = 1; + prnMsg(_('The password cannot contain the user id'),'error'); + } if ($InputError != 1) { // no errors - if ($update_pw != 'Y'){ + if ($UpdatePassword != 'Y'){ $sql = "UPDATE www_users SET displayrecordsmax='" . $_POST['DisplayRecordsMax'] . "', theme='" . $_POST['Theme'] . "', @@ -76,7 +83,7 @@ language='" . $_POST['Language'] . "', email='". $_POST['email'] ."', pdflanguage='" . $_POST['PDFLanguage'] . "', - password='" . CryptPass($_POST['pass']) . "' + password='" . CryptPass($_POST['Password']) . "' WHERE userid = '" . $_SESSION['UserID'] . "'"; $ErrMsg = _('The user alterations could not be processed because'); @@ -161,20 +168,20 @@ } } -if (!isset($_POST['passcheck'])) { - $_POST['passcheck']=''; +if (!isset($_POST['PasswordCheck'])) { + $_POST['PasswordCheck']=''; } -if (!isset($_POST['pass'])) { - $_POST['pass']=''; +if (!isset($_POST['Password'])) { + $_POST['Password']=''; } echo '</select></td></tr> <tr> <td>' . _('New Password') . ':</td> - <td><input type="password" name="pass" size=20 value="' . $_POST['pass'] . '"></td> + <td><input type="password" name="Password" size="20" value="' . $_POST['Password'] . '" /></td> </tr> <tr> <td>' . _('Confirm Password') . ':</td> - <td><input type="password" name="passcheck" size="20" value="' . $_POST['passcheck'] . '"></td> + <td><input type="password" name="PasswordCheck" size="20" value="' . $_POST['PasswordCheck'] . '" /></td> </tr> <tr> <td colspan=2 align="center"><i>' . _('If you leave the password boxes empty your password will not change') . '</i></td> @@ -189,7 +196,7 @@ $_POST['email'] = $myrow['email']; } -echo '<td><input type="text" name="email" size=40 value="' . $_POST['email'] . '"></td> +echo '<td><input type="text" name="email" size=40 value="' . $_POST['email'] . '" /></td> </tr>'; if (!isset($_POST['PDFLanguage'])){ Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/WWW_Users.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -60,7 +60,7 @@ ie the page has called itself with some user input */ //first off validate inputs sensible - if (mb_strlen($_POST['UserID'])<3){ + if (mb_strlen($_POST['UserID'])<4){ $InputError = 1; prnMsg(_('The user ID entered must be at least 4 characters long'),'error'); } elseif (ContainsIllegalCharacters($_POST['UserID'])) { @@ -391,19 +391,23 @@ $_POST['Blocked'] = $myrow['blocked']; $_POST['PDFLanguage'] = $myrow['pdflanguage']; - echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" /'; + echo '<input type="hidden" name="SelectedUser" value="' . $SelectedUser . '" />'; echo '<input type="hidden" name="UserID" value="' . $_POST['UserID'] . '" />'; echo '<input type="hidden" name="ModulesAllowed" value="' . $_POST['ModulesAllowed'] . '" />'; - echo '<table class=selection> <tr><td>' . _('User code') . ':</td><td>'; - echo $_POST['UserID'] . '</td></tr>'; + echo '<table class="selection"> + <tr> + <td>' . _('User code') . ':</td> + <td>' . $_POST['UserID'] . '</td> + </tr>'; } else { //end of if $SelectedUser only do the else when a new record is being entered echo '<table class="selection"> <tr> <td>' . _('User Login') . ':</td> - <td><input type="text" name="UserID" size="22" maxlength="20" /></td></tr>'; + <td><input type="text" name="UserID" size="22" maxlength="20" /></td> + </tr>'; /*set the default modules to show to all this had trapped a few people previously*/ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/doc/Change.log 2011-11-21 09:22:06 UTC (rev 4749) @@ -1,5 +1,8 @@ webERP Change Log +21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids +21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > + 19/11/11 Release 4.06RC3 - 4.06.1 19/11/11 Phil: SupplierAllocations.php fixes for number_formatting Modified: trunk/includes/DefinePOClass.php =================================================================== --- trunk/includes/DefinePOClass.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/includes/DefinePOClass.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -154,6 +154,17 @@ return 0; } + function Any_Lines_On_A_Shipment(){ + /* Checks if any of the line items are on a shipment */ + if (count($this->LineItems)>0){ + foreach ($this->LineItems as $OrderedItems) { + if ($OrderedItems->ShiptRef !=''){ + return $OrderedItems->ShiptRef; + } + } + } + return 0; + } function Some_Already_Received($LineNo){ /* Checks if there have been deliveries or amounts invoiced against a specific line item */ if (count($this->LineItems)>0 and isset($this->LineItems[$LineNo])){ Modified: trunk/includes/DefineShiptClass.php =================================================================== --- trunk/includes/DefineShiptClass.php 2011-11-19 04:00:22 UTC (rev 4748) +++ trunk/includes/DefineShiptClass.php 2011-11-21 09:22:06 UTC (rev 4749) @@ -4,17 +4,17 @@ Class Shipment { - Var $ShiptRef; /*unqique identifier for the shipment */ - + var $ShiptRef; /*unqique identifier for the shipment */ var $LineItems; /*array of objects of class LineDetails using the product id as the pointer */ - Var $SupplierID; + var $SupplierID; var $SupplierName; var $CurrCode; var $VoyageRef; - Var $Vessel; - Var $ETA; - Var $StockLocation; - Var $Closed; + var $Vessel; + var $ETA; + var $StockLocation; + var $Closed; + var $CurrDecimalPlaces; function Shipment(){ /*Constructor function initialises a new Shipment object */ @@ -23,20 +23,32 @@ $this->Closed =0; } - function add_to_shipment($PODetailItem, - $OrderNo, - $StockID, - $ItemDescr, - $QtyInvoiced, - $UnitPrice, - $UOM, - $DelDate, - $QuantityOrd, - $QuantityRecd, - $StdCostUnit, - &$db){ + function Add_To_Shipment($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces, + &$db){ - $this->LineItems[$PODetailItem]= new LineDetails($PODetailItem,$OrderNo,$StockID,$ItemDescr, $QtyInvoiced, $UnitPrice, $UOM, $DelDate, $QuantityOrd, $QuantityRecd, $StdCostUnit); + $this->LineItems[$PODetailItem]= new LineDetails($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces); $sql = "UPDATE purchorderdetails SET shiptref = '" . $this->ShiptRef . "' WHERE podetailitem = '" . $PODetailItem . "'"; @@ -47,7 +59,7 @@ } - function remove_from_shipment($PODetailItem,&$db){ + function Remove_From_Shipment($PODetailItem,&$db){ if ($this->LineItems[$PODetailItem]->QtyInvoiced==0){ @@ -63,20 +75,32 @@ Class LineDetails { - Var $PODetailItem; - Var $OrderNo; - Var $StockID; - Var $ItemDescription; - Var $QtyInvoiced; - Var $UnitPrice; - Var $UOM; - Var $DelDate; - Var $QuantityOrd; - Var $QuantityRecd; - Var $StdCostUnit; + var $PODetailItem; + var $OrderNo; + var $StockID; + var $ItemDescription; + var $QtyInvoiced; + var $UnitPrice; + var $UOM; + var $DelDate; + var $QuantityOrd; + var $QuantityRecd; + var $StdCostUnit; + var $DecimalPlaces; - function LineDetails ($PODetailItem, $OrderNo, $StockID, $ItemDescr, $QtyInvoiced, $UnitPrice, $UOM, $DelDate, $QuantityOrd, $QuantityRecd, $StdCostUnit){ + function LineDetails ($PODetailItem, + $OrderNo, + $StockID, + $ItemDescr, + $QtyInvoiced, + $UnitPrice, + $UOM, + $DelDate, + $QuantityOrd, + $QuantityRecd, + $StdCostUnit, + $DecimalPlaces=2){ /* Constructor function to add a new LineDetail object with passed params */ $this->PODetailItem = $PODetailItem; @@ -90,6 +114,7 @@ $this->QuantityRecd = $QuantityRecd; $this->QuantityOrd = $QuantityOrd; $this->StdCostUnit = $StdCostUnit; + $this->DecimalPlaces = $DecimalPlaces; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-23 09:22:46
|
Revision: 4751 http://web-erp.svn.sourceforge.net/web-erp/?rev=4751&view=rev Author: daintree Date: 2011-11-23 09:22:39 +0000 (Wed, 23 Nov 2011) Log Message: ----------- number format changes Modified Paths: -------------- trunk/SalesCategories.php trunk/StockCategories.php trunk/StockSerialItems.php trunk/doc/Change.log Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-11-21 09:25:54 UTC (rev 4750) +++ trunk/SalesCategories.php 2011-11-23 09:22:39 UTC (rev 4751) @@ -21,6 +21,7 @@ } else if (isset($_POST['ParentCategory'])){ $ParentCategory = mb_strtoupper($_POST['ParentCategory']); } + if(isset($ParentCategory) AND $ParentCategory == 0 ) { unset($ParentCategory); } @@ -164,7 +165,7 @@ $CategoryPath = '<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?ParentCategory=0">' . _('Main') . '</a>' . " \\ "; $TempPath = ''; -if (isset($ParentCategory)){ +if (!isset($ParentCategory)){ $ParentCategory=0; } Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2011-11-21 09:25:54 UTC (rev 4750) +++ trunk/StockCategories.php 2011-11-23 09:22:39 UTC (rev 4751) @@ -55,11 +55,11 @@ } for ($i=0;$i<=$_POST['PropertyCounter'];$i++){ if (isset($_POST['PropNumeric' .$i]) and $_POST['PropNumeric' .$i] == true){ - if (!is_numeric($_POST['PropMinimum' .$i])){ + if (!is_numeric(filter_number_format($_POST['PropMinimum' .$i]))){ $InputError = 1; prnMsg(_('The minimum value is expected to be a numeric value'),'error'); } - if (!is_numeric($_POST['PropMaximum' .$i])){ + if (!is_numeric(filter_number_format($_POST['PropMaximum' .$i]))){ $InputError = 1; prnMsg(_('The maximum value is expected to be a numeric value'),'error'); } @@ -109,8 +109,8 @@ '" . $_POST['PropLabel' . $i] . "', " . $_POST['PropControlType' . $i] . ", '" . $_POST['PropDefault' .$i] . "', - '" . $_POST['PropMinimum' .$i] . "', - '" . $_POST['PropMaximum' .$i] . "', + '" . filter_number_format($_POST['PropMinimum' .$i]) . "', + '" . filter_number_format($_POST['PropMaximum' .$i]) . "', '" . $_POST['PropNumeric' .$i] . "', " . $_POST['PropReqSO' .$i] . ')'; $ErrMsg = _('Could not insert a new category property for') . $_POST['PropLabel' . $i]; @@ -119,8 +119,8 @@ $sql = "UPDATE stockcatproperties SET label ='" . $_POST['PropLabel' . $i] . "', controltype = " . $_POST['PropControlType' . $i] . ", defaultvalue = '" . $_POST['PropDefault' .$i] . "', - minimumvalue = '" . $_POST['PropMinimum' .$i] . "', - maximumvalue = '" . $_POST['PropMaximum' .$i] . "', + minimumvalue = '" . filter_number_format($_POST['PropMinimum' .$i]) . "', + maximumvalue = '" . filter_number_format($_POST['PropMaximum' .$i]) . "', numericvalue = '" . $_POST['PropNumeric' .$i] . "', reqatsalesorder = " . $_POST['PropReqSO' .$i] . " WHERE stkcatpropid =" . $_POST['PropID' .$i]; @@ -181,19 +181,19 @@ '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('items referring to this stock category code'),'warn'); } else { - $sql = "SELECT COUNT(*) FROM salesglpostings WHERE stkcat='$SelectedCategory'"; + $sql = "SELECT COUNT(*) FROM salesglpostings WHERE stkcat='" . $SelectedCategory . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg(_('Cannot delete this stock category because it is used by the sales') . ' - ' . _('GL posting interface') . '. ' . _('Delete any records in the Sales GL Interface set up using this stock category first'),'warn'); } else { - $sql = "SELECT COUNT(*) FROM cogsglpostings WHERE stkcat='$SelectedCategory'"; + $sql = "SELECT COUNT(*) FROM cogsglpostings WHERE stkcat='" . $SelectedCategory . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg(_('Cannot delete this stock category because it is used by the cost of sales') . ' - ' . _('GL posting interface') . '. ' . _('Delete any records in the Cost of Sales GL Interface set up using this stock category first'),'warn'); } else { - $sql="DELETE FROM stockcategory WHERE categoryid='$SelectedCategory'"; + $sql="DELETE FROM stockcategory WHERE categoryid='" . $SelectedCategory . "'"; $result = DB_query($sql,$db); prnMsg(_('The stock category') . ' ' . $SelectedCategory . ' ' . _('has been deleted') . ' !','success'); unset ($SelectedCategory); @@ -304,8 +304,8 @@ $_POST['MaterialUseageVarAc'] = $myrow['materialuseagevarac']; $_POST['WIPAct'] = $myrow['wipact']; } - echo '<input type=hidden name="SelectedCategory" value="' . $SelectedCategory . '" />'; - echo '<input type=hidden name="CategoryID" value="' . $_POST['CategoryID'] . '" />'; + echo '<input type="hidden" name="SelectedCategory" value="' . $SelectedCategory . '" />'; + echo '<input type="hidden" name="CategoryID" value="' . $_POST['CategoryID'] . '" />'; echo '<table class="selection"> <tr> <td>' . _('Category Code') . ':</td> @@ -380,7 +380,7 @@ echo '</select></td> </tr>'; - echo '<input type="submit" name="UpdateTypes" style="visibility:hidden;width:1px" value="Not Seen">'; + echo '<input type="submit" name="UpdateTypes" style="visibility:hidden;width:1px" value="Not Seen" />'; if (isset($_POST['StockType']) and $_POST['StockType']=='L') { $Result = $PnLAccountsResult; echo '<tr><td>' . _('Recovery GL Code'); @@ -484,7 +484,9 @@ label, controltype, defaultvalue, - reqatsalesorder + reqatsalesorder, + minimumvalue, + maximumvalue FROM stockcatproperties WHERE categoryid='" . $SelectedCategory . "' ORDER BY stkcatpropid"; @@ -515,8 +517,9 @@ $HeadingCounter++; } echo '<input type="hidden" name="PropID' . $PropertyCounter .'" value="' . $myrow['stkcatpropid'] . '" />'; - echo '<tr><td><input type="textbox" name="PropLabel' . $PropertyCounter . '" size="50" maxlength="100" value="' . $myrow['label'] . '" /></td> - <td><select name="PropControlType' . $PropertyCounter . '">'; + echo '<tr> + <td><input type="text" name="PropLabel' . $PropertyCounter . '" size="50" maxlength="100" value="' . $myrow['label'] . '" /></td> + <td><select name="PropControlType' . $PropertyCounter . '">'; if ($myrow['controltype']==0){ echo '<option selected value="0">' . _('Text Box') . '</option>'; } else { @@ -540,8 +543,8 @@ echo 'checked'; } echo '"></td> - <td><input type="textbox" "name="PropMinimum' . $PropertyCounter . '" value="' . $myrow['minimumvalue'] . '"></td> - <td><input type="textbox" name="PropMaximum' . $PropertyCounter . '" value="' . $myrow['maximumvalue'] . '"></td>'; + <td><input type="textbox" class="number" name="PropMinimum' . $PropertyCounter . '" value="' . locale_number_format($myrow['minimumvalue'],'Variable') . '" /></td> + <td><input type="textbox" class="number" name="PropMaximum' . $PropertyCounter . '" value="' . locale_number_format($myrow['maximumvalue'],'Variable') . '" /></td>'; echo '<td align="center"><input type="checkbox" name="PropReqSO' . $PropertyCounter .'"'; if ($myrow['reqatsalesorder']==1){ @@ -550,7 +553,7 @@ echo ''; } - echo '></td> + echo ' /></td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DeleteProperty=' . $myrow['stkcatpropid'] .'&SelectedCategory=' . $SelectedCategory . '" onclick=\'return confirm("' . _('Are you sure you wish to delete this property? All properties of this type set up for stock items will also be deleted.') . '");\'>' . _('Delete') . '</td> </tr>'; @@ -560,14 +563,14 @@ echo '<tr> <td><input type="textbox" name="PropLabel' . $PropertyCounter . '" size="50" maxlength="100" /></td> <td><select name="PropControlType' . $PropertyCounter . '"> - <option selected value=0>' . _('Text Box') . '</option> - <option value=1>' . _('Select Box') . '</option> - <option value=2>' . _('Check Box') . '</option> + <option selected value="0">' . _('Text Box') . '</option> + <option value="1">' . _('Select Box') . '</option> + <option value="2">' . _('Check Box') . '</option> </select></td> <td><input type="textbox" name="PropDefault' . $PropertyCounter . '" /></td> <td><input type="checkbox" name="PropNumeric' . $PropertyCounter . '" /></td> - <td><input type="textbox" "name="PropMinimum' . $PropertyCounter . '" /></td> - <td><input type="textbox" name="PropMaximum' . $PropertyCounter . '" /></td> + <td><input type="textbox" class="number" "name="PropMinimum' . $PropertyCounter . '" /></td> + <td><input type="textbox" class="number" name="PropMaximum' . $PropertyCounter . '" /></td> <td align="center"><input type="checkbox" name="PropReqSO' . $PropertyCounter .'" /></td> </tr>'; echo '</table>'; @@ -578,7 +581,7 @@ echo '<br /> <div class="centre"> - <input type="submit" name="submit" value="' . _('Enter Information') . '"> + <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> </form>'; Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2011-11-21 09:25:54 UTC (rev 4750) +++ trunk/StockSerialItems.php 2011-11-23 09:22:39 UTC (rev 4751) @@ -150,7 +150,7 @@ echo '<th></th>'; } else if ($Serialised == 1 and $Perishable==1) { echo '<td>'.$myrow['serialno'].'</td> - echo '<td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; + <td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; } else if ($Serialised == 0 and $Perishable==0) { echo '<td>'.$myrow['serialno'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces).'</td>'; @@ -158,8 +158,8 @@ } else if ($Serialised == 0 and $Perishable==1){ echo '<td>'.$myrow['serialno'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces). '</td> - <td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; - echo '<th></th>'; + <td>' . ConvertSQLDate($myrow['expirationdate']). '</td> + <th></th>'; } $j++; If ($j == 36){ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-21 09:25:54 UTC (rev 4750) +++ trunk/doc/Change.log 2011-11-23 09:22:39 UTC (rev 4751) @@ -1,6 +1,7 @@ webERP Change Log - +23/11/11 Phil: StockCategories number_formatting of minumum and maximum values of stock category properties +23/11/11 Felix Lim: StockSerialItems.php closing quote typo. 21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids 21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > 20/11/11 Phil: Shipments.php now only allows purchase order items to be added to a shipment where the shipment is authorised. Completed, rejected, cancelled orders no longer show. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-23 09:22:46
|
Revision: 4751 http://web-erp.svn.sourceforge.net/web-erp/?rev=4751&view=rev Author: daintree Date: 2011-11-23 09:22:39 +0000 (Wed, 23 Nov 2011) Log Message: ----------- number format changes Modified Paths: -------------- trunk/SalesCategories.php trunk/StockCategories.php trunk/StockSerialItems.php trunk/doc/Change.log Modified: trunk/SalesCategories.php =================================================================== --- trunk/SalesCategories.php 2011-11-21 09:25:54 UTC (rev 4750) +++ trunk/SalesCategories.php 2011-11-23 09:22:39 UTC (rev 4751) @@ -21,6 +21,7 @@ } else if (isset($_POST['ParentCategory'])){ $ParentCategory = mb_strtoupper($_POST['ParentCategory']); } + if(isset($ParentCategory) AND $ParentCategory == 0 ) { unset($ParentCategory); } @@ -164,7 +165,7 @@ $CategoryPath = '<a href="'.htmlspecialchars($_SERVER['PHP_SELF']) . '?ParentCategory=0">' . _('Main') . '</a>' . " \\ "; $TempPath = ''; -if (isset($ParentCategory)){ +if (!isset($ParentCategory)){ $ParentCategory=0; } Modified: trunk/StockCategories.php =================================================================== --- trunk/StockCategories.php 2011-11-21 09:25:54 UTC (rev 4750) +++ trunk/StockCategories.php 2011-11-23 09:22:39 UTC (rev 4751) @@ -55,11 +55,11 @@ } for ($i=0;$i<=$_POST['PropertyCounter'];$i++){ if (isset($_POST['PropNumeric' .$i]) and $_POST['PropNumeric' .$i] == true){ - if (!is_numeric($_POST['PropMinimum' .$i])){ + if (!is_numeric(filter_number_format($_POST['PropMinimum' .$i]))){ $InputError = 1; prnMsg(_('The minimum value is expected to be a numeric value'),'error'); } - if (!is_numeric($_POST['PropMaximum' .$i])){ + if (!is_numeric(filter_number_format($_POST['PropMaximum' .$i]))){ $InputError = 1; prnMsg(_('The maximum value is expected to be a numeric value'),'error'); } @@ -109,8 +109,8 @@ '" . $_POST['PropLabel' . $i] . "', " . $_POST['PropControlType' . $i] . ", '" . $_POST['PropDefault' .$i] . "', - '" . $_POST['PropMinimum' .$i] . "', - '" . $_POST['PropMaximum' .$i] . "', + '" . filter_number_format($_POST['PropMinimum' .$i]) . "', + '" . filter_number_format($_POST['PropMaximum' .$i]) . "', '" . $_POST['PropNumeric' .$i] . "', " . $_POST['PropReqSO' .$i] . ')'; $ErrMsg = _('Could not insert a new category property for') . $_POST['PropLabel' . $i]; @@ -119,8 +119,8 @@ $sql = "UPDATE stockcatproperties SET label ='" . $_POST['PropLabel' . $i] . "', controltype = " . $_POST['PropControlType' . $i] . ", defaultvalue = '" . $_POST['PropDefault' .$i] . "', - minimumvalue = '" . $_POST['PropMinimum' .$i] . "', - maximumvalue = '" . $_POST['PropMaximum' .$i] . "', + minimumvalue = '" . filter_number_format($_POST['PropMinimum' .$i]) . "', + maximumvalue = '" . filter_number_format($_POST['PropMaximum' .$i]) . "', numericvalue = '" . $_POST['PropNumeric' .$i] . "', reqatsalesorder = " . $_POST['PropReqSO' .$i] . " WHERE stkcatpropid =" . $_POST['PropID' .$i]; @@ -181,19 +181,19 @@ '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('items referring to this stock category code'),'warn'); } else { - $sql = "SELECT COUNT(*) FROM salesglpostings WHERE stkcat='$SelectedCategory'"; + $sql = "SELECT COUNT(*) FROM salesglpostings WHERE stkcat='" . $SelectedCategory . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg(_('Cannot delete this stock category because it is used by the sales') . ' - ' . _('GL posting interface') . '. ' . _('Delete any records in the Sales GL Interface set up using this stock category first'),'warn'); } else { - $sql = "SELECT COUNT(*) FROM cogsglpostings WHERE stkcat='$SelectedCategory'"; + $sql = "SELECT COUNT(*) FROM cogsglpostings WHERE stkcat='" . $SelectedCategory . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg(_('Cannot delete this stock category because it is used by the cost of sales') . ' - ' . _('GL posting interface') . '. ' . _('Delete any records in the Cost of Sales GL Interface set up using this stock category first'),'warn'); } else { - $sql="DELETE FROM stockcategory WHERE categoryid='$SelectedCategory'"; + $sql="DELETE FROM stockcategory WHERE categoryid='" . $SelectedCategory . "'"; $result = DB_query($sql,$db); prnMsg(_('The stock category') . ' ' . $SelectedCategory . ' ' . _('has been deleted') . ' !','success'); unset ($SelectedCategory); @@ -304,8 +304,8 @@ $_POST['MaterialUseageVarAc'] = $myrow['materialuseagevarac']; $_POST['WIPAct'] = $myrow['wipact']; } - echo '<input type=hidden name="SelectedCategory" value="' . $SelectedCategory . '" />'; - echo '<input type=hidden name="CategoryID" value="' . $_POST['CategoryID'] . '" />'; + echo '<input type="hidden" name="SelectedCategory" value="' . $SelectedCategory . '" />'; + echo '<input type="hidden" name="CategoryID" value="' . $_POST['CategoryID'] . '" />'; echo '<table class="selection"> <tr> <td>' . _('Category Code') . ':</td> @@ -380,7 +380,7 @@ echo '</select></td> </tr>'; - echo '<input type="submit" name="UpdateTypes" style="visibility:hidden;width:1px" value="Not Seen">'; + echo '<input type="submit" name="UpdateTypes" style="visibility:hidden;width:1px" value="Not Seen" />'; if (isset($_POST['StockType']) and $_POST['StockType']=='L') { $Result = $PnLAccountsResult; echo '<tr><td>' . _('Recovery GL Code'); @@ -484,7 +484,9 @@ label, controltype, defaultvalue, - reqatsalesorder + reqatsalesorder, + minimumvalue, + maximumvalue FROM stockcatproperties WHERE categoryid='" . $SelectedCategory . "' ORDER BY stkcatpropid"; @@ -515,8 +517,9 @@ $HeadingCounter++; } echo '<input type="hidden" name="PropID' . $PropertyCounter .'" value="' . $myrow['stkcatpropid'] . '" />'; - echo '<tr><td><input type="textbox" name="PropLabel' . $PropertyCounter . '" size="50" maxlength="100" value="' . $myrow['label'] . '" /></td> - <td><select name="PropControlType' . $PropertyCounter . '">'; + echo '<tr> + <td><input type="text" name="PropLabel' . $PropertyCounter . '" size="50" maxlength="100" value="' . $myrow['label'] . '" /></td> + <td><select name="PropControlType' . $PropertyCounter . '">'; if ($myrow['controltype']==0){ echo '<option selected value="0">' . _('Text Box') . '</option>'; } else { @@ -540,8 +543,8 @@ echo 'checked'; } echo '"></td> - <td><input type="textbox" "name="PropMinimum' . $PropertyCounter . '" value="' . $myrow['minimumvalue'] . '"></td> - <td><input type="textbox" name="PropMaximum' . $PropertyCounter . '" value="' . $myrow['maximumvalue'] . '"></td>'; + <td><input type="textbox" class="number" name="PropMinimum' . $PropertyCounter . '" value="' . locale_number_format($myrow['minimumvalue'],'Variable') . '" /></td> + <td><input type="textbox" class="number" name="PropMaximum' . $PropertyCounter . '" value="' . locale_number_format($myrow['maximumvalue'],'Variable') . '" /></td>'; echo '<td align="center"><input type="checkbox" name="PropReqSO' . $PropertyCounter .'"'; if ($myrow['reqatsalesorder']==1){ @@ -550,7 +553,7 @@ echo ''; } - echo '></td> + echo ' /></td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF']) . '?DeleteProperty=' . $myrow['stkcatpropid'] .'&SelectedCategory=' . $SelectedCategory . '" onclick=\'return confirm("' . _('Are you sure you wish to delete this property? All properties of this type set up for stock items will also be deleted.') . '");\'>' . _('Delete') . '</td> </tr>'; @@ -560,14 +563,14 @@ echo '<tr> <td><input type="textbox" name="PropLabel' . $PropertyCounter . '" size="50" maxlength="100" /></td> <td><select name="PropControlType' . $PropertyCounter . '"> - <option selected value=0>' . _('Text Box') . '</option> - <option value=1>' . _('Select Box') . '</option> - <option value=2>' . _('Check Box') . '</option> + <option selected value="0">' . _('Text Box') . '</option> + <option value="1">' . _('Select Box') . '</option> + <option value="2">' . _('Check Box') . '</option> </select></td> <td><input type="textbox" name="PropDefault' . $PropertyCounter . '" /></td> <td><input type="checkbox" name="PropNumeric' . $PropertyCounter . '" /></td> - <td><input type="textbox" "name="PropMinimum' . $PropertyCounter . '" /></td> - <td><input type="textbox" name="PropMaximum' . $PropertyCounter . '" /></td> + <td><input type="textbox" class="number" "name="PropMinimum' . $PropertyCounter . '" /></td> + <td><input type="textbox" class="number" name="PropMaximum' . $PropertyCounter . '" /></td> <td align="center"><input type="checkbox" name="PropReqSO' . $PropertyCounter .'" /></td> </tr>'; echo '</table>'; @@ -578,7 +581,7 @@ echo '<br /> <div class="centre"> - <input type="submit" name="submit" value="' . _('Enter Information') . '"> + <input type="submit" name="submit" value="' . _('Enter Information') . '" /> </div> </form>'; Modified: trunk/StockSerialItems.php =================================================================== --- trunk/StockSerialItems.php 2011-11-21 09:25:54 UTC (rev 4750) +++ trunk/StockSerialItems.php 2011-11-23 09:22:39 UTC (rev 4751) @@ -150,7 +150,7 @@ echo '<th></th>'; } else if ($Serialised == 1 and $Perishable==1) { echo '<td>'.$myrow['serialno'].'</td> - echo '<td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; + <td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; } else if ($Serialised == 0 and $Perishable==0) { echo '<td>'.$myrow['serialno'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces).'</td>'; @@ -158,8 +158,8 @@ } else if ($Serialised == 0 and $Perishable==1){ echo '<td>'.$myrow['serialno'].'</td> <td class="number">'.locale_number_format($myrow['quantity'],$DecimalPlaces). '</td> - <td>' . ConvertSQLDate($myrow['expirationdate']). '</td>'; - echo '<th></th>'; + <td>' . ConvertSQLDate($myrow['expirationdate']). '</td> + <th></th>'; } $j++; If ($j == 36){ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-21 09:25:54 UTC (rev 4750) +++ trunk/doc/Change.log 2011-11-23 09:22:39 UTC (rev 4751) @@ -1,6 +1,7 @@ webERP Change Log - +23/11/11 Phil: StockCategories number_formatting of minumum and maximum values of stock category properties +23/11/11 Felix Lim: StockSerialItems.php closing quote typo. 21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids 21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > 20/11/11 Phil: Shipments.php now only allows purchase order items to be added to a shipment where the shipment is authorised. Completed, rejected, cancelled orders no longer show. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-24 09:10:28
|
Revision: 4752 http://web-erp.svn.sourceforge.net/web-erp/?rev=4752&view=rev Author: daintree Date: 2011-11-24 09:10:21 +0000 (Thu, 24 Nov 2011) Log Message: ----------- only check password if it is !=\"\" Modified Paths: -------------- trunk/UserSettings.php trunk/doc/Change.log Modified: trunk/UserSettings.php =================================================================== --- trunk/UserSettings.php 2011-11-23 09:22:39 UTC (rev 4751) +++ trunk/UserSettings.php 2011-11-24 09:10:21 UTC (rev 4752) @@ -35,15 +35,15 @@ } */ $UpdatePassword = 'N'; - if ($_POST['Password'] != ''){ - if ($_POST['Password'] != $_POST['PasswordCheck']){ + + if ($_POST['PasswordCheck'] != ''){ + if (mb_strlen($_POST['Password'])<5){ $InputError = 1; - prnMsg(_('The password and password confirmation fields entered do not match'),'error'); - }else{ - $UpdatePassword = 'Y'; + prnMsg(_('The password entered must be at least 5 characters long'),'error'); + } elseif (mb_strstr($_POST['Password'],$_SESSION['UserID'])!= False){ + $InputError = 1; + prnMsg(_('The password cannot contain the user id'),'error'); } - } - if ($_POST['PasswordCheck'] != ''){ if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); @@ -51,13 +51,7 @@ $UpdatePassword = 'Y'; } } - if (mb_strlen($_POST['Password'])<5){ - $InputError = 1; - prnMsg(_('The password entered must be at least 5 characters long'),'error'); - } elseif (mb_strstr($_POST['Password'],$_SESSION['UserID'])!= False){ - $InputError = 1; - prnMsg(_('The password cannot contain the user id'),'error'); - } + if ($InputError != 1) { // no errors Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-23 09:22:39 UTC (rev 4751) +++ trunk/doc/Change.log 2011-11-24 09:10:21 UTC (rev 4752) @@ -1,7 +1,8 @@ webERP Change Log -23/11/11 Phil: StockCategories number_formatting of minumum and maximum values of stock category properties -23/11/11 Felix Lim: StockSerialItems.php closing quote typo. +23/11/11 Phil: UserSettings.php - now only checks password if != '' +22/11/11 Phil: StockCategories number_formatting of minumum and maximum values of stock category properties +22/11/11 Felix Lim: StockSerialItems.php closing quote typo. 21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids 21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > 20/11/11 Phil: Shipments.php now only allows purchase order items to be added to a shipment where the shipment is authorised. Completed, rejected, cancelled orders no longer show. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-24 09:10:32
|
Revision: 4752 http://web-erp.svn.sourceforge.net/web-erp/?rev=4752&view=rev Author: daintree Date: 2011-11-24 09:10:21 +0000 (Thu, 24 Nov 2011) Log Message: ----------- only check password if it is !=\"\" Modified Paths: -------------- trunk/UserSettings.php trunk/doc/Change.log Modified: trunk/UserSettings.php =================================================================== --- trunk/UserSettings.php 2011-11-23 09:22:39 UTC (rev 4751) +++ trunk/UserSettings.php 2011-11-24 09:10:21 UTC (rev 4752) @@ -35,15 +35,15 @@ } */ $UpdatePassword = 'N'; - if ($_POST['Password'] != ''){ - if ($_POST['Password'] != $_POST['PasswordCheck']){ + + if ($_POST['PasswordCheck'] != ''){ + if (mb_strlen($_POST['Password'])<5){ $InputError = 1; - prnMsg(_('The password and password confirmation fields entered do not match'),'error'); - }else{ - $UpdatePassword = 'Y'; + prnMsg(_('The password entered must be at least 5 characters long'),'error'); + } elseif (mb_strstr($_POST['Password'],$_SESSION['UserID'])!= False){ + $InputError = 1; + prnMsg(_('The password cannot contain the user id'),'error'); } - } - if ($_POST['PasswordCheck'] != ''){ if ($_POST['Password'] != $_POST['PasswordCheck']){ $InputError = 1; prnMsg(_('The password and password confirmation fields entered do not match'),'error'); @@ -51,13 +51,7 @@ $UpdatePassword = 'Y'; } } - if (mb_strlen($_POST['Password'])<5){ - $InputError = 1; - prnMsg(_('The password entered must be at least 5 characters long'),'error'); - } elseif (mb_strstr($_POST['Password'],$_SESSION['UserID'])!= False){ - $InputError = 1; - prnMsg(_('The password cannot contain the user id'),'error'); - } + if ($InputError != 1) { // no errors Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-23 09:22:39 UTC (rev 4751) +++ trunk/doc/Change.log 2011-11-24 09:10:21 UTC (rev 4752) @@ -1,7 +1,8 @@ webERP Change Log -23/11/11 Phil: StockCategories number_formatting of minumum and maximum values of stock category properties -23/11/11 Felix Lim: StockSerialItems.php closing quote typo. +23/11/11 Phil: UserSettings.php - now only checks password if != '' +22/11/11 Phil: StockCategories number_formatting of minumum and maximum values of stock category properties +22/11/11 Felix Lim: StockSerialItems.php closing quote typo. 21/11/11 Phil: UserSettings.php now checks for at least 5 character passwords WWW_Users.php CustLoginSetup.php and SupplierLoginSetup.php now also check for 4 character userids 21/11/11 Felix Lim: WWW_users.php malfomed <input type="hidden" - with no closing > 20/11/11 Phil: Shipments.php now only allows purchase order items to be added to a shipment where the shipment is authorised. Completed, rejected, cancelled orders no longer show. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-26 07:58:29
|
Revision: 4753 http://web-erp.svn.sourceforge.net/web-erp/?rev=4753&view=rev Author: daintree Date: 2011-11-26 07:58:19 +0000 (Sat, 26 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PcAssignCashToTab.php trunk/SelectCompletedOrder.php trunk/StockCostUpdate.php trunk/SuppInvGRNs.php trunk/SupplierInvoice.php trunk/doc/README.txt trunk/includes/ConnectDB_mysqli.inc trunk/includes/SQL_CommonFunctions.inc trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/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/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Added Paths: ----------- trunk/css/aguapop/images/allocation.gif trunk/css/aguapop/images/bank.gif trunk/css/aguapop/images/credit.gif trunk/css/aguapop/images/email.gif trunk/css/aguapop/images/folders.gif trunk/css/aguapop/images/inventory.gif trunk/css/aguapop/images/maintenance.gif trunk/css/aguapop/images/preview.gif trunk/css/aguapop/images/reports.gif trunk/css/aguapop/images/transactions.gif Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/ConfirmDispatchControlled_Invoice.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -33,7 +33,7 @@ exit; } -if (!isset($_SESSION['Items']) OR !isset($_SESSION['ProcessingOrder'])) { +if (!isset($_SESSION['Items'.$identifier]) OR !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with a sales order number to invoice */ echo '<div class="centre"> <a href="' . $rootpath . '/SelectSalesOrder.php">'. _('Select a sales order to invoice') . '</a> @@ -46,7 +46,7 @@ /*Save some typing by referring to the line item class object in short form */ -$LineItem = &$_SESSION['Items']->LineItems[$LineNo]; +$LineItem = &$_SESSION['Items'.$identifier]->LineItems[$LineNo]; //Make sure this item is really controlled @@ -63,15 +63,15 @@ ********************************************/ echo '<div class="centre">'; -echo '<br /><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a>'; +echo '<br /><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php?identifier=' . $identifier . '">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a>'; -echo '<br /><font size=2><b>'. _('Dispatch of up to').' '. locale_number_format($LineItem->Quantity-$LineItem->QtyInv, $LineItem->DecimalPlaces). ' '. _('Controlled items').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('on order').' ' . $_SESSION['Items']->OrderNo . ' '. _('to'). ' ' . $_SESSION['Items']->CustomerName . '</b></font></div>'; +echo '<br /><b>'. _('Dispatch of up to').' '. locale_number_format($LineItem->Quantity-$LineItem->QtyInv, $LineItem->DecimalPlaces). ' '. _('Controlled items').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('on order').' ' . $_SESSION['Items'.$identifier]->OrderNo . ' '. _('to'). ' ' . $_SESSION['Items'.$identifier]->CustomerName . '</b></div>'; /** vars needed by InputSerialItem : **/ $StockID = $LineItem->StockID; $RecvQty = $LineItem->Quantity-$LineItem->QtyInv; $ItemMustExist = true; /*Can only invoice valid batches/serial numbered items that exist */ -$LocationOut = $_SESSION['Items']->Location; +$LocationOut = $_SESSION['Items'.$identifier]->Location; $InOutModifier=1; $ShowExisting=false; @@ -79,7 +79,7 @@ /*TotalQuantity set inside this include file from the sum of the bundles of the item selected for dispatch */ -$_SESSION['Items']->LineItems[$LineNo]->QtyDispatched = $TotalQuantity; +$_SESSION['Items'.$identifier]->LineItems[$LineNo]->QtyDispatched = $TotalQuantity; include('includes/footer.inc'); exit; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -232,8 +232,12 @@ foreach ($Itm->SerialItems as $SerialItem) { //calculate QtyDispatched from bundle quantities $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } - } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); + } else if (isset($_POST[$Itm->LineNumber . '_QtyDispatched' ])){ + if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) + AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv)){ + + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); + } } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ @@ -449,7 +453,7 @@ } } -if (isset($_POST['ChargeFreightCost']) and !is_numeric(filter_number_format($_POST['ChargeFreightCost']))){ +if (isset($_POST['ChargeFreightCost']) AND !is_numeric(filter_number_format($_POST['ChargeFreightCost']))){ $_POST['ChargeFreightCost'] = 0; } @@ -467,7 +471,10 @@ if (!isset($_POST['ChargeFreightCost'])) { $_POST['ChargeFreightCost']=0; } -if ($_SESSION['Items'.$identifier]->Any_Already_Delivered()==1 and (!isset($_SESSION['Items'.$identifier]->FreightCost) or $_POST['ChargeFreightCost']==0)) { +if ($_SESSION['Items'.$identifier]->Any_Already_Delivered()==1 + AND (!isset($_SESSION['Items'.$identifier]->FreightCost) + OR $_POST['ChargeFreightCost']==0)) { + echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td> <td><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0"></td>'; $_SESSION['Items'.$identifier]->FreightCost=0; @@ -478,7 +485,7 @@ } else { echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; } - $_POST['ChargeFreightCost'] = $_SESSION['Items'.$identifier]->FreightCost; + $_POST['ChargeFreightCost'] = locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); } $FreightTaxTotal =0; //initialise tax total Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/PO_PDFPurchOrder.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -305,7 +305,7 @@ $Success = 1; //assume the best and email goes - has to be set to 1 to allow update status if ($MakePDFThenDisplayIt){ $pdf->OutputD($_SESSION['DatabaseName'] . '_PurchaseOrder_' . $OrderNo . '_' . date('Y-m-d') . '.pdf'); - $pdf->__destruct(); //UldisN + $pdf->__destruct(); } else { /* must be MakingPDF to email it */ $PdfFileName = $_SESSION['DatabaseName'] . '_PurchaseOrder_' . $OrderNo . '_' .date('Y-m-d') . '.pdf'; Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/PO_SelectOSPurchOrder.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -131,7 +131,11 @@ */ if (!isset($OrderNumber) or $OrderNumber=='' ){ - echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; + if (isset($SelectedSupplier)){ + echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes&SupplierID=' . $SelectedSupplier . '">' . _('Add Purchase Order') . '</a>'; + } else { + echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; + } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'</p>'; echo '<table class=selection> <tr> Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/PcAssignCashToTab.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -82,8 +82,8 @@ SET date = '".FormatDateForSQL($_POST['Date'])."', amount = '" . filter_number_format($_POST['Amount']) . "', authorized = '0000-00-00', - notes = '" . DB_escape_string($_POST['Notes']) . "', - receipt = '" . DB_escape_string($_POST['Receipt']) . "' + notes = '" . $_POST['Notes'] . "', + receipt = '" . $_POST['Receipt'] . "' WHERE counterindex = '" . $SelectedIndex . "'"; $msg = _('Assignment of cash to PC Tab ') . ' ' . $SelectedTabs . ' ' . _('has been updated'); @@ -106,8 +106,8 @@ '" . filter_number_format($_POST['Amount']) . "', authorized = '0000-00-00', '0', - '" . DB_escape_string($_POST['Notes']) . "', - '" . DB_escape_string($_POST['Receipt']) . "' + '" . $_POST['Notes'] . "', + '" . $_POST['Receipt'] . "' )"; $msg = _('Assignment of cash to PC Tab ') . ' ' . $_POST['SelectedTabs'] . ' ' . _('has been created'); } @@ -173,8 +173,8 @@ echo '</td></tr></table>'; // close main table echo '<p> <div class="centre"> - <input type=submit name="process" value="' . _('Accept') . '" /> - <input type=submit name="Cancel" value="' . _('Cancel') . '" /> + <input type="submit" name="process" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> </div>'; echo '</form>'; } @@ -321,10 +321,10 @@ $_POST['Notes'] = $myrow['notes']; $_POST['Receipt'] = $myrow['receipt']; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '">'; - echo '<input type=hidden name="SelectedIndex" value="' . $SelectedIndex. '">'; - echo '<input type=hidden name="CurrentAmount" value="' . $Amount[0]. '">'; - echo '<input type=hidden name="Days" value="' . $Days . '">'; + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type=hidden name="SelectedIndex" value="' . $SelectedIndex. '" />'; + echo '<input type=hidden name="CurrentAmount" value="' . $Amount[0]. '" />'; + echo '<input type=hidden name="Days" value="' . $Days . '" />'; } /* Ricard: needs revision of this date initialization */ Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/SelectCompletedOrder.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -235,68 +235,35 @@ //figure out the SQL required from the inputs available if (isset($OrderNumber)) { - if (isset($SelectedCustomer)) { - $SQL = "SELECT salesorders.orderno, - debtorsmaster.name, - custbranch.brname, - salesorders.customerref, - salesorders.orddate, - salesorders.deliverydate, - salesorders.deliverto, - currencies.decimalplaces AS currdecimalplaces, SUM(salesorderdetails.unitprice*salesorderdetails.quantity*(1-salesorderdetails.discountpercent)) AS ordervalue - FROM salesorders INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN debtorsmaster - ON salesorders.debtorno = debtorsmaster.debtorno - INNER JOIN custbranch - ON salesorders.branchcode = custbranch.branchcode - AND salesorders.debtorno = custbranch.debtorno - INNER JOIN currencies - ON debtorsmaster.currcode = currencies.currabrev - WHERE salesorders.debtorno='" . $SelectedCustomer ."' - AND salesorders.orderno='". $OrderNumber ."' - AND salesorders.quotation=0 - AND salesorderdetails.completed".$Completed." - GROUP BY salesorders.orderno, - debtorsmaster.name, - custbranch.brname, - salesorders.customerref, - salesorders.orddate, - salesorders.deliverydate, - currencies.decimalplaces, - salesorders.deliverto - ORDER BY salesorders.orderno"; - } else { //Set order number and SelectedCustomer not set - $SQL = "SELECT salesorders.orderno, - debtorsmaster.name, - custbranch.brname, - salesorders.customerref, - salesorders.orddate, - salesorders.deliverydate, - salesorders.deliverto, - currencies.decimalplaces AS currdecimalplaces, SUM(salesorderdetails.unitprice*salesorderdetails.quantity*(1-salesorderdetails.discountpercent)) AS ordervalue - FROM salesorders INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN debtorsmaster - ON salesorders.debtorno = debtorsmaster.debtorno - INNER JOIN custbranch - ON salesorders.branchcode = custbranch.branchcode - AND salesorders.debtorno = custbranch.debtorno - INNER JOIN currencies - ON debtorsmaster.currcode = currencies.currabrev - WHERE salesorders.orderno='". $OrderNumber ."' - AND salesorders.quotation=0 - AND salesorderdetails.completed " . $Completed ." - GROUP BY salesorders.orderno, - debtorsmaster.name, - currencies.decimalplaces, - custbranch.brname, - salesorders.customerref, - salesorders.orddate, - salesorders.deliverydate, - salesorders.deliverto - ORDER BY salesorders.orderno"; - } + $SQL = "SELECT salesorders.orderno, + debtorsmaster.name, + custbranch.brname, + salesorders.customerref, + salesorders.orddate, + salesorders.deliverydate, + salesorders.deliverto, + currencies.decimalplaces AS currdecimalplaces, SUM(salesorderdetails.unitprice*salesorderdetails.quantity*(1-salesorderdetails.discountpercent)) AS ordervalue + FROM salesorders INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN custbranch + ON salesorders.branchcode = custbranch.branchcode + AND salesorders.debtorno = custbranch.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + WHERE salesorders.orderno='". $OrderNumber ."' + AND salesorders.quotation=0 + AND salesorderdetails.completed " . $Completed ." + GROUP BY salesorders.orderno, + debtorsmaster.name, + currencies.decimalplaces, + custbranch.brname, + salesorders.customerref, + salesorders.orddate, + salesorders.deliverydate, + salesorders.deliverto + ORDER BY salesorders.orderno"; } elseif (isset($CustomerRef)) { if (isset($SelectedCustomer)) { $SQL = "SELECT salesorders.orderno, Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/StockCostUpdate.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -186,7 +186,7 @@ <br />'; } if ($myrow['mbflag']!='D'){ - echo '<div class="centre"><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '>' . _('Show Stock Status') . '</a>'; + echo '<div class="centre"><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a>'; echo '<br /><a href="' . $rootpath . '/StockUsage.php?StockID=' . $StockID . '">' . _('Show Stock Usage') .'</a>'; echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>'; Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/SuppInvGRNs.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -62,6 +62,9 @@ } else { $Complete = False; } + + /* It is not logical to allow being charged for more than was received - and doing so would leave the goods received suspense account out of balance */ + /* if ($_SESSION['Check_Qty_Charged_vs_Del_Qty']==True) { if ((filter_number_format($_POST['This_QuantityInv'])+ $_POST['Prev_QuantityInv'])/($_POST['QtyRecd'] ) > (1+ ($_SESSION['OverChargeProportion'] / 100))){ prnMsg(_('The quantity being invoiced is more than the outstanding quantity by more than') . ' ' . $_SESSION['OverChargeProportion'] . ' ' . @@ -69,6 +72,11 @@ $Hold = True; } } + */ + if (filter_number_format($_POST['This_QuantityInv'])+$_POST['Prev_QuantityInv']-$_POST['QtyRecd'] > 0){ + prnMsg(_('The quantity being invoiced is more than the outstanding quantity that was delivered. It is not possible to enter an invoice for a quantity more than was received into stock'),'warn'); + $InputError = True; + } if (!is_numeric(filter_number_format($_POST['ChgPrice'])) AND filter_number_format($_POST['ChgPrice'])<0){ $InputError = True; prnMsg(_('The price charged in the suppliers currency is either not numeric or negative') . '. ' . _('The goods received cannot be invoiced at this price'),'error'); Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/SupplierInvoice.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -16,8 +16,6 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -//this is available from the menu on this page already -//echo "<a href='" . $rootpath . '/SelectSupplier.php?' . SID . "'>" . _('Back to Suppliers') . '</a><br />'; if (!isset($_SESSION['SuppTrans']->SupplierName)) { $sql="SELECT suppname FROM suppliers WHERE supplierid='" . $_GET['SupplierID'] . "'"; @@ -723,7 +721,7 @@ '" . $SQLInvoiceDate . "', '" . $PeriodNo . "', '" . $EnteredGLCode->GLCode . "', - '" . DB_escape_string($_SESSION['SuppTrans']->SupplierID . ' ' . $EnteredGLCode->Narrative) . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' ' . $EnteredGLCode->Narrative . "', '" . $EnteredGLCode->Amount/ $_SESSION['SuppTrans']->ExRate ."')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added because'); @@ -751,7 +749,7 @@ '" . $SQLInvoiceDate . "', '" . $PeriodNo . "', '" . $_SESSION['SuppTrans']->GRNAct . "', - '" . DB_escape_string($_SESSION['SuppTrans']->SupplierID . ' ' . _('Shipment charge against') . ' ' . $ShiptChg->ShiptRef) . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Shipment charge against') . ' ' . $ShiptChg->ShiptRef . "', '" . $ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the shipment') . @@ -779,7 +777,7 @@ '" . $SQLInvoiceDate . "', '" . $PeriodNo . "', '". $AssetAddition->CostAct . "', - '" . DB_escape_string($_SESSION['SuppTrans']->SupplierID . ' ' . _('Asset Addition') . ' ' . $AssetAddition->AssetID . ': ' . $AssetAddition->Description) . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Asset Addition') . ' ' . $AssetAddition->AssetID . ': ' . $AssetAddition->Description . "', '" . ($AssetAddition->Amount/ $_SESSION['SuppTrans']->ExRate) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the asset addition could not be added because'); $DbgMsg = _('The following SQL to insert the GL transaction was used'); @@ -842,8 +840,8 @@ '" . $SQLInvoiceDate . "', '" . $PeriodNo . "', '" . $_SESSION['SuppTrans']->GRNAct . "', - '" . DB_escape_string($_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv . ' @ ' . - _('std cost of') . ' ' . $EnteredGRN->StdCostUnit) . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv . ' @ ' . + _('std cost of') . ' ' . $EnteredGRN->StdCostUnit . "', '" . ($EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added because'); @@ -892,10 +890,11 @@ if ($EnteredGRN->This_QuantityInv > $TotalQuantityOnHand){ /*So we need to write off some of the variance to variances and only the balance of the quantity in stock to go to stock value */ - - $WriteOffToVariances = ($EnteredGRN->This_QuantityInv - $TotalQuantityOnHand) - * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); - + + /*if the TotalQuantityOnHand is negative then this variance to write off is inflated by the negative quantity - which makes sense */ + + $WriteOffToVariances = ($EnteredGRN->This_QuantityInv - $TotalQuantityOnHand) * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); + $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -916,7 +915,63 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); - } + + /* The variance to the extent of the quantity invoiced should also be written off against the sales analysis cost - as sales analysis would have been created using the cost at the time the sale was made... this was incorrect as hind-sight has shown here. However, how to determine when these were last sold? To update the sales analysis cost. Work through the last 6 months sales analysis from the latest period in which this invoice is being posted and prior. + + The assumption here is that the goods have been sold prior to the purchase invocie being entered so it is necessary to back track on the sales analysis cost. + * + Note that this will mean that posting to GL COGS will not agree to the cost of sales from the sales analysis*/ + + $QuantityVarianceAllocated = $EnteredGRN->This_QuantityInv; + $CostVarPerUnit = (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); + $PeriodAllocated = $PeriodNo; + + while ($QuantityVarianceAllocated >0) { + $SalesAnalResult=DB_query("SELECT cust, + custbranch, + typeabbrev, + periodno, + stkcategory, + area, + salesperson, + cost, + qty + FROM salesanalysis + WHERE salesanalysis.stockid = '" . $EnteredGRN->ItemCode . "' + AND salesanalysis.budgetoractual=1 + AND periodno='" . $PeriodAllocated . "'", + $db); + if (DB_num_rows($SalesAnalResult)>0){ + while ($SalesAnalRow = DB_fetch_array($SalesAnalResult) AND $QuantityVarianceAllocated >0){ + if ($SalesAnalRow['qty']<=$QuantityVarianceAllocated){ + $QuantityVarianceAllocated -= $SalesAnalRow['qty']; + $QuantityAllocated = $SalesAnalRow['qty']; + } else { + $QuantityAllocated = $QuantityVarianceAllocated; + $QuantityVarianceAllocated=0; + } + $UpdSalAnalResult = DB_query("UPDATE salesanalysis + SET cost = cost + " . ($CostVarPerUnit * $QuantityAllocated) . " + WHERE cust ='" . $SalesAnalRow['cust'] . "' + AND stockid='" . $EnteredGRN->ItemCode . "' + AND custbranch='" . $SalesAnalRow['custbranch'] . "' + AND typeabbrev='" . $SalesAnalRow['typeabbrev'] . "' + AND periodno='" . $PeriodAllocated . "' + AND area='" . $SalesAnalRow['area'] . "' + AND salesperson='" . $SalesAnalRow['salesperson'] . "' + AND stkcategory='" . $SalesAnalRow['stkcategory'] . "' + AND budgetoractual=1", + $db); + } + } //end if there were sales in that period + $PeriodAllocated--; //decrement the period + if ($PeriodNo - $PeriodAllocated >6) { + /*if more than 6 months ago when sales were made then forget it */ + break; + } + } //end loop around different periods to see which sales analysis records to update + } // end if the quantity being invoiced here is greater than the current stock on hand + /*Now post any remaining price variance to stock rather than price variances */ $SQL = "INSERT INTO gltrans (type, @@ -933,7 +988,7 @@ '" . $StockGLCode['stockact'] . "', '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Average Cost Adj') . ' - ' . $EnteredGRN->ItemCode . ' x ' . $TotalQuantityOnHand . ' x ' . - round(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', + round(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . ($PurchPriceVar - $WriteOffToVariances) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -959,7 +1014,8 @@ materialcost=materialcost+" . $CostIncrement . " WHERE stockid='" . $EnteredGRN->ItemCode . "'"; $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg, True); - } else { + } else { + /* if stock is negative then update the cost to this cost */ $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, materialcost='" . ($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) . "' WHERE stockid='" . $EnteredGRN->ItemCode . "'"; @@ -1109,6 +1165,8 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the control total could not be added because'); $DbgMsg = _('The following SQL to insert the GL transaction was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); + + EnsureGLEntriesBalance(20, $InvoiceNo, $db); } /*Thats the end of the GL postings */ /*Now insert the invoice into the SuppTrans table*/ @@ -1276,7 +1334,7 @@ '20', '" . $InvoiceNo . "', '" . $Contract->Amount/ $_SESSION['SuppTrans']->ExRate . "', - '" . DB_escape_string($Contract->Narrative) . "', + '" . $Contract->Narrative . "', '" . $Anticipated . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The contract charge record for contract') . ' ' . $Contract->ContractRef . ' ' . _('could not be added because'); Added: trunk/css/aguapop/images/allocation.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/allocation.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/bank.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/bank.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/credit.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/credit.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/email.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/email.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/folders.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/folders.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/inventory.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/inventory.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/maintenance.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/maintenance.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/preview.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/preview.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/reports.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/reports.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/transactions.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/transactions.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/doc/README.txt 2011-11-26 07:58:19 UTC (rev 4753) @@ -22,6 +22,8 @@ 6. A significant push has been made to try to reduce the number of bugs, with a great deal of testing from all quarters. +7. Numbers can now be entered in the language format the user has selected and all numbers now display in the users language format - as of version 4.06.1 + The change log shows descriptions and dates of all changes made. Installation instructions are in the file INSTALL.txt in the doc directory. It is important to read the INSTALL.txt file in its entirety before proceeding. A printout is recommended. Modified: trunk/includes/ConnectDB_mysqli.inc =================================================================== --- trunk/includes/ConnectDB_mysqli.inc 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/includes/ConnectDB_mysqli.inc 2011-11-26 07:58:19 UTC (rev 4753) @@ -69,11 +69,6 @@ global $debug; global $PathPrefix; -/* PeterMoulding.com -20071102 Change from mysql to mysqli; - $result=mysql_query($SQL,$Conn); -*/ - $result=mysqli_query($Conn, $SQL); $_SESSION['LastInsertId'] = mysqli_insert_id($Conn); Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-26 07:58:19 UTC (rev 4753) @@ -141,10 +141,9 @@ $sql = "SELECT SUM(salesorderdetails.unitprice * (salesorderdetails.quantity - salesorderdetails.qtyinvoiced) * (1 - salesorderdetails.discountpercent)) AS ordervalue - FROM salesorders, - salesorderdetails - WHERE salesorders.orderno = salesorderdetails.orderno - AND salesorders.debtorno = '" . $DebtorNo . "' + FROM salesorders INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorders.debtorno = '" . $DebtorNo . "' AND salesorderdetails.completed = 0 AND salesorders.quotation = 0"; @@ -154,7 +153,7 @@ $myrow = DB_fetch_array($GetOSOrdersResult); $CreditAvailable -= $myrow['ordervalue']; - Return $CreditAvailable; + return $CreditAvailable; } function ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $QOH) { Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-26 07:58:19 UTC (rev 4753) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-13 10:46+1300\n" +"POT-Creation-Date: 2011-11-19 17:05+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -202,12 +202,12 @@ #: AccountGroups.php:223 AccountSections.php:175 AddCustomerContacts.php:25 #: AddCustomerContacts.php:28 AddCustomerNotes.php:103 -#: AddCustomerTypeNotes.php:97 AgedDebtors.php:451 AgedSuppliers.php:278 +#: AddCustomerTypeNotes.php:97 AgedDebtors.php:450 AgedSuppliers.php:278 #: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 #: BOMExtendedQty.php:261 BOMIndented.php:246 BOMIndentedReverse.php:235 #: BOMInquiry.php:187 BOMListing.php:109 BOMs.php:213 BOMs.php:832 -#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2014 -#: CounterSales.php:2140 Credit_Invoice.php:255 CreditStatus.php:21 +#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2025 +#: CounterSales.php:2151 Credit_Invoice.php:255 CreditStatus.php:21 #: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:11 #: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 #: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 @@ -221,14 +221,14 @@ #: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 #: PO_AuthorisationLevels.php:10 POReport.php:60 POReport.php:64 #: POReport.php:68 PO_SelectOSPurchOrder.php:135 PricesBasedOnMarkUp.php:8 -#: Prices_Customer.php:34 Prices.php:30 PurchData.php:137 PurchData.php:258 +#: Prices_Customer.php:35 Prices.php:30 PurchData.php:137 PurchData.php:258 #: PurchData.php:282 RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 #: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:215 #: SelectCreditItems.php:286 SelectCustomer.php:260 SelectGLAccount.php:17 -#: SelectGLAccount.php:77 SelectOrderItems.php:575 SelectOrderItems.php:1468 -#: SelectOrderItems.php:1592 SelectProduct.php:496 SelectSalesOrder.php:533 +#: SelectGLAccount.php:77 SelectOrderItems.php:577 SelectOrderItems.php:1479 +#: SelectOrderItems.php:1603 SelectProduct.php:496 SelectSalesOrder.php:533 #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 #: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 @@ -269,8 +269,8 @@ #: CompanyPreferences.php:476 CompanyPreferences.php:478 #: CompanyPreferences.php:491 CompanyPreferences.php:493 #: CompanyPreferences.php:506 CompanyPreferences.php:508 -#: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:577 -#: Customers.php:925 Customers.php:934 Customers.php:937 +#: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:593 +#: Customers.php:941 Customers.php:950 Customers.php:953 #: DeliveryDetails.php:1079 DeliveryDetails.php:1118 DeliveryDetails.php:1121 #: GLTransInquiry.php:69 MRPCalendar.php:224 MRP.php:529 MRP.php:533 #: MRP.php:537 MRP.php:541 PaymentMethods.php:197 PaymentMethods.php:198 @@ -304,8 +304,8 @@ #: BOMs.php:749 CompanyPreferences.php:475 CompanyPreferences.php:479 #: CompanyPreferences.php:490 CompanyPreferences.php:494 #: CompanyPreferences.php:505 CompanyPreferences.php:509 -#: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:576 -#: Customers.php:920 Customers.php:933 Customers.php:936 +#: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:592 +#: Customers.php:936 Customers.php:949 Customers.php:952 #: DeliveryDetails.php:1080 DeliveryDetails.php:1119 DeliveryDetails.php:1122 #: GLTransInquiry.php:86 MRPCalendar.php:226 MRP.php:527 MRP.php:531 #: MRP.php:535 MRP.php:539 PaymentMethods.php:197 PaymentMethods.php:198 @@ -338,14 +338,14 @@ #: AddCustomerNotes.php:141 AddCustomerTypeNotes.php:128 Areas.php:164 #: BankAccounts.php:223 BOMs.php:149 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 -#: CustomerBranches.php:414 Customers.php:1011 Customers.php:1045 +#: CustomerBranches.php:414 Customers.php:1027 Customers.php:1061 #: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:329 #: FixedAssetCategories.php:186 FixedAssetLocations.php:107 #: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:91 #: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:120 #: PaymentMethods.php:200 PaymentTerms.php:205 PcAssignCashToTab.php:259 #: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:234 -#: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:277 +#: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:278 #: Prices.php:251 PurchData.php:204 SalesCategories.php:255 #: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232 #: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:612 @@ -369,8 +369,8 @@ #: AddCustomerNotes.php:142 AddCustomerTypeNotes.php:129 Areas.php:165 #: BankAccounts.php:224 BOMs.php:151 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 -#: CounterSales.php:813 Credit_Invoice.php:381 CreditStatus.php:175 -#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1046 +#: CounterSales.php:821 Credit_Invoice.php:381 CreditStatus.php:175 +#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1062 #: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:182 #: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 #: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 @@ -378,13 +378,13 @@ #: PaymentMethods.php:201 Payments.php:1069 PaymentTerms.php:206 #: PcAssignCashToTab.php:263 PcClaimExpensesFromTab.php:253 PcExpenses.php:224 #: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 -#: PO_AuthorisationLevels.php:153 PO_Items.php:711 Prices_Customer.php:278 +#: PO_AuthorisationLevels.php:153 PO_Items.php:711 Prices_Customer.php:279 #: Prices.php:252 PurchData.php:205 SalesAnalReptCols.php:299 #: SalesAnalRepts.php:303 SalesCategories.php:256 SalesGLPostings.php:133 #: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207 #: SecurityTokens.php:129 SelectCreditItems.php:764 SelectCustomer.php:613 #: SelectCustomer.php:631 SelectCustomer.php:655 SelectCustomer.php:672 -#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1387 +#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1398 #: Shipments.php:429 Shippers.php:145 SpecialOrder.php:655 #: StockCategories.php:243 StockCategories.php:554 SuppContractChgs.php:99 #: SuppCreditGRNs.php:102 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 @@ -444,7 +444,7 @@ #: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 #: Locations.php:597 MRPDemands.php:419 MRPDemandTypes.php:187 #: OffersReceived.php:56 OffersReceived.php:143 PaymentMethods.php:282 -#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:354 +#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:356 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 #: SalesPeople.php:368 Shippers.php:200 StockCategories.php:581 #: SupplierContacts.php:281 SuppLoginSetup.php:293 TaxAuthorities.php:327 @@ -575,7 +575,7 @@ msgstr "Kontakt záznam byl odstraněn" #: AddCustomerContacts.php:128 CompanyPreferences.php:223 -#: CustomerBranches.php:368 Customers.php:998 Customers.php:1006 +#: CustomerBranches.php:368 Customers.php:1014 Customers.php:1022 #: SalesPeople.php:200 SelectCustomer.php:607 StockDispatch.php:187 #: StockDispatch.php:199 SupplierContacts.php:150 SuppTransGLAnalysis.php:105 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 @@ -583,8 +583,8 @@ msgid "Name" msgstr "Název" -#: AddCustomerContacts.php:129 AddCustomerContacts.php:223 Customers.php:999 -#: Customers.php:1007 SelectCustomer.php:608 WWW_Access.php:107 +#: AddCustomerContacts.php:129 AddCustomerContacts.php:223 Customers.php:1015 +#: Customers.php:1023 SelectCustomer.php:608 WWW_Access.php:107 #: WWW_Access.php:169 msgid "Role" msgstr "Roli" @@ -595,7 +595,7 @@ #: AddCustomerContacts.php:131 AddCustomerContacts.php:240 #: CustomerBranches.php:374 CustomerBranches.php:774 CustomerInquiry.php:253 -#: Customers.php:1001 Customers.php:1009 EmailCustTrans.php:15 +#: Customers.php:1017 Customers.php:1025 EmailCustTrans.php:15 #: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:563 #: OrderDetails.php:109 PDFRemittanceAdvice.php:243 PO_PDFPurchOrder.php:369 #: PO_PDFPurchOrder.php:372 PrintCustTrans.php:714 PrintCustTrans.php:945 @@ -609,8 +609,8 @@ msgid "Email" msgstr "E-mail" -#: AddCustomerContacts.php:132 AddCustomerContacts.php:249 Customers.php:1002 -#: Customers.php:1010 PcAssignCashToTab.php:224 PcAssignCashToTab.php:353 +#: AddCustomerContacts.php:132 AddCustomerContacts.php:249 Customers.php:1018 +#: Customers.php:1026 PcAssignCashToTab.php:224 PcAssignCashToTab.php:353 #: PcAuthorizeExpenses.php:92 PcClaimExpensesFromTab.php:214 #: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:611 #: SystemParameters.php:328 WOSerialNos.php:290 WOSerialNos.php:296 @@ -636,7 +636,7 @@ #: AddCustomerContacts.php:231 Contracts.php:775 PDFRemittanceAdvice.php:239 #: PO_Header.php:986 PO_Header.php:1067 SelectCreditItems.php:241 -#: SelectCustomer.php:417 SelectOrderItems.php:604 +#: SelectCustomer.php:417 SelectOrderItems.php:606 #: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:81 #: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" @@ -699,14 +699,15 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1019 UpgradeDatabase.php:174 UpgradeDatabase.php:177 -#: UpgradeDatabase.php:180 UpgradeDatabase.php:183 UpgradeDatabase.php:186 -#: UpgradeDatabase.php:189 UpgradeDatabase.php:192 UpgradeDatabase.php:195 -#: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 -#: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 -#: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 -#: Z_Upgrade_3.11-4.00.php:66 Z_Upgrade_3.11-4.00.php:70 -#: Z_Upgrade_3.11-4.00.php:74 Z_Upgrade_3.11-4.00.php:78 +#: Stocks.php:1019 UpgradeDatabase.php:175 UpgradeDatabase.php:178 +#: UpgradeDatabase.php:181 UpgradeDatabase.php:184 UpgradeDatabase.php:187 +#: UpgradeDatabase.php:190 UpgradeDatabase.php:193 UpgradeDatabase.php:196 +#: UpgradeDatabase.php:199 Z_Upgrade_3.10-3.11.php:62 +#: Z_Upgrade_3.10-3.11.php:66 Z_Upgrade_3.10-3.11.php:70 +#: Z_Upgrade_3.10-3.11.php:74 Z_Upgrade_3.10-3.11.php:78 +#: Z_Upgrade_3.11-4.00.php:62 Z_Upgrade_3.11-4.00.php:66 +#: Z_Upgrade_3.11-4.00.php:70 Z_Upgrade_3.11-4.00.php:74 +#: Z_Upgrade_3.11-4.00.php:78 msgid "Note" msgstr "Poznámka:" @@ -789,11 +790,11 @@ msgid "Aged Customer Balances" msgstr "Zákazník ve věku Váhy" -#: AgedDebtors.php:270 AgedDebtors.php:369 AgedDebtors.php:434 +#: AgedDebtors.php:269 AgedDebtors.php:368 AgedDebtors.php:433 msgid "Aged Customer Account Analysis" msgstr "Ve věku od zákaznického účtu analýza" -#: AgedDebtors.php:270 AgedDebtors.php:369 AgedDebtors.php:434 +#: AgedDebtors.php:269 AgedDebtors.php:368 AgedDebtors.php:433 #: AgedSuppliers.php:111 BOMExtendedQty.php:149 BOMIndented.php:150 #: BOMIndentedReverse.php:140 BOMListing.php:41 BOMListing.php:52 #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:100 @@ -817,12 +818,12 @@ msgid "Problem Report" msgstr "Problém" -#: AgedDebtors.php:272 CustomerInquiry.php:85 CustomerInquiry.php:109 +#: AgedDebtors.php:271 CustomerInquiry.php:85 CustomerInquiry.php:109 #: DebtorsAtPeriodEnd.php:59 msgid "The customer details could not be retrieved by the SQL because" msgstr "Zákazník podrobnosti se nepodařilo získat do SQL, protože" -#: AgedDebtors.php:273 AgedDebtors.php:372 AgedDebtors.php:437 +#: AgedDebtors.php:272 AgedDebtors.php:371 AgedDebtors.php:436 #: AgedSuppliers.php:114 AgedSuppliers.php:199 BOMExtendedQty.php:152 #: BOMExtendedQty.php:248 BOMIndented.php:153 BOMIndented.php:234 #: BOMIndentedReverse.php:144 BOMIndentedReverse.php:221 BOMListing.php:44 @@ -873,11 +874,11 @@ msgid "Back to the menu" msgstr "Zpět do menu" -#: AgedDebtors.php:371 +#: AgedDebtors.php:370 msgid "The details of outstanding transactions for customer" msgstr "Podrobnosti o nesplacených transakcí pro zákazníka" -#: AgedDebtors.php:371 AgedSuppliers.php:198 GLAccountCSV.php:168 +#: AgedDebtors.php:370 AgedSuppliers.php:198 GLAccountCSV.php:168 #: GLAccountInquiry.php:143 GLAccountReport.php:94 PO_Items.php:435 #: PO_Items.php:559 PO_Items.php:584 SalesAnalReptCols.php:365 #: SpecialOrder.php:440 StockLocTransferReceive.php:370 @@ -885,10 +886,10 @@ msgid "could not be retrieved because" msgstr "se nepodařilo získat, protože" -#: AgedDebtors.php:374 AgedSuppliers.php:201 Areas.php:95 -#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:959 -#: ConfirmDispatch_Invoice.php:973 Contracts.php:580 CounterSales.php:1354 -#: CounterSales.php:1368 Credit_Invoice.php:697 Credit_Invoice.php:718 +#: AgedDebtors.php:373 AgedSuppliers.php:201 Areas.php:95 +#: ConfirmDispatch_Invoice.php:160 ConfirmDispatch_Invoice.php:967 +#: ConfirmDispatch_Invoice.php:981 Contracts.php:580 CounterSales.php:1365 +#: CounterSales.php:1379 Credit_Invoice.php:697 Credit_Invoice.php:718 #: CustomerReceipt.php:542 CustomerReceipt.php:681 CustomerReceipt.php:709 #: CustomerTransInquiry.php:91 DeliveryDetails.php:396 GLProfit_Loss.php:596 #: GLTagProfit_Loss.php:511 Payments.php:334 PDFRemittanceAdvice.php:85 @@ -913,66 +914,66 @@ msgid "The SQL that failed was" msgstr "SQL příkaz, který selhal, byl" -#: AgedDebtors.php:436 +#: AgedDebtors.php:435 #, fuzzy msgid "" "There are no customers meeting the criteria specified with balances to list" msgstr "Nejsou žádné zákazníky, splňující kritéria uvedená na seznamu" -#: AgedDebtors.php:447 +#: AgedDebtors.php:446 msgid "Aged Debtor Analysis" msgstr "Ve věku dlužníka analýza" -#: AgedDebtors.php:461 DebtorsAtPeriodEnd.php:137 +#: AgedDebtors.php:460 DebtorsAtPeriodEnd.php:137 msgid "From Customer Code" msgstr "Od kódu zákazníka" -#: AgedDebtors.php:465 DebtorsAtPeriodEnd.php:141 +#: AgedDebtors.php:464 DebtorsAtPeriodEnd.php:141 msgid "To Customer Code" msgstr "Do kódu zákazníka" -#: AgedDebtors.php:469 AgedSuppliers.php:296 +#: AgedDebtors.php:468 AgedSuppliers.php:296 msgid "All balances or overdues only" msgstr "Všechny zůstatky nebo overdues pouze" -#: AgedDebtors.php:471 +#: AgedDebtors.php:470 msgid "All customers with balances" msgstr "Všichni zákazníci s bilancí" -#: AgedDebtors.php:472 AgedSuppliers.php:299 +#: AgedDebtors.php:471 AgedSuppliers.php:299 msgid "Overdue accounts only" msgstr "Po lhůtě splatnosti účtů" -#: AgedDebtors.php:473 +#: AgedDebtors.php:472 msgid "Held accounts only" msgstr "Účtů, pouze" -#: AgedDebtors.php:478 +#: AgedDebtors.php:477 msgid "Only Show Customers Of" msgstr "Zobrazit jen zákazníky" -#: AgedDebtors.php:484 +#: AgedDebtors.php:483 #, fuzzy msgid "All Sales people" msgstr "Všechny Prodejci" -#: AgedDebtors.php:491 +#: AgedDebtors.php:490 msgid "Only show customers trading in" msgstr "Zobrazovat pouze zákazníkům obchodování" -#: AgedDebtors.php:507 +#: AgedDebtors.php:506 msgid "Summary or detailed report" msgstr "Souhrn nebo podrobné zprávy" -#: AgedDebtors.php:509 AgedSuppliers.php:321 InventoryValuation.php:261 +#: AgedDebtors.php:508 AgedSuppliers.php:321 InventoryValuation.php:261 msgid "Summary Report" msgstr "Souhrnná zpráva" -#: AgedDebtors.php:510 AgedSuppliers.php:322 InventoryValuation.php:262 +#: AgedDebtors.php:509 AgedSuppliers.php:322 InventoryValuation.php:262 msgid "Detailed Report" msgstr "Podrobná zpráva" -#: AgedDebtors.php:517 AgedSuppliers.php:328 BOMExtendedQty.php:295 +#: AgedDebtors.php:516 AgedSuppliers.php:328 BOMExtendedQty.php:295 #: BOMIndented.php:276 BOMIndentedReverse.php:255 BOMListing.php:129 #: DebtorsAtPeriodEnd.php:163 InventoryPlanning.php:445 #: InventoryPlanningPrefSupplier.php:516 InventoryQuantities.php:209 @@ -1156,7 +1157,7 @@ msgstr "ID uživatele" #: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 -#: CounterSales.php:2146 CounterSales.php:2149 CustomerTransInquiry.php:31 +#: CounterSales.php:2157 CounterSales.php:2160 CustomerTransInquiry.php:31 #: DailySalesInquiry.php:47 DailySalesInquiry.php:49 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 @@ -1167,7 +1168,7 @@ #: ReorderLevel.php:215 SalesGraph.php:97 SalesGraph.php:99 SalesGraph.php:119 #: SalesGraph.php:121 SalesGraph.php:143 SalesGraph.php:145 SalesGraph.php:179 #: SalesInquiry.php:1078 SalesInquiry.php:1141 SelectCreditItems.php:952 -#: SelectOrderItems.php:1598 SelectOrderItems.php:1601 SelectProduct.php:504 +#: SelectOrderItems.php:1609 SelectOrderItems.php:1612 SelectProduct.php:504 #: SelectProduct.php:506 StockDispatch.php:298 StockDispatch.php:300 #: StockLocStatus.php:69 StockLocStatus.php:71 StockLocStatus.php:89 #: StockLocStatus.php:93 StockLocStatus.php:97 StockQuantityByDate.php:24 @@ -1526,7 +1527,7 @@ msgid "from" msgstr "od" -#: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:60 +#: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:68 #: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 #: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:733 #: PcReportTab.php:102 PDFChequeListing.php:114 PDFChequeListing.php:124 @@ -1640,7 +1641,7 @@ msgid "Ref" msgstr "Ref" -#: BankMatching.php:264 ConfirmDispatch_Invoice.php:276 Credit_Invoice.php:279 +#: BankMatching.php:264 ConfirmDispatch_Invoice.php:284 Credit_Invoice.php:279 #: CustomerAllocations.php:364 CustomerReceipt.php:897 #: CustomerTransInquiry.php:107 CustWhereAlloc.php:109 #: PaymentAllocations.php:67 Payments.php:1026 Payments.php:1030 @@ -1848,8 +1849,8 @@ "zůstatek na účtu. Je důležité, že směnný kurz výše odráží současnou hodnotu " "měny bankovního účtu" -#: BankReconciliation.php:354 CounterSales.php:813 Customers.php:1075 -#: SelectOrderItems.php:1398 Stocks.php:1204 WorkOrderCosting.php:540 +#: BankReconciliation.php:354 CounterSales.php:821 Customers.php:1091 +#: SelectOrderItems.php:1409 Stocks.php:1204 WorkOrderCosting.php:540 #: WorkOrderEntry.php:569 msgid "Are You Sure?" msgstr "Opravdu provést?" @@ -1916,8 +1917,8 @@ #: BOMIndentedReverse.php:295 BOMInquiry.php:200 BOMs.php:532 BOMs.php:709 #: ContractBOM.php:237 ContractBOM.php:349 ContractCosting.php:81 #: ContractCosting.php:87 ContractCosting.php:152 ContractOtherReqts.php:94 -#: Contracts.php:961 Contracts.php:997 CounterSales.php:733 -#: CounterSales.php:2025 CounterSales.php:2210 CounterSales.php:2336 +#: Contracts.php:961 Contracts.php:997 CounterSales.php:741 +#: CounterSales.php:2036 CounterSales.php:2221 CounterSales.php:2347 #: Credit_Invoice.php:273 DeliveryDetails.php:825 DeliveryDetails.php:891 #: GoodsReceived.php:100 GoodsReceived.php:104 GoodsReceived.php:107 #: InventoryPlanningPrefSupplier.php:78 InventoryQuantities.php:246 @@ -1933,16 +1934,16 @@ #: SalesAnalReptCols.php:16 SalesAnalReptCols.php:18 SalesGraph.php:188 #: SalesGraph.php:269 SalesInquiry.php:980 SalesTopItemsInquiry.php:223 #: SelectCreditItems.php:673 SelectCreditItems.php:1034 -#: SelectOrderItems.php:1322 SelectOrderItems.php:1480 -#: SelectOrderItems.php:1664 SelectOrderItems.php:1791 ShipmentCosting.php:145 +#: SelectOrderItems.php:1333 SelectOrderItems.php:1491 +#: SelectOrderItems.php:1675 SelectOrderItems.php:1802 ShipmentCosting.php:145 #: ShipmentCosting.php:146 Shipments.php:391 Shipments.php:393 #: Shipments.php:394 Shipments.php:473 Shipments.php:475 SpecialOrder.php:616 #: StockCounts.php:98 StockLocMovements.php:92 StockLocTransfer.php:186 #: StockMovements.php:97 StockStatus.php:310 StockUsageGraph.php:12 #: SuppCreditGRNs.php:267 SuppCreditGRNs.php:268 SupplierCredit.php:317 #: SupplierTenders.php:265 SupplierTenders.php:493 WOSerialNos.php:255 -#: WOSerialNos.php:295 includes/InputSerialItems.php:104 -#: includes/InputSerialItems.php:110 includes/OutputSerialItems.php:38 +#: WOSerialNos.php:295 includes/InputSerialItems.php:111 +#: includes/InputSerialItems.php:117 includes/OutputSerialItems.php:38 #: includes/OutputSerialItems.php:43 includes/OutputSerialItems.php:49 #: includes/PDFBOMListingPageHeader.inc:44 #: includes/PDFDeliveryDifferencesPageHeader.inc:43 @@ -2096,10 +2097,10 @@ msgstr "Stavět" #: BOMExtendedQty.php:331 BOMInquiry.php:114 BOMs.php:856 -#: CounterSales.php:2021 CounterSales.php:2206 PO_SelectOSPurchOrder.php:232 +#: CounterSales.php:2032 CounterSales.php:2217 PO_SelectOSPurchOrder.php:232 #: PO_SelectPurchOrder.php:213 ReorderLevelLocation.php:70 #: ReorderLevelLocation.php:71 SelectCompletedOrder.php:584 -#: SelectOrderItems.php:1476 SelectOrderItems.php:1660 +#: SelectOrderItems.php:1487 SelectOrderItems.php:1671 #: SelectSalesOrder.php:582 SelectWorkOrder.php:193 Shipt_Select.php:191 #: TopItems.php:182 includes/PDFTopItemsHeader.inc:54 msgid "On Hand" @@ -2168,8 +2169,8 @@ #: BOMIndented.php:312 BOMIndentedReverse.php:292 BOMInquiry.php:113 #: BOMInquiry.php:199 BOMs.php:529 BOMs.php:855 ContractBOM.php:236 -#: ContractBOM.php:346 ContractOtherReqts.php:93 CounterSales.php:2019 -#: CounterSales.php:2204 CreditStatus.php:152 CreditStatus.php:241 +#: ContractBOM.php:346 ContractOtherReqts.php:93 CounterSales.php:2030 +#: CounterSales.php:2215 CreditStatus.php:152 CreditStatus.php:241 #: EmailConfirmation.php:192 FixedAssetCategories.php:163 #: FixedAssetDepreciation.php:86 FixedAssetRegister.php:83 #: FixedAssetRegister.php:372 FixedAssetTransfer.php:50 @@ -2186,8 +2187,8 @@ #: ReverseGRN.php:385 SalesCategories.php:421 SecurityTokens.php:94 #: SecurityTokens.php:103 SecurityTokens.php:118 SelectAsset.php:243 #: SelectCompletedOrder.php:583 SelectContract.php:153 -#: SelectCreditItems.php:988 SelectOrderItems.php:1474 -#: SelectOrderItems.php:1658 SelectProduct.php:516 SelectProduct.php:733 +#: SelectCreditItems.php:988 SelectOrderItems.php:1485 +#: SelectOrderItems.php:1669 SelectProduct.php:516 SelectProduct.php:733 #: SelectSalesOrder.php:581 SelectWorkOrder.php:192 Shipt_Select.php:190 #: StockCategories.php:216 StockDispatch.php:375 StockDispatch.php:382 #: StockLocStatus.php:161 StockQuantityByDate.php:106 SuppCreditGRNs.php:82 @@ -2283,7 +2284,7 @@ msgstr "popis" #: BOMInquiry.php:30 BOMs.php:839 ContractBOM.php:324 ContractBOM.php:329 -#: Contracts.php:756 Contracts.php:759 CounterSales.php:2171 +#: Contracts.php:756 Contracts.php:759 CounterSales.php:2182 #: CustomerReceipt.php:1106 CustomerReceipt.php:1109 #: DiscountCategories.php:104 DiscountCategories.php:106 #: DiscountCategories.php:110 DiscountCategories.php:112 @@ -2293,8 +2... [truncated message content] |
From: <dai...@us...> - 2011-11-26 07:58:30
|
Revision: 4753 http://web-erp.svn.sourceforge.net/web-erp/?rev=4753&view=rev Author: daintree Date: 2011-11-26 07:58:19 +0000 (Sat, 26 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/ConfirmDispatchControlled_Invoice.php trunk/ConfirmDispatch_Invoice.php trunk/PO_PDFPurchOrder.php trunk/PO_SelectOSPurchOrder.php trunk/PcAssignCashToTab.php trunk/SelectCompletedOrder.php trunk/StockCostUpdate.php trunk/SuppInvGRNs.php trunk/SupplierInvoice.php trunk/doc/README.txt trunk/includes/ConnectDB_mysqli.inc trunk/includes/SQL_CommonFunctions.inc trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po trunk/locale/de_DE.utf8/LC_MESSAGES/messages.mo trunk/locale/de_DE.utf8/LC_MESSAGES/messages.po trunk/locale/el_GR.utf8/LC_MESSAGES/messages.mo trunk/locale/el_GR.utf8/LC_MESSAGES/messages.po trunk/locale/en_GB.utf8/LC_MESSAGES/messages.pot trunk/locale/en_US.utf8/LC_MESSAGES/messages.mo trunk/locale/en_US.utf8/LC_MESSAGES/messages.po trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po trunk/locale/et_EE.utf8/LC_MESSAGES/messages.mo trunk/locale/et_EE.utf8/LC_MESSAGES/messages.po trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.mo trunk/locale/fa_IR.utf8/LC_MESSAGES/messages.po trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.mo trunk/locale/fr_FR.utf8/LC_MESSAGES/messages.po trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.mo trunk/locale/hi_IN.utf8/LC_MESSAGES/messages.po trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.mo trunk/locale/hr_HR.utf8/LC_MESSAGES/messages.po trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.mo trunk/locale/hu_HU.utf8/LC_MESSAGES/messages.po trunk/locale/id_ID.utf8/LC_MESSAGES/messages.mo trunk/locale/id_ID.utf8/LC_MESSAGES/messages.po trunk/locale/it_IT.utf8/LC_MESSAGES/messages.mo trunk/locale/it_IT.utf8/LC_MESSAGES/messages.po trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.mo trunk/locale/ja_JP.utf8/LC_MESSAGES/messages.po trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.mo trunk/locale/lv_LV.utf8/LC_MESSAGES/messages.po trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.mo trunk/locale/nl_NL.utf8/LC_MESSAGES/messages.po trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.mo trunk/locale/pl_PL.utf8/LC_MESSAGES/messages.po trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_BR.utf8/LC_MESSAGES/messages.po trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.mo trunk/locale/pt_PT.utf8/LC_MESSAGES/messages.po trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.mo trunk/locale/ro_RO.utf8/LC_MESSAGES/messages.po trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.mo trunk/locale/ru_RU.utf8/LC_MESSAGES/messages.po trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.mo trunk/locale/sq_AL.utf8/LC_MESSAGES/messages.po trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.mo trunk/locale/sv_SE.utf8/LC_MESSAGES/messages.po trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.mo trunk/locale/sw_KE.utf8/LC_MESSAGES/messages.po trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.mo trunk/locale/tr_TR.utf8/LC_MESSAGES/messages.po trunk/locale/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/sql/mysql/weberp-demo.sql trunk/sql/mysql/weberp-new.sql Added Paths: ----------- trunk/css/aguapop/images/allocation.gif trunk/css/aguapop/images/bank.gif trunk/css/aguapop/images/credit.gif trunk/css/aguapop/images/email.gif trunk/css/aguapop/images/folders.gif trunk/css/aguapop/images/inventory.gif trunk/css/aguapop/images/maintenance.gif trunk/css/aguapop/images/preview.gif trunk/css/aguapop/images/reports.gif trunk/css/aguapop/images/transactions.gif Modified: trunk/ConfirmDispatchControlled_Invoice.php =================================================================== --- trunk/ConfirmDispatchControlled_Invoice.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/ConfirmDispatchControlled_Invoice.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -33,7 +33,7 @@ exit; } -if (!isset($_SESSION['Items']) OR !isset($_SESSION['ProcessingOrder'])) { +if (!isset($_SESSION['Items'.$identifier]) OR !isset($_SESSION['ProcessingOrder'])) { /* This page can only be called with a sales order number to invoice */ echo '<div class="centre"> <a href="' . $rootpath . '/SelectSalesOrder.php">'. _('Select a sales order to invoice') . '</a> @@ -46,7 +46,7 @@ /*Save some typing by referring to the line item class object in short form */ -$LineItem = &$_SESSION['Items']->LineItems[$LineNo]; +$LineItem = &$_SESSION['Items'.$identifier]->LineItems[$LineNo]; //Make sure this item is really controlled @@ -63,15 +63,15 @@ ********************************************/ echo '<div class="centre">'; -echo '<br /><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a>'; +echo '<br /><a href="'. $rootpath. '/ConfirmDispatch_Invoice.php?identifier=' . $identifier . '">'. _('Back to Confirmation of Dispatch') . '/' . _('Invoice'). '</a>'; -echo '<br /><font size=2><b>'. _('Dispatch of up to').' '. locale_number_format($LineItem->Quantity-$LineItem->QtyInv, $LineItem->DecimalPlaces). ' '. _('Controlled items').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('on order').' ' . $_SESSION['Items']->OrderNo . ' '. _('to'). ' ' . $_SESSION['Items']->CustomerName . '</b></font></div>'; +echo '<br /><b>'. _('Dispatch of up to').' '. locale_number_format($LineItem->Quantity-$LineItem->QtyInv, $LineItem->DecimalPlaces). ' '. _('Controlled items').' ' . $LineItem->StockID . ' - ' . $LineItem->ItemDescription . ' '. _('on order').' ' . $_SESSION['Items'.$identifier]->OrderNo . ' '. _('to'). ' ' . $_SESSION['Items'.$identifier]->CustomerName . '</b></div>'; /** vars needed by InputSerialItem : **/ $StockID = $LineItem->StockID; $RecvQty = $LineItem->Quantity-$LineItem->QtyInv; $ItemMustExist = true; /*Can only invoice valid batches/serial numbered items that exist */ -$LocationOut = $_SESSION['Items']->Location; +$LocationOut = $_SESSION['Items'.$identifier]->Location; $InOutModifier=1; $ShowExisting=false; @@ -79,7 +79,7 @@ /*TotalQuantity set inside this include file from the sum of the bundles of the item selected for dispatch */ -$_SESSION['Items']->LineItems[$LineNo]->QtyDispatched = $TotalQuantity; +$_SESSION['Items'.$identifier]->LineItems[$LineNo]->QtyDispatched = $TotalQuantity; include('includes/footer.inc'); exit; Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/ConfirmDispatch_Invoice.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -232,8 +232,12 @@ foreach ($Itm->SerialItems as $SerialItem) { //calculate QtyDispatched from bundle quantities $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched += $SerialItem->BundleQty; } - } else if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv)){ - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); + } else if (isset($_POST[$Itm->LineNumber . '_QtyDispatched' ])){ + if (is_numeric(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched' ])) + AND filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']) <= ($_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->Quantity - $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyInv)){ + + $_SESSION['Items'.$identifier]->LineItems[$Itm->LineNumber]->QtyDispatched = round(filter_number_format($_POST[$Itm->LineNumber . '_QtyDispatched']),$Itm->DecimalPlaces); + } } foreach ($Itm->Taxes as $TaxLine) { if (isset($_POST[$Itm->LineNumber . $TaxLine->TaxCalculationOrder . '_TaxRate'])){ @@ -449,7 +453,7 @@ } } -if (isset($_POST['ChargeFreightCost']) and !is_numeric(filter_number_format($_POST['ChargeFreightCost']))){ +if (isset($_POST['ChargeFreightCost']) AND !is_numeric(filter_number_format($_POST['ChargeFreightCost']))){ $_POST['ChargeFreightCost'] = 0; } @@ -467,7 +471,10 @@ if (!isset($_POST['ChargeFreightCost'])) { $_POST['ChargeFreightCost']=0; } -if ($_SESSION['Items'.$identifier]->Any_Already_Delivered()==1 and (!isset($_SESSION['Items'.$identifier]->FreightCost) or $_POST['ChargeFreightCost']==0)) { +if ($_SESSION['Items'.$identifier]->Any_Already_Delivered()==1 + AND (!isset($_SESSION['Items'.$identifier]->FreightCost) + OR $_POST['ChargeFreightCost']==0)) { + echo '<td colspan="2" class="number">'. _('Charge Freight Cost inc Tax').'</td> <td><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="0"></td>'; $_SESSION['Items'.$identifier]->FreightCost=0; @@ -478,7 +485,7 @@ } else { echo '<td class="number"><input tabindex='.$j.' type="text" class="number" size="10" maxlength="12" name="ChargeFreightCost" value="' . locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces) . '" /></td>'; } - $_POST['ChargeFreightCost'] = $_SESSION['Items'.$identifier]->FreightCost; + $_POST['ChargeFreightCost'] = locale_number_format($_SESSION['Items'.$identifier]->FreightCost,$_SESSION['Items'.$identifier]->CurrDecimalPlaces); } $FreightTaxTotal =0; //initialise tax total Modified: trunk/PO_PDFPurchOrder.php =================================================================== --- trunk/PO_PDFPurchOrder.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/PO_PDFPurchOrder.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -305,7 +305,7 @@ $Success = 1; //assume the best and email goes - has to be set to 1 to allow update status if ($MakePDFThenDisplayIt){ $pdf->OutputD($_SESSION['DatabaseName'] . '_PurchaseOrder_' . $OrderNo . '_' . date('Y-m-d') . '.pdf'); - $pdf->__destruct(); //UldisN + $pdf->__destruct(); } else { /* must be MakingPDF to email it */ $PdfFileName = $_SESSION['DatabaseName'] . '_PurchaseOrder_' . $OrderNo . '_' .date('Y-m-d') . '.pdf'; Modified: trunk/PO_SelectOSPurchOrder.php =================================================================== --- trunk/PO_SelectOSPurchOrder.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/PO_SelectOSPurchOrder.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -131,7 +131,11 @@ */ if (!isset($OrderNumber) or $OrderNumber=='' ){ - echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; + if (isset($SelectedSupplier)){ + echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes&SupplierID=' . $SelectedSupplier . '">' . _('Add Purchase Order') . '</a>'; + } else { + echo '<a href="' . $rootpath . '/PO_Header.php?NewOrder=Yes">' . _('Add Purchase Order') . '</a>'; + } echo '<p class="page_title_text"><img src="'.$rootpath.'/css/'.$theme.'/images/magnifier.png" title="' . _('Search') . '" alt="">' . ' ' . $title.'</p>'; echo '<table class=selection> <tr> Modified: trunk/PcAssignCashToTab.php =================================================================== --- trunk/PcAssignCashToTab.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/PcAssignCashToTab.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -82,8 +82,8 @@ SET date = '".FormatDateForSQL($_POST['Date'])."', amount = '" . filter_number_format($_POST['Amount']) . "', authorized = '0000-00-00', - notes = '" . DB_escape_string($_POST['Notes']) . "', - receipt = '" . DB_escape_string($_POST['Receipt']) . "' + notes = '" . $_POST['Notes'] . "', + receipt = '" . $_POST['Receipt'] . "' WHERE counterindex = '" . $SelectedIndex . "'"; $msg = _('Assignment of cash to PC Tab ') . ' ' . $SelectedTabs . ' ' . _('has been updated'); @@ -106,8 +106,8 @@ '" . filter_number_format($_POST['Amount']) . "', authorized = '0000-00-00', '0', - '" . DB_escape_string($_POST['Notes']) . "', - '" . DB_escape_string($_POST['Receipt']) . "' + '" . $_POST['Notes'] . "', + '" . $_POST['Receipt'] . "' )"; $msg = _('Assignment of cash to PC Tab ') . ' ' . $_POST['SelectedTabs'] . ' ' . _('has been created'); } @@ -173,8 +173,8 @@ echo '</td></tr></table>'; // close main table echo '<p> <div class="centre"> - <input type=submit name="process" value="' . _('Accept') . '" /> - <input type=submit name="Cancel" value="' . _('Cancel') . '" /> + <input type="submit" name="process" value="' . _('Accept') . '" /> + <input type="submit" name="Cancel" value="' . _('Cancel') . '" /> </div>'; echo '</form>'; } @@ -321,10 +321,10 @@ $_POST['Notes'] = $myrow['notes']; $_POST['Receipt'] = $myrow['receipt']; - echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '">'; - echo '<input type=hidden name="SelectedIndex" value="' . $SelectedIndex. '">'; - echo '<input type=hidden name="CurrentAmount" value="' . $Amount[0]. '">'; - echo '<input type=hidden name="Days" value="' . $Days . '">'; + echo '<input type="hidden" name="SelectedTabs" value="' . $SelectedTabs . '" />'; + echo '<input type=hidden name="SelectedIndex" value="' . $SelectedIndex. '" />'; + echo '<input type=hidden name="CurrentAmount" value="' . $Amount[0]. '" />'; + echo '<input type=hidden name="Days" value="' . $Days . '" />'; } /* Ricard: needs revision of this date initialization */ Modified: trunk/SelectCompletedOrder.php =================================================================== --- trunk/SelectCompletedOrder.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/SelectCompletedOrder.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -235,68 +235,35 @@ //figure out the SQL required from the inputs available if (isset($OrderNumber)) { - if (isset($SelectedCustomer)) { - $SQL = "SELECT salesorders.orderno, - debtorsmaster.name, - custbranch.brname, - salesorders.customerref, - salesorders.orddate, - salesorders.deliverydate, - salesorders.deliverto, - currencies.decimalplaces AS currdecimalplaces, SUM(salesorderdetails.unitprice*salesorderdetails.quantity*(1-salesorderdetails.discountpercent)) AS ordervalue - FROM salesorders INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN debtorsmaster - ON salesorders.debtorno = debtorsmaster.debtorno - INNER JOIN custbranch - ON salesorders.branchcode = custbranch.branchcode - AND salesorders.debtorno = custbranch.debtorno - INNER JOIN currencies - ON debtorsmaster.currcode = currencies.currabrev - WHERE salesorders.debtorno='" . $SelectedCustomer ."' - AND salesorders.orderno='". $OrderNumber ."' - AND salesorders.quotation=0 - AND salesorderdetails.completed".$Completed." - GROUP BY salesorders.orderno, - debtorsmaster.name, - custbranch.brname, - salesorders.customerref, - salesorders.orddate, - salesorders.deliverydate, - currencies.decimalplaces, - salesorders.deliverto - ORDER BY salesorders.orderno"; - } else { //Set order number and SelectedCustomer not set - $SQL = "SELECT salesorders.orderno, - debtorsmaster.name, - custbranch.brname, - salesorders.customerref, - salesorders.orddate, - salesorders.deliverydate, - salesorders.deliverto, - currencies.decimalplaces AS currdecimalplaces, SUM(salesorderdetails.unitprice*salesorderdetails.quantity*(1-salesorderdetails.discountpercent)) AS ordervalue - FROM salesorders INNER JOIN salesorderdetails - ON salesorders.orderno = salesorderdetails.orderno - INNER JOIN debtorsmaster - ON salesorders.debtorno = debtorsmaster.debtorno - INNER JOIN custbranch - ON salesorders.branchcode = custbranch.branchcode - AND salesorders.debtorno = custbranch.debtorno - INNER JOIN currencies - ON debtorsmaster.currcode = currencies.currabrev - WHERE salesorders.orderno='". $OrderNumber ."' - AND salesorders.quotation=0 - AND salesorderdetails.completed " . $Completed ." - GROUP BY salesorders.orderno, - debtorsmaster.name, - currencies.decimalplaces, - custbranch.brname, - salesorders.customerref, - salesorders.orddate, - salesorders.deliverydate, - salesorders.deliverto - ORDER BY salesorders.orderno"; - } + $SQL = "SELECT salesorders.orderno, + debtorsmaster.name, + custbranch.brname, + salesorders.customerref, + salesorders.orddate, + salesorders.deliverydate, + salesorders.deliverto, + currencies.decimalplaces AS currdecimalplaces, SUM(salesorderdetails.unitprice*salesorderdetails.quantity*(1-salesorderdetails.discountpercent)) AS ordervalue + FROM salesorders INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + INNER JOIN debtorsmaster + ON salesorders.debtorno = debtorsmaster.debtorno + INNER JOIN custbranch + ON salesorders.branchcode = custbranch.branchcode + AND salesorders.debtorno = custbranch.debtorno + INNER JOIN currencies + ON debtorsmaster.currcode = currencies.currabrev + WHERE salesorders.orderno='". $OrderNumber ."' + AND salesorders.quotation=0 + AND salesorderdetails.completed " . $Completed ." + GROUP BY salesorders.orderno, + debtorsmaster.name, + currencies.decimalplaces, + custbranch.brname, + salesorders.customerref, + salesorders.orddate, + salesorders.deliverydate, + salesorders.deliverto + ORDER BY salesorders.orderno"; } elseif (isset($CustomerRef)) { if (isset($SelectedCustomer)) { $SQL = "SELECT salesorders.orderno, Modified: trunk/StockCostUpdate.php =================================================================== --- trunk/StockCostUpdate.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/StockCostUpdate.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -186,7 +186,7 @@ <br />'; } if ($myrow['mbflag']!='D'){ - echo '<div class="centre"><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '>' . _('Show Stock Status') . '</a>'; + echo '<div class="centre"><a href="' . $rootpath . '/StockStatus.php?StockID=' . $StockID . '">' . _('Show Stock Status') . '</a>'; echo '<br /><a href="' . $rootpath . '/StockMovements.php?StockID=' . $StockID . '">' . _('Show Stock Movements') . '</a>'; echo '<br /><a href="' . $rootpath . '/StockUsage.php?StockID=' . $StockID . '">' . _('Show Stock Usage') .'</a>'; echo '<br /><a href="' . $rootpath . '/SelectSalesOrder.php?SelectedStockItem=' . $StockID . '">' . _('Search Outstanding Sales Orders') . '</a>'; Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/SuppInvGRNs.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -62,6 +62,9 @@ } else { $Complete = False; } + + /* It is not logical to allow being charged for more than was received - and doing so would leave the goods received suspense account out of balance */ + /* if ($_SESSION['Check_Qty_Charged_vs_Del_Qty']==True) { if ((filter_number_format($_POST['This_QuantityInv'])+ $_POST['Prev_QuantityInv'])/($_POST['QtyRecd'] ) > (1+ ($_SESSION['OverChargeProportion'] / 100))){ prnMsg(_('The quantity being invoiced is more than the outstanding quantity by more than') . ' ' . $_SESSION['OverChargeProportion'] . ' ' . @@ -69,6 +72,11 @@ $Hold = True; } } + */ + if (filter_number_format($_POST['This_QuantityInv'])+$_POST['Prev_QuantityInv']-$_POST['QtyRecd'] > 0){ + prnMsg(_('The quantity being invoiced is more than the outstanding quantity that was delivered. It is not possible to enter an invoice for a quantity more than was received into stock'),'warn'); + $InputError = True; + } if (!is_numeric(filter_number_format($_POST['ChgPrice'])) AND filter_number_format($_POST['ChgPrice'])<0){ $InputError = True; prnMsg(_('The price charged in the suppliers currency is either not numeric or negative') . '. ' . _('The goods received cannot be invoiced at this price'),'error'); Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/SupplierInvoice.php 2011-11-26 07:58:19 UTC (rev 4753) @@ -16,8 +16,6 @@ include('includes/header.inc'); include('includes/SQL_CommonFunctions.inc'); -//this is available from the menu on this page already -//echo "<a href='" . $rootpath . '/SelectSupplier.php?' . SID . "'>" . _('Back to Suppliers') . '</a><br />'; if (!isset($_SESSION['SuppTrans']->SupplierName)) { $sql="SELECT suppname FROM suppliers WHERE supplierid='" . $_GET['SupplierID'] . "'"; @@ -723,7 +721,7 @@ '" . $SQLInvoiceDate . "', '" . $PeriodNo . "', '" . $EnteredGLCode->GLCode . "', - '" . DB_escape_string($_SESSION['SuppTrans']->SupplierID . ' ' . $EnteredGLCode->Narrative) . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' ' . $EnteredGLCode->Narrative . "', '" . $EnteredGLCode->Amount/ $_SESSION['SuppTrans']->ExRate ."')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added because'); @@ -751,7 +749,7 @@ '" . $SQLInvoiceDate . "', '" . $PeriodNo . "', '" . $_SESSION['SuppTrans']->GRNAct . "', - '" . DB_escape_string($_SESSION['SuppTrans']->SupplierID . ' ' . _('Shipment charge against') . ' ' . $ShiptChg->ShiptRef) . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Shipment charge against') . ' ' . $ShiptChg->ShiptRef . "', '" . $ShiptChg->Amount/ $_SESSION['SuppTrans']->ExRate . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the shipment') . @@ -779,7 +777,7 @@ '" . $SQLInvoiceDate . "', '" . $PeriodNo . "', '". $AssetAddition->CostAct . "', - '" . DB_escape_string($_SESSION['SuppTrans']->SupplierID . ' ' . _('Asset Addition') . ' ' . $AssetAddition->AssetID . ': ' . $AssetAddition->Description) . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' ' . _('Asset Addition') . ' ' . $AssetAddition->AssetID . ': ' . $AssetAddition->Description . "', '" . ($AssetAddition->Amount/ $_SESSION['SuppTrans']->ExRate) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the asset addition could not be added because'); $DbgMsg = _('The following SQL to insert the GL transaction was used'); @@ -842,8 +840,8 @@ '" . $SQLInvoiceDate . "', '" . $PeriodNo . "', '" . $_SESSION['SuppTrans']->GRNAct . "', - '" . DB_escape_string($_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv . ' @ ' . - _('std cost of') . ' ' . $EnteredGRN->StdCostUnit) . "', + '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('GRN') . ' ' . $EnteredGRN->GRNNo . ' - ' . $EnteredGRN->ItemCode . ' x ' . $EnteredGRN->This_QuantityInv . ' @ ' . + _('std cost of') . ' ' . $EnteredGRN->StdCostUnit . "', '" . ($EnteredGRN->StdCostUnit * $EnteredGRN->This_QuantityInv) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added because'); @@ -892,10 +890,11 @@ if ($EnteredGRN->This_QuantityInv > $TotalQuantityOnHand){ /*So we need to write off some of the variance to variances and only the balance of the quantity in stock to go to stock value */ - - $WriteOffToVariances = ($EnteredGRN->This_QuantityInv - $TotalQuantityOnHand) - * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); - + + /*if the TotalQuantityOnHand is negative then this variance to write off is inflated by the negative quantity - which makes sense */ + + $WriteOffToVariances = ($EnteredGRN->This_QuantityInv - $TotalQuantityOnHand) * (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); + $SQL = "INSERT INTO gltrans (type, typeno, trandate, @@ -916,7 +915,63 @@ $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); - } + + /* The variance to the extent of the quantity invoiced should also be written off against the sales analysis cost - as sales analysis would have been created using the cost at the time the sale was made... this was incorrect as hind-sight has shown here. However, how to determine when these were last sold? To update the sales analysis cost. Work through the last 6 months sales analysis from the latest period in which this invoice is being posted and prior. + + The assumption here is that the goods have been sold prior to the purchase invocie being entered so it is necessary to back track on the sales analysis cost. + * + Note that this will mean that posting to GL COGS will not agree to the cost of sales from the sales analysis*/ + + $QuantityVarianceAllocated = $EnteredGRN->This_QuantityInv; + $CostVarPerUnit = (($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit); + $PeriodAllocated = $PeriodNo; + + while ($QuantityVarianceAllocated >0) { + $SalesAnalResult=DB_query("SELECT cust, + custbranch, + typeabbrev, + periodno, + stkcategory, + area, + salesperson, + cost, + qty + FROM salesanalysis + WHERE salesanalysis.stockid = '" . $EnteredGRN->ItemCode . "' + AND salesanalysis.budgetoractual=1 + AND periodno='" . $PeriodAllocated . "'", + $db); + if (DB_num_rows($SalesAnalResult)>0){ + while ($SalesAnalRow = DB_fetch_array($SalesAnalResult) AND $QuantityVarianceAllocated >0){ + if ($SalesAnalRow['qty']<=$QuantityVarianceAllocated){ + $QuantityVarianceAllocated -= $SalesAnalRow['qty']; + $QuantityAllocated = $SalesAnalRow['qty']; + } else { + $QuantityAllocated = $QuantityVarianceAllocated; + $QuantityVarianceAllocated=0; + } + $UpdSalAnalResult = DB_query("UPDATE salesanalysis + SET cost = cost + " . ($CostVarPerUnit * $QuantityAllocated) . " + WHERE cust ='" . $SalesAnalRow['cust'] . "' + AND stockid='" . $EnteredGRN->ItemCode . "' + AND custbranch='" . $SalesAnalRow['custbranch'] . "' + AND typeabbrev='" . $SalesAnalRow['typeabbrev'] . "' + AND periodno='" . $PeriodAllocated . "' + AND area='" . $SalesAnalRow['area'] . "' + AND salesperson='" . $SalesAnalRow['salesperson'] . "' + AND stkcategory='" . $SalesAnalRow['stkcategory'] . "' + AND budgetoractual=1", + $db); + } + } //end if there were sales in that period + $PeriodAllocated--; //decrement the period + if ($PeriodNo - $PeriodAllocated >6) { + /*if more than 6 months ago when sales were made then forget it */ + break; + } + } //end loop around different periods to see which sales analysis records to update + } // end if the quantity being invoiced here is greater than the current stock on hand + /*Now post any remaining price variance to stock rather than price variances */ $SQL = "INSERT INTO gltrans (type, @@ -933,7 +988,7 @@ '" . $StockGLCode['stockact'] . "', '" . $_SESSION['SuppTrans']->SupplierID . ' - ' . _('Average Cost Adj') . ' - ' . $EnteredGRN->ItemCode . ' x ' . $TotalQuantityOnHand . ' x ' . - round(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,2) . "', + round(($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) - $EnteredGRN->StdCostUnit,$_SESSION['CompanyRecord']['decimalplaces']) . "', '" . ($PurchPriceVar - $WriteOffToVariances) . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction could not be added for the price variance of the stock item because'); @@ -959,7 +1014,8 @@ materialcost=materialcost+" . $CostIncrement . " WHERE stockid='" . $EnteredGRN->ItemCode . "'"; $Result = DB_query($sql, $db, $ErrMsg, $DbgMsg, True); - } else { + } else { + /* if stock is negative then update the cost to this cost */ $sql = "UPDATE stockmaster SET lastcost=materialcost+overheadcost+labourcost, materialcost='" . ($EnteredGRN->ChgPrice / $_SESSION['SuppTrans']->ExRate) . "' WHERE stockid='" . $EnteredGRN->ItemCode . "'"; @@ -1109,6 +1165,8 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The general ledger transaction for the control total could not be added because'); $DbgMsg = _('The following SQL to insert the GL transaction was used'); $Result = DB_query($SQL, $db, $ErrMsg, $DbgMsg, True); + + EnsureGLEntriesBalance(20, $InvoiceNo, $db); } /*Thats the end of the GL postings */ /*Now insert the invoice into the SuppTrans table*/ @@ -1276,7 +1334,7 @@ '20', '" . $InvoiceNo . "', '" . $Contract->Amount/ $_SESSION['SuppTrans']->ExRate . "', - '" . DB_escape_string($Contract->Narrative) . "', + '" . $Contract->Narrative . "', '" . $Anticipated . "')"; $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The contract charge record for contract') . ' ' . $Contract->ContractRef . ' ' . _('could not be added because'); Added: trunk/css/aguapop/images/allocation.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/allocation.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/bank.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/bank.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/credit.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/credit.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/email.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/email.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/folders.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/folders.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/inventory.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/inventory.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/maintenance.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/maintenance.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/preview.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/preview.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/reports.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/reports.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/css/aguapop/images/transactions.gif =================================================================== (Binary files differ) Property changes on: trunk/css/aguapop/images/transactions.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/doc/README.txt =================================================================== --- trunk/doc/README.txt 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/doc/README.txt 2011-11-26 07:58:19 UTC (rev 4753) @@ -22,6 +22,8 @@ 6. A significant push has been made to try to reduce the number of bugs, with a great deal of testing from all quarters. +7. Numbers can now be entered in the language format the user has selected and all numbers now display in the users language format - as of version 4.06.1 + The change log shows descriptions and dates of all changes made. Installation instructions are in the file INSTALL.txt in the doc directory. It is important to read the INSTALL.txt file in its entirety before proceeding. A printout is recommended. Modified: trunk/includes/ConnectDB_mysqli.inc =================================================================== --- trunk/includes/ConnectDB_mysqli.inc 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/includes/ConnectDB_mysqli.inc 2011-11-26 07:58:19 UTC (rev 4753) @@ -69,11 +69,6 @@ global $debug; global $PathPrefix; -/* PeterMoulding.com -20071102 Change from mysql to mysqli; - $result=mysql_query($SQL,$Conn); -*/ - $result=mysqli_query($Conn, $SQL); $_SESSION['LastInsertId'] = mysqli_insert_id($Conn); Modified: trunk/includes/SQL_CommonFunctions.inc =================================================================== --- trunk/includes/SQL_CommonFunctions.inc 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/includes/SQL_CommonFunctions.inc 2011-11-26 07:58:19 UTC (rev 4753) @@ -141,10 +141,9 @@ $sql = "SELECT SUM(salesorderdetails.unitprice * (salesorderdetails.quantity - salesorderdetails.qtyinvoiced) * (1 - salesorderdetails.discountpercent)) AS ordervalue - FROM salesorders, - salesorderdetails - WHERE salesorders.orderno = salesorderdetails.orderno - AND salesorders.debtorno = '" . $DebtorNo . "' + FROM salesorders INNER JOIN salesorderdetails + ON salesorders.orderno = salesorderdetails.orderno + WHERE salesorders.debtorno = '" . $DebtorNo . "' AND salesorderdetails.completed = 0 AND salesorders.quotation = 0"; @@ -154,7 +153,7 @@ $myrow = DB_fetch_array($GetOSOrdersResult); $CreditAvailable -= $myrow['ordervalue']; - Return $CreditAvailable; + return $CreditAvailable; } function ItemCostUpdateGL($db, $StockID, $NewCost, $OldCost, $QOH) { Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-24 09:10:21 UTC (rev 4752) +++ trunk/locale/cs_CZ.utf8/LC_MESSAGES/messages.po 2011-11-26 07:58:19 UTC (rev 4753) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: webERP 3.08\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-13 10:46+1300\n" +"POT-Creation-Date: 2011-11-19 17:05+1300\n" "PO-Revision-Date: 2011-02-07 15:33+0000\n" "Last-Translator: Tim Schofield <Unknown>\n" "Language-Team: Czech <cs...@li...>\n" @@ -202,12 +202,12 @@ #: AccountGroups.php:223 AccountSections.php:175 AddCustomerContacts.php:25 #: AddCustomerContacts.php:28 AddCustomerNotes.php:103 -#: AddCustomerTypeNotes.php:97 AgedDebtors.php:451 AgedSuppliers.php:278 +#: AddCustomerTypeNotes.php:97 AgedDebtors.php:450 AgedSuppliers.php:278 #: Areas.php:144 AuditTrail.php:11 BankReconciliation.php:13 #: BOMExtendedQty.php:261 BOMIndented.php:246 BOMIndentedReverse.php:235 #: BOMInquiry.php:187 BOMListing.php:109 BOMs.php:213 BOMs.php:832 -#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2014 -#: CounterSales.php:2140 Credit_Invoice.php:255 CreditStatus.php:21 +#: COGSGLPostings.php:18 CompanyPreferences.php:153 CounterSales.php:2025 +#: CounterSales.php:2151 Credit_Invoice.php:255 CreditStatus.php:21 #: Currencies.php:28 CustEDISetup.php:17 DailyBankTransactions.php:11 #: DebtorsAtPeriodEnd.php:125 DiscountCategories.php:10 #: DiscountCategories.php:131 DiscountMatrix.php:16 EDIMessageFormat.php:104 @@ -221,14 +221,14 @@ #: PDFPrintLabel.php:140 PDFStockLocTransfer.php:17 #: PO_AuthorisationLevels.php:10 POReport.php:60 POReport.php:64 #: POReport.php:68 PO_SelectOSPurchOrder.php:135 PricesBasedOnMarkUp.php:8 -#: Prices_Customer.php:34 Prices.php:30 PurchData.php:137 PurchData.php:258 +#: Prices_Customer.php:35 Prices.php:30 PurchData.php:137 PurchData.php:258 #: PurchData.php:282 RecurringSalesOrders.php:309 SalesAnalReptCols.php:51 #: SalesAnalRepts.php:11 SalesCategories.php:11 SalesGLPostings.php:17 #: SalesGraph.php:34 SalesPeople.php:20 SalesTypes.php:20 SelectAsset.php:45 #: SelectCompletedOrder.php:11 SelectContract.php:78 SelectCreditItems.php:215 #: SelectCreditItems.php:286 SelectCustomer.php:260 SelectGLAccount.php:17 -#: SelectGLAccount.php:77 SelectOrderItems.php:575 SelectOrderItems.php:1468 -#: SelectOrderItems.php:1592 SelectProduct.php:496 SelectSalesOrder.php:533 +#: SelectGLAccount.php:77 SelectOrderItems.php:577 SelectOrderItems.php:1479 +#: SelectOrderItems.php:1603 SelectProduct.php:496 SelectSalesOrder.php:533 #: SelectSupplier.php:9 SelectSupplier.php:198 SelectWorkOrder.php:9 #: SelectWorkOrder.php:151 ShipmentCosting.php:11 Shipments.php:17 #: Shippers.php:123 Shippers.php:159 Shipt_Select.php:8 @@ -269,8 +269,8 @@ #: CompanyPreferences.php:476 CompanyPreferences.php:478 #: CompanyPreferences.php:491 CompanyPreferences.php:493 #: CompanyPreferences.php:506 CompanyPreferences.php:508 -#: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:577 -#: Customers.php:925 Customers.php:934 Customers.php:937 +#: ContractCosting.php:198 CustomerBranches.php:410 Customers.php:593 +#: Customers.php:941 Customers.php:950 Customers.php:953 #: DeliveryDetails.php:1079 DeliveryDetails.php:1118 DeliveryDetails.php:1121 #: GLTransInquiry.php:69 MRPCalendar.php:224 MRP.php:529 MRP.php:533 #: MRP.php:537 MRP.php:541 PaymentMethods.php:197 PaymentMethods.php:198 @@ -304,8 +304,8 @@ #: BOMs.php:749 CompanyPreferences.php:475 CompanyPreferences.php:479 #: CompanyPreferences.php:490 CompanyPreferences.php:494 #: CompanyPreferences.php:505 CompanyPreferences.php:509 -#: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:576 -#: Customers.php:920 Customers.php:933 Customers.php:936 +#: ContractCosting.php:196 CustomerBranches.php:410 Customers.php:592 +#: Customers.php:936 Customers.php:949 Customers.php:952 #: DeliveryDetails.php:1080 DeliveryDetails.php:1119 DeliveryDetails.php:1122 #: GLTransInquiry.php:86 MRPCalendar.php:226 MRP.php:527 MRP.php:531 #: MRP.php:535 MRP.php:539 PaymentMethods.php:197 PaymentMethods.php:198 @@ -338,14 +338,14 @@ #: AddCustomerNotes.php:141 AddCustomerTypeNotes.php:128 Areas.php:164 #: BankAccounts.php:223 BOMs.php:149 COGSGLPostings.php:108 #: COGSGLPostings.php:206 CreditStatus.php:174 Currencies.php:272 -#: CustomerBranches.php:414 Customers.php:1011 Customers.php:1045 +#: CustomerBranches.php:414 Customers.php:1027 Customers.php:1061 #: CustomerTypes.php:202 EDIMessageFormat.php:150 Factors.php:329 #: FixedAssetCategories.php:186 FixedAssetLocations.php:107 #: FreightCosts.php:240 GeocodeSetup.php:173 GLAccounts.php:312 GLTags.php:91 #: Labels.php:411 Locations.php:382 MRPDemands.php:306 MRPDemandTypes.php:120 #: PaymentMethods.php:200 PaymentTerms.php:205 PcAssignCashToTab.php:259 #: PcClaimExpensesFromTab.php:252 PcExpenses.php:223 PcTabs.php:234 -#: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:277 +#: PcTypeTabs.php:172 PO_AuthorisationLevels.php:151 Prices_Customer.php:278 #: Prices.php:251 PurchData.php:204 SalesCategories.php:255 #: SalesGLPostings.php:132 SalesGLPostings.php:245 SalesPeople.php:232 #: SalesTypes.php:206 SecurityTokens.php:128 SelectCustomer.php:612 @@ -369,8 +369,8 @@ #: AddCustomerNotes.php:142 AddCustomerTypeNotes.php:129 Areas.php:165 #: BankAccounts.php:224 BOMs.php:151 COGSGLPostings.php:109 #: COGSGLPostings.php:207 ContractBOM.php:266 ContractOtherReqts.php:119 -#: CounterSales.php:813 Credit_Invoice.php:381 CreditStatus.php:175 -#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1046 +#: CounterSales.php:821 Credit_Invoice.php:381 CreditStatus.php:175 +#: Currencies.php:275 CustomerReceipt.php:918 Customers.php:1062 #: CustomerTypes.php:203 DiscountCategories.php:219 DiscountMatrix.php:182 #: EDIMessageFormat.php:151 FixedAssetCategories.php:187 FreightCosts.php:241 #: GeocodeSetup.php:174 GLAccounts.php:313 GLJournal.php:427 GLTags.php:92 @@ -378,13 +378,13 @@ #: PaymentMethods.php:201 Payments.php:1069 PaymentTerms.php:206 #: PcAssignCashToTab.php:263 PcClaimExpensesFromTab.php:253 PcExpenses.php:224 #: PcExpensesTypeTab.php:185 PcTabs.php:235 PcTypeTabs.php:173 -#: PO_AuthorisationLevels.php:153 PO_Items.php:711 Prices_Customer.php:278 +#: PO_AuthorisationLevels.php:153 PO_Items.php:711 Prices_Customer.php:279 #: Prices.php:252 PurchData.php:205 SalesAnalReptCols.php:299 #: SalesAnalRepts.php:303 SalesCategories.php:256 SalesGLPostings.php:133 #: SalesGLPostings.php:246 SalesPeople.php:233 SalesTypes.php:207 #: SecurityTokens.php:129 SelectCreditItems.php:764 SelectCustomer.php:613 #: SelectCustomer.php:631 SelectCustomer.php:655 SelectCustomer.php:672 -#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1387 +#: SelectCustomer.php:696 SelectCustomer.php:713 SelectOrderItems.php:1398 #: Shipments.php:429 Shippers.php:145 SpecialOrder.php:655 #: StockCategories.php:243 StockCategories.php:554 SuppContractChgs.php:99 #: SuppCreditGRNs.php:102 SuppFixedAssetChgs.php:87 SuppInvGRNs.php:139 @@ -444,7 +444,7 @@ #: FreightCosts.php:339 GeocodeSetup.php:270 GLAccounts.php:262 #: Locations.php:597 MRPDemands.php:419 MRPDemandTypes.php:187 #: OffersReceived.php:56 OffersReceived.php:143 PaymentMethods.php:282 -#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:354 +#: PaymentTerms.php:309 PO_AuthorisationLevels.php:248 Prices_Customer.php:356 #: SalesAnalReptCols.php:552 SalesAnalRepts.php:514 SalesGLPostings.php:416 #: SalesPeople.php:368 Shippers.php:200 StockCategories.php:581 #: SupplierContacts.php:281 SuppLoginSetup.php:293 TaxAuthorities.php:327 @@ -575,7 +575,7 @@ msgstr "Kontakt záznam byl odstraněn" #: AddCustomerContacts.php:128 CompanyPreferences.php:223 -#: CustomerBranches.php:368 Customers.php:998 Customers.php:1006 +#: CustomerBranches.php:368 Customers.php:1014 Customers.php:1022 #: SalesPeople.php:200 SelectCustomer.php:607 StockDispatch.php:187 #: StockDispatch.php:199 SupplierContacts.php:150 SuppTransGLAnalysis.php:105 #: includes/InputSerialItemsFile.php:84 includes/InputSerialItemsFile.php:124 @@ -583,8 +583,8 @@ msgid "Name" msgstr "Název" -#: AddCustomerContacts.php:129 AddCustomerContacts.php:223 Customers.php:999 -#: Customers.php:1007 SelectCustomer.php:608 WWW_Access.php:107 +#: AddCustomerContacts.php:129 AddCustomerContacts.php:223 Customers.php:1015 +#: Customers.php:1023 SelectCustomer.php:608 WWW_Access.php:107 #: WWW_Access.php:169 msgid "Role" msgstr "Roli" @@ -595,7 +595,7 @@ #: AddCustomerContacts.php:131 AddCustomerContacts.php:240 #: CustomerBranches.php:374 CustomerBranches.php:774 CustomerInquiry.php:253 -#: Customers.php:1001 Customers.php:1009 EmailCustTrans.php:15 +#: Customers.php:1017 Customers.php:1025 EmailCustTrans.php:15 #: EmailCustTrans.php:63 Factors.php:245 Factors.php:292 Locations.php:563 #: OrderDetails.php:109 PDFRemittanceAdvice.php:243 PO_PDFPurchOrder.php:369 #: PO_PDFPurchOrder.php:372 PrintCustTrans.php:714 PrintCustTrans.php:945 @@ -609,8 +609,8 @@ msgid "Email" msgstr "E-mail" -#: AddCustomerContacts.php:132 AddCustomerContacts.php:249 Customers.php:1002 -#: Customers.php:1010 PcAssignCashToTab.php:224 PcAssignCashToTab.php:353 +#: AddCustomerContacts.php:132 AddCustomerContacts.php:249 Customers.php:1018 +#: Customers.php:1026 PcAssignCashToTab.php:224 PcAssignCashToTab.php:353 #: PcAuthorizeExpenses.php:92 PcClaimExpensesFromTab.php:214 #: PcClaimExpensesFromTab.php:372 PcReportTab.php:327 SelectCustomer.php:611 #: SystemParameters.php:328 WOSerialNos.php:290 WOSerialNos.php:296 @@ -636,7 +636,7 @@ #: AddCustomerContacts.php:231 Contracts.php:775 PDFRemittanceAdvice.php:239 #: PO_Header.php:986 PO_Header.php:1067 SelectCreditItems.php:241 -#: SelectCustomer.php:417 SelectOrderItems.php:604 +#: SelectCustomer.php:417 SelectOrderItems.php:606 #: includes/PDFStatementPageHeader.inc:63 includes/PDFTransPageHeader.inc:81 #: includes/PDFTransPageHeaderPortrait.inc:105 msgid "Phone" @@ -699,14 +699,15 @@ msgstr "Datum" #: AddCustomerNotes.php:122 AddCustomerTypeNotes.php:109 PcReportTab.php:173 -#: Stocks.php:1019 UpgradeDatabase.php:174 UpgradeDatabase.php:177 -#: UpgradeDatabase.php:180 UpgradeDatabase.php:183 UpgradeDatabase.php:186 -#: UpgradeDatabase.php:189 UpgradeDatabase.php:192 UpgradeDatabase.php:195 -#: Z_Upgrade_3.10-3.11.php:62 Z_Upgrade_3.10-3.11.php:66 -#: Z_Upgrade_3.10-3.11.php:70 Z_Upgrade_3.10-3.11.php:74 -#: Z_Upgrade_3.10-3.11.php:78 Z_Upgrade_3.11-4.00.php:62 -#: Z_Upgrade_3.11-4.00.php:66 Z_Upgrade_3.11-4.00.php:70 -#: Z_Upgrade_3.11-4.00.php:74 Z_Upgrade_3.11-4.00.php:78 +#: Stocks.php:1019 UpgradeDatabase.php:175 UpgradeDatabase.php:178 +#: UpgradeDatabase.php:181 UpgradeDatabase.php:184 UpgradeDatabase.php:187 +#: UpgradeDatabase.php:190 UpgradeDatabase.php:193 UpgradeDatabase.php:196 +#: UpgradeDatabase.php:199 Z_Upgrade_3.10-3.11.php:62 +#: Z_Upgrade_3.10-3.11.php:66 Z_Upgrade_3.10-3.11.php:70 +#: Z_Upgrade_3.10-3.11.php:74 Z_Upgrade_3.10-3.11.php:78 +#: Z_Upgrade_3.11-4.00.php:62 Z_Upgrade_3.11-4.00.php:66 +#: Z_Upgrade_3.11-4.00.php:70 Z_Upgrade_3.11-4.00.php:74 +#: Z_Upgrade_3.11-4.00.php:78 msgid "Note" msgstr "Poznámka:" @@ -789,11 +790,11 @@ msgid "Aged Customer Balances" msgstr "Zákazník ve věku Váhy" -#: AgedDebtors.php:270 AgedDebtors.php:369 AgedDebtors.php:434 +#: AgedDebtors.php:269 AgedDebtors.php:368 AgedDebtors.php:433 msgid "Aged Customer Account Analysis" msgstr "Ve věku od zákaznického účtu analýza" -#: AgedDebtors.php:270 AgedDebtors.php:369 AgedDebtors.php:434 +#: AgedDebtors.php:269 AgedDebtors.php:368 AgedDebtors.php:433 #: AgedSuppliers.php:111 BOMExtendedQty.php:149 BOMIndented.php:150 #: BOMIndentedReverse.php:140 BOMListing.php:41 BOMListing.php:52 #: DebtorsAtPeriodEnd.php:57 DebtorsAtPeriodEnd.php:69 GLBalanceSheet.php:100 @@ -817,12 +818,12 @@ msgid "Problem Report" msgstr "Problém" -#: AgedDebtors.php:272 CustomerInquiry.php:85 CustomerInquiry.php:109 +#: AgedDebtors.php:271 CustomerInquiry.php:85 CustomerInquiry.php:109 #: DebtorsAtPeriodEnd.php:59 msgid "The customer details could not be retrieved by the SQL because" msgstr "Zákazník podrobnosti se nepodařilo získat do SQL, protože" -#: AgedDebtors.php:273 AgedDebtors.php:372 AgedDebtors.php:437 +#: AgedDebtors.php:272 AgedDebtors.php:371 AgedDebtors.php:436 #: AgedSuppliers.php:114 AgedSuppliers.php:199 BOMExtendedQty.php:152 #: BOMExtendedQty.php:248 BOMIndented.php:153 BOMIndented.php:234 #: BOMIndentedReverse.php:144 BOMIndentedReverse.php:221 BOMListing.php:44 @@ -873,11 +874,11 @@ msgid "Back to the menu" msgstr "Zpět do menu" -#: AgedDebtors.php:371 +#: AgedDebtors.php:370 msgid "The details of outstanding transactions for customer" msgstr "Podrobnosti o nesplacených transakcí pro zákazníka" -#: AgedDebtors.php:371 AgedSuppliers.php:198 GLAccountCSV.php:168 +#: AgedDebtors.php:370 AgedSuppliers.php:198 GLAccountCSV.php:168 #: GLAccountInquiry.php:143 GLAccountReport.php:94 PO_Items.php:435 #: PO_Items.php:559 PO_Items.php:584 SalesAnalReptCols.php:365 #: SpecialOrder.php:440 StockLocTransferReceive.php:370 @@ -885,10 +886,10 @@ msgid "could not be retrieved because" msgstr "se nepodařilo získat, protože" -#: AgedDebtors.php:374 AgedSuppliers.php:201 Areas.php:95 -#: ConfirmDispatch_Invoice.php:152 ConfirmDispatch_Invoice.php:959 -#: ConfirmDispatch_Invoice.php:973 Contracts.php:580 CounterSales.php:1354 -#: CounterSales.php:1368 Credit_Invoice.php:697 Credit_Invoice.php:718 +#: AgedDebtors.php:373 AgedSuppliers.php:201 Areas.php:95 +#: ConfirmDispatch_Invoice.php:160 ConfirmDispatch_Invoice.php:967 +#: ConfirmDispatch_Invoice.php:981 Contracts.php:580 CounterSales.php:1365 +#: CounterSales.php:1379 Credit_Invoice.php:697 Credit_Invoice.php:718 #: CustomerReceipt.php:542 CustomerReceipt.php:681 CustomerReceipt.php:709 #: CustomerTransInquiry.php:91 DeliveryDetails.php:396 GLProfit_Loss.php:596 #: GLTagProfit_Loss.php:511 Payments.php:334 PDFRemittanceAdvice.php:85 @@ -913,66 +914,66 @@ msgid "The SQL that failed was" msgstr "SQL příkaz, který selhal, byl" -#: AgedDebtors.php:436 +#: AgedDebtors.php:435 #, fuzzy msgid "" "There are no customers meeting the criteria specified with balances to list" msgstr "Nejsou žádné zákazníky, splňující kritéria uvedená na seznamu" -#: AgedDebtors.php:447 +#: AgedDebtors.php:446 msgid "Aged Debtor Analysis" msgstr "Ve věku dlužníka analýza" -#: AgedDebtors.php:461 DebtorsAtPeriodEnd.php:137 +#: AgedDebtors.php:460 DebtorsAtPeriodEnd.php:137 msgid "From Customer Code" msgstr "Od kódu zákazníka" -#: AgedDebtors.php:465 DebtorsAtPeriodEnd.php:141 +#: AgedDebtors.php:464 DebtorsAtPeriodEnd.php:141 msgid "To Customer Code" msgstr "Do kódu zákazníka" -#: AgedDebtors.php:469 AgedSuppliers.php:296 +#: AgedDebtors.php:468 AgedSuppliers.php:296 msgid "All balances or overdues only" msgstr "Všechny zůstatky nebo overdues pouze" -#: AgedDebtors.php:471 +#: AgedDebtors.php:470 msgid "All customers with balances" msgstr "Všichni zákazníci s bilancí" -#: AgedDebtors.php:472 AgedSuppliers.php:299 +#: AgedDebtors.php:471 AgedSuppliers.php:299 msgid "Overdue accounts only" msgstr "Po lhůtě splatnosti účtů" -#: AgedDebtors.php:473 +#: AgedDebtors.php:472 msgid "Held accounts only" msgstr "Účtů, pouze" -#: AgedDebtors.php:478 +#: AgedDebtors.php:477 msgid "Only Show Customers Of" msgstr "Zobrazit jen zákazníky" -#: AgedDebtors.php:484 +#: AgedDebtors.php:483 #, fuzzy msgid "All Sales people" msgstr "Všechny Prodejci" -#: AgedDebtors.php:491 +#: AgedDebtors.php:490 msgid "Only show customers trading in" msgstr "Zobrazovat pouze zákazníkům obchodování" -#: AgedDebtors.php:507 +#: AgedDebtors.php:506 msgid "Summary or detailed report" msgstr "Souhrn nebo podrobné zprávy" -#: AgedDebtors.php:509 AgedSuppliers.php:321 InventoryValuation.php:261 +#: AgedDebtors.php:508 AgedSuppliers.php:321 InventoryValuation.php:261 msgid "Summary Report" msgstr "Souhrnná zpráva" -#: AgedDebtors.php:510 AgedSuppliers.php:322 InventoryValuation.php:262 +#: AgedDebtors.php:509 AgedSuppliers.php:322 InventoryValuation.php:262 msgid "Detailed Report" msgstr "Podrobná zpráva" -#: AgedDebtors.php:517 AgedSuppliers.php:328 BOMExtendedQty.php:295 +#: AgedDebtors.php:516 AgedSuppliers.php:328 BOMExtendedQty.php:295 #: BOMIndented.php:276 BOMIndentedReverse.php:255 BOMListing.php:129 #: DebtorsAtPeriodEnd.php:163 InventoryPlanning.php:445 #: InventoryPlanningPrefSupplier.php:516 InventoryQuantities.php:209 @@ -1156,7 +1157,7 @@ msgstr "ID uživatele" #: AuditTrail.php:49 AuditTrail.php:62 ContractBOM.php:298 -#: CounterSales.php:2146 CounterSales.php:2149 CustomerTransInquiry.php:31 +#: CounterSales.php:2157 CounterSales.php:2160 CustomerTransInquiry.php:31 #: DailySalesInquiry.php:47 DailySalesInquiry.php:49 FixedAssetRegister.php:56 #: FixedAssetRegister.php:65 InventoryQuantities.php:167 #: InventoryQuantities.php:193 InventoryQuantities.php:195 MRP.php:585 @@ -1167,7 +1168,7 @@ #: ReorderLevel.php:215 SalesGraph.php:97 SalesGraph.php:99 SalesGraph.php:119 #: SalesGraph.php:121 SalesGraph.php:143 SalesGraph.php:145 SalesGraph.php:179 #: SalesInquiry.php:1078 SalesInquiry.php:1141 SelectCreditItems.php:952 -#: SelectOrderItems.php:1598 SelectOrderItems.php:1601 SelectProduct.php:504 +#: SelectOrderItems.php:1609 SelectOrderItems.php:1612 SelectProduct.php:504 #: SelectProduct.php:506 StockDispatch.php:298 StockDispatch.php:300 #: StockLocStatus.php:69 StockLocStatus.php:71 StockLocStatus.php:89 #: StockLocStatus.php:93 StockLocStatus.php:97 StockQuantityByDate.php:24 @@ -1526,7 +1527,7 @@ msgid "from" msgstr "od" -#: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:60 +#: BankMatching.php:120 ConfirmDispatchControlled_Invoice.php:68 #: EmailCustTrans.php:63 FixedAssetRegister.php:78 FTP_RadioBeacon.php:280 #: GLAccountCSV.php:171 GLAccountReport.php:103 Payments.php:733 #: PcReportTab.php:102 PDFChequeListing.php:114 PDFChequeListing.php:124 @@ -1640,7 +1641,7 @@ msgid "Ref" msgstr "Ref" -#: BankMatching.php:264 ConfirmDispatch_Invoice.php:276 Credit_Invoice.php:279 +#: BankMatching.php:264 ConfirmDispatch_Invoice.php:284 Credit_Invoice.php:279 #: CustomerAllocations.php:364 CustomerReceipt.php:897 #: CustomerTransInquiry.php:107 CustWhereAlloc.php:109 #: PaymentAllocations.php:67 Payments.php:1026 Payments.php:1030 @@ -1848,8 +1849,8 @@ "zůstatek na účtu. Je důležité, že směnný kurz výše odráží současnou hodnotu " "měny bankovního účtu" -#: BankReconciliation.php:354 CounterSales.php:813 Customers.php:1075 -#: SelectOrderItems.php:1398 Stocks.php:1204 WorkOrderCosting.php:540 +#: BankReconciliation.php:354 CounterSales.php:821 Customers.php:1091 +#: SelectOrderItems.php:1409 Stocks.php:1204 WorkOrderCosting.php:540 #: WorkOrderEntry.php:569 msgid "Are You Sure?" msgstr "Opravdu provést?" @@ -1916,8 +1917,8 @@ #: BOMIndentedReverse.php:295 BOMInquiry.php:200 BOMs.php:532 BOMs.php:709 #: ContractBOM.php:237 ContractBOM.php:349 ContractCosting.php:81 #: ContractCosting.php:87 ContractCosting.php:152 ContractOtherReqts.php:94 -#: Contracts.php:961 Contracts.php:997 CounterSales.php:733 -#: CounterSales.php:2025 CounterSales.php:2210 CounterSales.php:2336 +#: Contracts.php:961 Contracts.php:997 CounterSales.php:741 +#: CounterSales.php:2036 CounterSales.php:2221 CounterSales.php:2347 #: Credit_Invoice.php:273 DeliveryDetails.php:825 DeliveryDetails.php:891 #: GoodsReceived.php:100 GoodsReceived.php:104 GoodsReceived.php:107 #: InventoryPlanningPrefSupplier.php:78 InventoryQuantities.php:246 @@ -1933,16 +1934,16 @@ #: SalesAnalReptCols.php:16 SalesAnalReptCols.php:18 SalesGraph.php:188 #: SalesGraph.php:269 SalesInquiry.php:980 SalesTopItemsInquiry.php:223 #: SelectCreditItems.php:673 SelectCreditItems.php:1034 -#: SelectOrderItems.php:1322 SelectOrderItems.php:1480 -#: SelectOrderItems.php:1664 SelectOrderItems.php:1791 ShipmentCosting.php:145 +#: SelectOrderItems.php:1333 SelectOrderItems.php:1491 +#: SelectOrderItems.php:1675 SelectOrderItems.php:1802 ShipmentCosting.php:145 #: ShipmentCosting.php:146 Shipments.php:391 Shipments.php:393 #: Shipments.php:394 Shipments.php:473 Shipments.php:475 SpecialOrder.php:616 #: StockCounts.php:98 StockLocMovements.php:92 StockLocTransfer.php:186 #: StockMovements.php:97 StockStatus.php:310 StockUsageGraph.php:12 #: SuppCreditGRNs.php:267 SuppCreditGRNs.php:268 SupplierCredit.php:317 #: SupplierTenders.php:265 SupplierTenders.php:493 WOSerialNos.php:255 -#: WOSerialNos.php:295 includes/InputSerialItems.php:104 -#: includes/InputSerialItems.php:110 includes/OutputSerialItems.php:38 +#: WOSerialNos.php:295 includes/InputSerialItems.php:111 +#: includes/InputSerialItems.php:117 includes/OutputSerialItems.php:38 #: includes/OutputSerialItems.php:43 includes/OutputSerialItems.php:49 #: includes/PDFBOMListingPageHeader.inc:44 #: includes/PDFDeliveryDifferencesPageHeader.inc:43 @@ -2096,10 +2097,10 @@ msgstr "Stavět" #: BOMExtendedQty.php:331 BOMInquiry.php:114 BOMs.php:856 -#: CounterSales.php:2021 CounterSales.php:2206 PO_SelectOSPurchOrder.php:232 +#: CounterSales.php:2032 CounterSales.php:2217 PO_SelectOSPurchOrder.php:232 #: PO_SelectPurchOrder.php:213 ReorderLevelLocation.php:70 #: ReorderLevelLocation.php:71 SelectCompletedOrder.php:584 -#: SelectOrderItems.php:1476 SelectOrderItems.php:1660 +#: SelectOrderItems.php:1487 SelectOrderItems.php:1671 #: SelectSalesOrder.php:582 SelectWorkOrder.php:193 Shipt_Select.php:191 #: TopItems.php:182 includes/PDFTopItemsHeader.inc:54 msgid "On Hand" @@ -2168,8 +2169,8 @@ #: BOMIndented.php:312 BOMIndentedReverse.php:292 BOMInquiry.php:113 #: BOMInquiry.php:199 BOMs.php:529 BOMs.php:855 ContractBOM.php:236 -#: ContractBOM.php:346 ContractOtherReqts.php:93 CounterSales.php:2019 -#: CounterSales.php:2204 CreditStatus.php:152 CreditStatus.php:241 +#: ContractBOM.php:346 ContractOtherReqts.php:93 CounterSales.php:2030 +#: CounterSales.php:2215 CreditStatus.php:152 CreditStatus.php:241 #: EmailConfirmation.php:192 FixedAssetCategories.php:163 #: FixedAssetDepreciation.php:86 FixedAssetRegister.php:83 #: FixedAssetRegister.php:372 FixedAssetTransfer.php:50 @@ -2186,8 +2187,8 @@ #: ReverseGRN.php:385 SalesCategories.php:421 SecurityTokens.php:94 #: SecurityTokens.php:103 SecurityTokens.php:118 SelectAsset.php:243 #: SelectCompletedOrder.php:583 SelectContract.php:153 -#: SelectCreditItems.php:988 SelectOrderItems.php:1474 -#: SelectOrderItems.php:1658 SelectProduct.php:516 SelectProduct.php:733 +#: SelectCreditItems.php:988 SelectOrderItems.php:1485 +#: SelectOrderItems.php:1669 SelectProduct.php:516 SelectProduct.php:733 #: SelectSalesOrder.php:581 SelectWorkOrder.php:192 Shipt_Select.php:190 #: StockCategories.php:216 StockDispatch.php:375 StockDispatch.php:382 #: StockLocStatus.php:161 StockQuantityByDate.php:106 SuppCreditGRNs.php:82 @@ -2283,7 +2284,7 @@ msgstr "popis" #: BOMInquiry.php:30 BOMs.php:839 ContractBOM.php:324 ContractBOM.php:329 -#: Contracts.php:756 Contracts.php:759 CounterSales.php:2171 +#: Contracts.php:756 Contracts.php:759 CounterSales.php:2182 #: CustomerReceipt.php:1106 CustomerReceipt.php:1109 #: DiscountCategories.php:104 DiscountCategories.php:106 #: DiscountCategories.php:110 DiscountCategories.php:112 @@ -2293,8 +2... [truncated message content] |
From: <dai...@us...> - 2011-11-26 20:51:08
|
Revision: 4754 http://web-erp.svn.sourceforge.net/web-erp/?rev=4754&view=rev Author: daintree Date: 2011-11-26 20:51:02 +0000 (Sat, 26 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/GLTagProfit_Loss.php trunk/doc/Change.log Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2011-11-26 07:58:19 UTC (rev 4753) +++ trunk/GLTagProfit_Loss.php 2011-11-26 20:51:02 UTC (rev 4754) @@ -655,7 +655,7 @@ </tr>', $Sections[$Section], locale_number_format($SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces'])); - $TotalIncome -= $SectionPrdActual; + } else { echo '<tr> <td colspan="2"></td> @@ -669,6 +669,10 @@ $Sections[$Section], locale_number_format($SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces'])); } + if ($Section==1) { + $TotalIncome+=$SectionPrdActual; + } + if ($Section==2){ /*Cost of Sales - need sub total for Gross Profit*/ echo '<tr> <td colspan="2"></td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-26 07:58:19 UTC (rev 4753) +++ trunk/doc/Change.log 2011-11-26 20:51:02 UTC (rev 4754) @@ -1,5 +1,11 @@ webERP Change Log +27/11/11 Tim: GLTagProfit_Loss Gross Profit calculation error was = COGS - fixed +26/11/11 Phil: SupplierInvoice.php attempt to update salesanalysis cost if goods sold prior to purchase invoice being entered +26/11/11 Phil: Added missing images to aguapop theme - for customer inquiry +26/11/11 Phil: ConfirmDispatchControlledInvoice.php now uses $identifier in session variable name to ensure uniqueness +26/11/11 Phil: PcAssignCashToTab.php removed unecssary DB_escape_string() calls +26/11/11 Phil: StockCostUpdate.php fix link to StockStatus.php 23/11/11 Phil: UserSettings.php - now only checks password if != '' 22/11/11 Phil: StockCategories number_formatting of minumum and maximum values of stock category properties 22/11/11 Felix Lim: StockSerialItems.php closing quote typo. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dai...@us...> - 2011-11-26 20:51:08
|
Revision: 4754 http://web-erp.svn.sourceforge.net/web-erp/?rev=4754&view=rev Author: daintree Date: 2011-11-26 20:51:02 +0000 (Sat, 26 Nov 2011) Log Message: ----------- Modified Paths: -------------- trunk/GLTagProfit_Loss.php trunk/doc/Change.log Modified: trunk/GLTagProfit_Loss.php =================================================================== --- trunk/GLTagProfit_Loss.php 2011-11-26 07:58:19 UTC (rev 4753) +++ trunk/GLTagProfit_Loss.php 2011-11-26 20:51:02 UTC (rev 4754) @@ -655,7 +655,7 @@ </tr>', $Sections[$Section], locale_number_format($SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces'])); - $TotalIncome -= $SectionPrdActual; + } else { echo '<tr> <td colspan="2"></td> @@ -669,6 +669,10 @@ $Sections[$Section], locale_number_format($SectionPrdActual,$_SESSION['CompanyRecord']['decimalplaces'])); } + if ($Section==1) { + $TotalIncome+=$SectionPrdActual; + } + if ($Section==2){ /*Cost of Sales - need sub total for Gross Profit*/ echo '<tr> <td colspan="2"></td> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2011-11-26 07:58:19 UTC (rev 4753) +++ trunk/doc/Change.log 2011-11-26 20:51:02 UTC (rev 4754) @@ -1,5 +1,11 @@ webERP Change Log +27/11/11 Tim: GLTagProfit_Loss Gross Profit calculation error was = COGS - fixed +26/11/11 Phil: SupplierInvoice.php attempt to update salesanalysis cost if goods sold prior to purchase invoice being entered +26/11/11 Phil: Added missing images to aguapop theme - for customer inquiry +26/11/11 Phil: ConfirmDispatchControlledInvoice.php now uses $identifier in session variable name to ensure uniqueness +26/11/11 Phil: PcAssignCashToTab.php removed unecssary DB_escape_string() calls +26/11/11 Phil: StockCostUpdate.php fix link to StockStatus.php 23/11/11 Phil: UserSettings.php - now only checks password if != '' 22/11/11 Phil: StockCategories number_formatting of minumum and maximum values of stock category properties 22/11/11 Felix Lim: StockSerialItems.php closing quote typo. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |