From: <rc...@us...> - 2014-12-13 20:06:31
|
Revision: 7020 http://sourceforge.net/p/web-erp/reponame/7020 Author: rchacon Date: 2014-12-13 20:06:28 +0000 (Sat, 13 Dec 2014) Log Message: ----------- Minor changes: Add "%" next to the input fields for discount_rate and for tax_rate; improve Spanish translation. Modified Paths: -------------- trunk/Credit_Invoice.php trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2014-12-12 09:13:23 UTC (rev 7019) +++ trunk/Credit_Invoice.php 2014-12-13 20:06:28 UTC (rev 7020) @@ -357,11 +357,9 @@ $j++; echo '<td><input class="number" maxlength="12" name="Price_' . $LnItm->LineNumber . '" required="required" size="6" tabindex="'.$tabindex++.'" title="' . _('Enter the price at which to credit this item') . '" type="text" value="' . locale_number_format($LnItm->Price,$_SESSION['CreditItems' . $identifier]->CurrDecimalPlaces) . '" /></td> + <td><input class="number" maxlength="3" name="Discount_' . $LnItm->LineNumber . '" required="required" size="3" tabindex="'.$tabindex++.'" type="text" value="' . locale_number_format(($LnItm->DiscountPercent * 100),2) . '" />%</td> + <td class="number">' . $DisplayLineTotal . '</td>'; - - <td><input class="number" maxlength="3" name="Discount_' . $LnItm->LineNumber . '" required="required" size="3" tabindex="'.$tabindex++.'" title="Discount percent" type="text" value="' . locale_number_format(($LnItm->DiscountPercent * 100),2) . '" /></td> - <td class="number">' . $DisplayLineTotal . '</td>'; - /*Need to list the taxes applicable to this line */ echo '<td>'; $i=0; @@ -374,8 +372,8 @@ $i++; } } - echo '</td>'; - echo '<td class="number">'; + echo '</td> + <td class="number">'; } $i=0; // initialise the number of taxes iterated through @@ -386,7 +384,7 @@ echo '<br />'; } if(!isset($_POST['ProcessCredit'])) { - echo '<input class="number" maxlength="4" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" required="required" size="4" type="text" value="' . locale_number_format($Tax->TaxRate*100,2) . '" tabindex="'.$tabindex++.'" />'; + echo '<input class="number" maxlength="4" name="' . $LnItm->LineNumber . $Tax->TaxCalculationOrder . '_TaxRate" required="required" size="4" tabindex="'.$tabindex++.'" type="text" value="' . locale_number_format($Tax->TaxRate*100,2) . '" />%'; } $i++; if($Tax->TaxOnTax ==1) { @@ -413,7 +411,7 @@ </tr>'; echo '<tr class="'.$RowClass.'"> - <td colspan="13"><textarea tabindex="'.$tabindex++.'" name="Narrative_' . $LnItm->LineNumber . '" cols="100%" rows="1">' . $LnItm->Narrative . '</textarea> + <td colspan="13"><textarea name="Narrative_' . $LnItm->LineNumber . '" cols="100%" rows="1" tabindex="'.$tabindex++.'">' . $LnItm->Narrative . '</textarea> <br /> <hr /></td> </tr>'; @@ -432,7 +430,7 @@ <td></td> <td class="number" colspan="2">' . _('Credit Freight Cost') . '</td> <td><input class="number" maxlength="6" name="ChargeFreightCost" required="required" size="6" tabindex="'.$tabindex++.'" type="text" value="' . locale_number_format($_SESSION['CreditItems' . $identifier]->FreightCost,$_SESSION['CreditItems' . $identifier]->CurrDecimalPlaces) . '" /></td> - <td></td> + <td> </td> <td>'; $i=0; // initialise the number of taxes iterated through @@ -1618,4 +1616,4 @@ echo '</div>'; echo '</form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-12-12 09:13:23 UTC (rev 7019) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-12-13 20:06:28 UTC (rev 7020) @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: webERP 4.11.3\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-12-02 13:21-0600\n" -"PO-Revision-Date: 2014-12-05 20:28-0600\n" +"POT-Creation-Date: 2014-12-13 13:29-0600\n" +"PO-Revision-Date: 2014-12-13 13:57-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "Language: es_ES\n" @@ -452,7 +452,7 @@ #: BOMs.php:159 BankAccounts.php:242 COGSGLPostings.php:113 #: COGSGLPostings.php:217 ContractBOM.php:272 ContractOtherReqts.php:124 #: CounterReturns.php:740 CounterSales.php:836 CreditStatus.php:176 -#: Credit_Invoice.php:404 Currencies.php:365 CustItem.php:167 +#: Credit_Invoice.php:412 Currencies.php:365 CustItem.php:167 #: CustomerReceipt.php:989 CustomerTypes.php:206 Customers.php:1166 #: Departments.php:187 DiscountCategories.php:238 DiscountMatrix.php:183 #: EDIMessageFormat.php:151 FixedAssetCategories.php:191 FreightCosts.php:254 @@ -806,7 +806,7 @@ #: CustomerAllocations.php:378 CustomerInquiry.php:251 #: CustomerTransInquiry.php:106 GLAccountInquiry.php:174 #: GLAccountReport.php:343 GLTransInquiry.php:47 MRPCalendar.php:219 -#: PDFRemittanceAdvice.php:308 PaymentAllocations.php:66 +#: PDFRemittanceAdvice.php:308 PDFWOPrint.php:448 PaymentAllocations.php:66 #: PcAssignCashToTab.php:238 PcAuthorizeExpenses.php:93 PrintCustTrans.php:856 #: PrintCustTransPortrait.php:907 PrintWOItemSlip.php:187 #: PrintWOItemSlip.php:198 PrintWOItemSlip.php:209 ReverseGRN.php:396 @@ -1018,7 +1018,7 @@ #: AgedControlledInventory.php:91 ConfirmDispatch_Invoice.php:305 #: ConfirmDispatch_Invoice.php:309 CounterReturns.php:676 #: CounterReturns.php:756 CounterSales.php:759 CounterSales.php:853 -#: CounterSales.php:855 Credit_Invoice.php:298 Credit_Invoice.php:302 +#: CounterSales.php:855 Credit_Invoice.php:299 Credit_Invoice.php:303 #: CustomerAllocations.php:349 CustomerAllocations.php:379 #: CustomerInquiry.php:256 DeliveryDetails.php:881 DeliveryDetails.php:950 #: GLBalanceSheet.php:191 GLBalanceSheet.php:203 GLBalanceSheet.php:293 @@ -1172,7 +1172,7 @@ #: ConfirmDispatch_Invoice.php:172 ConfirmDispatch_Invoice.php:1001 #: ConfirmDispatch_Invoice.php:1015 Contracts.php:592 CounterReturns.php:1024 #: CounterReturns.php:1038 CounterSales.php:1425 CounterSales.php:1439 -#: Credit_Invoice.php:747 Credit_Invoice.php:768 CustItem.php:73 +#: Credit_Invoice.php:757 Credit_Invoice.php:778 CustItem.php:73 #: CustItem.php:86 CustItem.php:197 CustomerReceipt.php:574 #: CustomerReceipt.php:726 CustomerReceipt.php:754 CustomerTransInquiry.php:97 #: Dashboard.php:259 Dashboard.php:439 DeliveryDetails.php:409 @@ -1622,7 +1622,7 @@ #: Contracts.php:994 Contracts.php:1030 CounterReturns.php:669 #: CounterReturns.php:1692 CounterReturns.php:1791 CounterSales.php:749 #: CounterSales.php:2102 CounterSales.php:2256 CounterSales.php:2359 -#: Credit_Invoice.php:295 CustomerPurchases.php:82 DeliveryDetails.php:877 +#: Credit_Invoice.php:296 CustomerPurchases.php:82 DeliveryDetails.php:877 #: DeliveryDetails.php:947 GoodsReceived.php:102 GoodsReceived.php:106 #: GoodsReceived.php:109 InternalStockRequest.php:635 #: InternalStockRequestFulfill.php:321 InternalStockRequestFulfill.php:322 @@ -2077,7 +2077,7 @@ #: BOMInquiry.php:111 BOMs.php:916 ConfirmDispatch_Invoice.php:300 #: ContractBOM.php:355 CounterReturns.php:1687 CounterSales.php:2097 -#: CounterSales.php:2251 Credit_Invoice.php:294 GoodsReceived.php:103 +#: CounterSales.php:2251 Credit_Invoice.php:295 GoodsReceived.php:103 #: GoodsReceived.php:107 InternalStockRequest.php:561 #: InternalStockRequest.php:630 InternalStockRequestAuthorisation.php:106 #: InternalStockRequestFulfill.php:323 InventoryValuation.php:197 @@ -2387,7 +2387,7 @@ msgstr "El SQL usado para obtener la descripción de la pieza que usa ésta fue" #: BOMs.php:436 ConfirmDispatch_Invoice.php:1048 CounterReturns.php:1072 -#: CounterSales.php:1472 Credit_Invoice.php:803 Credit_Invoice.php:831 +#: CounterSales.php:1472 Credit_Invoice.php:813 Credit_Invoice.php:841 #: SelectCreditItems.php:1486 StockClone.php:834 StockClone.php:836 #: Stocks.php:1137 Stocks.php:1139 api/api_debtortransactions.php:753 #: api/api_salesorders.php:920 reportwriter/languages/en_US/reports.php:56 @@ -3115,8 +3115,8 @@ msgid "Ref" msgstr "Ref." -#: BankMatching.php:283 ConfirmDispatch_Invoice.php:308 Credit_Invoice.php:301 -#: CustWhereAlloc.php:115 CustomerAllocations.php:379 CustomerReceipt.php:966 +#: BankMatching.php:283 ConfirmDispatch_Invoice.php:308 CustWhereAlloc.php:115 +#: CustomerAllocations.php:379 CustomerReceipt.php:966 #: CustomerTransInquiry.php:113 GLJournalInquiry.php:85 #: ImportBankTransAnalysis.php:208 ImportBankTransAnalysis.php:281 #: PaymentAllocations.php:67 Payments.php:1059 Payments.php:1064 @@ -3739,7 +3739,7 @@ msgstr "" #: CompanyPreferences.php:468 ConfirmDispatch_Invoice.php:654 -#: ConfirmDispatch_Invoice.php:1700 Credit_Invoice.php:1600 CustItem.php:452 +#: ConfirmDispatch_Invoice.php:1700 Credit_Invoice.php:1609 CustItem.php:452 #: FixedAssetItems.php:127 FixedAssetItems.php:653 GLBudgets.php:240 #: GLTags.php:68 GoodsReceived.php:257 GoodsReceived.php:263 #: GoodsReceived.php:270 GoodsReceived.php:766 ImportBankTransAnalysis.php:154 @@ -3950,7 +3950,7 @@ #: ConfirmDispatch_Invoice.php:297 ContractBOM.php:241 ContractCosting.php:79 #: ContractCosting.php:85 Contracts.php:992 CounterReturns.php:667 #: CounterReturns.php:1790 CounterSales.php:747 CounterSales.php:2358 -#: Credit_Invoice.php:291 DeliveryDetails.php:875 GoodsReceived.php:100 +#: Credit_Invoice.php:292 DeliveryDetails.php:875 GoodsReceived.php:100 #: InternalStockRequest.php:271 Labels.php:575 Labels.php:577 Labels.php:619 #: OrderDetails.php:171 OutstandingGRNs.php:179 PDFPriceList.php:415 #: PDFPrintLabel.php:64 PO_Items.php:715 PO_OrderDetails.php:186 @@ -3978,7 +3978,7 @@ #: ConfirmDispatch_Invoice.php:298 ContractCosting.php:80 #: ContractCosting.php:86 Contracts.php:993 CounterReturns.php:668 -#: CounterSales.php:748 Credit_Invoice.php:292 DeliveryDetails.php:876 +#: CounterSales.php:748 Credit_Invoice.php:293 DeliveryDetails.php:876 #: DeliveryDetails.php:946 InternalStockRequest.php:158 #: InternalStockRequest.php:272 Labels.php:580 OrderDetails.php:172 #: PDFPriceList.php:419 PDFPrintLabel.php:65 PO_Items.php:792 @@ -4022,7 +4022,7 @@ msgstr "Esta nota de Entrega" #: ConfirmDispatch_Invoice.php:303 CounterReturns.php:671 CounterSales.php:752 -#: Credit_Invoice.php:296 CustomerPurchases.php:81 DeliveryDetails.php:879 +#: Credit_Invoice.php:297 CustomerPurchases.php:81 DeliveryDetails.php:879 #: DeliveryDetails.php:949 GoodsReceived.php:113 Labels.php:590 Labels.php:592 #: Labels.php:622 OffersReceived.php:110 OffersReceived.php:218 #: OffersReceived.php:278 OrderDetails.php:175 PDFOrdersInvoiced.php:378 @@ -4047,12 +4047,12 @@ msgstr "Precio" #: ConfirmDispatch_Invoice.php:304 CounterReturns.php:672 CounterSales.php:754 -#: Credit_Invoice.php:297 CustomerReceipt.php:967 DeliveryDetails.php:880 -#: OrderDetails.php:176 PrintCustTrans.php:899 PrintCustTrans.php:988 -#: PrintCustTrans.php:1037 PrintCustTransPortrait.php:952 -#: PrintCustTransPortrait.php:1050 PrintCustTransPortrait.php:1106 -#: PurchData.php:700 PurchData.php:701 RecurringSalesOrders.php:334 -#: SalesAnalReptCols.php:41 SalesAnalReptCols.php:43 SelectCreditItems.php:691 +#: CustomerReceipt.php:967 DeliveryDetails.php:880 OrderDetails.php:176 +#: PrintCustTrans.php:899 PrintCustTrans.php:988 PrintCustTrans.php:1037 +#: PrintCustTransPortrait.php:952 PrintCustTransPortrait.php:1050 +#: PrintCustTransPortrait.php:1106 PurchData.php:700 PurchData.php:701 +#: RecurringSalesOrders.php:334 SalesAnalReptCols.php:41 +#: SalesAnalReptCols.php:43 SelectCreditItems.php:691 #: SelectOrderItems.php:1296 StockLocMovements.php:97 StockMovements.php:105 #: StockStatus.php:332 includes/PDFQuotationPageHeader.inc:100 #: includes/PDFQuotationPortraitPageHeader.inc:97 @@ -4060,12 +4060,12 @@ msgid "Discount" msgstr "Descuento" -#: ConfirmDispatch_Invoice.php:305 Credit_Invoice.php:298 +#: ConfirmDispatch_Invoice.php:305 Credit_Invoice.php:299 #: SelectCreditItems.php:692 msgid "Excl Tax" msgstr "Sin impuesto" -#: ConfirmDispatch_Invoice.php:306 Credit_Invoice.php:299 +#: ConfirmDispatch_Invoice.php:306 Credit_Invoice.php:300 #: SelectCreditItems.php:693 SupplierInvoice.php:607 TaxAuthorities.php:146 #: TaxGroups.php:288 msgid "Tax Authority" @@ -4076,15 +4076,14 @@ msgstr "Impuestos %" #: ConfirmDispatch_Invoice.php:308 CounterReturns.php:675 CounterSales.php:758 -#: Credit_Invoice.php:300 Credit_Invoice.php:301 PrintCustTrans.php:423 -#: PrintCustTrans.php:1075 PrintCustTransPortrait.php:480 -#: PrintCustTransPortrait.php:1144 SelectCreditItems.php:694 -#: SelectCreditItems.php:695 Tax.php:249 Tax.php:414 +#: PrintCustTrans.php:423 PrintCustTrans.php:1075 +#: PrintCustTransPortrait.php:480 PrintCustTransPortrait.php:1144 +#: SelectCreditItems.php:694 SelectCreditItems.php:695 Tax.php:249 Tax.php:414 msgid "Tax" msgstr "Impuestos" #: ConfirmDispatch_Invoice.php:309 CounterReturns.php:676 CounterSales.php:759 -#: Credit_Invoice.php:302 SelectCreditItems.php:696 +#: Credit_Invoice.php:303 SelectCreditItems.php:696 msgid "Incl Tax" msgstr "Con impuesto" @@ -4219,12 +4218,12 @@ msgid "Please remedy this" msgstr "Por favor arreglar eso" -#: ConfirmDispatch_Invoice.php:681 Credit_Invoice.php:528 +#: ConfirmDispatch_Invoice.php:681 Credit_Invoice.php:538 #: GoodsReceived.php:282 msgid "The company information and preferences could not be retrieved" msgstr "No se pudo obtener la información de la compañía ni la configuración" -#: ConfirmDispatch_Invoice.php:681 Credit_Invoice.php:528 +#: ConfirmDispatch_Invoice.php:681 Credit_Invoice.php:538 #: GoodsReceived.php:282 msgid "see your system administrator" msgstr "consulte con el administrador del sistema" @@ -4336,14 +4335,14 @@ #: CounterSales.php:1570 CounterSales.php:1591 CounterSales.php:1756 #: CounterSales.php:1778 CounterSales.php:1803 CounterSales.php:1824 #: CounterSales.php:1850 CounterSales.php:1873 Credit_Invoice.php:208 -#: Credit_Invoice.php:587 Credit_Invoice.php:630 Credit_Invoice.php:647 -#: Credit_Invoice.php:663 Credit_Invoice.php:712 Credit_Invoice.php:725 -#: Credit_Invoice.php:837 Credit_Invoice.php:847 Credit_Invoice.php:922 -#: Credit_Invoice.php:937 Credit_Invoice.php:954 Credit_Invoice.php:964 -#: Credit_Invoice.php:979 Credit_Invoice.php:1022 Credit_Invoice.php:1062 -#: Credit_Invoice.php:1102 Credit_Invoice.php:1124 Credit_Invoice.php:1298 -#: Credit_Invoice.php:1338 Credit_Invoice.php:1365 Credit_Invoice.php:1386 -#: Credit_Invoice.php:1415 Credit_Invoice.php:1441 Credit_Invoice.php:1467 +#: Credit_Invoice.php:597 Credit_Invoice.php:640 Credit_Invoice.php:657 +#: Credit_Invoice.php:673 Credit_Invoice.php:722 Credit_Invoice.php:735 +#: Credit_Invoice.php:847 Credit_Invoice.php:857 Credit_Invoice.php:932 +#: Credit_Invoice.php:947 Credit_Invoice.php:964 Credit_Invoice.php:974 +#: Credit_Invoice.php:989 Credit_Invoice.php:1032 Credit_Invoice.php:1072 +#: Credit_Invoice.php:1112 Credit_Invoice.php:1134 Credit_Invoice.php:1308 +#: Credit_Invoice.php:1348 Credit_Invoice.php:1375 Credit_Invoice.php:1396 +#: Credit_Invoice.php:1425 Credit_Invoice.php:1451 Credit_Invoice.php:1477 #: GoodsReceived.php:301 GoodsReceived.php:409 GoodsReceived.php:450 #: GoodsReceived.php:480 GoodsReceived.php:508 GoodsReceived.php:539 #: GoodsReceived.php:557 GoodsReceived.php:586 GoodsReceived.php:603 @@ -4458,15 +4457,15 @@ #: CounterSales.php:1438 CounterSales.php:1478 CounterSales.php:1488 #: CounterSales.php:1570 CounterSales.php:1591 CounterSales.php:1756 #: CounterSales.php:1778 CounterSales.php:1803 CounterSales.php:1824 -#: CounterSales.php:1850 CounterSales.php:1873 Credit_Invoice.php:587 -#: Credit_Invoice.php:630 Credit_Invoice.php:647 Credit_Invoice.php:663 -#: Credit_Invoice.php:712 Credit_Invoice.php:725 Credit_Invoice.php:837 -#: Credit_Invoice.php:847 Credit_Invoice.php:922 Credit_Invoice.php:937 -#: Credit_Invoice.php:954 Credit_Invoice.php:964 Credit_Invoice.php:979 -#: Credit_Invoice.php:1022 Credit_Invoice.php:1062 Credit_Invoice.php:1102 -#: Credit_Invoice.php:1124 Credit_Invoice.php:1298 Credit_Invoice.php:1338 -#: Credit_Invoice.php:1365 Credit_Invoice.php:1386 Credit_Invoice.php:1415 -#: Credit_Invoice.php:1441 Credit_Invoice.php:1467 GoodsReceived.php:301 +#: CounterSales.php:1850 CounterSales.php:1873 Credit_Invoice.php:597 +#: Credit_Invoice.php:640 Credit_Invoice.php:657 Credit_Invoice.php:673 +#: Credit_Invoice.php:722 Credit_Invoice.php:735 Credit_Invoice.php:847 +#: Credit_Invoice.php:857 Credit_Invoice.php:932 Credit_Invoice.php:947 +#: Credit_Invoice.php:964 Credit_Invoice.php:974 Credit_Invoice.php:989 +#: Credit_Invoice.php:1032 Credit_Invoice.php:1072 Credit_Invoice.php:1112 +#: Credit_Invoice.php:1134 Credit_Invoice.php:1308 Credit_Invoice.php:1348 +#: Credit_Invoice.php:1375 Credit_Invoice.php:1396 Credit_Invoice.php:1425 +#: Credit_Invoice.php:1451 Credit_Invoice.php:1477 GoodsReceived.php:301 #: GoodsReceived.php:409 GoodsReceived.php:450 GoodsReceived.php:480 #: GoodsReceived.php:508 GoodsReceived.php:539 GoodsReceived.php:557 #: GoodsReceived.php:586 GoodsReceived.php:603 GoodsReceived.php:690 @@ -4575,7 +4574,7 @@ "Se usó el siguiente SQL para agregar el registro de transacción del deudor" #: ConfirmDispatch_Invoice.php:834 CounterReturns.php:967 -#: CounterSales.php:1368 Credit_Invoice.php:647 +#: CounterSales.php:1368 Credit_Invoice.php:657 #: RecurringSalesOrdersProcess.php:694 SelectCreditItems.php:1179 msgid "The debtor transaction taxes records could not be inserted because" msgstr "" @@ -4583,7 +4582,7 @@ "porque" #: ConfirmDispatch_Invoice.php:835 CounterReturns.php:968 -#: CounterSales.php:1369 Credit_Invoice.php:648 +#: CounterSales.php:1369 Credit_Invoice.php:658 #: RecurringSalesOrdersProcess.php:695 SelectCreditItems.php:1180 msgid "" "The following SQL to insert the debtor transaction taxes record was used" @@ -4602,7 +4601,7 @@ "No se pudo actualizar el registro de detalle de la orden de venta porque" #: ConfirmDispatch_Invoice.php:867 ConfirmDispatch_Invoice.php:944 -#: Credit_Invoice.php:713 RecurringSalesOrdersProcess.php:324 +#: Credit_Invoice.php:723 RecurringSalesOrdersProcess.php:324 msgid "The following SQL to update the sales order detail record was used" msgstr "" "Se usó el siguiente SQL para actualizar el registro detalle del pedido de " @@ -4637,12 +4636,12 @@ msgstr "No se pudo obtener las existencias de la ubicación actual" #: ConfirmDispatch_Invoice.php:982 CounterReturns.php:1004 -#: CounterSales.php:1405 Credit_Invoice.php:725 SelectCreditItems.php:1419 +#: CounterSales.php:1405 Credit_Invoice.php:735 SelectCreditItems.php:1419 msgid "Location stock record could not be updated because" msgstr "No se pudo actualizar el registro de Ubicación del almacén porque" #: ConfirmDispatch_Invoice.php:983 ContractCosting.php:338 -#: CounterReturns.php:1005 CounterSales.php:1406 Credit_Invoice.php:726 +#: CounterReturns.php:1005 CounterSales.php:1406 Credit_Invoice.php:736 #: GoodsReceived.php:509 ReverseGRN.php:221 SelectCreditItems.php:1420 #: StockTransfers.php:434 StockTransfers.php:443 SupplierInvoice.php:276 #: WorkOrderIssue.php:181 WorkOrderReceive.php:344 WorkOrderReceive.php:451 @@ -4651,13 +4650,13 @@ "Para actualizar el registro de Ubicación del almacén, se usó el SQL siguiente" #: ConfirmDispatch_Invoice.php:1000 CounterReturns.php:1023 -#: CounterSales.php:1424 Credit_Invoice.php:746 SelectCreditItems.php:1440 +#: CounterSales.php:1424 Credit_Invoice.php:756 SelectCreditItems.php:1440 msgid "Could not retrieve assembly components from the database for" msgstr "" "No se pudo recuperar los componentes del montaje de la base de datos para" #: ConfirmDispatch_Invoice.php:1000 CounterReturns.php:1023 -#: CounterSales.php:1424 Credit_Invoice.php:746 EDIMessageFormat.php:43 +#: CounterSales.php:1424 Credit_Invoice.php:756 EDIMessageFormat.php:43 #: EDISendInvoices.php:105 EDISendInvoices_Reece.php:185 #: FixedAssetCategories.php:94 FixedAssetCategories.php:113 #: PricesBasedOnMarkUp.php:340 PricesBasedOnMarkUp.php:356 @@ -4691,13 +4690,13 @@ msgstr "Pedidos" #: ConfirmDispatch_Invoice.php:1054 CounterReturns.php:1078 -#: CounterSales.php:1478 Credit_Invoice.php:837 SelectCreditItems.php:1493 +#: CounterSales.php:1478 Credit_Invoice.php:847 SelectCreditItems.php:1493 msgid "Stock movement records for the assembly components of" msgstr "" "Registro de movimientos de inventario para los componentes del montaje de" #: ConfirmDispatch_Invoice.php:1054 CounterReturns.php:1078 -#: CounterSales.php:1478 Credit_Invoice.php:837 SelectCreditItems.php:1493 +#: CounterSales.php:1478 Credit_Invoice.php:847 SelectCreditItems.php:1493 #: ShipmentCosting.php:397 SupplierAllocations.php:139 #: includes/PDFPaymentRun_PymtFooter.php:57 #: includes/PDFPaymentRun_PymtFooter.php:88 @@ -4709,7 +4708,7 @@ msgstr "no se pudo agregar porque" #: ConfirmDispatch_Invoice.php:1055 CounterReturns.php:1079 -#: CounterSales.php:1479 Credit_Invoice.php:838 SelectCreditItems.php:1494 +#: CounterSales.php:1479 Credit_Invoice.php:848 SelectCreditItems.php:1494 msgid "" "The following SQL to insert the assembly components stock movement records " "was used" @@ -4718,7 +4717,7 @@ "existencias de componentes de ensamblados" #: ConfirmDispatch_Invoice.php:1064 CounterReturns.php:1088 -#: CounterSales.php:1488 Credit_Invoice.php:847 SelectCreditItems.php:1503 +#: CounterSales.php:1488 Credit_Invoice.php:857 SelectCreditItems.php:1503 msgid "" "Location stock record could not be updated for an assembly component because" msgstr "" @@ -4735,16 +4734,16 @@ "ubicaciones del componente" #: ConfirmDispatch_Invoice.php:1148 CounterReturns.php:1168 -#: CounterSales.php:1570 Credit_Invoice.php:922 Credit_Invoice.php:1022 -#: Credit_Invoice.php:1062 Credit_Invoice.php:1102 +#: CounterSales.php:1570 Credit_Invoice.php:932 Credit_Invoice.php:1032 +#: Credit_Invoice.php:1072 Credit_Invoice.php:1112 #: RecurringSalesOrdersProcess.php:363 ReverseGRN.php:249 #: SelectCreditItems.php:1246 SelectCreditItems.php:1317 msgid "Stock movement records could not be inserted because" msgstr "No se pudo agregar los registros de movimiento de existencias porque" #: ConfirmDispatch_Invoice.php:1149 ContractCosting.php:367 -#: CounterReturns.php:1169 CounterSales.php:1571 Credit_Invoice.php:923 -#: Credit_Invoice.php:1023 Credit_Invoice.php:1063 GoodsReceived.php:540 +#: CounterReturns.php:1169 CounterSales.php:1571 Credit_Invoice.php:933 +#: Credit_Invoice.php:1033 Credit_Invoice.php:1073 GoodsReceived.php:540 #: RecurringSalesOrdersProcess.php:364 ReverseGRN.php:250 #: SelectCreditItems.php:1318 SupplierInvoice.php:307 WorkOrderIssue.php:212 #: WorkOrderReceive.php:373 WorkOrderReceive.php:481 @@ -4763,7 +4762,7 @@ "de la factura porque" #: ConfirmDispatch_Invoice.php:1170 CounterReturns.php:1190 -#: CounterSales.php:1592 Credit_Invoice.php:1125 +#: CounterSales.php:1592 Credit_Invoice.php:1135 #: RecurringSalesOrdersProcess.php:385 SelectCreditItems.php:1339 msgid "" "The following SQL to insert the stock movement tax detail records was used" @@ -4771,16 +4770,16 @@ "Se usó el siguiente SQL para agregar los registros de detalle de impuestos " "de movimiento de existencias" -#: ConfirmDispatch_Invoice.php:1186 Credit_Invoice.php:954 -#: Credit_Invoice.php:964 SelectCreditItems.php:1383 StockAdjustments.php:265 +#: ConfirmDispatch_Invoice.php:1186 Credit_Invoice.php:964 +#: Credit_Invoice.php:974 SelectCreditItems.php:1383 StockAdjustments.php:265 #: StockAdjustments.php:283 StockLocTransferReceive.php:141 #: StockTransfers.php:274 StockTransfers.php:387 msgid "The serial stock item record could not be updated because" msgstr "" "No se pudo actualizar el registro del artículo de existencias seriado porque" -#: ConfirmDispatch_Invoice.php:1187 Credit_Invoice.php:955 -#: Credit_Invoice.php:965 SelectCreditItems.php:1384 +#: ConfirmDispatch_Invoice.php:1187 Credit_Invoice.php:965 +#: Credit_Invoice.php:975 SelectCreditItems.php:1384 #: SelectCreditItems.php:1608 StockAdjustments.php:266 #: StockAdjustments.php:284 StockLocTransferReceive.php:142 #: StockLocTransferReceive.php:156 StockLocTransferReceive.php:256 @@ -4791,7 +4790,7 @@ "Se usó el siguiente SQL para actualizar el registro del artículo de " "existencias seriado" -#: ConfirmDispatch_Invoice.php:1201 Credit_Invoice.php:979 +#: ConfirmDispatch_Invoice.php:1201 Credit_Invoice.php:989 #: GoodsReceived.php:603 SelectCreditItems.php:1398 StockAdjustments.php:299 #: StockLocTransferReceive.php:174 StockLocTransferReceive.php:286 #: StockTransfers.php:310 StockTransfers.php:421 WorkOrderIssue.php:248 @@ -4800,7 +4799,7 @@ msgstr "" "No se pudo agregar el registro de movimiento de existencias seriadas porque" -#: ConfirmDispatch_Invoice.php:1202 Credit_Invoice.php:980 +#: ConfirmDispatch_Invoice.php:1202 Credit_Invoice.php:990 #: GoodsReceived.php:604 StockAdjustments.php:300 #: StockLocTransferReceive.php:175 StockLocTransferReceive.php:287 #: StockTransfers.php:311 StockTransfers.php:422 WorkOrderIssue.php:249 @@ -4819,7 +4818,7 @@ "Ventas porque" #: ConfirmDispatch_Invoice.php:1247 CounterReturns.php:1235 -#: CounterSales.php:1674 Credit_Invoice.php:1156 +#: CounterSales.php:1674 Credit_Invoice.php:1166 #: RecurringSalesOrdersProcess.php:424 SelectCreditItems.php:1666 #: api/api_salesorders.php:1027 msgid "SQL to count the no of sales analysis records" @@ -4832,14 +4831,14 @@ "No se pudo agregar ó actualizar el registro de análisis de ventas porque" #: ConfirmDispatch_Invoice.php:1303 CounterReturns.php:1293 -#: CounterSales.php:1732 Credit_Invoice.php:1268 +#: CounterSales.php:1732 Credit_Invoice.php:1278 #: RecurringSalesOrdersProcess.php:483 SelectCreditItems.php:1776 msgid "The following SQL to insert the sales analysis record was used" msgstr "" "Se usó el siguiente SQL para agregar el registro del análisis de ventas" #: ConfirmDispatch_Invoice.php:1328 CounterReturns.php:1317 -#: CounterSales.php:1756 Credit_Invoice.php:1298 +#: CounterSales.php:1756 Credit_Invoice.php:1308 msgid "The cost of sales GL posting could not be inserted because" msgstr "No se pudo agregar el registro contable de costo de ventas porque" @@ -4852,9 +4851,9 @@ #: CounterReturns.php:1340 CounterReturns.php:1365 CounterReturns.php:1386 #: CounterReturns.php:1435 CounterSales.php:1757 CounterSales.php:1779 #: CounterSales.php:1804 CounterSales.php:1825 CounterSales.php:1874 -#: Credit_Invoice.php:1299 Credit_Invoice.php:1339 Credit_Invoice.php:1366 -#: Credit_Invoice.php:1387 Credit_Invoice.php:1416 Credit_Invoice.php:1442 -#: Credit_Invoice.php:1468 RecurringSalesOrdersProcess.php:511 +#: Credit_Invoice.php:1309 Credit_Invoice.php:1349 Credit_Invoice.php:1376 +#: Credit_Invoice.php:1397 Credit_Invoice.php:1426 Credit_Invoice.php:1452 +#: Credit_Invoice.php:1478 RecurringSalesOrdersProcess.php:511 #: RecurringSalesOrdersProcess.php:538 RecurringSalesOrdersProcess.php:631 #: SelectCreditItems.php:1810 SelectCreditItems.php:1836 #: SelectCreditItems.php:1859 SelectCreditItems.php:1890 @@ -4982,7 +4981,7 @@ msgstr "No se pudo agregar el registro contable de transporte porque" #: ConfirmDispatch_Invoice.php:1625 CounterReturns.php:1434 -#: CounterSales.php:1873 Credit_Invoice.php:1467 +#: CounterSales.php:1873 Credit_Invoice.php:1477 #: RecurringSalesOrdersProcess.php:577 SelectCreditItems.php:1981 msgid "The tax GL posting could not be inserted because" msgstr "No se pudo agregar el registro contable de impuestos porque" @@ -6527,7 +6526,7 @@ msgid "Contact Email" msgstr "Correo electrónico del contacto" -#: CounterReturns.php:787 CounterSales.php:884 Credit_Invoice.php:1572 +#: CounterReturns.php:787 CounterSales.php:884 Credit_Invoice.php:1582 #: DeliveryDetails.php:1117 SelectCreditItems.php:924 msgid "Sales person" msgstr "Vendedor" @@ -6646,12 +6645,12 @@ "No se puede insertar la asignación de clientes de la recepción de la factura " "porque" -#: CounterReturns.php:1596 Credit_Invoice.php:1483 SelectCreditItems.php:1996 +#: CounterReturns.php:1596 Credit_Invoice.php:1493 SelectCreditItems.php:1996 msgid "Credit Note number" msgstr "abono No." -#: CounterReturns.php:1601 CounterReturns.php:1603 Credit_Invoice.php:1485 -#: Credit_Invoice.php:1487 +#: CounterReturns.php:1601 CounterReturns.php:1603 Credit_Invoice.php:1495 +#: Credit_Invoice.php:1497 msgid "Print this credit note" msgstr "Imprimir esta nota de crédito" @@ -7343,54 +7342,69 @@ msgid "Credit Note amounts stated in" msgstr "Importes de notas de Crédito que constan en" -#: Credit_Invoice.php:293 PDFOrderStatus.php:339 PDFOrdersInvoiced.php:337 +#: Credit_Invoice.php:294 PDFOrderStatus.php:339 PDFOrdersInvoiced.php:337 #: ReverseGRN.php:398 SalesInquiry.php:854 ShipmentCosting.php:149 #: ShipmentCosting.php:151 Shipments.php:404 msgid "Invoiced" msgstr "Facturado" -#: Credit_Invoice.php:295 GLAccountInquiry.php:176 GLAccountReport.php:345 +#: Credit_Invoice.php:296 GLAccountInquiry.php:176 GLAccountReport.php:345 #: GLJournal.php:361 GLJournal.php:390 GLJournal.php:444 #: SuppCreditGRNs.php:294 msgid "Credit" msgstr "Haber" -#: Credit_Invoice.php:345 +#: Credit_Invoice.php:298 DiscountMatrix.php:136 DiscountMatrix.php:164 +msgid "Discount Rate" +msgstr "Tasa de descuento" + +#: Credit_Invoice.php:301 TaxAuthorityRates.php:83 +msgid "Tax Rate" +msgstr "Tasa impositiva" + +#: Credit_Invoice.php:302 includes/PDFCustTransListingPageHeader.inc:52 +#: includes/PDFQuotationPageHeader.inc:105 +#: includes/PDFQuotationPortraitPageHeader.inc:99 +#: includes/PDFSuppTransListingPageHeader.inc:52 +msgid "Tax Amount" +msgstr "Impuestos" + +#: Credit_Invoice.php:352 msgid "Enter the quantity of this item to credit" msgstr "" -#: Credit_Invoice.php:352 +#: Credit_Invoice.php:359 msgid "Enter the price at which to credit this item" -msgstr "" +msgstr "Introduzca el precio al cual acreditar este artículo" -#: Credit_Invoice.php:404 +#: Credit_Invoice.php:412 msgid "Are you sure you wish to delete this item from the credit?" msgstr "¿Está seguro de que quiere borrar este artículo del crédito?" -#: Credit_Invoice.php:422 +#: Credit_Invoice.php:430 msgid "Freight cost charged on invoice" msgstr "Costo de flete cargado en la factura" -#: Credit_Invoice.php:425 +#: Credit_Invoice.php:433 msgid "Credit Freight Cost" msgstr "Costo transporte credito" -#: Credit_Invoice.php:472 SelectCreditItems.php:843 +#: Credit_Invoice.php:481 SelectCreditItems.php:843 msgid "Credit Totals" msgstr "Total Créditos" -#: Credit_Invoice.php:491 +#: Credit_Invoice.php:501 msgid "" "Failed to retrieve salesoderdetails to compare if the order has been " "invoiced and that it is possible that the credit note may not already have " "been done" msgstr "" -#: Credit_Invoice.php:495 +#: Credit_Invoice.php:505 msgid "The credit quantity for the line for" msgstr "" -#: Credit_Invoice.php:506 SelectCreditItems.php:952 +#: Credit_Invoice.php:516 SelectCreditItems.php:952 msgid "" "The GL code to write off the credit value to must be specified. Please " "select the appropriate GL code for the selection box" @@ -7398,7 +7412,7 @@ "Debe indicar el código de la cuenta a la que apuntar el valor del crédito. " "Seleccione el código de cuenta apropiado." -#: Credit_Invoice.php:587 +#: Credit_Invoice.php:597 msgid "" "The alteration to the invoice record to reflect the allocation of the credit " "note to the invoice could not be done because" @@ -7406,11 +7420,11 @@ "La modificación del registro de la factura para reflejar la asignación de la " "nota de crédito a la factura no se pudo hacer, porque" -#: Credit_Invoice.php:588 +#: Credit_Invoice.php:598 msgid "The following SQL to update the invoice allocation was used" msgstr "Se usó el siguiente SQL para actualizar la asignación de la factura" -#: Credit_Invoice.php:630 SelectCreditItems.php:1162 +#: Credit_Invoice.php:640 SelectCreditItems.php:1162 msgid "" "The customer credit note transaction could not be added to the database " "because" @@ -7418,12 +7432,12 @@ "No se pudo agregar la transacción de nota de crédito del cliente a la base " "de datos porque" -#: Credit_Invoice.php:631 SelectCreditItems.php:1101 +#: Credit_Invoice.php:641 SelectCreditItems.php:1101 #: SelectCreditItems.php:1163 msgid "The following SQL to insert the customer credit note was used" msgstr "Se usó el siguiente SQL para agregar la nota de crédito del cliente" -#: Credit_Invoice.php:663 +#: Credit_Invoice.php:673 msgid "" "The allocation record for the credit note could not be added to the database " "because" @@ -7431,7 +7445,7 @@ "No se pudo agregar el registro de asignación para la nota de crédito a la " "base de datos porque" -#: Credit_Invoice.php:664 +#: Credit_Invoice.php:674 msgid "" "The following SQL to insert the allocation record for the credit note was " "used" @@ -7439,7 +7453,7 @@ "Se usó el siguiente SQL para agregar el registro de asignación para la nota " "de crédito" -#: Credit_Invoice.php:712 +#: Credit_Invoice.php:722 msgid "" "The sales order detail record could not be updated for the reduced quantity " "invoiced because" @@ -7447,40 +7461,40 @@ "El registro de detalle del pedido de ventas no se pudo actualizar para la " "cantidad reducida facturada, porque" -#: Credit_Invoice.php:768 +#: Credit_Invoice.php:778 msgid "Could not get the current location stock of the assembly component" msgstr "" "No se pudo obtener la existencia de la ubicación actual del componente del " "ensamblaje" -#: Credit_Invoice.php:803 Credit_Invoice.php:831 Credit_Invoice.php:884 -#: Credit_Invoice.php:915 Credit_Invoice.php:1015 Credit_Invoice.php:1093 +#: Credit_Invoice.php:813 Credit_Invoice.php:841 Credit_Invoice.php:894 +#: Credit_Invoice.php:925 Credit_Invoice.php:1025 Credit_Invoice.php:1103 msgid "Ex Inv" msgstr "Ex Inv" -#: Credit_Invoice.php:848 +#: Credit_Invoice.php:858 msgid "" "The following SQL to update the components location stock record was used" msgstr "" "Se usó el siguiente SQL para actualizar el registro de existencias de la " "ubicación de los componentes" -#: Credit_Invoice.php:937 +#: Credit_Invoice.php:947 msgid "The serial stock item record could not be selected because" msgstr "" "No se pudo seleccionar el registro del artículo de existencias seriado porque" -#: Credit_Invoice.php:938 +#: Credit_Invoice.php:948 msgid "The following SQL to select the serial stock item record was used" msgstr "" "Se usó el siguiente SQL para seleccionar el registro del artículo de " "existencias seriado" -#: Credit_Invoice.php:1054 +#: Credit_Invoice.php:1064 msgid "Written off ex Inv" msgstr "Escrito ex Inv" -#: Credit_Invoice.php:1103 SelectCreditItems.php:1247 +#: Credit_Invoice.php:1113 SelectCreditItems.php:1247 msgid "" "The following SQL to insert the stock movement records for the purpose of " "display on the credit note was used" @@ -7488,7 +7502,7 @@ "Se usó el siguiente SQL para agregar los registros de movimiento de " "existencias con el propósito de mostrarlos en la nota de crédito" -#: Credit_Invoice.php:1124 SelectCreditItems.php:1338 +#: Credit_Invoice.php:1134 SelectCreditItems.php:1338 msgid "" "Taxes and rates applicable to this credit note line item could not be " "inserted because" @@ -7496,21 +7510,21 @@ "No se pudo agregar los Impuestos y Tasas aplicables a esta fila de la nota " "de crédito porque" -#: Credit_Invoice.php:1155 SelectCreditItems.php:1665 +#: Credit_Invoice.php:1165 SelectCreditItems.php:1665 msgid "" "The count to check for existing Sales analysis records could not run because" msgstr "" "No se pudo procesar el cómputo para comprobar registros existentes de " "análisis de Ventas porque" -#: Credit_Invoice.php:1267 SelectCreditItems.php:1775 +#: Credit_Invoice.php:1277 SelectCreditItems.php:1775 msgid "" "The sales analysis record for this credit note could not be added because" msgstr "" "No se pudo agregar el registro de análisis de ventas de esta nota de crédito " "porque" -#: Credit_Invoice.php:1338 +#: Credit_Invoice.php:1348 msgid "" "The stock side or write off of the cost of sales GL posting could not be " "inserted because" @@ -7518,67 +7532,67 @@ "No se pudo agregar el registro contable del costo de ventas por la parte de " "existencias o su propio registro porque" -#: Credit_Invoice.php:1365 SelectCreditItems.php:1889 +#: Credit_Invoice.php:1375 SelectCreditItems.php:1889 msgid "The credit note GL posting could not be inserted because" msgstr "No se pudo agregar el registro contable de la nota de crédito porque" -#: Credit_Invoice.php:1386 SelectCreditItems.php:1912 +#: Credit_Invoice.php:1396 SelectCreditItems.php:1912 msgid "The credit note discount GL posting could not be inserted because" msgstr "" "No se pudo agregar el registro contable del descuento de la nota de crédito " "porque" -#: Credit_Invoice.php:1415 SelectCreditItems.php:1940 +#: Credit_Invoice.php:1425 SelectCreditItems.php:1940 msgid "" "The total debtor GL posting for the credit note could not be inserted because" msgstr "" "No se pudo agregar el registro contable de total deudor de la nota de " "crédito porque" -#: Credit_Invoice.php:1441 SelectCreditItems.php:1960 +#: Credit_Invoice.php:1451 SelectCreditItems.php:1960 msgid "" "The freight GL posting for this credit note could not be inserted because" msgstr "" "No se pudo agregar el registro contable de transporte de la nota de crédito " "porque" -#: Credit_Invoice.php:1483 GoodsReceived.php:741 SupplierCredit.php:1329 +#: Credit_Invoice.php:1493 GoodsReceived.php:741 SupplierCredit.php:1329 #: SupplierInvoice.php:1881 WorkOrderIssue.php:374 WorkOrderReceive.php:736 #: Z_BottomUpCosts.php:33 msgid "has been processed" msgstr "ha sido procesada" -#: Credit_Invoice.php:1498 SelectCreditItems.php:856 +#: Credit_Invoice.php:1508 SelectCreditItems.php:856 msgid "Credit Note Type" msgstr "Tipo de Abono" -#: Credit_Invoice.php:1502 Credit_Invoice.php:1507 Credit_Invoice.php:1511 +#: Credit_Invoice.php:1512 Credit_Invoice.php:1517 Credit_Invoice.php:1521 #: SelectCreditItems.php:860 SelectCreditItems.php:865 msgid "Goods returned to store" msgstr "Productos devueltos al almacén" -#: Credit_Invoice.php:1503 Credit_Invoice.php:1506 Credit_Invoice.php:1510 +#: Credit_Invoice.php:1513 Credit_Invoice.php:1516 Credit_Invoice.php:1520 #: SelectCreditItems.php:861 SelectCreditItems.php:864 msgid "Goods written off" msgstr "Productos anulados" -#: Credit_Invoice.php:1504 Credit_Invoice.php:1508 Credit_Invoice.php:1512 +#: Credit_Invoice.php:1514 Credit_Invoice.php:1518 Credit_Invoice.php:1522 msgid "Reverse overcharge" msgstr "Sobrecarga Inversa" -#: Credit_Invoice.php:1523 +#: Credit_Invoice.php:1533 msgid "Goods returned to location" msgstr "Productos devueltos a ubicación" -#: Credit_Invoice.php:1546 SelectCreditItems.php:902 +#: Credit_Invoice.php:1556 SelectCreditItems.php:902 msgid "Write off the cost of the goods to" msgstr "Cancelar el costo de los productos para" -#: Credit_Invoice.php:1594 +#: Credit_Invoice.php:1603 msgid "Credit note text" msgstr "Texto de la nota de crédito" -#: Credit_Invoice.php:1606 +#: Credit_Invoice.php:1615 msgid "Process Credit" msgstr "Procesar crédito" @@ -9670,7 +9684,7 @@ #: CustomerReceipt.php:1039 msgid "Customer Transaction Inquiry" -msgstr "" +msgstr "Consulta de transacción del cliente" #: CustomerReceipt.php:1048 SelectGLAccount.php:116 SelectGLAccount.php:131 #, php-format @@ -9709,7 +9723,7 @@ #: CustomerReceipt.php:1153 msgid "Payee Bank Details" -msgstr "Detalles del Pago Bancario" +msgstr "Detalles del banco del beneficiario" #: CustomerReceipt.php:1174 msgid "Select a Customer" @@ -9739,7 +9753,7 @@ #: CustomerReceipt.php:1183 msgid "Customer invoice number" -msgstr "El Nº de Factura del cliente" +msgstr "Número de factura del cliente" #: CustomerReceipt.php:1192 msgid "Enter A GL Receipt" @@ -9751,7 +9765,7 @@ #: CustomerTransInquiry.php:6 msgid "Customer Transactions Inquiry" -msgstr "Consultar Transacciones de cliente" +msgstr "Consultar transacciones del cliente" #: CustomerTransInquiry.php:14 msgid "Transaction Inquiry" @@ -9799,7 +9813,7 @@ #: CustomerTransInquiry.php:64 DailyBankTransactions.php:68 #: SupplierTransInquiry.php:59 msgid "Show Transactions" -msgstr "Mostrar Transacciones" +msgstr "Mostrar transacciones" #: CustomerTransInquiry.php:165 #, php-format @@ -10368,7 +10382,7 @@ #: DailySalesInquiry.php:6 includes/MainMenuLinksArray.php:56 msgid "Daily Sales Inquiry" -msgstr "Consultar ventas diarias" +msgstr "Consulta de ventas diarias" #: DailySalesInquiry.php:9 msgid "Daily Sales" @@ -11302,10 +11316,6 @@ msgid "Quantity Break" msgstr "Cantidad Tope" -#: DiscountMatrix.php:136 DiscountMatrix.php:164 -msgid "Discount Rate" -msgstr "Tasa de descuento" - #: DiscountMatrix.php:137 msgid "" "The discount to apply to orders where the quantity exceeds the specified " @@ -18922,7 +18932,7 @@ #: PDFOrderStatus.php:23 PDFOrderStatus.php:30 PDFOrderStatus.php:91 #: includes/MainMenuLinksArray.php:54 msgid "Order Status Report" -msgstr "Informe de Estado de Pedidos" +msgstr "Informe de estado de pedidos" #: PDFOrderStatus.php:37 PDFOrdersInvoiced.php:41 msgid "Enter the date from which orders are to be listed" @@ -19443,13 +19453,9 @@ "There were no remittance advices to print out for the supplier range and " "payment date specified" -#: PDFRemittanceAdvice.php:47 -msgid "Remmitance Advice" -msgstr "Aviso de Remesa" - -#: PDFRemittanceAdvice.php:48 PDFRemittanceAdvice.php:213 PrintCheque.php:78 -#: PrintCheque.php:92 Suppliers.php:832 Suppliers.php:1078 -#: includes/PDFStatementPageHeader.inc:27 +#: PDFRemittanceAdvice.php:47 PDFRemittanceAdvice.php:48 +#: PDFRemittanceAdvice.php:213 PrintCheque.php:78 PrintCheque.php:92 +#: Suppliers.php:832 Suppliers.php:1078 includes/PDFStatementPageHeader.inc:27 msgid "Remittance Advice" msgstr "Aviso de remesa" @@ -19802,10 +19808,6 @@ msgid "Unable to Locate Work Order Number" msgstr "" -#: PDFWOPrint.php:448 -msgid "Date : " -msgstr "Fecha :" - #: PDFWOPrint.php:449 msgid "Signed for: " msgstr "" @@ -26232,7 +26234,7 @@ #: SalesTopItemsInquiry.php:9 includes/MainMenuLinksArray.php:63 msgid "Top Sales Items Inquiry" -msgstr "Consulta de Artículos Más Vendidos" +msgstr "Consulta de artículos más vendidos" #: SalesTypes.php:5 includes/MainMenuLinksArray.php:479 msgid "Sales Types" @@ -35077,7 +35079,7 @@ #: SystemParameters.php:625 msgid "Create Supplier Codes Automatically" -msgstr "" +msgstr "Crear automáticamente códigos de proveedor" #: SystemParameters.php:636 msgid "" @@ -36083,10 +36085,6 @@ msgid "Deliveries From" msgstr "Entregas Desde" -#: TaxAuthorityRates.php:83 -msgid "Tax Rate" -msgstr "Tasa impositiva" - #: TaxAuthorityRates.php:97 #, php-format msgid "Input must be numeric" @@ -36626,7 +36624,7 @@ #: UnitsOfMeasure.php:236 msgid "More than one character" -msgstr "" +msgstr "Más de un caracter" #: UpgradeDatabase.php:7 msgid "Upgrade webERP Database" @@ -38380,7 +38378,7 @@ #: WorkOrderReceive.php:990 includes/PDFWOPageHeader.inc:47 msgid "Received Qty" -msgstr "" +msgstr "Cantidad recibida" #: WorkOrderStatus.php:5 msgid "Work Order Status Inquiry" @@ -40460,7 +40458,7 @@ #: Z_ImportGLTransactions.php:242 msgid "Select Currency" -msgstr "" +msgstr "Seleccionar moneda" #: Z_ImportPartCodes.php:6 msgid "Import Stock Items" @@ -44725,13 +44723,6 @@ msgid "Net Amount" msgstr "Importe Neto" -#: includes/PDFCustTransListingPageHeader.inc:52 -#: includes/PDFQuotationPageHeader.inc:105 -#: includes/PDFQuotationPortraitPageHeader.inc:99 -#: includes/PDFSuppTransListingPageHeader.inc:52 -msgid "Tax Amount" -msgstr "Impuestos" - #: includes/PDFCustTransListingPageHeader.inc:53 #: includes/PDFSuppTransListingPageHeader.inc:53 msgid "Total Amount" @@ -50932,6 +50923,12 @@ msgid "Bank Transfer" msgstr "Transferencia bancaria" +#~ msgid "Remmitance Advice" +#~ msgstr "Aviso de Remesa" + +#~ msgid "Date : " +#~ msgstr "Fecha :" + #~ msgid "The config value NumberOfMonthMustBeShown cannot be retrieved" #~ msgstr "" #~ "El valor de configuración NumberOfMonthMustBeShown no se puede obtener" |
From: <te...@us...> - 2014-12-14 02:04:48
|
Revision: 7021 http://sourceforge.net/p/web-erp/reponame/7021 Author: tehonu Date: 2014-12-14 02:04:44 +0000 (Sun, 14 Dec 2014) Log Message: ----------- Added userid field in stockmoves table. It contains the $_SESSION['UserID'] of the user creating the stock movement Modified StockMovements.php to show the UserID Modified INSERT INTO stockmoves sentences in files: ConfirmDispatch_Invoice.php ContractCosting.php CounterReturns.php CounterSales.php Credit_Invoice.php GoodsReceived.php InternalStockRequestFulfill.php PDFStockCheckComparison.php RecurringSalesOrdersProcess.php ReverseGRN.php SelectCreditItems.php StockAdjustments.php StockLocTransferReceive.php StockTransfers.php SupplierInvoice.php WorkOrderIssue.php WorkOrderReceive.php Modified Paths: -------------- trunk/ConfirmDispatch_Invoice.php trunk/ContractCosting.php trunk/CounterReturns.php trunk/CounterSales.php trunk/Credit_Invoice.php trunk/GoodsReceived.php trunk/InternalStockRequestFulfill.php trunk/PDFStockCheckComparison.php trunk/RecurringSalesOrdersProcess.php trunk/ReverseGRN.php trunk/SelectCreditItems.php trunk/StockAdjustments.php trunk/StockLocTransferReceive.php trunk/StockMovements.php trunk/StockTransfers.php trunk/SupplierInvoice.php trunk/WorkOrderIssue.php trunk/WorkOrderReceive.php trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/ConfirmDispatch_Invoice.php =================================================================== --- trunk/ConfirmDispatch_Invoice.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/ConfirmDispatch_Invoice.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -1029,6 +1029,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, prd, @@ -1042,6 +1043,7 @@ '" . $InvoiceNo . "', '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $PeriodNo . "', @@ -1084,6 +1086,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1099,6 +1102,7 @@ '" . $InvoiceNo . "', '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1119,6 +1123,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1133,6 +1138,7 @@ '" . $InvoiceNo . "', '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', Modified: trunk/ContractCosting.php =================================================================== --- trunk/ContractCosting.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/ContractCosting.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -345,6 +345,7 @@ transno, loccode, trandate, + userid, price, prd, reference, @@ -356,6 +357,7 @@ '" . $WOReceiptNo . "', '" . $_SESSION['Contract'.$identifier]->LocCode . "', '" . Date('Y-m-d') . "', + '" . $_SESSION['UserID'] . "', '" . ($OtherReqtsBudget+$ContractBOMBudget) . "', '" . $PeriodNo . "', '" . $_SESSION['Contract'.$identifier]->WO . "', Modified: trunk/CounterReturns.php =================================================================== --- trunk/CounterReturns.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/CounterReturns.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -1052,6 +1052,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, prd, @@ -1066,6 +1067,7 @@ '" . $CreditNoteNo . "', '" . $_SESSION['Items' . $identifier]->Location . "', '" . $ReturnDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['Items' . $identifier]->DebtorNo . "', '" . $_SESSION['Items' . $identifier]->Branch . "', '" . $PeriodNo . "', @@ -1107,6 +1109,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1122,6 +1125,7 @@ '" . $CreditNoteNo . "', '" . $_SESSION['Items' . $identifier]->Location . "', '" . $ReturnDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['Items' . $identifier]->DebtorNo . "', '" . $_SESSION['Items' . $identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1142,6 +1146,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1155,6 +1160,7 @@ '" . $CreditNoteNo . "', '" . $_SESSION['Items' . $identifier]->Location . "', '" . $ReturnDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['Items' . $identifier]->DebtorNo . "', '" . $_SESSION['Items' . $identifier]->Branch . "', '" . $LocalCurrencyPrice . "', Modified: trunk/CounterSales.php =================================================================== --- trunk/CounterSales.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/CounterSales.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -1453,6 +1453,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, prd, @@ -1466,6 +1467,7 @@ '" . $InvoiceNo . "', '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $PeriodNo . "', @@ -1507,6 +1509,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1522,6 +1525,7 @@ '" . $InvoiceNo . "', '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1542,6 +1546,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1556,6 +1561,7 @@ '" . $InvoiceNo . "', '" . $_SESSION['Items'.$identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['Items'.$identifier]->DebtorNo . "', '" . $_SESSION['Items'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', Modified: trunk/Credit_Invoice.php =================================================================== --- trunk/Credit_Invoice.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/Credit_Invoice.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -792,6 +792,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, prd, @@ -805,6 +806,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems' . $identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems' . $identifier]->DebtorNo . "', '" . $_SESSION['CreditItems' . $identifier]->Branch . "', '" . $PeriodNo . "', @@ -821,6 +823,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, prd, @@ -833,6 +836,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems' . $identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems' . $identifier]->DebtorNo . "', '" . $_SESSION['CreditItems' . $identifier]->Branch . "', '" . $PeriodNo . "', @@ -870,6 +874,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -885,6 +890,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems' . $identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems' . $identifier]->DebtorNo . "', '" . $_SESSION['CreditItems' . $identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -902,6 +908,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -916,6 +923,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems' . $identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "' '" . $_SESSION['CreditItems' . $identifier]->DebtorNo . "', '" . $_SESSION['CreditItems' . $identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1001,6 +1009,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1016,6 +1025,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems' . $identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems' . $identifier]->DebtorNo . "', '" . $_SESSION['CreditItems' . $identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1038,6 +1048,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1055,6 +1066,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems' . $identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems' . $identifier]->DebtorNo . "', '" . $_SESSION['CreditItems' . $identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1078,6 +1090,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1094,6 +1107,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems' . $identifier]->Location . "', '" . $DefaultDispatchDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems' . $identifier]->DebtorNo . "', '" . $_SESSION['CreditItems' . $identifier]->Branch . "', '" . $LocalCurrencyPrice . "', Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/GoodsReceived.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -516,6 +516,7 @@ transno, loccode, trandate, + userid, price, prd, reference, @@ -528,6 +529,7 @@ '" . $GRN . "', '" . $_SESSION['PO'.$identifier]->Location . "', '" . $_POST['DefaultReceivedDate'] . "', + '" . $_SESSION['UserID'] . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['PO'.$identifier]->SupplierID . " (" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierName) . ") - " .$_SESSION['PO'.$identifier]->OrderNo . "', Modified: trunk/InternalStockRequestFulfill.php =================================================================== --- trunk/InternalStockRequestFulfill.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/InternalStockRequestFulfill.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -66,6 +66,7 @@ transno, loccode, trandate, + userid, prd, reference, qty, @@ -76,6 +77,7 @@ '" . $AdjustmentNumber . "', '" . $Location . "', '" . $SQLAdjustmentDate . "', + '" . $_SESSION['UserID'] . "', '" . $PeriodNo . "', '" . $Narrative ."', '" . -$Quantity . "', Modified: trunk/PDFStockCheckComparison.php =================================================================== --- trunk/PDFStockCheckComparison.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/PDFStockCheckComparison.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -101,6 +101,7 @@ transno, loccode, trandate, + userid, prd, reference, qty, @@ -110,6 +111,7 @@ '" . $AdjustmentNumber . "', '" . $myrow['loccode'] . "', '" . $SQLAdjustmentDate . "', + '" . $_SESSION['UserID'] . "', '" . $PeriodNo . "', '" . _('Inventory Check') . "', '" . $StockQtyDifference . "', Modified: trunk/RecurringSalesOrdersProcess.php =================================================================== --- trunk/RecurringSalesOrdersProcess.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/RecurringSalesOrdersProcess.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -334,6 +334,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -350,6 +351,7 @@ '" . $InvoiceNo . "', '" . $RecurrOrderRow['fromstkloc'] . "', '" . $DelDate . "', + '" . $_SESSION['UserID'] . "', '" . $RecurrOrderRow['debtorno'] . "', '" . $RecurrOrderRow['branchcode'] . "', '" . $LocalCurrencyPrice . "', Modified: trunk/ReverseGRN.php =================================================================== --- trunk/ReverseGRN.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/ReverseGRN.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -228,6 +228,7 @@ transno, loccode, trandate, + userid, prd, reference, qty, @@ -239,6 +240,7 @@ '" . $_GET['GRNNo'] . "', '" . $GRN['intostocklocation'] . "', '" . $GRN['deliverydate'] . "', + '" . $_SESSION['UserID'] . "', '" . $PeriodNo . "', '" . _('Reversal') . ' - ' . $_POST['SupplierID'] . ' - ' . $GRN['orderno'] . "', '" . -$QtyToReverse . "', Modified: trunk/SelectCreditItems.php =================================================================== --- trunk/SelectCreditItems.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/SelectCreditItems.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -1215,6 +1215,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1231,6 +1232,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1255,6 +1257,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1271,6 +1274,7 @@ " . $CreditNo . ", '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1289,6 +1293,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1303,6 +1308,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1466,6 +1472,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, prd, @@ -1480,6 +1487,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $PeriodNo . "', @@ -1522,6 +1530,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1539,6 +1548,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', @@ -1559,6 +1569,7 @@ transno, loccode, trandate, + userid, debtorno, branchcode, price, @@ -1574,6 +1585,7 @@ '" . $CreditNo . "', '" . $_SESSION['CreditItems'.$identifier]->Location . "', '" . $SQLCreditDate . "', + '" . $_SESSION['UserID'] . "', '" . $_SESSION['CreditItems'.$identifier]->DebtorNo . "', '" . $_SESSION['CreditItems'.$identifier]->Branch . "', '" . $LocalCurrencyPrice . "', Modified: trunk/StockAdjustments.php =================================================================== --- trunk/StockAdjustments.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/StockAdjustments.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -215,6 +215,7 @@ transno, loccode, trandate, + userid, prd, reference, qty, @@ -225,6 +226,7 @@ '" . $AdjustmentNumber . "', '" . $_SESSION['Adjustment' . $identifier]->StockLocation . "', '" . $SQLAdjustmentDate . "', + '" . $_SESSION['UserID'] . "', '" . $PeriodNo . "', '" . $_SESSION['Adjustment' . $identifier]->Narrative ."', '" . $_SESSION['Adjustment' . $identifier]->Quantity . "', Modified: trunk/StockLocTransferReceive.php =================================================================== --- trunk/StockLocTransferReceive.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/StockLocTransferReceive.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -88,6 +88,7 @@ transno, loccode, trandate, + userid, prd, reference, qty, @@ -98,6 +99,7 @@ '" . $_SESSION['Transfer']->TrfID . "', '" . $_SESSION['Transfer']->StockLocationFrom . "', '" . $SQLTransferDate . "', + '" . $_SESSION['UserID'] . "', '" . $PeriodNo . "', '" . _('To') . ' ' . DB_escape_string($_SESSION['Transfer']->StockLocationToName) . "', '" . round(-$TrfLine->Quantity, $TrfLine->DecimalPlaces) . "', @@ -200,6 +202,7 @@ transno, loccode, trandate, + userid, prd, reference, qty, @@ -210,6 +213,7 @@ '" . $_SESSION['Transfer']->TrfID . "', '" . $_SESSION['Transfer']->StockLocationTo . "', '" . $SQLTransferDate . "', + '" . $_SESSION['UserID'] . "', '" . $PeriodNo . "', '" . _('From') . ' ' . DB_escape_string($_SESSION['Transfer']->StockLocationFromName) ."', '" . round($TrfLine->Quantity, $TrfLine->DecimalPlaces) . "', Modified: trunk/StockMovements.php =================================================================== --- trunk/StockMovements.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/StockMovements.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -70,6 +70,7 @@ stockmoves.type, stockmoves.transno, stockmoves.trandate, + stockmoves.userid, stockmoves.debtorno, stockmoves.branchcode, stockmoves.qty, @@ -97,6 +98,7 @@ <th>' . _('Type') . '</th> <th>' . _('Number') . '</th> <th>' . _('Date') . '</th> + <th>' . _('User ID') . '</th> <th>' . _('Customer') . '</th> <th>' . _('Branch') . '</th> <th>' . _('Quantity') . '</th> @@ -130,6 +132,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class="number">%s</td> <td>%s</td> <td class="number">%s</td> @@ -141,6 +144,7 @@ $myrow['typename'], $myrow['transno'], $DisplayTranDate, + $myrow['userid'], $myrow['debtorno'], $myrow['branchcode'], locale_number_format($myrow['qty'],$myrow['decimalplaces']), @@ -156,6 +160,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class="number">%s</td> <td>%s</td> <td class="number">%s</td> @@ -166,6 +171,7 @@ $myrow['transno'], $myrow['typename'], $myrow['transno'], + $myrow['userid'], $DisplayTranDate, $myrow['debtorno'], $myrow['branchcode'], @@ -181,6 +187,7 @@ <td>%s</td> <td>%s</td> <td>%s</td> + <td>%s</td> <td class="number">%s</td> <td>%s</td> <td class="number">%s</td> @@ -190,6 +197,7 @@ $myrow['typename'], $myrow['transno'], $DisplayTranDate, + $myrow['userid'], $myrow['debtorno'], $myrow['branchcode'], locale_number_format($myrow['qty'],$myrow['decimalplaces']), Modified: trunk/StockTransfers.php =================================================================== --- trunk/StockTransfers.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/StockTransfers.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -220,6 +220,7 @@ transno, loccode, trandate, + userid, prd, reference, qty, @@ -230,6 +231,7 @@ '" . $TransferNumber . "', '" . $_SESSION['Transfer']->StockLocationFrom . "', '" . $SQLTransferDate . "', + '" . $_SESSION['UserID'] . "', '" . $PeriodNo . "', 'To " . $_SESSION['Transfer']->StockLocationTo ."', '" . round(-$_SESSION['Transfer']->TransferItem[0]->Quantity,$_SESSION['Transfer']->TransferItem[0]->DecimalPlaces) . "', @@ -336,6 +338,7 @@ transno, loccode, trandate, + userid, prd, reference, qty, @@ -345,6 +348,7 @@ '" . $TransferNumber . "', '" . $_SESSION['Transfer']->StockLocationTo . "', '" . $SQLTransferDate . "', + '" . $_SESSION['UserID'] . "', '" . $PeriodNo . "', '" . _('From') . " " . $_SESSION['Transfer']->StockLocationFrom . "', '" . $_SESSION['Transfer']->TransferItem[0]->Quantity . "', Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/SupplierInvoice.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -283,6 +283,7 @@ transno, loccode, trandate, + userid, price, prd, reference, @@ -295,6 +296,7 @@ '" . $GRN . "', '" . $_SESSION['PO'.$identifier]->Location . "', '" . FormatDateForSQL($DeliveryDate) . "', + '" . $_SESSION['UserID'] . "', '" . $LocalCurrencyPrice . "', '" . $PeriodNo . "', '" . $_SESSION['PO'.$identifier]->SupplierID . " (" . DB_escape_string($_SESSION['PO'.$identifier]->SupplierName) . ") - " .$_SESSION['PO'.$identifier]->OrderNo . "', Modified: trunk/WorkOrderIssue.php =================================================================== --- trunk/WorkOrderIssue.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/WorkOrderIssue.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -190,6 +190,7 @@ transno, loccode, trandate, + userid, price, prd, reference, @@ -201,6 +202,7 @@ '" . $WOIssueNo . "', '" . $_POST['FromLocation'] . "', '" . FormatDateForSQL($_POST['IssuedDate']) . "', + '" . $_SESSION['UserID'] . "', '" . $IssueItemRow['cost'] . "', '" . $PeriodNo . "', '" . $_POST['WO'] . "', Modified: trunk/WorkOrderReceive.php =================================================================== --- trunk/WorkOrderReceive.php 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/WorkOrderReceive.php 2014-12-14 02:04:44 UTC (rev 7021) @@ -351,6 +351,7 @@ transno, loccode, trandate, + userid, prd, reference, price, @@ -362,6 +363,7 @@ '" . $WOIssueNo . "', '" . $WORow['loccode'] . "', '" . Date('Y-m-d') . "', + '" . $_SESSION['UserID'] . "', '" . $PeriodNo . "', '" . $_POST['WO'] . "', '" . $AutoIssueCompRow['cost'] . "', @@ -459,6 +461,7 @@ transno, loccode, trandate, + userid, price, prd, reference, @@ -470,6 +473,7 @@ '" . $WOReceiptNo . "', '" . $_POST['IntoLocation'] . "', '" . Date('Y-m-d') . "', + '" . $_SESSION['UserID'] . "', '" . $WORow['stdcost'] . "', '" . $PeriodNo . "', '" . $_POST['WO'] . "', Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2014-12-13 20:06:28 UTC (rev 7020) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2014-12-14 02:04:44 UTC (rev 7021) @@ -3,5 +3,6 @@ INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description` ) VALUES ('Z_UpdateItemCosts.php', '15', 'Use CSV of item codes and costs to update webERP item costs'); INSERT INTO scripts (`script` ,`pagesecurity` ,`description` ) VALUES ('CustomerBalancesMovement.php', '3', 'Allow customers to be listed in local currency with balances and activity over a date range'); INSERT INTO `scripts` VALUES ('UserLocations.php', '15', 'Location User Maintenance'); +ALTER TABLE `stockmoves` ADD `userid` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `trandate`; UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; |
From: <rc...@us...> - 2014-12-16 14:57:20
|
Revision: 7024 http://sourceforge.net/p/web-erp/reponame/7024 Author: rchacon Date: 2014-12-16 14:57:11 +0000 (Tue, 16 Dec 2014) Log Message: ----------- Expand and uniform the accuracy of the exchange rate. Modified Paths: -------------- trunk/CustomerReceipt.php trunk/Payments.php trunk/SupplierInvoice.php Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2014-12-16 14:26:19 UTC (rev 7023) +++ trunk/CustomerReceipt.php 2014-12-16 14:57:11 UTC (rev 7024) @@ -871,7 +871,7 @@ } if ($_SESSION['ReceiptBatch']->AccountCurrency!=$_SESSION['ReceiptBatch']->Currency AND isset($_SESSION['ReceiptBatch']->AccountCurrency)){ if (isset($SuggestedExRate)){ - $SuggestedExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedExRate,6) . '</b>'; + $SuggestedExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedExRate,8) . '</b>'; } else { $SuggestedExRateText =''; } @@ -882,7 +882,7 @@ } echo '<tr> <td>' . _('Receipt Exchange Rate') . ':</td> - <td><input tabindex="4" type="text" name="ExRate" required="required" maxlength="10" size="12" class="number" value="' . locale_number_format($_SESSION['ReceiptBatch']->ExRate,6) . '" /></td> + <td><input class="number" maxlength="12" name="ExRate" required="required" size="14" tabindex="4" type="text" value="' . locale_number_format($_SESSION['ReceiptBatch']->ExRate,8) . '" /></td> <td>' . $SuggestedExRateText . ' <i>' . _('The exchange rate between the currency of the bank account currency and the currency of the receipt') . '. 1 ' . $_SESSION['ReceiptBatch']->AccountCurrency . ' = ? ' . $_SESSION['ReceiptBatch']->Currency . '</i></td> </tr>'; } @@ -890,7 +890,7 @@ if ($_SESSION['ReceiptBatch']->AccountCurrency!=$_SESSION['CompanyRecord']['currencydefault'] AND isset($_SESSION['ReceiptBatch']->AccountCurrency)){ if (isset($SuggestedFunctionalExRate)){ - $SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedFunctionalExRate,6) . '</b>'; + $SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedFunctionalExRate,8) . '</b>'; } else { $SuggestedFunctionalExRateText =''; } @@ -899,14 +899,14 @@ } echo '<tr> <td>' . _('Functional Exchange Rate') . ':</td> - <td><input tabindex="5" type="text" name="FunctionalExRate" required="required" class="number" pattern="[0-9\.,]*" maxlength="10" size="12" value="' . locale_number_format($_SESSION['ReceiptBatch']->FunctionalExRate,6) . '" /></td> + <td><input class="number" maxlength="12" name="FunctionalExRate" pattern="[0-9\.,]*" required="required" size="14" tabindex="5" type="text" value="' . locale_number_format($_SESSION['ReceiptBatch']->FunctionalExRate,8) . '" /></td> <td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['ReceiptBatch']->AccountCurrency . '</i></td> </tr>'; } echo '<tr> <td>' . _('Receipt Type') . ':</td> - <td><select tabindex="6" name="ReceiptType">'; + <td><select name="ReceiptType" tabindex="6">'; include('includes/GetPaymentMethods.php'); /* The array ReceiptTypes is defined from the setup tab of the main menu under Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2014-12-16 14:26:19 UTC (rev 7023) +++ trunk/Payments.php 2014-12-16 14:57:11 UTC (rev 7024) @@ -865,7 +865,7 @@ } echo '<tr> <td>' . _('Payment Exchange Rate') . ':</td> - <td><input class="number" type="text" name="ExRate" maxlength="10" size="12" title="' . _('The exchange rate between the currency of the bank account currency and the currency of the payment') . '" value="' . $_POST['ExRate'] . '" /></td> + <td><input class="number" maxlength="12" name="ExRate" size="14" title="' . _('The exchange rate between the currency of the bank account currency and the currency of the payment') . '" type="text" value="' . $_POST['ExRate'] . '" /></td> <td>' . $SuggestedExRateText . ' <i>' . _('The exchange rate between the currency of the bank account currency and the currency of the payment') . '. 1 ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->Currency . '</i></td> </tr>'; } @@ -882,7 +882,7 @@ } echo '<tr> <td>' . _('Functional Exchange Rate') . ':</td> - <td><input type="text" name="FunctionalExRate" maxlength="10" size="12" class="number" title="' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '" value="' . $_POST['FunctionalExRate'] . '" /></td> + <td><input class="number" maxlength="12" name="FunctionalExRate" size="14" title="' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '" type="text" value="' . $_POST['FunctionalExRate'] . '" /></td> <td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . '</i></td> </tr>'; } @@ -1042,15 +1042,15 @@ <td><input type="text" name="Cheque" maxlength="12" size="12" /></td> </tr>'; - if (isset($_POST['GLNarrative'])) { // General Ledger Payment (Different than Bank Account) info to be inserted on gltrans.narrative, varchar(200). + if (isset($_POST['GLNarrative'])) {// General Ledger Payment (Different than Bank Account) info to be inserted on gltrans.narrative, varchar(200). echo '<tr> <td>' . _('GL Narrative') . ':</td> - <td><input type="text" name="GLNarrative" maxlength="50" size="52" value="' . stripslashes($_POST['GLNarrative']) . '" /></td> + <td><input maxlength="200" name="GLNarrative" size="52" type="text" value="' . stripslashes($_POST['GLNarrative']) . '" /></td> </tr>'; } else { echo '<tr> <td>' . _('GL Narrative') . ':</td> - <td><input type="text" name="GLNarrative" maxlength="50" size="52" /></td> + <td><input maxlength="200" name="GLNarrative" size="52" type="text" /></td> </tr>'; } Modified: trunk/SupplierInvoice.php =================================================================== --- trunk/SupplierInvoice.php 2014-12-16 14:26:19 UTC (rev 7023) +++ trunk/SupplierInvoice.php 2014-12-16 14:57:11 UTC (rev 7024) @@ -634,7 +634,7 @@ echo '<td>' . _('Invoice Date') . ' (' . _('in format') . ' ' . $_SESSION['DefaultDateFormat'] . ') :</td> <td><input type="text" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" size="11" maxlength="10" name="TranDate" value="' . $_SESSION['SuppTrans']->TranDate . '" /></td> <td>' . _('Exchange Rate') . ':</td> - <td><input type="text" class="number" size="11" maxlength="10" name="ExRate" value="' . locale_number_format($_SESSION['SuppTrans']->ExRate,8) . '" /></td> + <td><input class="number" maxlength="12" name="ExRate" size="14" type="text" value="' . locale_number_format($_SESSION['SuppTrans']->ExRate,10) . '" /></td> </tr> </table>'; |
From: <aga...@us...> - 2014-12-16 20:55:59
|
Revision: 7026 http://sourceforge.net/p/web-erp/reponame/7026 Author: agaluski Date: 2014-12-16 20:55:46 +0000 (Tue, 16 Dec 2014) Log Message: ----------- Modified Paths: -------------- trunk/GoodsReceived.php trunk/SystemParameters.php trunk/WorkOrderReceive.php trunk/Z_ChangeStockCode.php trunk/doc/Change.log trunk/includes/MainMenuLinksArray.php trunk/includes/SQL_CommonFunctions.inc trunk/sql/mysql/upgrade4.11-4.12.sql Added Paths: ----------- trunk/HistoricalTestResults.php trunk/PDFCOA.php trunk/PDFProdSpec.php trunk/ProductSpecs.php trunk/QATests.php trunk/SelectQASamples.php trunk/TestPlanResults.php trunk/includes/PDFCOAHeader.inc trunk/includes/PDFProdSpecHeader.inc Modified: trunk/GoodsReceived.php =================================================================== --- trunk/GoodsReceived.php 2014-12-16 15:01:00 UTC (rev 7025) +++ trunk/GoodsReceived.php 2014-12-16 20:55:46 UTC (rev 7026) @@ -605,6 +605,9 @@ $ErrMsg = _('CRITICAL ERROR') . '! ' . _('NOTE DOWN THIS ERROR AND SEEK ASSISTANCE') . ': ' . _('The serial stock movement record could not be inserted because'); $DbgMsg = _('The following SQL to insert the serial stock movement records was used'); $Result = DB_query($SQL, $ErrMsg, $DbgMsg, true); + if ($_SESSION['QualityLogSamples']==1) { + CreateQASample($OrderLine->StockID,$Item->BundleRef, '', 'Created from Purchase Order', 0, 0,$db); + } }//non blank BundleRef } //end foreach } Added: trunk/HistoricalTestResults.php =================================================================== --- trunk/HistoricalTestResults.php (rev 0) +++ trunk/HistoricalTestResults.php 2014-12-16 20:55:46 UTC (rev 7026) @@ -0,0 +1,156 @@ +<?php +/* $Id: HsitoricalTestResults.php 1 2014-09-08 10:42:50Z agaluski $*/ + +include('includes/session.inc'); +$Title = _('Historical Test Results'); +include('includes/header.inc'); + +if (isset($_GET['KeyValue'])){ + $KeyValue =mb_strtoupper($_GET['KeyValue']); +} elseif(isset($_POST['KeyValue'])){ + $KeyValue =mb_strtoupper($_POST['KeyValue']); +} + +if (!isset($_POST['FromDate'])){ + $_POST['FromDate']=Date(($_SESSION['DefaultDateFormat']), strtotime($UpcomingDate . ' - 180 days')); +} +if (!isset($_POST['ToDate'])){ + $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']); +} +if (!Is_Date($_POST['FromDate'])) { + $InputError = 1; + prnMsg(_('Invalid From Date'),'error'); + $_POST['FromDate']=Date(($_SESSION['DefaultDateFormat']), strtotime($UpcomingDate . ' - 180 days')); +} +if (!Is_Date($_POST['ToDate'])) { + $InputError = 1; + prnMsg(_('Invalid To Date'),'error'); + $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']); +} +$FromDate = FormatDateForSQL($_POST['FromDate']); +$ToDate = FormatDateForSQL($_POST['ToDate']); +if (isset($Errors)) { + unset($Errors); +} + +$Errors = array(); + +echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p>'; + + +//prompt user for Key Value +echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Show Test Results For') .':</td>'; +$SQLSpecSelect="SELECT DISTINCT(prodspeckey), + description + FROM qasamples LEFT OUTER JOIN stockmaster + ON stockmaster.stockid=qasamples.prodspeckey"; + + +$ResultSelection=DB_query($SQLSpecSelect, $db); +echo '<td><select name="KeyValue">'; + +while ($MyRowSelection=DB_fetch_array($ResultSelection)){ + if ($MyRowSelection['prodspeckey']==$KeyValue) { + $Selected=' selected="selected" '; + } else { + $Selected=''; + } + echo '<option' . $Selected . ' value="' . $MyRowSelection['prodspeckey'] . '">' . $MyRowSelection['prodspeckey'].' - ' .htmlspecialchars($MyRowSelection['description'], ENT_QUOTES,'UTF-8', false) . '</option>'; +} +echo '</select></td>'; +echo '</tr> + <tr> + <td>'; +echo _('From Sample Date') . ': </td><td><input name="FromDate" size="10" class="date" value="' . $_POST['FromDate'] . '"/></td></tr><tr><td> ' . _('To Sample Date') . ':</td><td> <input name="ToDate" size="10" class="date" value="' . $_POST['ToDate'] . '"/> '; +echo '</td> + </tr> + </table> + </div> + <div> + <input type="submit" name="pickspec" value="' . _('Submit') . '" /> + </div> + </form>'; + + +//show header +$SQLSpecSelect="SELECT description + FROM stockmaster + WHERE stockmaster.stockid='" .$KeyValue. "'"; + +$ResultSelection=DB_query($SQLSpecSelect, $db); +$MyRowSelection=DB_fetch_array($ResultSelection); +$SQLTests="SELECT sampleresults.testid, + sampledate, + sampleresults.sampleid, + lotkey, + identifier, + cert, + isinspec, + testvalue, + name + FROM qasamples + INNER JOIN sampleresults on sampleresults.sampleid=qasamples.sampleid + INNER JOIN qatests + ON qatests.testid=sampleresults.testid + WHERE qasamples.prodspeckey='".$KeyValue."' + AND sampleresults.showontestplan='1' + AND sampledate>='".$FromDate."' + AND sampledate <='".$ToDate."'"; + + +$TestResult=DB_query($SQLTests, $db); +$TestsArray=array(); +$SamplesArray=array(); +$AllResultsArray=array(); +$TotResults=0; +while ($MyTestRow=DB_fetch_array($TestResult)) { + $FormattedSampleID=str_pad($MyTestRow['sampleid'],10,'0',STR_PAD_LEFT); + $testkey=array_search ($MyTestRow['name'] , $TestsArray); + if ($testkey===false) { + $TestsArray[$MyTestRow['name']]=$MyTestRow['name']; + } + + $testkey=array_search ($MyTestRow['sampleid'] , $SamplesArray); + if ($testkey===false) { + $SamplesArray[$FormattedSampleID]=$MyTestRow; + $TotResults++; + } + $AllResultsArray[$MyTestRow['name']][$FormattedSampleID]=$MyTestRow; +} + +if ($TotResults>0) { + echo '<br/>' . _('Historical Test Results for') . ' ' . $KeyValue . '-' . $MyRowSelection['description'] . '<br/>'; + $k = 0; //row colour counter + echo '<div><div style="overflow:auto; width:98%; padding:10px; "><table width="90%" style="overflow: scroll;"><tr><th style="white-space:nowrap; text-align:right">' . _('Sample ID:') . '<br>' . _('Lot/Serial:') . '<br>' . _('Identifier:') . '<br>' . _('Sample Date:') .'</th>'; + foreach ($SamplesArray as $samplekey => $samplevalue) { + echo '<th>'. $samplekey . '<br>' . $samplevalue['lotkey'] . '<br>' . $samplevalue['identifier'] . '<br>' . ConvertSQLDate($samplevalue['sampledate']).'</th>'; + } + echo '</tr>'; + foreach ($TestsArray as $testkey => $testvalue) { + if ($k == 1) { /*alternate bgcolour of row for highlighting */ + echo '<tr class="EvenTableRows">'; + $k = 0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + echo '<td class="select" style="white-space:nowrap;">'.$testvalue.'</th>'; + foreach ($SamplesArray as $samplekey => $samplevalue) { + if ($AllResultsArray[$testkey][$samplekey]['testvalue']=='' OR !isset($AllResultsArray[$testkey][$samplekey]['testvalue'])) { + $AllResultsArray[$testkey][$samplekey]['testvalue']=' '; + } + echo '<td>'.$AllResultsArray[$testkey][$samplekey]['testvalue'].'</td>'; + } + echo '</tr>'; + } + echo '</tr></table></div></div>'; +} + +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/PDFCOA.php =================================================================== --- trunk/PDFCOA.php (rev 0) +++ trunk/PDFCOA.php 2014-12-16 20:55:46 UTC (rev 7026) @@ -0,0 +1,320 @@ +<?php + +/* $Id: PDFCOA.php 1 2014-09-15 06:31:08Z agaluski $ */ + +include('includes/session.inc'); +include('includes/SQL_CommonFunctions.inc'); + +if (isset($_GET['LotKey'])) { + $SelectedCOA=$_GET['LotKey']; +} elseif (isset($_POST['LotKey'])) { + $SelectedCOA=$_POST['LotKey']; +} +if (isset($_GET['ProdSpec'])) { + $SelectedSpec=$_GET['ProdSpec']; +} elseif (isset($_POST['ProdSpec'])) { + $SelectedSpec=$_POST['ProdSpec']; +} + +if (isset($_GET['QASampleID'])) { + $QASampleID=$_GET['QASampleID']; +} elseif (isset($_POST['QASampleID'])) { + $QASampleID=$_POST['QASampleID']; +} + +//Get Out if we have no Certificate of Analysis +If ((!isset($SelectedCOA) || $SelectedCOA=='') AND (!isset($QASampleID) OR $QASampleID=='')){ + $Title = _('Select Certificate of Analysis To Print'); + include('includes/header.inc'); + echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . $Title . '</p>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Enter Item') .':</td> + <td><input type="text" name="ProdSpec" size="25" maxlength="25" /></td> + <td>' . _('Enter Lot') .':</td> + <td><input type="text" name="LotKey" size="25" maxlength="25" /></td> + </tr> + </table> + </div> + <div> + <input type="submit" name="pickspec" value="' . _('Submit') . '" /> + </div> + </form> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Or Select Existing Lot') .':</td>'; + $SQLSpecSelect="SELECT sampleid, + lotkey, + prodspeckey, + description + FROM qasamples LEFT OUTER JOIN stockmaster + ON stockmaster.stockid=qasamples.prodspeckey + WHERE cert='1' + ORDER BY lotkey"; + + + $ResultSelection=DB_query($SQLSpecSelect, $db); + echo '<td><select name="QASampleID" style="font-family: monospace; white-space:pre;">'; + echo '<option value="">' . str_pad(_('Lot/Serial'),15,'_'). str_pad(_('Item'),20, '_', STR_PAD_RIGHT). str_pad(_('Description'),20,'_') . '</option>'; + while ($MyRowSelection=DB_fetch_array($ResultSelection)){ + echo '<option value="' . $MyRowSelection['sampleid'] . '">' . str_pad($MyRowSelection['lotkey'],15, '_', STR_PAD_RIGHT). str_pad($MyRowSelection['prodspeckey'],20,'_') .htmlspecialchars($MyRowSelection['description'], ENT_QUOTES,'UTF-8', false) . '</option>'; + } + echo '</select></td>'; + echo '</tr> + </table> + </div> + <div> + <input type="submit" name="pickspec" value="' . _('Submit') . '" /> + </div> + </form>'; + include('includes/footer.inc'); + exit(); +} + + +$ErrMsg = _('There was a problem retrieving the Lot Information') . ' ' .$SelectedCOA . ' ' . _('from the database'); +if (isset($SelectedCOA)) { + $sql = "SELECT lotkey, + description, + name, + method, + qatests.units, + type, + testvalue, + sampledate, + groupby + FROM qasamples INNER JOIN sampleresults + ON sampleresults.sampleid=qasamples.sampleid + INNER JOIN qatests + ON qatests.testid=sampleresults.testid + LEFT OUTER JOIN stockmaster on stockmaster.stockid=qasamples.prodspeckey + WHERE qasamples.lotkey='" .$SelectedCOA."' + AND qasamples.prodspeckey='" .$SelectedSpec."' + AND qasamples.cert='1' + AND sampleresults.showoncert='1' + ORDER by groupby, sampleresults.testid"; +} else { + $sql = "SELECT lotkey, + description, + name, + method, + qatests.units, + type, + testvalue, + sampledate, + groupby + FROM qasamples INNER JOIN sampleresults + ON sampleresults.sampleid=qasamples.sampleid + INNER JOIN qatests + ON qatests.testid=sampleresults.testid + LEFT OUTER JOIN stockmaster on stockmaster.stockid=qasamples.prodspeckey + WHERE qasamples.sampleid='" .$QASampleID."' + AND qasamples.cert='1' + AND sampleresults.showoncert='1' + ORDER by groupby, sampleresults.testid"; +} +$result=DB_query($sql,$db, $ErrMsg); + +//If there are no rows, there's a problem. +if (DB_num_rows($result)==0){ + $Title = _('Print Certificate of Analysis Error'); + include('includes/header.inc'); + echo '<div class="centre"> + <br /> + <br /> + <br />'; + prnMsg( _('Unable to Locate Lot') . ' : ' . $SelectedCOA . ' ', 'error'); + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="'. $RootPath . '/PDFCOA.php">' . _('Certificate of Analysis') . '</a></li></ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; + include('includes/footer.inc'); + exit; +} +$PaperSize = 'Letter'; +if ($QASampleID>'') { + $myrow=DB_fetch_array($result); + $SelectedCOA=$myrow['lotkey']; + DB_data_seek($result,0); +} +include('includes/PDFStarter.php'); +$pdf->addInfo('Title', _('Certificate of Analysis') ); +$pdf->addInfo('Subject', _('Certificate of Analysis') . ' ' . $SelectedCOA); +$FontSize=12; +$PageNumber = 1; +$HeaderPrinted=0; +$line_height=$FontSize*1.25; +$RectHeight=12; +$SectionHeading=0; +$CurSection=''; +$SectionTitle=''; +$SectionTrailer=''; + +$SectionsArray=array(array('PhysicalProperty',3, _('Physical Properties'), '', array(260,110,135),array(_('Physical Property'),_('Value'),_('Test Method')),array('left','center','center')), + array('Processing',2, _('Injection Molding Processing Guidelines'), _('* Desicant type dryer required.'), array(240,265),array(_('Setting'),_('Value')),array('left','center')), + array('RegulatoryCompliance',2, _('Regulatory Compliance'), '', array(240,265),array(_('Regulatory Compliance'),_('Value')),array('left','center'))); + +while ($myrow=DB_fetch_array($result)){ + if ($myrow['description']=='') { + $myrow['description']=$myrow['prodspeckey']; + } + $Spec=$myrow['description']; + $SampleDate=ConvertSQLDate($myrow['sampledate']); + + foreach($SectionsArray as $row) { + if ($myrow['groupby']==$row[0]) { + $SectionColSizes=$row[4]; + $SectionColLabs=$row[5]; + $SectionAlign=$row[6]; + } + } + $TrailerPrinted=1; + if ($HeaderPrinted==0) { + include('includes/PDFCOAHeader.inc'); + $HeaderPrinted=1; + } + + if ($CurSection!=$myrow['groupby']) { + $SectionHeading=0; + if ($CurSection!='' AND $PrintTrailer==1) { + $pdf->line($XPos+1, $YPos+$RectHeight,$XPos+506, $YPos+$RectHeight); + } + $PrevTrailer=$SectionTrailer; + $CurSection=$myrow['groupby']; + foreach($SectionsArray as $row) { + if ($myrow['groupby']==$row[0]) { + $SectionTitle=$row[2]; + $SectionTrailer=$row[3]; + } + } + } + + if ($SectionHeading==0) { + $XPos=65; + if ($PrevTrailer>'' AND $PrintTrailer==1) { + $PrevFontSize=$FontSize; + $FontSize=8; + $line_height=$FontSize*1.25; + $LeftOvers = $pdf->addTextWrap($XPos+5,$YPos,500,$FontSize,$PrevTrailer,'left'); + $FontSize=$PrevFontSize; + $line_height=$FontSize*1.25; + $YPos -= $line_height; + $YPos -= $line_height; + } + if ($YPos < ($Bottom_Margin + 90)){ // Begins new page + $PrintTrailer=0; + $PageNumber++; + include ('includes/PDFCOAHeader.inc'); + } + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,500,$FontSize,$SectionTitle,'center'); + $YPos -= $line_height; + $pdf->setFont('','B'); + $pdf->SetFillColor(200,200,200); + $x=0; + foreach($SectionColLabs as $CurColLab) { + $ColLabel=$CurColLab; + $ColWidth=$SectionColSizes[$x]; + $x++; + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,$ColWidth,$FontSize,$ColLabel,'center',1,'fill'); + $XPos+=$ColWidth; + } + $SectionHeading=1; + $YPos -= $line_height; + $pdf->setFont('',''); + } //$SectionHeading==0 + $XPos=65; + $Value=''; + if ($myrow['testvalue'] > '') { + $Value=$myrow['testvalue']; + } //elseif ($myrow['rangemin'] > '') { + // $Value=$myrow['rangemin'] . ' - ' . $myrow['rangemax']; + //} + if (strtoupper($Value) <> 'NB' AND strtoupper($Value) <> 'NO BREAK') { + $Value.= ' ' . $myrow['units']; + } + $x=0; + foreach($SectionColLabs as $CurColLab) { + $ColLabel=$CurColLab; + $ColWidth=$SectionColSizes[$x]; + $ColAlign=$SectionAlign[$x]; + switch ($x) { + case 0; + $DispValue=$myrow['name']; + break; + case 1; + $DispValue=$Value; + break; + case 2; + $DispValue=$myrow['method']; + break; + } + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,$ColWidth,$FontSize,$DispValue,$ColAlign,1); + $XPos+=$ColWidth; + $x++; + } + + $YPos -= $line_height; + $XPos=65; + $PrintTrailer=1; + if ($YPos < ($Bottom_Margin + 80)){ // Begins new page + $pdf->line($XPos+1, $YPos+$RectHeight,$XPos+506, $YPos+$RectHeight); + $PrintTrailer=0; + $PageNumber++; + include ('includes/PDFCOAHeader.inc'); + } + //echo 'PrintTrailer'.$PrintTrailer.' '.$PrevTrailer.'<br>' ; +} //while loop + +$pdf->line($XPos+1, $YPos+$RectHeight,$XPos+506, $YPos+$RectHeight); +if ($SectionTrailer>'') { + $PrevFontSize=$FontSize; + $FontSize=8; + $line_height=$FontSize*1.25; + $LeftOvers = $pdf->addTextWrap($XPos+5,$YPos,500,$FontSize,$SectionTrailer,'left'); + $FontSize=$PrevFontSize; + $line_height=$FontSize*1.25; + $YPos -= $line_height; + $YPos -= $line_height; +} +if ($YPos < ($Bottom_Margin + 85)){ // Begins new page + $PageNumber++; + include ('includes/PDFCOAHeader.inc'); +} + +$FontSize=8; +$line_height=$FontSize*1.25; +$YPos -= $line_height; +$YPos -= $line_height; +$sql = "SELECT confvalue + FROM config + WHERE confname='QualityCOAText'"; + +$result=DB_query($sql,$db, $ErrMsg); +$myrow=DB_fetch_array($result); +$Disclaimer=$myrow[0]; +$LeftOvers = $pdf->addTextWrap($XPos+5,$YPos,500,$FontSize,$Disclaimer); +while (mb_strlen($LeftOvers) > 1) { + $YPos -= $line_height; + $LeftOvers = $pdf->addTextWrap($XPos+5,$YPos,445,$FontSize, $LeftOvers, 'left'); +} + +$pdf->OutputI($_SESSION['DatabaseName'] . 'COA' . date('Y-m-d') . '.pdf'); +$pdf->__destruct(); + +?> \ No newline at end of file Added: trunk/PDFProdSpec.php =================================================================== --- trunk/PDFProdSpec.php (rev 0) +++ trunk/PDFProdSpec.php 2014-12-16 20:55:46 UTC (rev 7026) @@ -0,0 +1,287 @@ +<?php + +/* $Id: PDFProdSpec.php 1 2014-09-15 06:31:08Z agaluski $ */ + +include('includes/session.inc'); +include('includes/SQL_CommonFunctions.inc'); + +if (isset($_GET['KeyValue'])) { + $SelectedProdSpec=$_GET['KeyValue']; +} elseif (isset($_POST['KeyValue'])) { + $SelectedProdSpec=$_POST['KeyValue']; +} + +//Get Out if we have no product specification +If (!isset($SelectedProdSpec) || $SelectedProdSpec==""){ + $Title = _('Select Product Specification To Print'); + include('includes/header.inc'); + echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/printer.png" title="' . _('Print') . '" alt="" />' . ' ' . $Title . '</p>'; + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Enter Specification Name') .':</td> + <td><input type="text" name="KeyValue" size="25" maxlength="25" /></td> + </tr> + </table> + </div> + <div> + <input type="submit" name="pickspec" value="' . _('Submit') . '" /> + </div> + </form> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Or Select Existing Specification') .':</td>'; + $SQLSpecSelect="SELECT DISTINCT(keyval), + description + FROM prodspecs LEFT OUTER JOIN stockmaster + ON stockmaster.stockid=prodspecs.keyval"; + + + $ResultSelection=DB_query($SQLSpecSelect, $db); + echo '<td><select name="KeyValue">'; + + while ($MyRowSelection=DB_fetch_array($ResultSelection)){ + echo '<option value="' . $MyRowSelection['keyval'] . '">' . $MyRowSelection['keyval'].' - ' .htmlspecialchars($MyRowSelection['description'], ENT_QUOTES,'UTF-8', false) . '</option>'; + } + echo '</select></td>'; + echo '</tr> + </table> + </div> + <div> + <input type="submit" name="pickspec" value="' . _('Submit') . '" /> + </div> + </form>'; + include('includes/footer.inc'); + exit(); +} + +/*retrieve the order details from the database to print */ +$ErrMsg = _('There was a problem retrieving the Product Specification') . ' ' . $SelectedProdSpec . ' ' . _('from the database'); + +$sql = "SELECT keyval, + description, + longdescription, + prodspecs.testid, + name, + method, + qatests.units, + type, + numericvalue, + prodspecs.targetvalue, + prodspecs.rangemin, + prodspecs.rangemax, + groupby + FROM prodspecs INNER JOIN qatests + ON qatests.testid=prodspecs.testid + LEFT OUTER JOIN stockmaster on stockmaster.stockid=prodspecs.keyval + WHERE prodspecs.keyval='" .$SelectedProdSpec."' + AND prodspecs.showonspec='1' + ORDER by groupby, prodspecs.testid"; + +$result=DB_query($sql,$db, $ErrMsg); + +//If there are no rows, there's a problem. +if (DB_num_rows($result)==0){ + $Title = _('Print Product Specification Error'); + include('includes/header.inc'); + echo '<div class="centre"> + <br /> + <br /> + <br />'; + prnMsg( _('Unable to Locate Specification') . ' : ' . $_SelectedProdSpec . ' ', 'error'); + echo '<br /> + <br /> + <br /> + <table class="table_index"> + <tr> + <td class="menu_group_item"> + <ul><li><a href="'. $RootPath . '/PDFProdSpec.php">' . _('Product Specifications') . '</a></li></ul> + </td> + </tr> + </table> + </div> + <br /> + <br /> + <br />'; + include('includes/footer.inc'); + exit; +} +$PaperSize = 'Letter'; + +include('includes/PDFStarter.php'); +$pdf->addInfo('Title', _('Product Specification') ); +$pdf->addInfo('Subject', _('Product Specification') . ' ' . $SelectedProdSpec); +$FontSize=12; +$PageNumber = 1; +$HeaderPrinted=0; +$line_height=$FontSize*1.25; +$RectHeight=12; +$SectionHeading=0; +$CurSection=''; +$SectionTitle=''; +$SectionTrailer=''; + +$SectionsArray=array(array('PhysicalProperty',3, _('Technical Data Sheet Properties'), _('* Data herein is typical and not to be construed as specifications.'), array(260,110,135),array(_('Physical Property'),_('Value'),_('Test Method')),array('left','center','center')), + array('Processing',2, _('Injection Molding Processing Guidelines'), _('* Desicant type dryer required.'), array(240,265),array(_('Setting'),_('Value')),array('left','center')), + array('RegulatoryCompliance',2, _('Regulatory Compliance'), '', array(240,265),array(_('Regulatory Compliance'),_('Value')),array('left','center'))); + +while ($myrow=DB_fetch_array($result)){ + if ($myrow['description']=='') { + $myrow['description']=$myrow['keyval']; + } + $Spec=$myrow['description']; + $SpecDesc=$myrow['longdescription']; + foreach($SectionsArray as $row) { + if ($myrow['groupby']==$row[0]) { + $SectionColSizes=$row[4]; + $SectionColLabs=$row[5]; + $SectionAlign=$row[6]; + } + } + $TrailerPrinted=1; + if ($HeaderPrinted==0) { + include('includes/PDFProdSpecHeader.inc'); + $HeaderPrinted=1; + } + + if ($CurSection!=$myrow['groupby']) { + $SectionHeading=0; + if ($CurSection!='' AND $PrintTrailer==1) { + $pdf->line($XPos+1, $YPos+$RectHeight,$XPos+506, $YPos+$RectHeight); + } + $PrevTrailer=$SectionTrailer; + $CurSection=$myrow['groupby']; + foreach($SectionsArray as $row) { + if ($myrow['groupby']==$row[0]) { + $SectionTitle=$row[2]; + $SectionTrailer=$row[3]; + } + } + } + + if ($SectionHeading==0) { + $XPos=65; + if ($PrevTrailer>'' AND $PrintTrailer==1) { + $PrevFontSize=$FontSize; + $FontSize=8; + $line_height=$FontSize*1.25; + $LeftOvers = $pdf->addTextWrap($XPos+5,$YPos,500,$FontSize,$PrevTrailer,'left'); + $FontSize=$PrevFontSize; + $line_height=$FontSize*1.25; + $YPos -= $line_height; + $YPos -= $line_height; + } + if ($YPos < ($Bottom_Margin + 90)){ // Begins new page + $PrintTrailer=0; + $PageNumber++; + include ('includes/PDFProdSpecHeader.inc'); + } + $LeftOvers = $pdf->addTextWrap($XPos,$YPos,500,$FontSize,$SectionTitle,'center'); + $YPos -= $line_height; + $pdf->setFont('','B'); + $pdf->SetFillColor(200,200,200); + $x=0; + foreach($SectionColLabs as $CurColLab) { + $ColLabel=$CurColLab; + $ColWidth=$SectionColSizes[$x]; + $x++; + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,$ColWidth,$FontSize,$ColLabel,'center',1,'fill'); + $XPos+=$ColWidth; + } + $SectionHeading=1; + $YPos -= $line_height; + $pdf->setFont('',''); + } //$SectionHeading==0 + $XPos=65; + $Value=''; + if ($myrow['targetvalue'] > '') { + $Value=$myrow['targetvalue']; + } elseif ($myrow['rangemin'] > '' OR $myrow['rangemax'] > '') { + if ($myrow['rangemin'] > '' AND $myrow['rangemax'] == '') { + $Value='> ' . $myrow['rangemin']; + } elseif ($myrow['rangemin']== '' AND $myrow['rangemax'] > '') { + $Value='< ' . $myrow['rangemax']; + } else { + $Value=$myrow['rangemin'] . ' - ' . $myrow['rangemax']; + } + } + if (strtoupper($Value) <> 'NB' AND strtoupper($Value) <> 'NO BREAK') { + $Value.= ' ' . $myrow['units']; + } + $x=0; + + foreach($SectionColLabs as $CurColLab) { + $ColLabel=$CurColLab; + $ColWidth=$SectionColSizes[$x]; + $ColAlign=$SectionAlign[$x]; + switch ($x) { + case 0; + $DispValue=$myrow['name']; + break; + case 1; + $DispValue=$Value; + break; + case 2; + $DispValue=$myrow['method']; + break; + } + $LeftOvers = $pdf->addTextWrap($XPos+1,$YPos,$ColWidth,$FontSize,$DispValue,$ColAlign,1); + $XPos+=$ColWidth; + $x++; + } + $YPos -= $line_height; + $XPos=65; + $PrintTrailer=1; + if ($YPos < ($Bottom_Margin + 80)){ // Begins new page + $pdf->line($XPos+1, $YPos+$RectHeight,$XPos+506, $YPos+$RectHeight); + $PrintTrailer=0; + $PageNumber++; + include ('includes/PDFProdSpecHeader.inc'); + } + //echo 'PrintTrailer'.$PrintTrailer.' '.$PrevTrailer.'<br>' ; +} //while loop + +$pdf->line($XPos+1, $YPos+$RectHeight,$XPos+506, $YPos+$RectHeight); +if ($SectionTrailer>'') { + $PrevFontSize=$FontSize; + $FontSize=8; + $line_height=$FontSize*1.25; + $LeftOvers = $pdf->addTextWrap($XPos+5,$YPos,500,$FontSize,$SectionTrailer,'left'); + $FontSize=$PrevFontSize; + $line_height=$FontSize*1.25; + $YPos -= $line_height; + $YPos -= $line_height; +} +if ($YPos < ($Bottom_Margin + 85)){ // Begins new page + $PageNumber++; + include ('includes/PDFProdSpecHeader.inc'); +} +$Disclaimer= _('The information provided on this datasheet should only be used as a guideline. Actual lot to lot values will vary.'); +$FontSize=8; +$line_height=$FontSize*1.25; +$YPos -= $line_height; +$LeftOvers = $pdf->addTextWrap($XPos+5,$YPos,500,$FontSize,$Disclaimer); +$YPos -= $line_height; +$YPos -= $line_height; +$sql = "SELECT confvalue + FROM config + WHERE confname='QualityProdSpecText'"; + +$result=DB_query($sql,$db, $ErrMsg); +$myrow=DB_fetch_array($result); +$Disclaimer=$myrow[0]; +$LeftOvers = $pdf->addTextWrap($XPos+5,$YPos,500,$FontSize,$Disclaimer); +while (mb_strlen($LeftOvers) > 1) { + $YPos -= $line_height; + $LeftOvers = $pdf->addTextWrap($XPos+5,$YPos,445,$FontSize, $LeftOvers, 'left'); +} + +$pdf->OutputI($_SESSION['DatabaseName'] . 'ProductSpecification' . date('Y-m-d') . '.pdf'); +$pdf->__destruct(); + +?> \ No newline at end of file Added: trunk/ProductSpecs.php =================================================================== --- trunk/ProductSpecs.php (rev 0) +++ trunk/ProductSpecs.php 2014-12-16 20:55:46 UTC (rev 7026) @@ -0,0 +1,671 @@ +<?php +/* $Id: ProductsSpecs.php 1 2014-09-08 10:42:50Z agaluski $*/ + +include('includes/session.inc'); +$Title = _('Product Specifications Maintenance'); +include('includes/header.inc'); + +if (isset($_GET['SelectedQATest'])){ + $SelectedQATest =mb_strtoupper($_GET['SelectedQATest']); +} elseif(isset($_POST['SelectedQATest'])){ + $SelectedQATest =mb_strtoupper($_POST['SelectedQATest']); +} +if (isset($_GET['KeyValue'])){ + $KeyValue =mb_strtoupper($_GET['KeyValue']); +} elseif(isset($_POST['KeyValue'])){ + $KeyValue =mb_strtoupper($_POST['KeyValue']); +} + +if ($_POST['RangeMin']=='') { + $RangeMin="NULL"; +} else { + $RangeMin="'" . $_POST['RangeMin'] . "'"; +} +if ($_POST['RangeMax']=='') { + $RangeMax="NULL"; +} else { + $RangeMax="'" . $_POST['RangeMax'] . "'"; +} + +if (isset($Errors)) { + unset($Errors); +} + +$Errors = array(); + +echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p>'; + +if (isset($_GET['CopySpec']) OR isset($_POST['CopySpec'])) { + if (!isset($_POST['CopyTo']) OR $_POST['CopyTo']=='' ) { + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo _('Enter The Item, Fixed Asset or Template to Copy this Specification to') . ':<input type="text" name="CopyTo" size="25" maxlength="25" />'; + echo '<div class="centre"> + <input type="hidden" name="KeyValue" value="' . $KeyValue . '" /> + <input type="submit" name="CopySpec" value="' . _('Copy') . '" /> + </div></form>'; + include('includes/footer.inc'); + exit; + } else { + $sql = "INSERT IGNORE INTO prodspecs + (keyval, + testid, + defaultvalue, + targetvalue, + rangemin, + rangemax, + showoncert, + showonspec, + showontestplan, + active) + SELECT '" . $_POST['CopyTo'] . "', + testid, + defaultvalue, + targetvalue, + rangemin, + rangemax, + showoncert, + showonspec, + showontestplan, + active + FROM prodspecs WHERE keyval='" .$KeyValue. "'"; + $msg = _('A Product Specification has been copied to') . ' ' . $_POST['CopyTo'] . ' from ' . ' ' . $KeyValue ; + $ErrMsg = _('The insert of the Product Specification failed because'); + $DbgMsg = _('The SQL that was used and failed was'); + $result = DB_query($sql,$db,$ErrMsg, $DbgMsg); + prnMsg($msg , 'success'); + $KeyValue=$_POST['CopyTo']; + unset($_GET['CopySpec']); + unset($_POST['CopySpec']); + } //else +} //CopySpec + +if (!isset($KeyValue) OR $KeyValue=='') { + //prompt user for Key Value + echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Enter Specification Name') .':</td> + <td><input type="text" name="KeyValue" size="25" maxlength="25" /></td> + </tr> + </table> + </div> + <div> + <input type="submit" name="pickspec" value="' . _('Submit') . '" /> + </div> + </form> + <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Or Select Existing Specification') .':</td>'; + $SQLSpecSelect="SELECT DISTINCT(keyval), + description + FROM prodspecs LEFT OUTER JOIN stockmaster + ON stockmaster.stockid=prodspecs.keyval"; + + + $ResultSelection=DB_query($SQLSpecSelect, $db); + echo '<td><select name="KeyValue">'; + + while ($MyRowSelection=DB_fetch_array($ResultSelection)){ + echo '<option value="' . $MyRowSelection['keyval'] . '">' . $MyRowSelection['keyval'].' - ' .htmlspecialchars($MyRowSelection['description'], ENT_QUOTES,'UTF-8', false) . '</option>'; + } + echo '</select></td>'; + echo '</tr> + </table> + </div> + <div> + <input type="submit" name="pickspec" value="' . _('Submit') . '" /> + </div> + </form>'; + + +} else { + //show header + $SQLSpecSelect="SELECT description + FROM stockmaster + WHERE stockmaster.stockid='" .$KeyValue. "'"; + + $ResultSelection=DB_query($SQLSpecSelect, $db); + $MyRowSelection=DB_fetch_array($ResultSelection); + echo '<br/>' . _('Product Specification for') . ' ' . $KeyValue . '-' . $MyRowSelection['description'] . '<br/><br/>'; +} +if (isset($_GET['ListTests'])) { + $sql = "SELECT qatests.testid, + name, + method, + units, + type, + numericvalue, + qatests.defaultvalue + FROM qatests + LEFT JOIN prodspecs + ON prodspecs.testid=qatests.testid + AND prodspecs.keyval='".$KeyValue."' + WHERE qatests.active='1' + AND prodspecs.keyval IS NULL + ORDER BY name"; + $result = DB_query($sql,$db); + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + echo '<table class="selection">'; + echo '<tr> + <th class="ascending">' . _('Add') . '</th> + <th class="ascending">' . _('Name') . '</th> + <th class="ascending">' . _('Method') . '</th> + <th class="ascending">' . _('Units') . '</th> + <th>' . _('Possible Values') . '</th> + <th>' . _('Target Value') . '</th> + <th>' . _('Range Min') . '</th> + <th>' . _('Range Max') . '</th> + </tr>'; + $k=0; + $x=0; + while ($myrow=DB_fetch_array($result)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + $x++; + $Class=''; + $RangeMin=''; + $RangeMax=''; + if ($myrow['numericvalue'] == 1) { + $IsNumeric = _('Yes'); + $Class="number"; + } else { + $IsNumeric = _('No'); + } + + switch ($myrow['type']) { + case 0; //textbox + $TypeDisp=_('Text Box'); + break; + case 1; //select box + $TypeDisp=_('Select Box'); + break; + case 2; //checkbox + $TypeDisp=_('Check Box'); + break; + case 3; //datebox + $TypeDisp=_('Date Box'); + $Class="date"; + break; + case 4; //range + $TypeDisp=_('Range'); + $RangeMin='<input class="' .$Class. '" type="text" name="AddRangeMin' .$x.'" />'; + $RangeMax='<input class="' .$Class. '" type="text" name="AddRangeMax' .$x.'" />'; + break; + } //end switch + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + </tr>', + '<input type="checkbox" name="AddRow' .$x.'"><input type="hidden" name="AddTestID' .$x.'" value="' .$myrow['testid']. '">', + $myrow['name'], + $myrow['method'], + $myrow['units'], + $myrow['defaultvalue'], + '<input class="' .$Class. '" type="text" name="AddTargetValue' .$x.'" />', + $RangeMin, + $RangeMax); + + } //END WHILE LIST LOOP + + echo '</table><br /></div> + <div class="centre"> + <input type="hidden" name="KeyValue" value="' . $KeyValue . '" /> + <input type="hidden" name="AddTestsCounter" value="' . $x . '" /> + <input type="submit" name="AddTests" value="' . _('Add') . '" /> + </div></form>'; + include('includes/footer.inc'); + exit; +} //ListTests +if (isset($_POST['AddTests'])) { + for ($i=0;$i<=$_POST['AddTestsCounter'];$i++){ + if ($_POST['AddRow' .$i]=='on') { + if ($_POST['AddRangeMin' .$i]=='') { + $AddRangeMin="NULL"; + } else { + $AddRangeMin="'" . $_POST['AddRangeMin' .$i] . "'"; + } + if ($_POST['AddRangeMax' .$i]=='') { + $AddRangeMax="NULL"; + } else { + $AddRangeMax="'" . $_POST['AddRangeMax' .$i] . "'"; + } + + $sql = "INSERT INTO prodspecs + (keyval, + testid, + defaultvalue, + targetvalue, + rangemin, + rangemax, + showoncert, + showonspec, + showontestplan, + active) + SELECT '" . $KeyValue . "', + testid, + defaultvalue, + '" . $_POST['AddTargetValue' .$i] . "', + " . $AddRangeMin . ", + " . $AddRangeMax. ", + showoncert, + showonspec, + showontestplan, + active + FROM qatests WHERE testid='" .$_POST['AddTestID' .$i]. "'"; + echo $sql; + $msg = _('A Product Specification record has been added for Test ID') . ' ' . $_POST['AddTestID' .$i] . ' for ' . ' ' . $KeyValue ; + $ErrMsg = _('The insert of the Product Specification failed because'); + $DbgMsg = _('The SQL that was used and failed was'); + $result = DB_query($sql,$db,$ErrMsg, $DbgMsg); + prnMsg($msg , 'success'); + } //if on + } //for +} //AddTests + +if (isset($_POST['submit'])) { + + //initialise no input errors assumed initially before we test + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + $i=1; + + //first off validate inputs sensible + + if (isset($SelectedQATest) AND $InputError !=1) { + + /*SelectedQATest could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ + + $sql = "UPDATE prodspecs SET defaultvalue='" . $_POST['DefaultValue'] . "', + targetvalue='" . $_POST['TargetValue'] . "', + rangemin=" . $RangeMin . ", + rangemax=" . $RangeMax . ", + showoncert='" . $_POST['ShowOnCert'] . "', + showonspec='" . $_POST['ShowOnSpec'] . "', + showontestplan='" . $_POST['ShowOnTestPlan'] . "', + active='" . $_POST['Active'] . "' + WHERE prodspecs.keyval = '".$KeyValue."' + AND prodspecs.testid = '".$SelectedQATest."'"; + + $msg = _('Product Specification record for') . ' ' . $_POST['QATestName'] . ' for ' . ' ' . $KeyValue . _('has been updated'); + $ErrMsg = _('The update of the Product Specification failed because'); + $DbgMsg = _('The SQL that was used and failed was'); + $result = DB_query($sql,$db,$ErrMsg, $DbgMsg); + + prnMsg($msg , 'success'); + + unset($SelectedQATest); + unset($_POST['DefaultValue']); + unset($_POST['TargetValue']); + unset($_POST['RangeMax']); + unset($_POST['RangeMin']); + unset($_POST['ShowOnCert']); + unset($_POST['ShowOnSpec']); + unset($_POST['Active']); + } +} elseif (isset($_GET['delete'])) { +//the link to delete a selected record was clicked instead of the submit button + +// PREVENT DELETES IF DEPENDENT RECORDS + + $sql= "SELECT COUNT(*) FROM qasamples + INNER JOIN sampleresults on sampleresults.sampleid=qasamples.sampleid AND sampleresults.testid='". $SelectedQATest."' + WHERE qasamples.prodspeckey='".$KeyValue."'"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ($myrow[0]>0) { + prnMsg(_('Cannot delete this Product Specification because there are test results tied to it'),'error'); + } else { + $sql="DELETE FROM prodspecs WHERE keyval='". $KeyValue."' + AND testid='". $SelectedQATest."'"; + $ErrMsg = _('The Product Specification could not be deleted because'); + $result = DB_query($sql,$db,$ErrMsg); + + prnMsg(_('Product Specification') . ' ' . $SelectedQATest . ' for ' . ' ' . $KeyValue . _('has been deleted from the database'),'success'); + unset ($SelectedQATest); + unset($delete); + unset ($_GET['delete']); + } +} + +if (!isset($SelectedQATest)) { + +/* It could still be the second time the page has been run and a record has been selected for modification - SelectedQATest will exist because it was sent with the new call. If its the first time the page has been displayed with no parameters +then none of the above are true and the list of QA Test will be displayed with +links to delete or edit each. These will call the same page again and allow update/input +or deletion of the records*/ + + $sql = "SELECT prodspecs.testid, + name, + method, + units, + type, + numericvalue, + prodspecs.defaultvalue, + prodspecs.targetvalue, + prodspecs.rangemin, + prodspecs.rangemax, + prodspecs.showoncert, + prodspecs.showonspec, + prodspecs.showontestplan, + prodspecs.active + FROM prodspecs INNER JOIN qatests + ON qatests.testid=prodspecs.testid + WHERE prodspecs.keyval='" .$KeyValue."' + ORDER BY name"; + $result = DB_query($sql,$db); + + echo '<table class="selection">'; + echo '<tr> + <th class="ascending">' . _('Name') . '</th> + <th class="ascending">' . _('Method') . '</th> + <th class="ascending">' . _('Units') . '</th> + <th class="ascending">' . _('Type') . '</th> + <th>' . _('Possible Values') . '</th> + <th>' . _('Target Value') . '</th> + <th>' . _('Range Min') . '</th> + <th>' . _('Range Max') . '</th> + <th class="ascending">' . _('Show on Cert') . '</th> + <th class="ascending">' . _('Show on Spec') . '</th> + <th class="ascending">' . _('Show on Test Plan') . '</th> + <th class="ascending">' . _('Active') . '</th> + </tr>'; + $k=0; + while ($myrow=DB_fetch_array($result)) { + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + if ($myrow['active'] == 1) { + $ActiveText = _('Yes'); + } else { + $ActiveText = _('No'); + } + if ($myrow['numericvalue'] == 1) { + $IsNumeric = _('Yes'); + $Class="number"; + } else { + $IsNumeric = _('No'); + } + if ($myrow['showoncert'] == 1) { + $ShowOnCertText = _('Yes'); + } else { + $ShowOnCertText = _('No'); + } + if ($myrow['showonspec'] == 1) { + $ShowOnSpecText = _('Yes'); + } else { + $ShowOnSpecText = _('No'); + } + if ($myrow['showontestplan'] == 1) { + $ShowOnTestPlanText = _('Yes'); + } else { + $ShowOnTestPlanText = _('No'); + } + switch ($myrow['type']) { + case 0; //textbox + $TypeDisp='Text Box'; + break; + case 1; //select box + $TypeDisp='Select Box'; + break; + case 2; //checkbox + $TypeDisp='Check Box'; + break; + case 3; //datebox + $TypeDisp='Date Box'; + $Class="date"; + break; + case 4; //range + $TypeDisp='Range'; + break; + } //end switch + + printf('<td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td><a href="%sSelectedQATest=%s&KeyValue=%s">' . _('Edit') . '</a></td> + <td><a href="%sSelectedQATest=%s&KeyValue=%s&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this Product Specification ?') . '\');">' . _('Delete') . '</a></td> + </tr>', + $myrow['name'], + $myrow['method'], + $myrow['units'], + $TypeDisp, + $myrow['defaultvalue'], + $myrow['targetvalue'], + $myrow['rangemin'], + $myrow['rangemax'], + $ShowOnCertText, + $ShowOnSpecText, + $ShowOnTestPlanText, + $ActiveText, + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', + $myrow['testid'], + $KeyValue, + htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', + $myrow['testid'], + $KeyValue); + + } //END WHILE LIST LOOP + echo '</table><br />'; +} //end of ifs and buts! + +if (isset($SelectedQATest)) { + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?KeyValue=' .$KeyValue .'">' . _('Show All Product Specs') . '</a></div>'; +} + +if (! isset($_GET['delete'])) { + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + if (isset($SelectedQATest)) { + //editing an existing Prod Spec + + $sql = "SELECT prodspecs.testid, + name, + method, + units, + type, + numericvalue, + prodspecs.defaultvalue, + prodspecs.targetvalue, + prodspecs.rangemin, + prodspecs.rangemax, + prodspecs.showoncert, + prodspecs.showonspec, + prodspecs.showontestplan, + prodspecs.active + FROM prodspecs INNER JOIN qatests + ON qatests.testid=prodspecs.testid + WHERE prodspecs.keyval='".$KeyValue."' + AND prodspecs.testid='".$SelectedQATest."'"; + + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + + $_POST['SelectedQATest'] = $myrow['testid']; + $_POST['QATestName'] = $myrow['name']; + $_POST['Method'] = $myrow['method']; + $_POST['GroupBy'] = $myrow['groupby']; + $_POST['Type'] = $myrow['type']; + $_POST['Units'] = $myrow['units']; + $_POST['DefaultValue'] = $myrow['defaultvalue']; + $_POST['NumericValue'] = $myrow['numericvalue']; + $_POST['TargetValue'] = $myrow['targetvalue']; + $_POST['RangeMin'] = $myrow['rangemin']; + $_POST['RangeMax'] = $myrow['rangemax']; + $_POST['ShowOnCert'] = $myrow['showoncert']; + $_POST['ShowOnSpec'] = $myrow['showonspec']; + $_POST['ShowOnTestPlan'] = $myrow['showontestplan']; + $_POST['Active'] = $myrow['active']; + + + echo '<input type="hidden" name="SelectedQATest" value="' . $SelectedQATest . '" />'; + echo '<input type="hidden" name="KeyValue" value="' . $KeyValue . '" />'; + echo '<input type="hidden" name="TestID" value="' . $_POST['SelectedQATest'] . '" />'; + echo '<table class="selection"> + <tr> + <td>' . _('Test Name') . ':</td> + <td>' . $_POST['QATestName'] . '</td> + </tr>'; + + if (!isset($_POST['Active'])) { + $_POST['Active']=1; + } + if (!isset($_POST['ShowOnCert'])) { + $_POST['ShowOnCert']=1; + } + if (!isset($_POST['ShowOnSpec'])) { + $_POST['ShowOnSpec']=1; + } + if ($myrow['numericvalue'] == 1) { + $IsNumeric = _('Yes'); + $Class="number"; + } + switch ($myrow['type']) { + case 0; //textbox + $TypeDisp='Text Box'; + break; + case 1; //select box + $TypeDisp='Select Box'; + break; + case 2; //checkbox + $TypeDisp='Check Box'; + break; + case 3; //datebox + $TypeDisp='Date Box'; + $Class="date"; + break; + case 4; //range + $TypeDisp='Range'; + break; + } //end switch + if ($TypeDisp=='Select Box') { + echo '<tr> + <td>' . _('Possible Values') . ':</td> + <td><input type="text" name="DefaultValue" size="50" maxlength="150" value="' . $_POST['DefaultValue']. '" /></td> + </tr>'; + } + echo '<tr> + <td>' . _('Target Value') . ':</td> + <td><input type="text" class="' . $Class.'" name="TargetValue" size="15" maxlength="15" value="' . $_POST['TargetValue']. '" /> '.$_POST['Units'].'</td> + </tr>'; + + if ($TypeDisp=='Range') { + echo '<tr> + <td>' . _('Range Min') . ':</td> + <td><input class="' . $Class.'" type="text" name="RangeMin" size="10" maxlength="10" value="' . $_POST['RangeMin']. '" /></td> + </tr>'; + echo '<tr> + <td>' . _('Range Max') . ':</td> + <td><input class="' . $Class.'" type="text" name="RangeMax" size="10" maxlength="10" value="' . $_POST['RangeMax']. '" /></td> + </tr>'; + } + echo '<tr> + <td>' . _('Show On Cert?') . ':</td> + <td><select name="ShowOnCert">'; + if ($_POST['ShowOnCert']==1){ + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + } else { + echo '<option value="1">' . _('Yes') . '</option>'; + } + if ($_POST['ShowOnCert']==0){ + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + } else { + echo '<option value="0">' . _('No') . '</option>'; + } + echo '</select></td></tr><tr> + <td>' . _('Show On Spec?') . ':</td> + <td><select name="ShowOnSpec">'; + if ($_POST['ShowOnSpec']==1){ + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + } else { + echo '<option value="1">' . _('Yes') . '</option>'; + } + if ($_POST['ShowOnSpec']==0){ + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + } else { + echo '<option value="0">' . _('No') . '</option>'; + } + echo '</select></td></tr><tr> + <td>' . _('Show On Test Plan?') . ':</td> + <td><select name="ShowOnTestPlan">'; + if ($_POST['ShowOnTestPlan']==1){ + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + } else { + echo '<option value="1">' . _('Yes') . '</option>'; + } + if ($_POST['ShowOnTestPlan']==0){ + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + } else { + echo '<option value="0">' . _('No') . '</option>'; + } + echo '</select></td></tr><tr> + <td>' . _('Active?') . ':</td> + <td><select name="Active">'; + if ($_POST['Active']==1){ + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + } else { + echo '<option value="1">' . _('Yes') . '</option>'; + } + if ($_POST['Active']==0){ + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + } else { + echo '<option value="0">' . _('No') . '</option>'; + } + echo '</select></td> + </tr> + </table> + <br /> + <div class="centre"> + <input type="submit" name="submit" value="' . _('Enter Information') . '" /> + </div> + </div> + </form>'; + } + if (isset($KeyValue)) { + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?ListTests=yes&KeyValue=' .$KeyValue .'">' . _('Add More Tests') . '</a></div>'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?CopySpec=yes&KeyValue=' .$KeyValue .'">' . _('Copy This Specification') . '</a></div>'; + echo '<div class="centre"><a target="_blank" href="'. $RootPath . '/PDFProdSpec.php?KeyValue=' .$KeyValue .'">' . _('Print Product Specification') . '</a></div>'; + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') .'">' . _('Product Specification Main Page') . '</a></div>'; + } +} //end if record deleted no point displaying form to add record + +include('includes/footer.inc'); +?> \ No newline at end of file Added: trunk/QATests.php =================================================================== --- trunk/QATests.php (rev 0) +++ trunk/QATests.php 2014-12-16 20:55:46 UTC (rev 7026) @@ -0,0 +1,488 @@ +<?php +/* $Id: QATests.php 1 2014-09-08 10:42:50Z agaluski $*/ + +include('includes/session.inc'); +$Title = _('QA Tests Maintenance'); +include('includes/header.inc'); + +if (isset($_GET['SelectedQATest'])){ + $SelectedQATest =mb_strtoupper($_GET['SelectedQATest']); +} elseif(isset($_POST['SelectedQATest'])){ + $SelectedQATest =mb_strtoupper($_POST['SelectedQATest']); +} + +if (isset($Errors)) { + unset($Errors); +} + +$Errors = array(); + +echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p>'; + +if (isset($_POST['submit'])) { + + //initialise no input errors assumed initially before we test + $InputError = 0; + + /* actions to take once the user has clicked the submit button + ie the page has called itself with some user input */ + $i=1; + + //first off validate inputs sensible + + if (mb_strlen($_POST['QATestName']) > 50) { + $InputError = 1; + prnMsg(_('The QA Test name must be fifty characters or less long'),'error'); + $Errors[$i] = 'QATestName'; + $i++; + } + + if (mb_strlen($_POST['Type']) =='') { + $InputError = 1; + prnMsg(_('The Type must not be blank'),'error'); + $Errors[$i] = 'Type'; + $i++; + } + $sql= "SELECT COUNT(*) FROM qatests WHERE qatests.name='".$_POST['QATestName']."' + AND qatests.testid <> '" .$SelectedQATest. "'"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ($myrow[0]>0) { + $InputError = 1; + prnMsg(_('The QA Test name already exists'),'error'); + $Errors[$i] = 'QATestName'; + $i++; + } + + if (isset($SelectedQATest) AND $InputError !=1) { + + /*SelectedQATest could also exist if submit had not been clicked this code would not run in this case cos submit is false of course see the delete code below*/ + + $sql = "UPDATE qatests SET name='" . $_POST['QATestName'] . "', + method='" . $_POST['Method'] . "', + groupby='" . $_POST['GroupBy'] . "', + units='" . $_POST['Units'] . "', + type='" . $_POST['Type'] . "', + defaultvalue='" . $_POST['DefaultValue'] . "', + numericvalue='" . $_POST['NumericValue'] . "', + showoncert='" . $_POST['ShowOnCert'] . "', + showonspec='" . $_POST['ShowOnSpec'] . "', + showontestplan='" . $_POST['ShowOnTestPlan'] . "', + active='" . $_POST['Active'] . "' + WHERE qatests.testid = '".$SelectedQATest."'"; + + $msg = _('QA Test record for') . ' ' . $_POST['QATestName'] . ' ' . _('has been updated'); + } elseif ($InputError !=1) { + + /*Selected group is null cos no item selected on first time round so must be adding a record must be submitting new entries in the new QA Test form */ + + $sql = "INSERT INTO qatests (name, + method, + groupby, + units, + type, + defaultvalue, + numericvalue, + showoncert, + showonspec, + showontestplan, + active) + VALUES ('" . $_POST['QATestName'] . "', + '" . $_POST['Method'] . "', + '" . $_POST['GroupBy'] . "', + '" . $_POST['Units'] . "', + '" .$_POST['Type'] . "', + '" . $_POST['DefaultValue'] . "', + '" . $_POST['NumericValue'] . "', + '" . $_POST['ShowOnCert'] . "', + '" . $_POST['ShowOnSpec'] . "', + '" . $_POST['ShowOnTestPlan'] . "', + '" . $_POST['Active'] . "' + )"; + + $msg = _('A new QA Test record has been added for') . ' ' . $_POST['QATestName']; + } + if ($InputError !=1) { + //run the SQL from either of the above possibilites + $ErrMsg = _('The insert or update of the QA Test failed because'); + $DbgMsg = _('The SQL that was used and failed was'); + $result = DB_query($sql,$db,$ErrMsg, $DbgMsg); + + prnMsg($msg , 'success'); + + unset($SelectedQATest); + unset($_POST['QATestName']); + //unset($_POST['Method']); + //unset($_POST['GroupBy']); + //unset($_POST['Units']); + //unset($_POST['Type']); + unset($_POST['DefaultValue']); + unset($_POST['NumericValue']); + //unset($_POST['ShowOnCert']); + //unset($_POST['ShowOnSpec']); + //unset($_POST['ShowOnTestPlan']); + //unset($_POST['Active']); + } + +} elseif (isset($_GET['delete'])) { +//the link to delete a selected record was clicked instead of the submit button + +// PREVENT DELETES IF DEPENDENT RECORDS + + $sql= "SELECT COUNT(*) FROM prodspec WHERE prodspec.testid='".$SelectedQATest."'"; + //$result = DB_query($sql,$db); + //$myrow = DB_fetch_row($result); + if ($myrow[0]>0) { + prnMsg(_('Cannot delete this QA Test because Product Specs are using it'),'error'); + } else { + $sql="DELETE FROM qatests WHERE testid='". $SelectedQATest."'"; + $ErrMsg = _('The QA Test could not be deleted because'); + $result = DB_query($sql,$db,$ErrMsg); + + prnMsg(_('QA Test') . ' ' . $SelectedQATest . ' ' . _('has been deleted from the database'),'success'); + unset ($SelectedQATest); + unset($delete); + unset ($_GET['delete']); + } +} + +if (isset($SelectedQATest)) { + echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">' . _('Show All QA Tests') . '</a></div>'; +} + +if (! isset($_GET['delete'])) { + + echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; + echo '<div>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + + if (isset($SelectedQATest)) { + //editing an existing Sales-person + + $sql = "SELECT testid, + name, + method, + groupby, + units, + type, + defaultvalue, + numericvalue, + showoncert, + showonspec, + showontestplan, + active + FROM qatests + WHERE testid='".$SelectedQATest."'"; + + $result = DB_query($sql, $db); + $myrow = DB_fetch_array($result); + + $_POST['SelectedQATest'] = $myrow['testid']; + $_POST['QATestName'] = $myrow['name']; + $_POST['Method'] = $myrow['method']; + $_POST['GroupBy'] = $myrow['groupby']; + $_POST['Type'] = $myrow['type']; + $_POST['Units'] = $myrow['units']; + $_POST['DefaultValue'] = $myrow['defaultvalue']; + $_POST['NumericValue'] = $myrow['numericvalue']; + $_POST['ShowOnCert'] = $myrow['showoncert']; + $_POST['ShowOnSpec'] = $myrow['showonspec']; + $_POST['ShowOnTestPlan'] = $myrow['showontestplan']; + $_POST['Active'] = $myrow['active']; + + + echo '<input type="hidden" name="SelectedQATest" value="' . $SelectedQATest . '" />'; + echo '<input type="hidden" name="TestID" value="' . $_POST['SelectedQATest'] . '" />'; + echo '<table class="selection"> + <tr> + <td>' . _('QA Test ID') . ':</td> + <td>' . $_POST['SelectedQATest'] . '</td> + </tr>'; + + } else { //end of if $SelectedQATest only do the else when a new record is being entered + + echo '<table class="selection">'; + + } + if (!isset($_POST['QATestName'])){ + $_POST['QATestName']=''; + } + if (!isset($_POST['Method'])){ + $_POST['Method']=''; + } + if (!isset($_POST['GroupBy'])){ + $_POST['GroupBy']=''; + } + if (!isset($_POST['Units'])){ + $_POST['Units']=''; + } + if (!isset($_POST['Type'])) { + $_POST['Type']=4; + } + if (!isset($_POST['Active'])) { + $_POST['Active']=1; + } + if (!isset($_POST['NumericValue'])) { + $_POST['NumericValue']=1; + } + if (!isset($_POST['ShowOnCert'])) { + $_POST['ShowOnCert']=1; + } + if (!isset($_POST['ShowOnSpec'])) { + $_POST['ShowOnSpec']=1; + } + if (!isset($_POST['ShowOnTestPlan'])) { + $_POST['ShowOnTestPlan']=1; + } + echo '<tr> + <td>' . _('QA Test Name') . ':</td> + <td><input type="text" '. (in_array('QATestName',$Errors) ? 'class="inputerror"' : '' ) .' name="QATestName" size="30" maxlength="50" value="' . $_POST['QATestName'] . '" /></td> + </tr>'; + echo '<tr> + <td>' . _('Method') . ':</td> + <td><input type="text" name="Method" size="20" maxlength="20" value="' . $_POST['Method'] . '" /></td> + </tr>'; + echo '<tr> + <td>' . _('Group By') . ':</td> + <td><input type="text" name="GroupBy" size="20" maxlength="20" value="' . $_POST['GroupBy'] . '" /></td> + </tr>'; + echo '<tr> + <td>' . _('Units') . ':</td> + <td><input type="text" name="Units" size="20" maxlength="20" value="' . $_POST['Units'] . '" /></td> + </tr>'; + echo '<tr> + <td>' . _('Type') . ':</td> + <td><select name="Type">'; + if ($_POST['Type']==0){ + echo '<option selected="selected" value="0">' . _('Text Box') . '</option>'; + } else { + echo '<option Type="0">' . _('Text Box') . '</option>'; + } + if ($_POST['Type']==1){ + echo '<option selected="selected" value="1">' . _('Select Box') . '</option>'; + } else { + echo '<option value="1">' . _('Select Box') . '</option>'; + } + if ($_POST['Type']==2){ + echo '<option selected="selected" value="2">' . _('Check Box') . '</option>'; + } else { + echo '<option Type="2">' . _('Check Box') . '</option>'; + } + if ($_POST['Type']==3){ + echo '<option selected="selected" value="3">' . _('Date Box') . '</option>'; + } else { + echo '<option value="3">' . _('Date Box') . '</option>'; + } + if ($_POST['Type']==4){ + echo '<option selected="selected" value="4">' . _('Range') . '</option>'; + } else { + echo '<option value="4">' . _('Range') . '</option>'; + } + echo '</select></td></tr><tr> + <td>' . _('Possible Values') . ':</td> + <td><input type="text" name="DefaultValue" size="50" maxlength="150" value="' . $_POST['DefaultValue']. '" /></td> + </tr>'; + + echo '<tr> + <td>' . _('Numeric Value?') . ':</td> + <td><select name="NumericValue">'; + if ($_POST['NumericValue']==1){ + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + } else { + echo '<option value="1">' . _('Yes') . '</option>'; + } + if ($_POST['NumericValue']==0){ + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + } else { + echo '<option value="0">' . _('No') . '</option>'; + } + echo '</select></td></tr><tr> + <td>' . _('Show On Cert?') . ':</td> + <td><select name="ShowOnCert">'; + if ($_POST['ShowOnCert']==1){ + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + } else { + echo '<option value="1">' . _('Yes') . '</option>'; + } + if ($_POST['ShowOnCert']==0){ + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + } else { + echo '<option value="0">' . _('No') . '</option>'; + } + echo '</select></td></tr><tr> + <td>' . _('Show On Spec?') . ':</td> + <td><select name="ShowOnSpec">'; + if ($_POST['ShowOnSpec']==1){ + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + } else { + echo '<option value="1">' . _('Yes') . '</option>'; + } + if ($_POST['ShowOnSpec']==0){ + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + } else { + echo '<option value="0">' . _('No') . '</option>'; + } + echo '</select></td></tr><tr> + <td>' . _('Show On Test Plan?') . ':</td> + <td><select name="ShowOnTestPlan">'; + if ($_POST['ShowOnTestPlan']==1){ + echo '<option selected="se... [truncated message content] |
From: <dai...@us...> - 2014-12-17 09:04:51
|
Revision: 7027 http://sourceforge.net/p/web-erp/reponame/7027 Author: daintree Date: 2014-12-17 09:04:39 +0000 (Wed, 17 Dec 2014) Log Message: ----------- tweaks to QA stuff Modified Paths: -------------- trunk/AccountGroups.php trunk/CustomerBalancesMovement.php trunk/ProductSpecs.php trunk/QATests.php trunk/includes/MainMenuLinksArray.php trunk/sql/mysql/upgrade4.11-4.12.sql Added Paths: ----------- trunk/doc/Manual/ManualQualityAssurance.html trunk/doc/Manual/images/QA_Config.png trunk/doc/Manual/images/QA_Menus.png trunk/doc/Manual/images/QA_Tests.png trunk/doc/Manual/images/QA_TestsEntry.png Modified: trunk/AccountGroups.php =================================================================== --- trunk/AccountGroups.php 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/AccountGroups.php 2014-12-17 09:04:39 UTC (rev 7027) @@ -34,9 +34,6 @@ return false; } //end of function CheckForRecursiveGroupName - - - // If $Errors is set, then unset it. if (isset($Errors)) { unset($Errors); @@ -200,6 +197,7 @@ unset ($_POST['GroupName']); unset ($_POST['SequenceInTB']); } + } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button @@ -258,7 +256,6 @@ } } //end if account group used in GL accounts - } if (!isset($_GET['SelectedAccountGroup']) AND !isset($_POST['SelectedAccountGroup'])) { @@ -471,4 +468,4 @@ } //end if record deleted no point displaying form to add record include('includes/footer.inc'); -?> +?> \ No newline at end of file Modified: trunk/CustomerBalancesMovement.php =================================================================== --- trunk/CustomerBalancesMovement.php 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/CustomerBalancesMovement.php 2014-12-17 09:04:39 UTC (rev 7027) @@ -16,6 +16,7 @@ $SalesAreasResult = DB_query("SELECT areacode, areadescription FROM areas"); $CustomersResult = DB_query("SELECT debtorno, name FROM debtorsmaster ORDER BY name"); + $SalesFolkResult = DB_query("SELECT salesmancode, salesmanname FROM salesman ORDER BY salesmanname"); echo '<form id="Form1" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> @@ -44,6 +45,16 @@ </td> </tr> <tr> + <td>' . _('Sales Person') . '</td> + <td><select name="SalesPerson"> + <option selected="selected" value="">' . _('All') . '</option>'; + while ($SalesPersonRow = DB_fetch_array($SalesFolkResult)) { + echo '<option value="' . $SalesPersonRow['salesmancode'] . '">' . $SalesPersonRow['salesmanname'] . '</option>'; + } + echo '</select> + </td> + </tr> + <tr> <td>' . _('Date From') . ':</td> <td><input type="text" class="date" alt="' . $_SESSION['DefaultDateFormat'] . '" name="FromDate" maxlength="10" size="11" value="' . Date($_SESSION['DefaultDateFormat'], Mktime(0, 0, 0, Date('m') - $_SESSION['NumberOfMonthMustBeShown'], Date('d'), Date('Y'))) . '" /></td> </tr> @@ -72,8 +83,8 @@ $WhereClause = "debtorsmaster.debtorno='" . $_POST['Customer'] . "'"; } elseif ($_POST['SalesArea']!='') { $WhereClause = "custbranch.area='" . $_POST['SalesArea'] . "'"; -} else { - $WhereClause =''; +} elseif ($_POST['SalesPerson']!='') { + $WhereClause = "custbranch.salesman='" . $_POST['SalesPerson'] . "'"; } $sql = "SELECT SUM(ovamount+ovgst+ovdiscount+ovfreight-alloc) AS currencybalance, Modified: trunk/ProductSpecs.php =================================================================== --- trunk/ProductSpecs.php 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/ProductSpecs.php 2014-12-17 09:04:39 UTC (rev 7027) @@ -3,6 +3,8 @@ include('includes/session.inc'); $Title = _('Product Specifications Maintenance'); +$ViewTopic= 'QualityAssurance';// Filename in ManualContents.php's TOC. +$BookMark = 'QA';// Anchor's id in the manual's html document. include('includes/header.inc'); if (isset($_GET['SelectedQATest'])){ @@ -16,15 +18,15 @@ $KeyValue =mb_strtoupper($_POST['KeyValue']); } -if ($_POST['RangeMin']=='') { - $RangeMin="NULL"; +if (!isset($_POST['RangeMin']) OR $_POST['RangeMin']=='') { + $RangeMin = 'NULL'; } else { - $RangeMin="'" . $_POST['RangeMin'] . "'"; + $RangeMin = "'" . $_POST['RangeMin'] . "'"; } -if ($_POST['RangeMax']=='') { - $RangeMax="NULL"; +if (!isset($_POST['RangeMax']) OR $_POST['RangeMax']=='') { + $RangeMax = 'NULL'; } else { - $RangeMax="'" . $_POST['RangeMax'] . "'"; + $RangeMax = "'" . $_POST['RangeMax'] . "'"; } if (isset($Errors)) { @@ -48,7 +50,7 @@ include('includes/footer.inc'); exit; } else { - $sql = "INSERT IGNORE INTO prodspecs + $sql = "INSERT IGNORE INTO prodspecs (keyval, testid, defaultvalue, @@ -73,7 +75,7 @@ $msg = _('A Product Specification has been copied to') . ' ' . $_POST['CopyTo'] . ' from ' . ' ' . $KeyValue ; $ErrMsg = _('The insert of the Product Specification failed because'); $DbgMsg = _('The SQL that was used and failed was'); - $result = DB_query($sql,$db,$ErrMsg, $DbgMsg); + $result = DB_query($sql,$ErrMsg, $DbgMsg); prnMsg($msg , 'success'); $KeyValue=$_POST['CopyTo']; unset($_GET['CopySpec']); @@ -107,15 +109,15 @@ description FROM prodspecs LEFT OUTER JOIN stockmaster ON stockmaster.stockid=prodspecs.keyval"; - - $ResultSelection=DB_query($SQLSpecSelect, $db); + + $ResultSelection=DB_query($SQLSpecSelect); echo '<td><select name="KeyValue">'; while ($MyRowSelection=DB_fetch_array($ResultSelection)){ echo '<option value="' . $MyRowSelection['keyval'] . '">' . $MyRowSelection['keyval'].' - ' .htmlspecialchars($MyRowSelection['description'], ENT_QUOTES,'UTF-8', false) . '</option>'; } - echo '</select></td>'; + echo '</select></td>'; echo '</tr> </table> </div> @@ -123,15 +125,15 @@ <input type="submit" name="pickspec" value="' . _('Submit') . '" /> </div> </form>'; - + } else { //show header $SQLSpecSelect="SELECT description FROM stockmaster WHERE stockmaster.stockid='" .$KeyValue. "'"; - $ResultSelection=DB_query($SQLSpecSelect, $db); + $ResultSelection=DB_query($SQLSpecSelect); $MyRowSelection=DB_fetch_array($ResultSelection); echo '<br/>' . _('Product Specification for') . ' ' . $KeyValue . '-' . $MyRowSelection['description'] . '<br/><br/>'; } @@ -144,13 +146,13 @@ numericvalue, qatests.defaultvalue FROM qatests - LEFT JOIN prodspecs + LEFT JOIN prodspecs ON prodspecs.testid=qatests.testid AND prodspecs.keyval='".$KeyValue."' WHERE qatests.active='1' AND prodspecs.keyval IS NULL ORDER BY name"; - $result = DB_query($sql,$db); + $result = DB_query($sql); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<div>'; echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; @@ -186,7 +188,7 @@ } else { $IsNumeric = _('No'); } - + switch ($myrow['type']) { case 0; //textbox $TypeDisp=_('Text Box'); @@ -226,8 +228,8 @@ $RangeMax); } //END WHILE LIST LOOP - - echo '</table><br /></div> + + echo '</table><br /></div> <div class="centre"> <input type="hidden" name="KeyValue" value="' . $KeyValue . '" /> <input type="hidden" name="AddTestsCounter" value="' . $x . '" /> @@ -249,8 +251,8 @@ } else { $AddRangeMax="'" . $_POST['AddRangeMax' .$i] . "'"; } - - $sql = "INSERT INTO prodspecs + + $sql = "INSERT INTO prodspecs (keyval, testid, defaultvalue, @@ -262,21 +264,21 @@ showontestplan, active) SELECT '" . $KeyValue . "', - testid, - defaultvalue, + testid, + defaultvalue, '" . $_POST['AddTargetValue' .$i] . "', " . $AddRangeMin . ", " . $AddRangeMax. ", - showoncert, + showoncert, showonspec, showontestplan, - active + active FROM qatests WHERE testid='" .$_POST['AddTestID' .$i]. "'"; echo $sql; $msg = _('A Product Specification record has been added for Test ID') . ' ' . $_POST['AddTestID' .$i] . ' for ' . ' ' . $KeyValue ; $ErrMsg = _('The insert of the Product Specification failed because'); $DbgMsg = _('The SQL that was used and failed was'); - $result = DB_query($sql,$db,$ErrMsg, $DbgMsg); + $result = DB_query($sql,$ErrMsg, $DbgMsg); prnMsg($msg , 'success'); } //if on } //for @@ -311,7 +313,7 @@ $msg = _('Product Specification record for') . ' ' . $_POST['QATestName'] . ' for ' . ' ' . $KeyValue . _('has been updated'); $ErrMsg = _('The update of the Product Specification failed because'); $DbgMsg = _('The SQL that was used and failed was'); - $result = DB_query($sql,$db,$ErrMsg, $DbgMsg); + $result = DB_query($sql,$ErrMsg, $DbgMsg); prnMsg($msg , 'success'); @@ -323,16 +325,16 @@ unset($_POST['ShowOnCert']); unset($_POST['ShowOnSpec']); unset($_POST['Active']); - } + } } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button // PREVENT DELETES IF DEPENDENT RECORDS - $sql= "SELECT COUNT(*) FROM qasamples + $sql= "SELECT COUNT(*) FROM qasamples INNER JOIN sampleresults on sampleresults.sampleid=qasamples.sampleid AND sampleresults.testid='". $SelectedQATest."' WHERE qasamples.prodspeckey='".$KeyValue."'"; - $result = DB_query($sql,$db); + $result = DB_query($sql); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { prnMsg(_('Cannot delete this Product Specification because there are test results tied to it'),'error'); @@ -340,7 +342,7 @@ $sql="DELETE FROM prodspecs WHERE keyval='". $KeyValue."' AND testid='". $SelectedQATest."'"; $ErrMsg = _('The Product Specification could not be deleted because'); - $result = DB_query($sql,$db,$ErrMsg); + $result = DB_query($sql,$ErrMsg); prnMsg(_('Product Specification') . ' ' . $SelectedQATest . ' for ' . ' ' . $KeyValue . _('has been deleted from the database'),'success'); unset ($SelectedQATest); @@ -374,10 +376,10 @@ ON qatests.testid=prodspecs.testid WHERE prodspecs.keyval='" .$KeyValue."' ORDER BY name"; - $result = DB_query($sql,$db); + $result = DB_query($sql); - echo '<table class="selection">'; - echo '<tr> + echo '<table class="selection"> + <tr> <th class="ascending">' . _('Name') . '</th> <th class="ascending">' . _('Method') . '</th> <th class="ascending">' . _('Units') . '</th> @@ -515,8 +517,8 @@ ON qatests.testid=prodspecs.testid WHERE prodspecs.keyval='".$KeyValue."' AND prodspecs.testid='".$SelectedQATest."'"; - - $result = DB_query($sql, $db); + + $result = DB_query($sql); $myrow = DB_fetch_array($result); $_POST['SelectedQATest'] = $myrow['testid']; @@ -534,8 +536,8 @@ $_POST['ShowOnSpec'] = $myrow['showonspec']; $_POST['ShowOnTestPlan'] = $myrow['showontestplan']; $_POST['Active'] = $myrow['active']; - + echo '<input type="hidden" name="SelectedQATest" value="' . $SelectedQATest . '" />'; echo '<input type="hidden" name="KeyValue" value="' . $KeyValue . '" />'; echo '<input type="hidden" name="TestID" value="' . $_POST['SelectedQATest'] . '" />'; @@ -557,7 +559,7 @@ if ($myrow['numericvalue'] == 1) { $IsNumeric = _('Yes'); $Class="number"; - } + } switch ($myrow['type']) { case 0; //textbox $TypeDisp='Text Box'; @@ -586,7 +588,7 @@ <td>' . _('Target Value') . ':</td> <td><input type="text" class="' . $Class.'" name="TargetValue" size="15" maxlength="15" value="' . $_POST['TargetValue']. '" /> '.$_POST['Units'].'</td> </tr>'; - + if ($TypeDisp=='Range') { echo '<tr> <td>' . _('Range Min') . ':</td> @@ -596,7 +598,7 @@ <td>' . _('Range Max') . ':</td> <td><input class="' . $Class.'" type="text" name="RangeMax" size="10" maxlength="10" value="' . $_POST['RangeMax']. '" /></td> </tr>'; - } + } echo '<tr> <td>' . _('Show On Cert?') . ':</td> <td><select name="ShowOnCert">'; @@ -658,7 +660,7 @@ </div> </div> </form>'; - } + } if (isset($KeyValue)) { echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?ListTests=yes&KeyValue=' .$KeyValue .'">' . _('Add More Tests') . '</a></div>'; echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?CopySpec=yes&KeyValue=' .$KeyValue .'">' . _('Copy This Specification') . '</a></div>'; Modified: trunk/QATests.php =================================================================== --- trunk/QATests.php 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/QATests.php 2014-12-17 09:04:39 UTC (rev 7027) @@ -36,7 +36,7 @@ $Errors[$i] = 'QATestName'; $i++; } - + if (mb_strlen($_POST['Type']) =='') { $InputError = 1; prnMsg(_('The Type must not be blank'),'error'); @@ -51,7 +51,7 @@ $InputError = 1; prnMsg(_('The QA Test name already exists'),'error'); $Errors[$i] = 'QATestName'; - $i++; + $i++; } if (isset($SelectedQATest) AND $InputError !=1) { @@ -189,8 +189,8 @@ $_POST['ShowOnSpec'] = $myrow['showonspec']; $_POST['ShowOnTestPlan'] = $myrow['showontestplan']; $_POST['Active'] = $myrow['active']; - + echo '<input type="hidden" name="SelectedQATest" value="' . $SelectedQATest . '" />'; echo '<input type="hidden" name="TestID" value="' . $_POST['SelectedQATest'] . '" />'; echo '<table class="selection"> @@ -236,23 +236,24 @@ } echo '<tr> <td>' . _('QA Test Name') . ':</td> - <td><input type="text" '. (in_array('QATestName',$Errors) ? 'class="inputerror"' : '' ) .' name="QATestName" size="30" maxlength="50" value="' . $_POST['QATestName'] . '" /></td> + <td><input type="text" '. (in_array('QATestName',$Errors) ? 'class="inputerror"' : '' ) .' name="QATestName" required="required" title="' . _('The name of the Test you are setting up') . '" size="30" maxlength="50" value="' . $_POST['QATestName'] . '" /></td> </tr>'; echo '<tr> <td>' . _('Method') . ':</td> - <td><input type="text" name="Method" size="20" maxlength="20" value="' . $_POST['Method'] . '" /></td> + <td><input type="text" name="Method" title="' . _('ASTM, ISO, UL or other') . '" size="20" maxlength="20" value="' . $_POST['Method'] . '" /></td> </tr>'; echo '<tr> <td>' . _('Group By') . ':</td> - <td><input type="text" name="GroupBy" size="20" maxlength="20" value="' . $_POST['GroupBy'] . '" /></td> + <td><input type="text" name="GroupBy" title="' . _('Can be used to group certain Tests on the Product Specification or Certificate of +Analysis or left blank') . '" size="20" maxlength="20" value="' . $_POST['GroupBy'] . '" /></td> </tr>'; echo '<tr> <td>' . _('Units') . ':</td> - <td><input type="text" name="Units" size="20" maxlength="20" value="' . $_POST['Units'] . '" /></td> + <td><input type="text" name="Units" title="' . _('How this is measured. PSI, Fahrenheit, Celsius etc.') . '" size="20" maxlength="20" value="' . $_POST['Units'] . '" /></td> </tr>'; echo '<tr> <td>' . _('Type') . ':</td> - <td><select name="Type">'; + <td><select title="' . _('What sort of data field is required to record the results for this test') . '" name="Type">'; if ($_POST['Type']==0){ echo '<option selected="selected" value="0">' . _('Text Box') . '</option>'; } else { Added: trunk/doc/Manual/ManualQualityAssurance.html =================================================================== --- trunk/doc/Manual/ManualQualityAssurance.html (rev 0) +++ trunk/doc/Manual/ManualQualityAssurance.html 2014-12-17 09:04:39 UTC (rev 7027) @@ -0,0 +1,32 @@ +<h1><a id="QA">Quality Assurance</a></h1> + +<h2>Overview</h2> + +<p>The Quality module allows the users of webERP to define what they would like to test, apply those tests to certain templates or specific products (Items, Stocks) and then to capture actual test results on a Lot to Lot or Serial number basis. Outputs from the module include a Product Specification or Data Sheet and a Certificate of Analysis. Historical Results are kept and can be compared side by side for any particular Item. There is an option in the configuration that allows QA Samples to be automatically logged for Purchase Order and Work Order receipts if the product specification exists and the item is Lot or Serial Controlled. Also in the configuration are some disclaimers for specifcations and certifications.</p> + +<img src="images/QA_Config.png" alt="QA Config screen" /> + +<h2>Menu Options</h2> +<p>All menu options for Quality are found under Manufacturing. Your menus may look differnet based on your permissoins. The menus are shown below.</p> +<img src="images/QA_Menus.png" alt="QA Menu options screen" /> + +<h2>QA Tests Maintenance</h2> +<p>This is where all tests that will be performed are defined. Other specification related information can be captured here that isn’t tested but describes in more detail the product specification. An example of this would be Processing Conditions for your product that you wish for your customers to understand. A specification is made up of any number of tests. The test defines outer tolerances but the specification allows the upper and lower bounds of the test to be specified.</p> +<img src="images/QA_Tests.png" alt="QA Tests screen" /> + +<img src="images/QA_TestsEntry.png" alt="QA Tests Entry screen" /> + +Test Name: The name of the Test you are setting up +Method: ASTM, ISO, UL or other. +Group By: Free Form. Can be used to Group certain Test on the Product Specification or Certificate of +Analysis +Units: How this is measure. PSI, Fahrenheit, Celsius etc. +Type: How do we measure/Enter this value (Text, Date, Numeric Range, and Selection List?) +Possible Values: (Only valid for type Select List, controls what appears in the drop down?) +Numeric Value: Enforces numbers to be entered for this test type +Show on Cert: Does this test print on the Certificate of Analysis (Can be overwritten at a Product level) +Show on Cert: Does this test print on the Product Specification (Can be overwritten at a Product level) +Show on Cert: Does this test print on the Test Plan (Can be overwritten at a Product level) +Active: once a test has results entered against it delete is no longer allowed. This flag can be used to +inactivate it and not use it on future product specifications. +<!-- Help End: QA --> Added: trunk/doc/Manual/images/QA_Config.png =================================================================== (Binary files differ) Index: trunk/doc/Manual/images/QA_Config.png =================================================================== --- trunk/doc/Manual/images/QA_Config.png 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/doc/Manual/images/QA_Config.png 2014-12-17 09:04:39 UTC (rev 7027) Property changes on: trunk/doc/Manual/images/QA_Config.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/doc/Manual/images/QA_Menus.png =================================================================== (Binary files differ) Index: trunk/doc/Manual/images/QA_Menus.png =================================================================== --- trunk/doc/Manual/images/QA_Menus.png 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/doc/Manual/images/QA_Menus.png 2014-12-17 09:04:39 UTC (rev 7027) Property changes on: trunk/doc/Manual/images/QA_Menus.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/doc/Manual/images/QA_Tests.png =================================================================== (Binary files differ) Index: trunk/doc/Manual/images/QA_Tests.png =================================================================== --- trunk/doc/Manual/images/QA_Tests.png 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/doc/Manual/images/QA_Tests.png 2014-12-17 09:04:39 UTC (rev 7027) Property changes on: trunk/doc/Manual/images/QA_Tests.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/doc/Manual/images/QA_TestsEntry.png =================================================================== (Binary files differ) Index: trunk/doc/Manual/images/QA_TestsEntry.png =================================================================== --- trunk/doc/Manual/images/QA_TestsEntry.png 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/doc/Manual/images/QA_TestsEntry.png 2014-12-17 09:04:39 UTC (rev 7027) Property changes on: trunk/doc/Manual/images/QA_TestsEntry.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/includes/MainMenuLinksArray.php 2014-12-17 09:04:39 UTC (rev 7027) @@ -283,7 +283,7 @@ '/ReorderLevelLocation.php'); $MenuItems['manuf']['Transactions']['Caption'] = array( _('Work Order Entry'), - _('Select A Work Order')), + _('Select A Work Order'), _('QA Samples and Test Results')); $MenuItems['manuf']['Transactions']['URL'] = array( '/WorkOrderEntry.php', Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2014-12-16 20:55:46 UTC (rev 7026) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2014-12-17 09:04:39 UTC (rev 7027) @@ -5,17 +5,19 @@ INSERT INTO `scripts` VALUES ('UserLocations.php', '15', 'Location User Maintenance'); ALTER TABLE `stockmoves` ADD `userid` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `trandate`; -INSERT INTO `scripts` ( `script` , `pagesecurity` , `description` ) VALUES ('QATests.php', '16', 'Quality Test Maintenance'); -INSERT INTO `scripts` ( `script` , `pagesecurity` , `description` ) VALUES ('ProductSpecs.php', '16', 'Product Specification Maintenance'); -INSERT INTO `scripts` ( `script` , `pagesecurity` , `description` ) VALUES ('TestPlanResults.php', '16', 'Test Plan Results Entry'); -INSERT INTO `scripts` ( `script` , `pagesecurity` , `description` ) VALUES ('PDFProdSpec.php', '0', 'PDF OF Product Specification'); -INSERT INTO `scripts` ( `script` , `pagesecurity` , `description` ) VALUES ('PDFCOA.php', '0', 'PDF of COA'); -INSERT INTO `scripts` ( `script` , `pagesecurity` , `description` ) VALUES ('PDFTestPlan.php', '16', 'PDF of Test Plan'); -INSERT INTO `scripts` ( `script` , `pagesecurity` , `description` ) VALUES ('SelectQASamples.php', '16', 'Select QA Samples'); -INSERT INTO `scripts` ( `script` , `pagesecurity` , `description` ) VALUES ('HistoricalTestResults.php', '16', 'Historical Test Results') +INSERT INTO `securitytokens` VALUES ('16', 'QA'); +INSERT INTO `scripts` VALUES ('QATests.php', '16', 'Quality Test Maintenance'); +INSERT INTO `scripts` VALUES ('ProductSpecs.php', '16', 'Product Specification Maintenance'); +INSERT INTO `scripts` VALUES ('TestPlanResults.php', '16', 'Test Plan Results Entry'); +INSERT INTO `scripts` VALUES ('PDFProdSpec.php', '0', 'PDF OF Product Specification'); +INSERT INTO `scripts` VALUES ('PDFCOA.php', '0', 'PDF of COA'); +INSERT INTO `scripts` VALUES ('PDFTestPlan.php', '16', 'PDF of Test Plan'); +INSERT INTO `scripts` VALUES ('SelectQASamples.php', '16', 'Select QA Samples'); +INSERT INTO `scripts` VALUES ('HistoricalTestResults.php', '16', 'Historical Test Results'); -INSERT INTO `config` (`confname` ,`confvalue` )VALUES ('QualityLogSamples', '0'); + +INSERT INTO `config` (`confname` ,`confvalue` ) VALUES ('QualityLogSamples', '0'); INSERT INTO `config` (`confname` ,`confvalue` ) VALUES ('QualityCOAText', ''); INSERT INTO `config` (`confname` ,`confvalue` ) VALUES (' QualityProdSpecText', ''); |
From: <te...@us...> - 2014-12-18 02:07:10
|
Revision: 7029 http://sourceforge.net/p/web-erp/reponame/7029 Author: tehonu Date: 2014-12-18 02:07:07 +0000 (Thu, 18 Dec 2014) Log Message: ----------- Function allowing automatic translations fron Google Translate API. To be used with multi-language descriptions. Modified Paths: -------------- trunk/SystemParameters.php trunk/sql/mysql/upgrade4.11-4.12.sql Added Paths: ----------- trunk/includes/GoogleTranslator.php Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2014-12-17 09:11:47 UTC (rev 7028) +++ trunk/SystemParameters.php 2014-12-18 02:07:07 UTC (rev 7029) @@ -261,6 +261,9 @@ if ($_SESSION['AllowOrderLineItemNarrative'] != $_POST['X_AllowOrderLineItemNarrative'] ) { $sql[] = "UPDATE config SET confvalue = '". $_POST['X_AllowOrderLineItemNarrative']."' WHERE confname = 'AllowOrderLineItemNarrative'"; } + if ($_SESSION['GoogleTranslatorAPIKey'] != $_POST['X_GoogleTranslatorAPIKey'] ) { + $sql[] = "UPDATE config SET confvalue = '". $_POST['X_GoogleTranslatorAPIKey']."' WHERE confname = 'GoogleTranslatorAPIKey'"; + } if ($_SESSION['RequirePickingNote'] != $_POST['X_RequirePickingNote'] ) { $sql[] = "UPDATE config SET confvalue = '". $_POST['X_RequirePickingNote']."' WHERE confname = 'RequirePickingNote'"; } @@ -486,6 +489,11 @@ <td>' . _('Select the languages in which translations of the item description will be maintained. The default language is excluded.') . '</td> </tr>'; +// Google Translator API Key +echo '<tr style="outline: 1px solid"><td>' . _('Google Translator API Key') . ':</td> + <td><input type="text" name="X_GoogleTranslatorAPIKey" size="25" maxlength="50" value="' . $_SESSION['GoogleTranslatorAPIKey'] . '" /></td> + <td>' . _('Google Translator API Key to allow automatic translations. More info at https://cloud.google.com/translate/') . '</td></tr>'; + //'RequirePickingNote' echo '<tr style="outline: 1px solid"><td>' . _('A picking note must be produced before an order can be delivered') . ':</td> <td><select name="X_RequirePickingNote"> Added: trunk/includes/GoogleTranslator.php =================================================================== --- trunk/includes/GoogleTranslator.php (rev 0) +++ trunk/includes/GoogleTranslator.php 2014-12-18 02:07:07 UTC (rev 7029) @@ -0,0 +1,33 @@ +<?php + +// Detailed info on Google Translator API https://cloud.google.com/translate/ +// This webERP-style code is based on http://hayageek.com/google-translate-api-tutorial/ + +function translate_via_google_translator($text,$target,$source=false){ + $url = 'https://www.googleapis.com/language/translate/v2?key=' . $_SESSION['GoogleTranslatorAPIKey'] . '&q=' . rawurlencode($text); + $url .= '&target='.$target; + if($source){ + $url .= '&source='.$source; + } + $ch = curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $response = curl_exec($ch); + curl_close($ch); + $obj =json_decode($response,true); //true converts stdClass to associative array. + if($obj != null){ + if(isset($obj['error'])){ + $TranslatedText = "ERROR: " . $obj['error']['message']; + } + else{ + $TranslatedText = $obj['data']['translations'][0]['translatedText']; + // if(isset($obj['data']['translations'][0]['detectedSourceLanguage'])) //this is set if only source is not available. + // echo "Detecte Source Languge : ".$obj['data']['translations'][0]['detectedSourceLanguage']."n"; + } + } + else{ + $TranslatedText = "UNKNOW ERROR"; + } + return $TranslatedText; +} + +?> \ No newline at end of file Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2014-12-17 09:11:47 UTC (rev 7028) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2014-12-18 02:07:07 UTC (rev 7029) @@ -127,4 +127,6 @@ ADD CONSTRAINT `sampleresults_ibfk_1` FOREIGN KEY (`testid`) REFERENCES `qatests` (`testid`); +INSERT INTO `config` (`confname` ,`confvalue`) VALUES ('GoogleTranslatorAPIKey', ''); + UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2014-12-18 08:29:30
|
Revision: 7030 http://sourceforge.net/p/web-erp/reponame/7030 Author: daintree Date: 2014-12-18 08:29:23 +0000 (Thu, 18 Dec 2014) Log Message: ----------- dont make a new record in stockdescriptiontranslations for empty translations Modified Paths: -------------- trunk/Stocks.php trunk/doc/Change.log Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2014-12-18 02:07:07 UTC (rev 7029) +++ trunk/Stocks.php 2014-12-18 08:29:23 UTC (rev 7030) @@ -428,8 +428,8 @@ if (count($ItemDescriptionLanguagesArray)>0){ foreach ($ItemDescriptionLanguagesArray as $LanguageId) { - if ($LanguageId!=''){ - $result = DB_query("DELETE FROM stockdescriptiontranslations WHERE stockid='" . $StockID . "' AND language_id='" . $LanguageId . "'",$ErrMsg,$DbgMsg,true); + if ($LanguageId != ''){ + $result = DB_query("DELETE FROM stockdescriptiontranslations WHERE stockid='" . $StockID . "' AND language_id='" . $LanguageId . "'", $ErrMsg, $DbgMsg, true); $result = DB_query("INSERT INTO stockdescriptiontranslations VALUES('" . $StockID . "','" . $LanguageId . "', '" . $_POST['Description_' . str_replace('.','_',$LanguageId)] . "')",$ErrMsg,$DbgMsg,true); } } @@ -632,7 +632,7 @@ $DbgMsg = _('The SQL that was used to update the language description and failed was'); if (count($ItemDescriptionLanguages)>0){ foreach ($ItemDescriptionLanguagesArray as $LanguageId) { - if ($LanguageId!=''){ + if ($LanguageId != '' AND $_POST['Description_' . str_replace('.','_',$LanguageId)] != ''){ $sql = "INSERT INTO stockdescriptiontranslations VALUES('" . $StockID . "','" . $LanguageId . "', '" . $_POST['Description_' . str_replace('.','_',$LanguageId)] . "')"; $result = DB_query($sql,$ErrMsg,$DbgMsg,true); } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-12-18 02:07:07 UTC (rev 7029) +++ trunk/doc/Change.log 2014-12-18 08:29:23 UTC (rev 7030) @@ -1,4 +1,7 @@ webERP Change Log + +18/12/14 Phil: Fix to only add a description translation record where there is a non-empty translation string +18/12/14 Ricard: Google translate script to add descriptions in a selected language 16/12/14 Agaluski: Add new Quality Module to WebERP. 16/12/14 RChacon: Expand and uniform the accuracy of the exchange rate. 5/12/14 Exson: Fixed the branch field bug in CustomerReceipt.php. Reported by wertthey. |
From: <ex...@us...> - 2014-12-20 06:55:25
|
Revision: 7035 http://sourceforge.net/p/web-erp/reponame/7035 Author: exsonqu Date: 2014-12-20 06:55:12 +0000 (Sat, 20 Dec 2014) Log Message: ----------- 20/12/14 Exson: Make COGSGLPostings.php, SalesGLPostings.php SQL strict mode compatible. Modified Paths: -------------- trunk/COGSGLPostings.php trunk/SalesGLPostings.php Modified: trunk/COGSGLPostings.php =================================================================== --- trunk/COGSGLPostings.php 2014-12-20 06:30:24 UTC (rev 7034) +++ trunk/COGSGLPostings.php 2014-12-20 06:55:12 UTC (rev 7035) @@ -144,11 +144,14 @@ $sql = "INSERT INTO accountgroups ( groupname, sectioninaccounts, pandl, - sequenceintb ) + sequenceintb, + accountgroups + ) VALUES ('Sales', '1', '1', - '10')"; + '10', + ' ')"; $result = DB_query($sql); } Modified: trunk/SalesGLPostings.php =================================================================== --- trunk/SalesGLPostings.php 2014-12-20 06:30:24 UTC (rev 7034) +++ trunk/SalesGLPostings.php 2014-12-20 06:55:12 UTC (rev 7035) @@ -167,12 +167,14 @@ groupname, sectioninaccounts, pandl, - sequenceintb + sequenceintb, + parentgroupname ) VALUES ( 'Sales', 1, 1, - 10)"; + 10, + ' ')"; $result = DB_query($SQL); } @@ -431,4 +433,4 @@ include('includes/footer.inc'); -?> \ No newline at end of file +?> |
From: <rc...@us...> - 2014-12-27 18:29:12
|
Revision: 7043 http://sourceforge.net/p/web-erp/reponame/7043 Author: rchacon Date: 2014-12-27 18:28:36 +0000 (Sat, 27 Dec 2014) Log Message: ----------- In AutomaticTranslationDescriptions.php, add comment for the SVN repository automatically updates the revision number, add $ViewTopic and $BookMark, and else if no translation. Add info to manual. Modified Paths: -------------- trunk/AutomaticTranslationDescriptions.php trunk/doc/Change.log trunk/doc/Manual/ManualSpecialUtilities.html trunk/includes/MainMenuLinksArray.php Modified: trunk/AutomaticTranslationDescriptions.php =================================================================== --- trunk/AutomaticTranslationDescriptions.php 2014-12-27 16:12:40 UTC (rev 7042) +++ trunk/AutomaticTranslationDescriptions.php 2014-12-27 18:28:36 UTC (rev 7043) @@ -1,110 +1,123 @@ -<?php - -include ('includes/session.inc'); -$Title = _('Automatic Translation - Descriptions'); -include ('includes/header.inc'); -include ('includes/GoogleTranslator.php'); - -$SourceLanguage=mb_substr($_SESSION['Language'],0,2); - -// Select items and classify them -$SQL = "SELECT stockmaster.stockid, - description, - longdescription, - language_id, - descriptiontranslation, - longdescriptiontranslation - FROM stockmaster, stockdescriptiontranslations - WHERE stockmaster.stockid = stockdescriptiontranslations.stockid - AND (descriptiontranslation = '' - OR longdescriptiontranslation = '') - ORDER BY stockmaster.stockid, - language_id"; -$result = DB_query($SQL); - -if (DB_num_rows($result) != 0){ - echo '<p class="page_title_text" align="center"><strong>' . _('Description Automatic Translation for empty translations') . '</strong></p>'; - echo '<div>'; - echo '<table class="selection">'; - $TableHeader = '<tr> - <th>' . _('#') . '</th> - <th>' . _('Code') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('To') . '</th> - <th>' . _('Translated') . '</th> - </tr>'; - echo $TableHeader; - $k = 0; //row colour counter - $i = 0; - while ($myrow = DB_fetch_array($result)) { - - if ($myrow['descriptiontranslation'] == ''){ - $TargetLanguage=mb_substr($myrow['language_id'],0,2); - $TranslatedText = translate_via_google_translator($myrow['description'],$TargetLanguage,$SourceLanguage); - - $sql = "UPDATE stockdescriptiontranslations " . - "SET descriptiontranslation='" . $TranslatedText . "', " . - "needsrevision= '1' " . - "WHERE stockid='" . $myrow['stockid'] . "' AND (language_id='" . $myrow['language_id'] . "')"; - $update = DB_query($sql, $ErrMsg, $DbgMsg, true); - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - $i++; - printf('<td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - </tr>', - $i, - $myrow['stockid'], - $myrow['description'], - $myrow['language_id'], - $TranslatedText - ); - } - if ($myrow['longdescriptiontranslation'] == ''){ - $TargetLanguage=mb_substr($myrow['language_id'],0,2); - $TranslatedText = translate_via_google_translator($myrow['longdescription'],$TargetLanguage,$SourceLanguage); - - $sql = "UPDATE stockdescriptiontranslations " . - "SET longdescriptiontranslation='" . $TranslatedText . "', " . - "needsrevision= '1' " . - "WHERE stockid='" . $myrow['stockid'] . "' AND (language_id='" . $myrow['language_id'] . "')"; - $update = DB_query($sql, $ErrMsg, $DbgMsg, true); - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k++; - } - $i++; - printf('<td class="number">%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - <td>%s</td> - </tr>', - $i, - $myrow['stockid'], - $myrow['longdescription'], - $myrow['language_id'], - $TranslatedText - ); - } - } - echo '</table> - </div>'; - prnMsg("Number of translated descriptions via Google API: " . locale_number_format($i)); -} - -include ('includes/footer.inc'); -?> \ No newline at end of file +<?php +/* $Id: AutomaticTranslationDescriptions.php 7037 2014-12-22 14:45:20Z tehonu $ */ + +include ('includes/session.inc'); +$Title = _('Translate Item Descriptions'); +$ViewTopic = 'SpecialUtilities'; // Filename in ManualContents.php's TOC. +$BookMark = 'Z_TranslateItemDescriptions'; // Anchor's id in the manual's html document. +include ('includes/header.inc'); + +include ('includes/GoogleTranslator.php'); + +$SourceLanguage=mb_substr($_SESSION['Language'],0,2); + +// Select items and classify them +$SQL = "SELECT stockmaster.stockid, + description, + longdescription, + language_id, + descriptiontranslation, + longdescriptiontranslation + FROM stockmaster, stockdescriptiontranslations + WHERE stockmaster.stockid = stockdescriptiontranslations.stockid + AND (descriptiontranslation = '' + OR longdescriptiontranslation = '') + ORDER BY stockmaster.stockid, + language_id"; +$result = DB_query($SQL); + +if(DB_num_rows($result) != 0) { + echo '<p class="page_title_text" align="center"><strong>' . _('Description Automatic Translation for empty translations') . '</strong></p>'; + echo '<div>'; + echo '<table class="selection">'; + $TableHeader = '<tr> + <th>' . _('#') . '</th> + <th>' . _('Code') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('To') . '</th> + <th>' . _('Translated') . '</th> + </tr>'; + echo $TableHeader; + $k = 0; //row colour counter + $i = 0; + while ($myrow = DB_fetch_array($result)) { + + if ($myrow['descriptiontranslation'] == ''){ + $TargetLanguage=mb_substr($myrow['language_id'],0,2); + $TranslatedText = translate_via_google_translator($myrow['description'],$TargetLanguage,$SourceLanguage); + + $sql = "UPDATE stockdescriptiontranslations " . + "SET descriptiontranslation='" . $TranslatedText . "', " . + "needsrevision= '1' " . + "WHERE stockid='" . $myrow['stockid'] . "' AND (language_id='" . $myrow['language_id'] . "')"; + $update = DB_query($sql, $ErrMsg, $DbgMsg, true); + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + $i++; + printf('<td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + </tr>', + $i, + $myrow['stockid'], + $myrow['description'], + $myrow['language_id'], + $TranslatedText + ); + } + if ($myrow['longdescriptiontranslation'] == ''){ + $TargetLanguage=mb_substr($myrow['language_id'],0,2); + $TranslatedText = translate_via_google_translator($myrow['longdescription'],$TargetLanguage,$SourceLanguage); + + $sql = "UPDATE stockdescriptiontranslations " . + "SET longdescriptiontranslation='" . $TranslatedText . "', " . + "needsrevision= '1' " . + "WHERE stockid='" . $myrow['stockid'] . "' AND (language_id='" . $myrow['language_id'] . "')"; + $update = DB_query($sql, $ErrMsg, $DbgMsg, true); + + if ($k==1){ + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k++; + } + $i++; + printf('<td class="number">%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + <td>%s</td> + </tr>', + $i, + $myrow['stockid'], + $myrow['longdescription'], + $myrow['language_id'], + $TranslatedText + ); + } + } + echo '</table> + </div>'; + prnMsg("Number of translated descriptions via Google API: " . locale_number_format($i)); +} else { + +echo '<p class="page_title_text"><img alt="" src="' . $RootPath . '/css/' . $Theme . + '/images/maintenance.png" title="' . + _('No item description was automatically translated') . '" />' . ' ' . + _('No item description was automatically translated') . '</p>'; + +// Add error message for "Google Translator API Key" empty. + +} + +include ('includes/footer.inc'); +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-12-27 16:12:40 UTC (rev 7042) +++ trunk/doc/Change.log 2014-12-27 18:28:36 UTC (rev 7043) @@ -1,5 +1,6 @@ webERP Change Log +27/12/14 RChacon: In AutomaticTranslationDescriptions.php, add comment for the SVN repository automatically updates the revision number, add $ViewTopic and $BookMark, and else if no translation. Add info to manual. 27/12/14 RChacon: Set boolean field needrevision to tiny integer with a maximum display width of 1, signed and not null. Add comments to sql file. 20/12/14 Exson: Make COGSGLPostings.php, SalesGLPostings.php SQL strict mode compatible. 20/12/14 Exson: Remove item from weberpchina.sql Modified: trunk/doc/Manual/ManualSpecialUtilities.html =================================================================== --- trunk/doc/Manual/ManualSpecialUtilities.html 2014-12-27 16:12:40 UTC (rev 7042) +++ trunk/doc/Manual/ManualSpecialUtilities.html 2014-12-27 18:28:36 UTC (rev 7043) @@ -4,22 +4,61 @@ <p>The Utility menu is a separate module so access can be turned off to hide these utility script links by turning off the Utilities module in user settings. All utlity pages are prefixed with a Z_.</p> -<h2>Re-Apply Standard Costs to Sales Analysis</h2> +<h2><a id="Z_ChangeCustomerCode">Change A Customer Code</a></h2> -<p>This utility allows a period to be selected for which the current standard cost is applied to the quantities recorded in the sales analysis as sold to re-calculate the cost of goods sold.</p> +<p>This page requires the entry of an existing customer code and the new customer code. The system checks to see the new code entered doesn't already exist and that the code entered for the existing customer does exist. If all is well then the customer code data is changed in all tables throughout the system that refer to the customer code. Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours when others are using the system.</p> -<p>It is important to realise that this will destroy the integrity of the matching general ledger journals created at the time of invoicing and that the GL cost of sales will no longer match with the sales analysis cost of sales.</p> +<h2><a id="Z_ChangeCustomerCode">Change A Customer Code</a></h2> -<p>However, occasionally incorrect cost data that has made a monkey of the sales analysis and general ledger can only be rectified by running this utility.</p> +<p>.</p> -<h2>Change A Customer Code</h2> +<h2><a id="Z_ChangeBranchCode">Change A Customer Branch Code</a></h2> -<p>This page requires the entry of an existing customer code and the new customer code. The system checks to see the new code entered doesn't already exist and that the code entered for the existing customer does exist. If all is well then the customer code data is changed in all tables throughout the system that refer to the customer code. Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours when others are using the system.</p> +<p>.</p> +<h2><a id="Z_ChangeSupplierCode">Change A Supplier Code</a></h2> + +<p>.</p> + +<h2><a id="Z_ChangeStockCategory">Change A Stock Category Code</a></h2> + +<p>.</p> + <h2><a id="Z_ChangeStockCode">Change An Inventory Item Code</a></h2> <p>This page requires the entry of an existing stock code and the new stock code. The system checks to see the new code entered doesn't already exist and that the code entered for the existing item does exist. If all is well then the stock code data is changed in all tables through-out the system. Sales analysis, stock movements, stock locations, Bills of Material, parent and component items, sales order details and purchase order details as well as the Stock Master, pricing and shipment charges. Due to the extensive changes taking place throughout the database this utility should not be run during normal operating hours, when others are using the system.</p> +<p>.</p> + +<h2><a id="Z_ChangeGLAccountCode">Change A GL Account Code</a></h2> + +<p>.</p> + +<h2><a id="Z_ChangeLocationCode">Change A Location Code</a></h2> + +<p>.</p> + +<h2><a id="Z_TranslateItemDescriptions">Translate Item Descriptions</a></h2> + +<p> +This utility uses the Google Translator API to automatically translate item descriptions (short and long part descriptions).</p> + +<p>It translates from the item description in the default language (It was set up in $DefaultLanguage in config) to the languages to maintain translations for item descriptions (They were set up in <u>Main Menu</u> > <u>Setup</u> > General Setup Options > <u>System Parameters</u> > General Settings).</p> + +<p>It requieres a Google Translator API Key (more info in <a href="https://cloud.google.com/translate/" target=_blank">https://cloud.google.com/translate/</a>) to allow automatic translations.</p> + +<h2><a id="Z_BottomUpCosts">Update costs for all BOM items, from the bottom up</a></h2> + +<p>.</p> + +<h2><a id="Z_ReApplyCostToSA">Re-apply costs to Sales Analysis</a></h2> + +<p>This utility allows a period to be selected for which the current standard cost is applied to the quantities recorded in the sales analysis as sold to re-calculate the cost of goods sold.</p> + +<p>It is important to realise that this will destroy the integrity of the matching general ledger journals created at the time of invoicing and that the GL cost of sales will no longer match with the sales analysis cost of sales.</p> + +<p>However, occasionally incorrect cost data that has made a monkey of the sales analysis and general ledger can only be rectified by running this utility.</p> + <h2>Make Stock Locations</h2> <p>If the inventory database is imported from some other system, the stock location records can be created for all locations currently defined by running the script Z_MakeStockLocns.php. Inventory items will not appear on searches during entry of sales orders until their corresponding inventory locations records exist.</p> Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2014-12-27 16:12:40 UTC (rev 7042) +++ trunk/includes/MainMenuLinksArray.php 2014-12-27 18:28:36 UTC (rev 7043) @@ -550,7 +550,7 @@ _('Change An Inventory Item Code'), _('Change A GL Account Code'), _('Change A Location Code'), - _('Automatic Translation - Item descriptions'), + _('Translate Item Descriptions'), _('Update costs for all BOM items, from the bottom up'), _('Re-apply costs to Sales Analysis'), _('Delete sales transactions'), |
From: <rc...@us...> - 2014-12-27 19:53:44
|
Revision: 7044 http://sourceforge.net/p/web-erp/reponame/7044 Author: rchacon Date: 2014-12-27 19:53:03 +0000 (Sat, 27 Dec 2014) Log Message: ----------- Allow translation of typename in GLAccountInquiry.php. Modified Paths: -------------- trunk/GLAccountInquiry.php trunk/doc/Change.log Modified: trunk/GLAccountInquiry.php =================================================================== --- trunk/GLAccountInquiry.php 2014-12-27 18:28:36 UTC (rev 7043) +++ trunk/GLAccountInquiry.php 2014-12-27 19:53:03 UTC (rev 7044) @@ -1,5 +1,4 @@ <?php - /* $Id$*/ include ('includes/session.inc'); @@ -293,7 +292,7 @@ <td class="number"><b>%s</b></td> <td>%s</td> </tr>', - $myrow['typename'], + _($myrow['typename']), $URL_to_TransDetail, $myrow['typeno'], $FormatedTranDate, Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-12-27 18:28:36 UTC (rev 7043) +++ trunk/doc/Change.log 2014-12-27 19:53:03 UTC (rev 7044) @@ -1,5 +1,6 @@ webERP Change Log +27/12/14 RChacon: Allow translation of typename in GLAccountInquiry.php. 27/12/14 RChacon: In AutomaticTranslationDescriptions.php, add comment for the SVN repository automatically updates the revision number, add $ViewTopic and $BookMark, and else if no translation. Add info to manual. 27/12/14 RChacon: Set boolean field needrevision to tiny integer with a maximum display width of 1, signed and not null. Add comments to sql file. 20/12/14 Exson: Make COGSGLPostings.php, SalesGLPostings.php SQL strict mode compatible. |
From: <rc...@us...> - 2014-12-27 20:59:18
|
Revision: 7045 http://sourceforge.net/p/web-erp/reponame/7045 Author: rchacon Date: 2014-12-27 20:59:15 +0000 (Sat, 27 Dec 2014) Log Message: ----------- Allow translation of typename in CustomerTransInquiry.php. Modified Paths: -------------- trunk/CustomerTransInquiry.php trunk/doc/Change.log Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2014-12-27 19:53:03 UTC (rev 7044) +++ trunk/CustomerTransInquiry.php 2014-12-27 20:59:15 UTC (rev 7045) @@ -1,13 +1,10 @@ <?php - /* $Id$*/ include('includes/session.inc'); $Title = _('Customer Transactions Inquiry'); - $ViewTopic = 'ARInquiries'; $BookMark = 'ARTransInquiry'; - include('includes/header.inc'); echo '<p class="page_title_text"> @@ -34,16 +31,14 @@ $resultTypes = DB_query($sql); echo '<option value="All">' . _('All') . '</option>'; -while ($myrow=DB_fetch_array($resultTypes)){ - if (isset($_POST['TransType'])){ - if ($myrow['typeid'] == $_POST['TransType']){ - echo '<option selected="selected" value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; - } else { - echo '<option value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; +while($myrow=DB_fetch_array($resultTypes)) { + echo '<option'; + if(isset($_POST['TransType'])) { + if($myrow['typeid'] == $_POST['TransType']) { + echo ' selected="selected"' ; } - } else { - echo '<option value="' . $myrow['typeid'] . '">' . $myrow['typename'] . '</option>'; } + echo ' value="' . $myrow['typeid'] . '">' . _($myrow['typename']) . '</option>'; } echo '</select></td>'; @@ -54,14 +49,14 @@ $_POST['ToDate'] = Date($_SESSION['DefaultDateFormat']); } echo '<td>' . _('From') . ':</td> - <td><input tabindex="2" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="FromDate" required="required" maxlength="10" size="11" value="' . $_POST['FromDate'] . '" /></td> + <td><input alt="'.$_SESSION['DefaultDateFormat'].'" class="date" maxlength="10" name="FromDate" required="required" size="11" tabindex="2" type="text" value="' . $_POST['FromDate'] . '" /></td> <td>' . _('To') . ':</td> - <td><input tabindex="3" class="date" alt="'.$_SESSION['DefaultDateFormat'].'" type="text" name="ToDate" required="required" maxlength="10" size="11" value="' . $_POST['ToDate'] . '" /></td> + <td><input alt="'.$_SESSION['DefaultDateFormat'].'" class="date" maxlength="10" name="ToDate" required="required" size="11" tabindex="3" type="text" value="' . $_POST['ToDate'] . '" /></td> </tr> </table> <br /> <div class="centre"> - <input tabindex="4" type="submit" name="ShowResults" value="' . _('Show Transactions') . '" /> + <input name="ShowResults" tabindex="4" type="submit" value="' . _('Show Transactions') . '" /> </div> </div> </form>'; @@ -145,7 +140,7 @@ printf($format_base . '<td><a target="_blank" href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Invoice"><img src="%s" title="' . _('Click to preview the invoice') . '" /></a></td> </tr>', - $myrow['typename'], + _($myrow['typename']), $myrow['transno'], ConvertSQLDate($myrow['trandate']), $myrow['debtorno'], @@ -160,11 +155,11 @@ $myrow['transno'], $RootPath.'/css/'.$Theme.'/images/preview.gif'); - } elseif ($_POST['TransType']==11){ /* credit notes */ + } elseif($_POST['TransType']==11) { /* credit notes */ printf($format_base . '<td><a target="_blank" href="%s/PrintCustTrans.php?FromTransNo=%s&InvOrCredit=Credit"><img src="%s" title="' . _('Click to preview the credit') . '" /></a></td> </tr>', - $myrow['typename'], + _($myrow['typename']), $myrow['transno'], ConvertSQLDate($myrow['trandate']), $myrow['debtorno'], @@ -180,7 +175,7 @@ $RootPath.'/css/'.$Theme.'/images/preview.gif'); } else { /* otherwise */ printf($format_base . '</tr>', - $myrow['typename'], + _($myrow['typename']), $myrow['transno'], ConvertSQLDate($myrow['trandate']), $myrow['debtorno'], Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-12-27 19:53:03 UTC (rev 7044) +++ trunk/doc/Change.log 2014-12-27 20:59:15 UTC (rev 7045) @@ -1,5 +1,6 @@ webERP Change Log +27/12/14 RChacon: Allow translation of typename in CustomerTransInquiry.php. 27/12/14 RChacon: Allow translation of typename in GLAccountInquiry.php. 27/12/14 RChacon: In AutomaticTranslationDescriptions.php, add comment for the SVN repository automatically updates the revision number, add $ViewTopic and $BookMark, and else if no translation. Add info to manual. 27/12/14 RChacon: Set boolean field needrevision to tiny integer with a maximum display width of 1, signed and not null. Add comments to sql file. |
From: <rc...@us...> - 2014-12-27 22:49:03
|
Revision: 7046 http://sourceforge.net/p/web-erp/reponame/7046 Author: rchacon Date: 2014-12-27 22:48:49 +0000 (Sat, 27 Dec 2014) Log Message: ----------- Add info to manual and context $BookMark for Sales People Maintenance. Modified Paths: -------------- trunk/SalesPeople.php trunk/doc/Change.log trunk/doc/Manual/ManualSalesPeople.html Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2014-12-27 20:59:15 UTC (rev 7045) +++ trunk/SalesPeople.php 2014-12-27 22:48:49 UTC (rev 7046) @@ -3,6 +3,10 @@ include('includes/session.inc'); $Title = _('Sales People Maintenance'); +$ViewTopic = 'SalesPeople'; +$BookMark = 'SalesPeople'; +if(isset($_GET['SelectedSalesPerson'])) {$BookMark = 'SalespeopleEdit';}// For Edit's screen. +if(isset($_GET['delete'])) {$BookMark = 'SalespeopleDelete';}// For Delete's ERROR Message Report. include('includes/header.inc'); if (isset($_GET['SelectedSalesPerson'])){ @@ -139,6 +143,7 @@ } } elseif (isset($_GET['delete'])) { +$BookMark = 'SalespeopleDelete'; //the link to delete a selected record was clicked instead of the submit button // PREVENT DELETES IF DEPENDENT RECORDS IN 'DebtorsMaster' @@ -173,7 +178,6 @@ } } } //end if Sales-person used in GL accounts - } if (!isset($SelectedSalesPerson)) { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-12-27 20:59:15 UTC (rev 7045) +++ trunk/doc/Change.log 2014-12-27 22:48:49 UTC (rev 7046) @@ -1,5 +1,6 @@ webERP Change Log +27/12/14 RChacon: Add info to manual and context $BookMark for Sales People Maintenance. 27/12/14 RChacon: Allow translation of typename in CustomerTransInquiry.php. 27/12/14 RChacon: Allow translation of typename in GLAccountInquiry.php. 27/12/14 RChacon: In AutomaticTranslationDescriptions.php, add comment for the SVN repository automatically updates the revision number, add $ViewTopic and $BookMark, and else if no translation. Add info to manual. Modified: trunk/doc/Manual/ManualSalesPeople.html =================================================================== --- trunk/doc/Manual/ManualSalesPeople.html 2014-12-27 20:59:15 UTC (rev 7045) +++ trunk/doc/Manual/ManualSalesPeople.html 2014-12-27 22:48:49 UTC (rev 7046) @@ -5,19 +5,39 @@ <p> Salesperson details can be entered or amended from the setup tab of the main menu.</p> -<h2>Salespeople Code</h2> +<h3>Salespeople Code</h3> <p> This field can accept any text or numbers up to a maximum of 3 characters - normally the initials of the salesperson or some reference to the area NW1,SW2 would suffice. These salespeople codes are stored against each branch to identify who services them. actual</p> <p> Note: The salesperson code is not held against individual transactions. This means that if there is any change to a salesperson for an area and you wish to calculate commissions up to the change and after for the new salespeople, the dates of transactions must be used. However, sales analysis records created at the time of invoicing and crediting are created including a copy of the salesperson code applicable at the time of invoicing. Sales analysis reports will thus show who made sales based on the historical representative settings.</p> -<h2>Salesperson Name, Telephone and Fax Numbers</h2> +<h3>Salesperson Name, Telephone and Fax Numbers</h3> <p> The salesperson name is what appears in the look-ups on the customers' branch maintenance page. It is also used for inquiries and reports. By default it shows on invoices and statements, to remind customers where they can contact their local agent for sales inquiries.</p> -<p> -The name can be any character to a maximum of 30 characters. The phone number and fax number fields can be a maximum of 20 characters long.</p> -<h2>Salesperson Commission Rates and Breakpoint</h2> -<p> -The system allows for input of these items as the basis of commission calculations. Most businesses have different ways of calculating commissions. For this reason it is left to the business to write a report which will use these fields (and/or additional ones) to calculate commission according to traditional company policy. -</p> \ No newline at end of file +<p>The name can be any character to a maximum of 30 characters. The phone number and fax number fields can be a maximum of 20 characters long.</p> + +<h3>Salesperson Commission Rates and Breakpoint</h3> + +<p>The system allows for input of these items as the basis of commission calculations. Most businesses have different ways of calculating commissions. For this reason it is left to the business to write a report which will use these fields (and/or additional ones) to calculate commission according to traditional company policy.</p> + + +<h2><a id="SalespeopleEdit">Salespeople Edit</a></h2> + +<p>Click this link is to edit the above information.</p> + +<p>You can change the Salesperson Name, Telephone No, Facsimile No, Commission Rate 1, Breakpoint, Commission Rate 2, and Current state (Yes/No).</p> + +<p>You can not change the Salesperson code.</p> + +<h2><a id="SalespeopleDelete">Salespeople Delete</a></h2> + +<p>Click this link is to delete the salesperson of that line.</p> + +<p>This script do some verifications before delete the salesperson:</p> + +<ol> +<li><b>custbranch.salesman</b>. Looks for a customer's branch asigned to this saleperson.</li> +<li><b>salesanalysis.salesperson</b>. Looks for a sales analysis records that refer to this sales person.</li> +<li><b>www_users.salesman</b>. Looks for a user that refer to this sales person.</li> +</ol> |
From: <dai...@us...> - 2014-12-28 09:33:10
|
Revision: 7048 http://sourceforge.net/p/web-erp/reponame/7048 Author: daintree Date: 2014-12-28 09:33:08 +0000 (Sun, 28 Dec 2014) Log Message: ----------- formatting Modified Paths: -------------- trunk/CustomerTransInquiry.php trunk/ProductSpecs.php trunk/SalesPeople.php trunk/includes/session.inc Modified: trunk/CustomerTransInquiry.php =================================================================== --- trunk/CustomerTransInquiry.php 2014-12-27 23:36:39 UTC (rev 7047) +++ trunk/CustomerTransInquiry.php 2014-12-28 09:33:08 UTC (rev 7048) @@ -15,9 +15,8 @@ echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">'; echo '<div>'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - -echo '<table class="selection"> +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> <tr> <td>' . _('Type') . ':</td> <td><select tabindex="1" name="TransType"> '; Modified: trunk/ProductSpecs.php =================================================================== --- trunk/ProductSpecs.php 2014-12-27 23:36:39 UTC (rev 7047) +++ trunk/ProductSpecs.php 2014-12-28 09:33:08 UTC (rev 7048) @@ -86,25 +86,25 @@ if (!isset($KeyValue) OR $KeyValue=='') { //prompt user for Key Value echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <div> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <table class="selection"> - <tr> - <td>' . _('Enter Specification Name') .':</td> - <td><input type="text" name="KeyValue" size="25" maxlength="25" /></td> - </tr> - </table> - </div> - <div> - <input type="submit" name="pickspec" value="' . _('Submit') . '" /> - </div> + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Enter Specification Name') .':</td> + <td><input type="text" name="KeyValue" size="25" maxlength="25" /></td> + </tr> + </table> + </div> + <div> + <input type="submit" name="pickspec" value="' . _('Submit') . '" /> + </div> </form> <form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post"> - <div> - <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> - <table class="selection"> - <tr> - <td>' . _('Or Select Existing Specification') .':</td>'; + <div> + <input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <td>' . _('Or Select Existing Specification') .':</td>'; $SQLSpecSelect="SELECT DISTINCT(keyval), description FROM prodspecs LEFT OUTER JOIN stockmaster @@ -117,12 +117,12 @@ while ($MyRowSelection=DB_fetch_array($ResultSelection)){ echo '<option value="' . $MyRowSelection['keyval'] . '">' . $MyRowSelection['keyval'].' - ' .htmlspecialchars($MyRowSelection['description'], ENT_QUOTES,'UTF-8', false) . '</option>'; } - echo '</select></td>'; - echo '</tr> + echo '</select></td> + </tr> </table> </div> <div> - <input type="submit" name="pickspec" value="' . _('Submit') . '" /> + <input type="submit" name="pickspec" value="' . _('Submit') . '" /> </div> </form>'; @@ -155,18 +155,18 @@ $result = DB_query($sql); echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; echo '<div>'; - echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - echo '<table class="selection">'; - echo '<tr> - <th class="ascending">' . _('Add') . '</th> - <th class="ascending">' . _('Name') . '</th> - <th class="ascending">' . _('Method') . '</th> - <th class="ascending">' . _('Units') . '</th> - <th>' . _('Possible Values') . '</th> - <th>' . _('Target Value') . '</th> - <th>' . _('Range Min') . '</th> - <th>' . _('Range Max') . '</th> - </tr>'; + echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" /> + <table class="selection"> + <tr> + <th class="ascending">' . _('Add') . '</th> + <th class="ascending">' . _('Name') . '</th> + <th class="ascending">' . _('Method') . '</th> + <th class="ascending">' . _('Units') . '</th> + <th>' . _('Possible Values') . '</th> + <th>' . _('Target Value') . '</th> + <th>' . _('Range Min') . '</th> + <th>' . _('Range Max') . '</th> + </tr>'; $k=0; $x=0; while ($myrow=DB_fetch_array($result)) { Modified: trunk/SalesPeople.php =================================================================== --- trunk/SalesPeople.php 2014-12-27 23:36:39 UTC (rev 7047) +++ trunk/SalesPeople.php 2014-12-28 09:33:08 UTC (rev 7048) @@ -5,8 +5,12 @@ $Title = _('Sales People Maintenance'); $ViewTopic = 'SalesPeople'; $BookMark = 'SalesPeople'; -if(isset($_GET['SelectedSalesPerson'])) {$BookMark = 'SalespeopleEdit';}// For Edit's screen. -if(isset($_GET['delete'])) {$BookMark = 'SalespeopleDelete';}// For Delete's ERROR Message Report. +if(isset($_GET['SelectedSalesPerson'])) { + $BookMark = 'SalespeopleEdit'; +}// For Edit's screen. +if(isset($_GET['delete'])) { + $BookMark = 'SalespeopleDelete'; +}// For Delete's ERROR Message Report. include('includes/header.inc'); if (isset($_GET['SelectedSalesPerson'])){ Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2014-12-27 23:36:39 UTC (rev 7047) +++ trunk/includes/session.inc 2014-12-28 09:33:08 UTC (rev 7048) @@ -15,7 +15,7 @@ } include($PathPrefix . 'config.php'); -if (isset($dbuser)) { +if (isset($dbuser)) { //this gets past an upgrade issue where old versions used lower case variable names $DBUser=$dbuser; $DBPassword=$dbpassword; $DBType=$dbType; @@ -102,7 +102,7 @@ } /* Need to set the theme to make login screen nice */ - $Theme = (isset($_SESSION['Theme'])) ? $_SESSION['Theme'] : 'gel'; + $Theme = (isset($_SESSION['Theme'])) ? $_SESSION['Theme'] : 'xenos'; switch ($rc) { case UL_OK; //user logged in successfully include($PathPrefix . 'includes/LanguageSetup.php'); //set up the language |
From: <rc...@us...> - 2014-12-28 16:15:29
|
Revision: 7049 http://sourceforge.net/p/web-erp/reponame/7049 Author: rchacon Date: 2014-12-28 16:15:27 +0000 (Sun, 28 Dec 2014) Log Message: ----------- Update comment for the SVN repository automatically updates the revision number, standardise title. Modified Paths: -------------- trunk/CustomerBalancesMovement.php trunk/doc/Change.log trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po Modified: trunk/CustomerBalancesMovement.php =================================================================== --- trunk/CustomerBalancesMovement.php 2014-12-28 09:33:08 UTC (rev 7048) +++ trunk/CustomerBalancesMovement.php 2014-12-28 16:15:27 UTC (rev 7049) @@ -1,15 +1,17 @@ <?php -/* $Id: Z_CustomerBalancesMovements.php 6941 2014-10-26 23:18:08Z daintree $*/ +/* $Id: CustomerBalancesMovement.php 6941 2014-10-26 23:18:08Z daintree $*/ + $PageSecurity = 1; + include('includes/session.inc'); -$Title=_('Customer Balances Movements'); +$Title=_('Customer Activity and Balances'); +/*To do: Info in the manual. RChacon. +$ViewTopic = '';// Filename in ManualContents.php's TOC. +$BookMark = '';// Anchor's id in the manual's html document.*/ -if (!isset($_POST['CreateCSV'])){ +if(!isset($_POST['CreateCSV'])) { include('includes/header.inc'); - - echo '<p class="page_title_text"> - <img src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . _('Customer Balances Movements') . '" alt="" />' . ' ' . _('Customer Balances Movements') . ' - </p>'; + echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme.'/images/transactions.png" title="' . _('Customer Activity and Balances') . '" /> ' . _('Customer Activity and Balances') . '</p>'; } if (!isset($_POST['RunReport'])){ Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-12-28 09:33:08 UTC (rev 7048) +++ trunk/doc/Change.log 2014-12-28 16:15:27 UTC (rev 7049) @@ -1,5 +1,6 @@ webERP Change Log +28/12/14 RChacon: Update comment for the SVN repository automatically updates the revision number, standardise title. 27/12/14 RChacon: Add info to manual and context $BookMark for Sales People Maintenance. 27/12/14 RChacon: Allow translation of typename in CustomerTransInquiry.php. 27/12/14 RChacon: Allow translation of typename in GLAccountInquiry.php. Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-12-28 09:33:08 UTC (rev 7048) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2014-12-28 16:15:27 UTC (rev 7049) @@ -8,7 +8,7 @@ "Project-Id-Version: webERP 4.11.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-13 15:27-0600\n" -"PO-Revision-Date: 2014-12-27 17:34-0600\n" +"PO-Revision-Date: 2014-12-28 10:09-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "Language: es_ES\n" @@ -603,7 +603,8 @@ #: AccountSections.php:130 msgid "general ledger accounts groups that refer to this account section" -msgstr "Subgrupos de Cuentas relacionados con este Grupo Principal" +msgstr "" +"grupos contables del libro mayor que hacen referencia a esta sección contable" #: AccountSections.php:142 msgid "section has been deleted" @@ -627,7 +628,7 @@ #: AccountSections.php:204 msgid "Review Account Sections" -msgstr "Revisar Grupos Principales" +msgstr "Revisar se secciones contables" #: AccountSections.php:223 msgid "Could not retrieve the requested section please try again." @@ -772,7 +773,7 @@ #: AddCustomerNotes.php:21 AddCustomerTypeNotes.php:19 msgid "Back to Select Customer" -msgstr "Volver a Seleccionar cliente" +msgstr "Volver a seleccionar cliente" #: AddCustomerNotes.php:34 msgid "The contact priority must be an integer." @@ -884,7 +885,7 @@ #: AddCustomerTypeNotes.php:48 SelectCustomer.php:730 msgid "Customer Group Notes" -msgstr "Notas del Grupo del cliente" +msgstr "Notas del grupo del cliente" #: AddCustomerTypeNotes.php:61 msgid "The contact group notes record has been added" @@ -6124,7 +6125,7 @@ #: Contracts.php:896 msgid "Default Work Centre" -msgstr "Centro de Trabajo Predeterminado" +msgstr "Centro de trabajo predeterminado" #: Contracts.php:913 msgid "Contract Description" @@ -47790,7 +47791,7 @@ #: includes/MainMenuLinksArray.php:114 msgid "Customer Activity and Balances" -msgstr "" +msgstr "Actividad y saldos de cliente" #: includes/MainMenuLinksArray.php:135 msgid "Add Customer" |
From: <rc...@us...> - 2014-12-28 21:40:14
|
Revision: 7052 http://sourceforge.net/p/web-erp/reponame/7052 Author: rchacon Date: 2014-12-28 21:40:12 +0000 (Sun, 28 Dec 2014) Log Message: ----------- Add comments, variables to link to the manual and titles in Z_CurrencyDebtorsBalances.php and Z_CurrencySuppliersBalances.php. Modified Paths: -------------- trunk/Z_CurrencyDebtorsBalances.php trunk/Z_CurrencySuppliersBalances.php trunk/doc/Change.log trunk/doc/Manual/ManualSpecialUtilities.html trunk/includes/MainMenuLinksArray.php Modified: trunk/Z_CurrencyDebtorsBalances.php =================================================================== --- trunk/Z_CurrencyDebtorsBalances.php 2014-12-28 20:54:32 UTC (rev 7051) +++ trunk/Z_CurrencyDebtorsBalances.php 2014-12-28 21:40:12 UTC (rev 7052) @@ -1,14 +1,17 @@ <?php /* $Id$*/ +/* This script is an utility to show debtors balances in total by currency. */ -include('includes/session.inc'); -$Title=_('Currency Debtor Balances'); -$ViewTopic = 'SpecialUtilities'; // Filename in ManualContents.php's TOC. -$BookMark = 'Z_CurrencyDebtorsBalances'; // Anchor's id in the manual's html document. +include ('includes/session.inc'); +$Title = _('Currency Debtor Balances');// Screen identificator. +$ViewTopic = 'SpecialUtilities';// Filename's id in ManualContents.php's TOC. +$BookMark = 'Z_CurrencyDebtorsBalances';// Anchor's id in the manual's html document. include('includes/header.inc'); +echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/ar.png" title="' . + _('Show Local Currency Total Debtors Balances') . '" /> ' .// Icon title. + _('Debtors Balances By Currency Totals') . '</p>';// Page title. -echo '<div class="centre"><h3>' . _('Debtors Balances By Currency Totals') . '</h3></div>'; - $sql = "SELECT SUM(ovamount+ovgst+ovdiscount+ovfreight-alloc) AS currencybalance, currcode, decimalplaces AS currdecimalplaces, Modified: trunk/Z_CurrencySuppliersBalances.php =================================================================== --- trunk/Z_CurrencySuppliersBalances.php 2014-12-28 20:54:32 UTC (rev 7051) +++ trunk/Z_CurrencySuppliersBalances.php 2014-12-28 21:40:12 UTC (rev 7052) @@ -1,12 +1,17 @@ <?php /* $Id$*/ +/* This script is an utility to show suppliers balances in total by currency. */ -include('includes/session.inc'); -$Title=_('Currency Supplier Balances'); +include ('includes/session.inc'); +$Title = _('Currency Supplier Balances');// Screen identificator. +$ViewTopic = 'SpecialUtilities';// Filename's id in ManualContents.php's TOC. +$BookMark = 'Z_CurrencySuppliersBalances';// Anchor's id in the manual's html document. include('includes/header.inc'); +echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/supplier.png" title="' . + _('Show Local Currency Total Suppliers Balances') . '" /> ' .// Icon title. + _('Suppliers Balances By Currency Totals') . '</p>';// Page title. -echo '<div class="centre"><h3>' . _('Suppliers Balances By Currency Totals') . '</h3></div>'; - $sql = "SELECT SUM(ovamount+ovgst-alloc) AS currencybalance, currcode, decimalplaces AS currdecimalplaces, @@ -42,4 +47,4 @@ echo '</table>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-12-28 20:54:32 UTC (rev 7051) +++ trunk/doc/Change.log 2014-12-28 21:40:12 UTC (rev 7052) @@ -1,5 +1,6 @@ webERP Change Log +28/12/14 RChacon: Add comments, variables to link to the manual and titles in Z_CurrencyDebtorsBalances.php and Z_CurrencySuppliersBalances.php. 28/12/14 RChacon: Add comments, variables to link to the manual and titles in Z_Change*.php. 28/12/14 RChacon: Update comment for the SVN repository automatically updates the revision number, standardise title. 27/12/14 RChacon: Add info to manual and context $BookMark for Sales People Maintenance. Modified: trunk/doc/Manual/ManualSpecialUtilities.html =================================================================== --- trunk/doc/Manual/ManualSpecialUtilities.html 2014-12-28 20:54:32 UTC (rev 7051) +++ trunk/doc/Manual/ManualSpecialUtilities.html 2014-12-28 21:40:12 UTC (rev 7052) @@ -64,6 +64,15 @@ <p>However, occasionally incorrect cost data that has made a monkey of the sales analysis and general ledger can only be rectified by running this utility.</p> +<h2><a id="Z_CurrencyDebtorsBalances.php">Debtors Balances By Currency Totals</a></h2> + +<p>This script is an utility to show debtors balances in total by currency.</p> + +<h2><a id="Z_CurrencySuppliersBalances.php">Suppliers Balances By Currency Totals</a></h2> + +<p>This script is an utility to show suppliers balances in total by currency.</p> + + <h2>Make Stock Locations</h2> <p>If the inventory database is imported from some other system, the stock location records can be created for all locations currently defined by running the script Z_MakeStockLocns.php. Inventory items will not appear on searches during entry of sales orders until their corresponding inventory locations records exist.</p> Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2014-12-28 20:54:32 UTC (rev 7051) +++ trunk/includes/MainMenuLinksArray.php 2014-12-28 21:40:12 UTC (rev 7052) @@ -571,8 +571,8 @@ '/Z_ReverseSuppPaymentRun.php', '/Z_UpdateSalesAnalysisWithLatestCustomerData.php'); -$MenuItems['Utilities']['Reports']['Caption'] = array( _('Show Local Currency Total Debtor Balances'), - _('Show Local Currency Total Suppliers Balances'), +$MenuItems['Utilities']['Reports']['Caption'] = array( _('Debtors Balances By Currency Totals'), + _('Suppliers Balances By Currency Totals'), _('Show General Transactions That Do Not Balance'), _('List of items without picture')); |
From: <rc...@us...> - 2015-01-02 00:53:22
|
Revision: 7056 http://sourceforge.net/p/web-erp/reponame/7056 Author: rchacon Date: 2015-01-02 00:53:14 +0000 (Fri, 02 Jan 2015) Log Message: ----------- Move default theme from session.inc to config.php. Add the ability to change the default theme in SystemParameters.php. Modified Paths: -------------- trunk/SystemParameters.php trunk/config.distrib.php trunk/doc/Change.log trunk/includes/session.inc trunk/install/index.php trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2015-01-01 11:37:29 UTC (rev 7055) +++ trunk/SystemParameters.php 2015-01-02 00:53:14 UTC (rev 7056) @@ -107,7 +107,7 @@ prnMsg(_('The Quality ProdSpec Text may not contain single quotes and may not be longer than 5000 chars'),'error'); } elseif (mb_strstr($_POST['X_QualityCOAText'], "'") OR mb_strlen($_POST['X_QualityCOAText']) > 5000) { $InputError = 1; - prnMsg(_('The Quality COA Text may not contain single quotes and may not be longer than 5000 chars'),'error'); + prnMsg(_('The Quality COA Text may not contain single quotes and may not be longer than 5000 chars'),'error'); } if ($InputError !=1){ @@ -117,6 +117,27 @@ if ($_SESSION['DefaultDateFormat'] != $_POST['X_DefaultDateFormat'] ) { $sql[] = "UPDATE config SET confvalue = '".$_POST['X_DefaultDateFormat']."' WHERE confname = 'DefaultDateFormat'"; } + if ($_SESSION['DefaultTheme'] != $_POST['X_DefaultTheme'] ) {// If not equal, update the default theme (login window). + $sql[] = "UPDATE config SET confvalue = '".$_POST['X_DefaultTheme']."' WHERE confname = 'DefaultTheme'"; + // BEGIN Update config.php: + $FileName = $RootPath . 'config.php'; + $fhandle = fopen($FileName,"r"); + if($fhandle) { + $content = fread($fhandle,filesize($FileName)); + $content = str_replace(" ;", ";", $content);// Clean space before end-of-php-line. + $content = str_replace("'".$_SESSION['DefaultTheme']."';", "'".$_POST['X_DefaultTheme']."';", $content); + $fhandle = fopen($FileName,"w"); + if(!fwrite($fhandle,$content)) { + prnMsg(_("Cannot write to the configuration file").' '.$FileName,'error'); + } else { + prnMsg(_("The configuration file was updated"),'info'); + } + fclose($fhandle); + } else { + prnMsg(_("Cannot open the configuration file").' '.$FileName,'error'); + } + // END Update config.php. + } if ($_SESSION['PastDueDays1'] != $_POST['X_PastDueDays1'] ) { $sql[] = "UPDATE config SET confvalue = '".$_POST['X_PastDueDays1']."' WHERE confname = 'PastDueDays1'"; } @@ -404,6 +425,23 @@ </select></td> <td>' . _('The default date format for entry of dates and display.') . '</td></tr>'; +// DefaultTheme: +echo '<tr style="outline: 1px solid"><td>' . _('Default Theme') . ':</td> + <td><select name="X_DefaultTheme">'; +$ThemeDirectories = scandir('css/');// List directories inside ~/css. Each diretory is a theme. +foreach($ThemeDirectories as $ThemeName) { + if(is_dir('css/'.$ThemeName) AND $ThemeName!='.' AND $ThemeName!='..' AND $ThemeName!='.svn') { + echo '<option'; + if($_SESSION['DefaultTheme'] == $ThemeName) { + echo ' selected="selected"'; + } + echo ' value="'.$ThemeName.'">'.$ThemeName.'</option>'; + } +} +echo '</select></td> + <td>' . _("The default theme to use for the login screen and the setup of new users. The users' theme selection will override it.") . '</td></tr>'; + +// ---------- New section: echo '<tr><th colspan="3">' . _('Accounts Receivable/Payable Settings') . '</th></tr>'; // PastDueDays1 @@ -489,11 +527,11 @@ <td>' . _('Select the languages in which translations of the item description will be maintained. The default language is excluded.') . '</td> </tr>'; -// Google Translator API Key +// Google Translator API Key echo '<tr style="outline: 1px solid"><td>' . _('Google Translator API Key') . ':</td> <td><input type="text" name="X_GoogleTranslatorAPIKey" size="25" maxlength="50" value="' . $_SESSION['GoogleTranslatorAPIKey'] . '" /></td> <td>' . _('Google Translator API Key to allow automatic translations. More info at https://cloud.google.com/translate/') . '</td></tr>'; - + //'RequirePickingNote' echo '<tr style="outline: 1px solid"><td>' . _('A picking note must be produced before an order can be delivered') . ':</td> <td><select name="X_RequirePickingNote"> @@ -1205,4 +1243,4 @@ </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/config.distrib.php =================================================================== --- trunk/config.distrib.php 2015-01-01 11:37:29 UTC (rev 7055) +++ trunk/config.distrib.php 2015-01-02 00:53:14 UTC (rev 7056) @@ -5,10 +5,14 @@ // User configurable variables //--------------------------------------------------- -//DefaultLanguage to use for the login screen and the setup of new users +// Default language to use for the login screen and the setup of new users. //The users' language selection will override -$DefaultLanguage ='en_GB.utf8'; +$DefaultLanguage = 'en_GB.utf8'; +// Default theme to use for the login screen and the setup of new users. +//The users' theme selection will override +$DefaultTheme = 'xenos'; + // Whether to display the demo login and password or not on the login screen $AllowDemoMode = True; @@ -106,4 +110,4 @@ //error_reporting (-1); /*Make sure there is nothing - not even spaces after this last ?> */ -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-01-01 11:37:29 UTC (rev 7055) +++ trunk/doc/Change.log 2015-01-02 00:53:14 UTC (rev 7056) @@ -1,5 +1,6 @@ webERP Change Log +01/01/15 RChacon: Move default theme from session.inc to config.php. Add the ability to change the default theme in SystemParameters.php. 01/01/15 Exson: Make StockCategories.php strict sql mode compatible. 28/12/14 RChacon: Standardise labels and texts in Prices_Customer.php SpecialOrder.php and WWW_Access.php. Add $ViewTopic and $BookMark to WWW_Access.php 28/12/14 RChacon: Add comments, variables to link to the manual and titles in Z_CurrencyDebtorsBalances.php and Z_CurrencySuppliersBalances.php. Modified: trunk/includes/session.inc =================================================================== --- trunk/includes/session.inc 2015-01-01 11:37:29 UTC (rev 7055) +++ trunk/includes/session.inc 2015-01-02 00:53:14 UTC (rev 7056) @@ -102,7 +102,7 @@ } /* Need to set the theme to make login screen nice */ - $Theme = (isset($_SESSION['Theme'])) ? $_SESSION['Theme'] : 'xenos'; + $Theme = (isset($_SESSION['Theme'])) ? $_SESSION['Theme'] : $DefaultTheme; switch ($rc) { case UL_OK; //user logged in successfully include($PathPrefix . 'includes/LanguageSetup.php'); //set up the language @@ -146,8 +146,8 @@ } elseif (isset($_SESSION['Theme'])) { $Theme = $_SESSION['Theme']; } else { - $Theme = 'xenos'; - $_SESSION['Theme'] = 'xenos'; + $Theme = $DefaultTheme; + $_SESSION['Theme'] = '$DefaultTheme'; } @@ -255,4 +255,4 @@ exit; } } -?> \ No newline at end of file +?> Modified: trunk/install/index.php =================================================================== --- trunk/install/index.php 2015-01-01 11:37:29 UTC (rev 7055) +++ trunk/install/index.php 2015-01-02 00:53:14 UTC (rev 7056) @@ -150,8 +150,9 @@ $PathPrefix = '../';//To make the LanguageSetup.php script run properly include('../includes/LanguageSetup.php'); include('../includes/MiscFunctions.php'); - //prevent the installation file from running again + $DefaultTheme = 'xenos'; + // Prevent the installation file from running again: if(file_exists('../config.php') or file_exists('../Config.php')){ prnMsg(_('It seems that the system has been already installed. If you want to install again, please remove the config.php file first'),'error'); exit; @@ -344,8 +345,10 @@ $msg = "<?php\n\n"; $msg .= "// User configurable variables\n"; $msg .= "//---------------------------------------------------\n\n"; - $msg .= "//DefaultLanguage to use for the login screen and the setup of new users.\n"; + $msg .= "// Default language to use for the login screen and the setup of new users.\n"; $msg .= "\$DefaultLanguage = '" . $UserLanguage . "';\n\n"; + $msg .= "// Default theme to use for the login screen and the setup of new users.\n"; + $msg .= "\$DefaultTheme = '" . $DefaultTheme . "';\n\n"; $msg .= "// Whether to display the demo login and password or not on the login screen\n"; $msg .= "\$AllowDemoMode = FALSE;\n\n"; $msg .= "// Connection information for the database\n"; Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-01 11:37:29 UTC (rev 7055) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-02 00:53:14 UTC (rev 7056) @@ -141,5 +141,10 @@ INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('RevisionTranslations.php', '15', 'Human revision for automatic descriptions translations'); +-- +-- Insert default theme value for login screen +-- +INSERT INTO `verdoram_erp`.`config` (`confname`, `confvalue`) VALUES ('DefaultTheme', 'xenos'); + UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; |
From: <rc...@us...> - 2015-01-02 01:07:58
|
Revision: 7057 http://sourceforge.net/p/web-erp/reponame/7057 Author: rchacon Date: 2015-01-02 01:07:51 +0000 (Fri, 02 Jan 2015) Log Message: ----------- Modified Paths: -------------- trunk/SystemParameters.php trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2015-01-02 00:53:14 UTC (rev 7056) +++ trunk/SystemParameters.php 2015-01-02 01:07:51 UTC (rev 7057) @@ -117,7 +117,7 @@ if ($_SESSION['DefaultDateFormat'] != $_POST['X_DefaultDateFormat'] ) { $sql[] = "UPDATE config SET confvalue = '".$_POST['X_DefaultDateFormat']."' WHERE confname = 'DefaultDateFormat'"; } - if ($_SESSION['DefaultTheme'] != $_POST['X_DefaultTheme'] ) {// If not equal, update the default theme (login window). + if ($_SESSION['DefaultTheme'] != $_POST['X_DefaultTheme'] ) {// If not equal, update the default theme. $sql[] = "UPDATE config SET confvalue = '".$_POST['X_DefaultTheme']."' WHERE confname = 'DefaultTheme'"; // BEGIN Update config.php: $FileName = $RootPath . 'config.php'; Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-02 00:53:14 UTC (rev 7056) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-02 01:07:51 UTC (rev 7057) @@ -144,7 +144,7 @@ -- -- Insert default theme value for login screen -- -INSERT INTO `verdoram_erp`.`config` (`confname`, `confvalue`) VALUES ('DefaultTheme', 'xenos'); +INSERT INTO `config` (`confname`, `confvalue`) VALUES ('DefaultTheme', 'xenos'); UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; |
From: <rc...@us...> - 2015-01-04 18:02:38
|
Revision: 7061 http://sourceforge.net/p/web-erp/reponame/7061 Author: rchacon Date: 2015-01-04 18:02:35 +0000 (Sun, 04 Jan 2015) Log Message: ----------- In SystemParameters.php, remove root path to config.php and add comments. Modified Paths: -------------- trunk/SystemParameters.php trunk/doc/Change.log Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2015-01-04 14:02:33 UTC (rev 7060) +++ trunk/SystemParameters.php 2015-01-04 18:02:35 UTC (rev 7061) @@ -1,18 +1,20 @@ <?php - /* $Id$*/ +/* This script is for maintenance of the system parameters. */ include('includes/session.inc'); -$Title = _('System Parameters'); -$ViewTopic= 'GettingStarted'; -$BookMark = 'SystemConfiguration'; +$Title = _('System Parameters');// Screen identificator. +$ViewTopic= 'GettingStarted';// Filename's id in ManualContents.php's TOC. +$BookMark = 'SystemConfiguration';// Anchor's id in the manual's html document. include('includes/header.inc'); +echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/maintenance.png" title="' .// Title icon. + $Title . '" />' .// Icon title. + $Title . '</p>';// Page title. + include('includes/CountriesArray.php'); -echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/maintenance.png" title="' . _('Supplier Types') - . '" alt="" />' . $Title. '</p>'; - if (isset($_POST['submit'])) { //initialise no input errors assumed initially before we test @@ -117,26 +119,25 @@ if ($_SESSION['DefaultDateFormat'] != $_POST['X_DefaultDateFormat'] ) { $sql[] = "UPDATE config SET confvalue = '".$_POST['X_DefaultDateFormat']."' WHERE confname = 'DefaultDateFormat'"; } - if ($_SESSION['DefaultTheme'] != $_POST['X_DefaultTheme'] ) {// If not equal, update the default theme. + if($_SESSION['DefaultTheme'] != $_POST['X_DefaultTheme']) {// If not equal, update the default theme. $sql[] = "UPDATE config SET confvalue = '".$_POST['X_DefaultTheme']."' WHERE confname = 'DefaultTheme'"; - // BEGIN Update config.php: - $FileName = $RootPath . 'config.php'; - $fhandle = fopen($FileName,"r"); + // BEGIN: Update the config.php file: + $fhandle = fopen('config.php', 'r'); if($fhandle) { - $content = fread($fhandle,filesize($FileName)); - $content = str_replace(" ;", ";", $content);// Clean space before end-of-php-line. - $content = str_replace("'".$_SESSION['DefaultTheme']."';", "'".$_POST['X_DefaultTheme']."';", $content); - $fhandle = fopen($FileName,"w"); + $content = fread($fhandle, filesize('config.php')); + $content = str_replace(' ;\n', ';\n', $content);// Clean space before the end-of-php-line. + $content = str_replace('\''.$_SESSION['DefaultTheme'].'\';', '\''.$_POST['X_DefaultTheme'].'\';', $content); + $fhandle = fopen('config.php','w'); if(!fwrite($fhandle,$content)) { - prnMsg(_("Cannot write to the configuration file").' '.$FileName,'error'); + prnMsg(_('Cannot write to the configuration file.'), 'error'); } else { - prnMsg(_("The configuration file was updated"),'info'); + prnMsg(_('The configuration file was updated.'), 'info'); } fclose($fhandle); } else { - prnMsg(_("Cannot open the configuration file").' '.$FileName,'error'); + prnMsg(_('Cannot open the configuration file.'), 'error'); } - // END Update config.php. + // END: Update the config.php file. } if ($_SESSION['PastDueDays1'] != $_POST['X_PastDueDays1'] ) { $sql[] = "UPDATE config SET confvalue = '".$_POST['X_PastDueDays1']."' WHERE confname = 'PastDueDays1'"; Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-01-04 14:02:33 UTC (rev 7060) +++ trunk/doc/Change.log 2015-01-04 18:02:35 UTC (rev 7061) @@ -1,5 +1,6 @@ webERP Change Log +04/01/15 RChacon: In SystemParameters.php, remove root path to config.php and add comments. 01/01/15 RChacon: Move default theme from session.inc to config.php. Add the ability to change the default theme in SystemParameters.php. 01/01/15 Exson: Make StockCategories.php strict sql mode compatible. 28/12/14 RChacon: Standardise labels and texts in Prices_Customer.php SpecialOrder.php and WWW_Access.php. Add $ViewTopic and $BookMark to WWW_Access.php |
From: <rc...@us...> - 2015-01-04 21:55:06
|
Revision: 7062 http://sourceforge.net/p/web-erp/reponame/7062 Author: rchacon Date: 2015-01-04 21:54:58 +0000 (Sun, 04 Jan 2015) Log Message: ----------- In RevisionTranslations.php, add $Id, $ViewTopic, $BookMark and page_title_text. Add info to manual. Add comments to code. Modified Paths: -------------- trunk/RevisionTranslations.php trunk/doc/Change.log trunk/doc/Manual/ManualInventory.html trunk/doc/Manual/ManualSpecialUtilities.html trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/RevisionTranslations.php =================================================================== --- trunk/RevisionTranslations.php 2015-01-04 18:02:35 UTC (rev 7061) +++ trunk/RevisionTranslations.php 2015-01-04 21:54:58 UTC (rev 7062) @@ -1,109 +1,119 @@ -<?php - -include('includes/session.inc'); -$Title = _('Revision of Description Translations'); -include('includes/header.inc'); -include('includes/SQL_CommonFunctions.inc'); - -//update database if update pressed -if (isset($_POST['Submit'])){ - for ($i=1;$i<count($_POST);$i++){ //loop through the returned translations - - if (isset($_POST['Revised' . $i]) AND ($_POST['Revised' . $i] == '1')){ - $sqlUpdate="UPDATE stockdescriptiontranslations - SET needsrevision = '0', - descriptiontranslation = '". $_POST['DescriptionTranslation' .$i] ."', - longdescriptiontranslation = '". $_POST['LongDescriptionTranslation' .$i] ."' - WHERE stockid = '". $_POST['StockID' .$i] ."' - AND language_id = '". $_POST['LanguageID' .$i] ."'"; - $ResultUpdate = DB_Query($sqlUpdate,'', '', true); - prnMsg($_POST['StockID' .$i] . ' ' . _('descriptions') . ' ' . _('in') . ' ' . $_POST['LanguageID' .$i] . ' ' . _('have been updated'),'success'); - } - } -} - -echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; -echo '<div>'; -echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; - -echo '<table class="selection"> - <tr> - <th colspan="7">' . _('Translations to revise') .'</th> - </tr>'; - -$sql = "SELECT stockdescriptiontranslations.stockid, - stockmaster.description, - stockmaster.longdescription, - stockdescriptiontranslations.language_id, - stockdescriptiontranslations.descriptiontranslation, - stockdescriptiontranslations.longdescriptiontranslation - FROM stockdescriptiontranslations, stockmaster - WHERE stockdescriptiontranslations.stockid = stockmaster.stockid - AND stockdescriptiontranslations.needsrevision = '1' - ORDER BY stockdescriptiontranslations.stockid, - stockdescriptiontranslations.language_id"; - -$result = DB_query($sql); - -echo '<tr> - <th>' . _('Code') . '</th> - <th>' . _('Language') . '</th> - <th>' . _('Description') . '</th> - <th>' . _('Long Description') . '</th> - <th>' . _('Revised?') . '</th> -</tr>'; - -$k=0; //row colour counter -$i=1; -while ($myrow=DB_fetch_array($result)) { - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - echo'<td>' . $myrow['stockid'] . '</td> - <td>'. $_SESSION['Language']. '</td> - <td>' . $myrow['description'] . '</td> - <td>' . $myrow['longdescription'] . '</td> - </tr>'; - - if ($k==1){ - echo '<tr class="EvenTableRows">'; - $k=0; - } else { - echo '<tr class="OddTableRows">'; - $k=1; - } - - echo'<td></td> - <td>' . $myrow['language_id'] . '</td>'; - - echo '<td> - <input type="text" class="text" name="DescriptionTranslation' . $i .'" maxlength="50" size="52" value="'. $myrow['descriptiontranslation'] .'" /> - </td> - <td> - <textarea name="LongDescriptionTranslation' . $i .'" cols="70" rows="5">'. $myrow['longdescriptiontranslation'] .'" </textarea></td> - </td>'; - - echo '<td><input type="checkbox" name="Revised' . $i.'" value="1" /> - </td> - </tr>'; - echo'<input type="hidden" value="' . $myrow['stockid'] . '" name="StockID' . $i . '" /> - <input type="hidden" value="' . $myrow['language_id'] . '" name="LanguageID' . $i . '" />'; - $i++; - -} //end of looping - -echo '</table> - <br /> - <div class="centre"> - <input type="submit" name="Submit" value="' . _('Update') . '" /></div> - </div> - </form>'; - -include('includes/footer.inc'); -?> +<?php +/* $Id: RevisionTranslations.php 7040 2014-12-27 15:15:29Z tehonu $*/ +/* This script is to review the item description translations. */ + +include('includes/session.inc'); + +$Title = _('Review Translated Descriptions');// Screen identificator. +$ViewTopic= 'Inventory';// Filename's id in ManualContents.php's TOC. +$BookMark = 'ReviewTranslatedDescriptions';// Anchor's id in the manual's html document. +include('includes/header.inc'); +echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/maintenance.png" title="' .// Title icon. + _('Review Translated Descriptions') . '" />' .// Icon title. + _('Review Translated Descriptions') . '</p>';// Page title. + +include('includes/SQL_CommonFunctions.inc'); + +//update database if update pressed +if(isset($_POST['Submit'])) { + for ($i=1;$i<count($_POST);$i++) { //loop through the returned translations + + if(isset($_POST['Revised' . $i]) AND ($_POST['Revised' . $i] == '1')) { + $sqlUpdate="UPDATE stockdescriptiontranslations + SET needsrevision = '0', + descriptiontranslation = '". $_POST['DescriptionTranslation' .$i] ."', + longdescriptiontranslation = '". $_POST['LongDescriptionTranslation' .$i] ."' + WHERE stockid = '". $_POST['StockID' .$i] ."' + AND language_id = '". $_POST['LanguageID' .$i] ."'"; + $ResultUpdate = DB_Query($sqlUpdate,'', '', true); + prnMsg($_POST['StockID' .$i] . ' ' . _('descriptions') . ' ' . _('in') . ' ' . $_POST['LanguageID' .$i] . ' ' . _('have been updated'),'success'); + } + } +} + +echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '">'; +echo '<div>'; +echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />'; + +echo '<table class="selection"> + <tr> + <th colspan="7">' . _('Translations to revise') .'</th> + </tr>'; + +$sql = "SELECT stockdescriptiontranslations.stockid, + stockmaster.description, + stockmaster.longdescription, + stockdescriptiontranslations.language_id, + stockdescriptiontranslations.descriptiontranslation, + stockdescriptiontranslations.longdescriptiontranslation + FROM stockdescriptiontranslations, stockmaster + WHERE stockdescriptiontranslations.stockid = stockmaster.stockid + AND stockdescriptiontranslations.needsrevision = '1' + ORDER BY stockdescriptiontranslations.stockid, + stockdescriptiontranslations.language_id"; + +$result = DB_query($sql); + +echo '<tr> + <th>' . _('Code') . '</th> + <th>' . _('Language') . '</th> + <th>' . _('Description') . '</th> + <th>' . _('Long Description') . '</th> + <th>' . _('Revised?') . '</th> +</tr>'; + +$k=0; //row colour counter +$i=1; +while($myrow=DB_fetch_array($result)) { + + if($k==1) { + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + echo '<td>' . $myrow['stockid'] . '</td> + <td>'. $_SESSION['Language']. '</td> + <td>' . $myrow['description'] . '</td> + <td>' . $myrow['longdescription'] . '</td> + </tr>'; + + if($k==1) { + echo '<tr class="EvenTableRows">'; + $k=0; + } else { + echo '<tr class="OddTableRows">'; + $k=1; + } + + echo '<td></td> + <td>' . $myrow['language_id'] . '</td>'; + + echo '<td> + <input type="text" class="text" name="DescriptionTranslation' . $i .'" maxlength="50" size="52" value="'. $myrow['descriptiontranslation'] .'" /> + </td> + <td> + <textarea name="LongDescriptionTranslation' . $i .'" cols="70" rows="5">'. $myrow['longdescriptiontranslation'] .'" </textarea></td> + </td>'; + + echo '<td><input type="checkbox" name="Revised' . $i.'" value="1" /> + </td> + </tr>'; + echo '<input type="hidden" value="' . $myrow['stockid'] . '" name="StockID' . $i . '" /> + <input type="hidden" value="' . $myrow['language_id'] . '" name="LanguageID' . $i . '" />'; + $i++; + +} //end of looping + +echo '</table> + <br /> + <div class="centre"> + <input type="submit" name="Submit" value="' . _('Update') . '" /></div> + </div> + </form>'; + +include('includes/footer.inc'); +?> \ No newline at end of file Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-01-04 18:02:35 UTC (rev 7061) +++ trunk/doc/Change.log 2015-01-04 21:54:58 UTC (rev 7062) @@ -1,5 +1,6 @@ webERP Change Log +04/01/15 RChacon: In RevisionTranslations.php, add $Id, $ViewTopic, $BookMark and page_title_text. Add info to manual. Add comments to code. 04/01/15 RChacon: In SystemParameters.php, remove root path to config.php and add comments. 01/01/15 RChacon: Move default theme from session.inc to config.php. Add the ability to change the default theme in SystemParameters.php. 01/01/15 Exson: Make StockCategories.php strict sql mode compatible. Modified: trunk/doc/Manual/ManualInventory.html =================================================================== --- trunk/doc/Manual/ManualInventory.html 2015-01-04 18:02:35 UTC (rev 7061) +++ trunk/doc/Manual/ManualInventory.html 2015-01-04 21:54:58 UTC (rev 7062) @@ -296,6 +296,20 @@ <h3>Item Properties</h3> <!-- Help End: Stocks --> +<!-- Help Begin: ReviewTranslatedDescriptions --> + <div class="floatright"> + <a class="minitext" href="#top">⬆ Top</a> + </div> + + <h2><a id="ReviewTranslatedDescriptions">Review Translated Descriptions</a></h2> + + <p>This script shows items descriptions marked for review and allows to edit the translations.</p> + + <p>You can review and edit the translated short description (<i>stockdescriptiontranslations.descriptiontranslation</i> field) and the translated long description (<i>stockdescriptiontranslations.longdescriptiontranslation</i> field) that have the review flag turned on (<i>stockdescriptiontranslations.needsrevision=1</i>).</p> + + <p>See also: In <a href="ManualContents.php?ViewTopic=SpecialUtilities">Special Utilities</a>, <a href="ManualContents.php?ViewTopic=SpecialUtilities#Z_TranslateItemDescriptions">Translate Item Descriptions</a>.</p> + +<!-- Help End: ReviewTranslatedDescriptions --> <!-- Help Begin: StockCostUpdate --> <div class="floatright"> Modified: trunk/doc/Manual/ManualSpecialUtilities.html =================================================================== --- trunk/doc/Manual/ManualSpecialUtilities.html 2015-01-04 18:02:35 UTC (rev 7061) +++ trunk/doc/Manual/ManualSpecialUtilities.html 2015-01-04 21:54:58 UTC (rev 7062) @@ -52,6 +52,9 @@ <p>It requieres a Google Translator API Key (more info in <a href="https://cloud.google.com/translate/" target=_blank">https://cloud.google.com/translate/</a>) to allow automatic translations.</p> +<p>See also: In <a href="ManualContents.php?ViewTopic=Inventory">Inventory (aka "Stock")</a>, <a href="ManualContents.php? +ViewTopic=Inventory#ReviewTranslatedDescriptions">Review Translated Descriptions</a>.</p> + <h2><a id="Z_BottomUpCosts">Update costs for all BOM items, from the bottom up</a></h2> <p>.</p> Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-04 18:02:35 UTC (rev 7061) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-04 21:54:58 UTC (rev 7062) @@ -134,13 +134,13 @@ ALTER TABLE `stockdescriptiontranslations` ADD `longdescriptiontranslation` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Item''s long description'; -- Add a field to mark if a description needs revision: ALTER TABLE `stockdescriptiontranslations` ADD `needsrevision` TINYINT(1) NOT NULL DEFAULT '0'; - -INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('AutomaticTranslationDescriptions.php', '15', 'Translates via Google Translator all empty translated descriptions '); - +-- INSERT INTO `config` (`confname` ,`confvalue`) VALUES ('GoogleTranslatorAPIKey', ''); +-- Assign a Page Security value to each translation script: +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES + ('AutomaticTranslationDescriptions.php', '15', 'Translates via Google Translator all empty translated descriptions'), + ('RevisionTranslations.php', '15', 'Human revision for automatic descriptions translations'); -INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description`) VALUES ('RevisionTranslations.php', '15', 'Human revision for automatic descriptions translations'); - -- -- Insert default theme value for login screen -- |
From: <rc...@us...> - 2015-01-04 22:33:37
|
Revision: 7065 http://sourceforge.net/p/web-erp/reponame/7065 Author: rchacon Date: 2015-01-04 22:33:27 +0000 (Sun, 04 Jan 2015) Log Message: ----------- Minor improvements. Modified Paths: -------------- trunk/includes/MainMenuLinksArray.php trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po Modified: trunk/includes/MainMenuLinksArray.php =================================================================== --- trunk/includes/MainMenuLinksArray.php 2015-01-04 22:12:33 UTC (rev 7064) +++ trunk/includes/MainMenuLinksArray.php 2015-01-04 22:33:27 UTC (rev 7065) @@ -268,7 +268,7 @@ $MenuItems['stock']['Maintenance']['Caption'] = array( _('Add A New Item'), _('Select An Item'), - _('Translated Descriptions Revision'), + _('Review Translated Descriptions'), _('Sales Category Maintenance'), _('Brands Maintenance'), _('Add or Update Prices Based On Costs'), Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo =================================================================== (Binary files differ) Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po =================================================================== --- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2015-01-04 22:12:33 UTC (rev 7064) +++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2015-01-04 22:33:27 UTC (rev 7065) @@ -8,7 +8,7 @@ "Project-Id-Version: webERP 4.11.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-01-04 16:05-0600\n" -"PO-Revision-Date: 2014-12-28 17:08-0600\n" +"PO-Revision-Date: 2015-01-04 16:29-0600\n" "Last-Translator: Rafael Chacon <raf...@gm...>\n" "Language-Team: TecnoSoluciones.com <web...@te...>\n" "Language: es_ES\n" @@ -1618,7 +1618,7 @@ #: AutomaticTranslationDescriptions.php:5 includes/MainMenuLinksArray.php:553 msgid "Translate Item Descriptions" -msgstr "" +msgstr "Traducir descripciones de artículo" #: AutomaticTranslationDescriptions.php:31 msgid "Description Automatic Translation for empty translations" @@ -1668,12 +1668,12 @@ #: AutomaticTranslationDescriptions.php:39 msgid "Translated" -msgstr "" +msgstr "Traducido" #: AutomaticTranslationDescriptions.php:116 #: AutomaticTranslationDescriptions.php:117 msgid "No item description was automatically translated" -msgstr "" +msgstr "Ninguna descripción de artículo fue traducido automáticamente" #: BOMExtendedQty.php:12 BOMExtendedQty.php:13 BOMExtendedQty.php:154 #: BOMExtendedQty.php:254 @@ -15237,7 +15237,7 @@ #: HistoricalTestResults.php:70 SelectQASamples.php:243 #: TestPlanResults.php:128 msgid "To Sample Date" -msgstr "" +msgstr "A fecha de muestreo" #: HistoricalTestResults.php:76 InternalStockRequest.php:301 #: MRPCreateDemands.php:282 MailingGroupMaintenance.php:145 PDFCOA.php:43 @@ -25423,7 +25423,7 @@ #: RevisionTranslations.php:7 RevisionTranslations.php:13 #: RevisionTranslations.php:14 msgid "Review Translated Descriptions" -msgstr "" +msgstr "Revisar descripciones traducidas" #: RevisionTranslations.php:30 msgid "descriptions" @@ -37191,11 +37191,11 @@ #: TestPlanResults.php:433 msgid " from sample" -msgstr "" +msgstr "de la muestra" #: TestPlanResults.php:433 msgid " for test " -msgstr "" +msgstr "para prueba" #: TestPlanResults.php:439 msgid "Test Results have NOT BEEN overwritten for Result ID " @@ -37207,11 +37207,11 @@ #: TestPlanResults.php:474 msgid " from " -msgstr "" +msgstr "desde" #: TestPlanResults.php:474 msgid " for " -msgstr "" +msgstr "para" #: TestPlanResults.php:620 msgid "A Sample Result record has been added for Test ID" @@ -50626,7 +50626,7 @@ #: reportwriter/languages/en_US/reports.php:340 msgid "Today" -msgstr "" +msgstr "Hoy" #: reportwriter/languages/en_US/reports.php:342 msgid "This Week To Date" |
From: <rc...@us...> - 2015-01-05 03:41:52
|
Revision: 7067 http://sourceforge.net/p/web-erp/reponame/7067 Author: rchacon Date: 2015-01-05 03:41:43 +0000 (Mon, 05 Jan 2015) Log Message: ----------- Allow turn on/off the dashboard display after login for an specific user. Add comments to code. Modified Paths: -------------- trunk/WWW_Users.php trunk/doc/Change.log trunk/includes/UserLogin.php trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/WWW_Users.php =================================================================== --- trunk/WWW_Users.php 2015-01-04 22:50:43 UTC (rev 7066) +++ trunk/WWW_Users.php 2015-01-05 03:41:43 UTC (rev 7067) @@ -1,5 +1,4 @@ <?php - /* $Id$*/ if (isset($_POST['UserID']) AND isset($_POST['ID'])){ @@ -26,15 +25,18 @@ _('Chinese'), _('Free Serif')); -$Title = _('Users Maintenance'); -/* webERP manual links before header.inc */ -$ViewTopic= 'GettingStarted'; -$BookMark = 'UserMaintenance'; +$Title = _('Users Maintenance');// Screen identificator. +$ViewTopic= 'GettingStarted';// Filename's id in ManualContents.php's TOC. +$BookMark = 'UserMaintenance';// Anchor's id in the manual's html document. include('includes/header.inc'); +echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme. + '/images/group_add.png" title="' .// Title icon. + _('Search') . '" />' .// Icon title. + $Title . '</p>';// Page title. + include('includes/SQL_CommonFunctions.inc'); -echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/group_add.png" title="' . _('Search') . '" alt="" />' . ' ' . $Title . '</p> - <br />'; +echo '<br />';// Extra line after page_title_text. // Make an array of the security roles $sql = "SELECT secroleid, @@ -155,6 +157,7 @@ language ='" . $_POST['UserLanguage'] . "', defaultlocation='" . $_POST['DefaultLocation'] ."', modulesallowed='" . $ModulesAllowed . "', + showdashboard='" . $_POST['ShowDashboard'] . "', blocked='" . $_POST['Blocked'] . "', pdflanguage='" . $_POST['PDFLanguage'] . "', department='" . $_POST['Department'] . "' @@ -238,6 +241,7 @@ unset($_POST['CanCreateTender']); unset($_POST['DefaultLocation']); unset($_POST['ModulesAllowed']); + unset($_POST['ShowDashboard']); unset($_POST['Blocked']); unset($_POST['Theme']); unset($_POST['UserLanguage']); @@ -303,10 +307,12 @@ <th>' . _('Supplier Code') . '</th> <th>' . _('Salesperson') . '</th> <th>' . _('Last Visit') . '</th> - <th>' . _('Security Role') . '</th> - <th>' . _('Report Size') . '</th> - <th>' . _('Theme') . '</th> - <th>' . _('Language') . '</th> + <th>' . _('Security Role') . '</th> + <th>' . _('Report Size') . '</th> + <th>' . _('Theme') . '</th> + <th>' . _('Language') . '</th> + <th> </th> + <th> </th> </tr>'; $k=0; //row colour counter @@ -392,6 +398,7 @@ cancreatetender, defaultlocation, modulesallowed, + showdashboard, blocked, theme, language, @@ -418,6 +425,7 @@ $_POST['ModulesAllowed'] = $myrow['modulesallowed']; $_POST['Theme'] = $myrow['theme']; $_POST['UserLanguage'] = $myrow['language']; + $_POST['ShowDashboard'] = $myrow['showdashboard']; $_POST['Blocked'] = $myrow['blocked']; $_POST['PDFLanguage'] = $myrow['pdflanguage']; $_POST['Department'] = $myrow['department']; @@ -687,6 +695,20 @@ </tr>'; $i++; } + +echo '<tr> + <td>' . _('Display Dashboard after Login') . ': </td> + <td><select name="ShowDashboard">'; +if($_POST['ShowDashboard']==0) { + echo '<option selected="selected" value="0">' . _('No') . '</option>'; + echo '<option value="1">' . _('Yes') . '</option>'; +} else { + echo '<option selected="selected" value="1">' . _('Yes') . '</option>'; + echo '<option value="0">' . _('No') . '</option>'; +} +echo '</select></td> + </tr>'; + if (!isset($_POST['PDFLanguage'])){ $_POST['PDFLanguage']=0; } @@ -755,4 +777,4 @@ </form>'; include('includes/footer.inc'); -?> \ No newline at end of file +?> Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-01-04 22:50:43 UTC (rev 7066) +++ trunk/doc/Change.log 2015-01-05 03:41:43 UTC (rev 7067) @@ -1,5 +1,6 @@ webERP Change Log +05/01/15 RChacon: Allow turn on/off the dashboard display after login for an specific user. Add comments to code. 04/01/15 RChacon: In RevisionTranslations.php, add $Id, $ViewTopic, $BookMark and page_title_text. Add info to manual. Add comments to code. 04/01/15 RChacon: In SystemParameters.php, remove root path to config.php and add comments. 01/01/15 RChacon: Move default theme from session.inc to config.php. Add the ability to change the default theme in SystemParameters.php. Modified: trunk/includes/UserLogin.php =================================================================== --- trunk/includes/UserLogin.php 2015-01-04 22:50:43 UTC (rev 7066) +++ trunk/includes/UserLogin.php 2015-01-05 03:41:43 UTC (rev 7067) @@ -110,7 +110,7 @@ $_SESSION['SalesmanLogin'] = $myrow['salesman']; $_SESSION['CanCreateTender'] = $myrow['cancreatetender']; $_SESSION['AllowedDepartment'] = $myrow['department']; - $_SESSION['ShowDashboard'] = $myrow['dashboard']; + $_SESSION['ShowDashboard'] = $myrow['showdashboard']; if (isset($myrow['pdflanguage'])) { $_SESSION['PDFLanguage'] = $myrow['pdflanguage']; @@ -271,4 +271,4 @@ return UL_OK; /* All is well */ } -?> \ No newline at end of file +?> Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-04 22:50:43 UTC (rev 7066) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-05 03:41:43 UTC (rev 7067) @@ -1,7 +1,9 @@ INSERT INTO `config` VALUES ('InvoiceQuantityDefault','1'); -ALTER TABLE `www_users` ADD `dashboard` TINYINT NOT NULL DEFAULT '0'; +-- Add field to display dashboard after login: +ALTER TABLE `www_users` ADD `showdashboard` TINYINT(1) NOT NULL DEFAULT '0' COMMENT 'Display dashboard after login' AFTER `modulesallowed`; + INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description` ) VALUES ('Z_UpdateItemCosts.php', '15', 'Use CSV of item codes and costs to update webERP item costs'); -INSERT INTO scripts (`script` ,`pagesecurity` ,`description` ) VALUES ('CustomerBalancesMovement.php', '3', 'Allow customers to be listed in local currency with balances and activity over a date range'); +INSERT INTO `scripts` (`script` ,`pagesecurity` ,`description` ) VALUES ('CustomerBalancesMovement.php', '3', 'Allow customers to be listed in local currency with balances and activity over a date range'); INSERT INTO `scripts` VALUES ('UserLocations.php', '15', 'Location User Maintenance'); ALTER TABLE `stockmoves` ADD `userid` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `trandate`; @@ -19,7 +21,7 @@ INSERT INTO `config` (`confname` ,`confvalue` ) VALUES ('QualityLogSamples', '0'); INSERT INTO `config` (`confname` ,`confvalue` ) VALUES ('QualityCOAText', ''); -INSERT INTO `config` (`confname` ,`confvalue` ) VALUES (' QualityProdSpecText', ''); +INSERT INTO `config` (`confname` ,`confvalue` ) VALUES ('QualityProdSpecText', ''); -- -- Table structure for table `prodspecs` |
From: <dai...@us...> - 2015-01-06 07:52:33
|
Revision: 7068 http://sourceforge.net/p/web-erp/reponame/7068 Author: daintree Date: 2015-01-06 07:52:25 +0000 (Tue, 06 Jan 2015) Log Message: ----------- missing SQL and config.distrib.php fix for multi coy setup Modified Paths: -------------- trunk/PDFPriceList.php trunk/config.distrib.php trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/PDFPriceList.php =================================================================== --- trunk/PDFPriceList.php 2015-01-05 03:41:43 UTC (rev 7067) +++ trunk/PDFPriceList.php 2015-01-06 07:52:25 UTC (rev 7068) @@ -292,8 +292,8 @@ <tr> <td>' . _('Select Inventory Categories') . ':</td> <td><select autofocus="autofocus" required="required" minlength="1" size="12" name="Categories[]"multiple="multiple">'; - $SQL = 'SELECT categoryid, categorydescription - FROM stockcategory + $SQL = 'SELECT categoryid, categorydescription + FROM stockcategory ORDER BY categorydescription'; $CatResult = DB_query($SQL); while ($MyRow = DB_fetch_array($CatResult)) { @@ -395,9 +395,7 @@ _('Printed') . ': ' . date($_SESSION['DefaultDateFormat']), 'right');// Date printed. $YPos -= $FontSize; - $pdf->addText($Left_Margin, $YPos, $FontSize, - _('Categories') . ': ' . $_POST['FromCriteria'] . ' - ' . $_POST['ToCriteria'] . '. ' . - _('Effective As At') . ' ' . $_POST['EffectiveDate']);// Categories and effective date. + $pdf->addText($Left_Margin, $YPos, $FontSize, _('Effective As At') . ' ' . $_POST['EffectiveDate']); $pdf->addTextWrap($Page_Width-$Right_Margin-140, $YPos-$FontSize, 140, $FontSize, date('H:i:s'), 'right');// Time printed. Modified: trunk/config.distrib.php =================================================================== --- trunk/config.distrib.php 2015-01-05 03:41:43 UTC (rev 7067) +++ trunk/config.distrib.php 2015-01-06 07:52:25 UTC (rev 7068) @@ -109,5 +109,8 @@ /* For Development Use */ //error_reporting (-1); +//Installed companies +$CompanyList[0] = array('database'=>'weberpdemo' ,'company'=>'WebERP Demo Company' ); +$CompanyList[1] = array('database'=>'your_db' ,'company'=>'Your Company inc' ); /*Make sure there is nothing - not even spaces after this last ?> */ ?> Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-05 03:41:43 UTC (rev 7067) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-06 07:52:25 UTC (rev 7068) @@ -137,7 +137,7 @@ -- Add a field to mark if a description needs revision: ALTER TABLE `stockdescriptiontranslations` ADD `needsrevision` TINYINT(1) NOT NULL DEFAULT '0'; -- -INSERT INTO `config` (`confname` ,`confvalue`) VALUES ('GoogleTranslatorAPIKey', ''); +INSERT INTO `config` (`confname` ,`confvalue`) VALUES ('GoogleTranslatorAPIKey', ''); -- Assign a Page Security value to each translation script: INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('AutomaticTranslationDescriptions.php', '15', 'Translates via Google Translator all empty translated descriptions'), @@ -147,6 +147,23 @@ -- Insert default theme value for login screen -- INSERT INTO `config` (`confname`, `confvalue`) VALUES ('DefaultTheme', 'xenos'); +INSERT INTO scripts (`script`,`pagesecurity`,`description`) VALUES ('SalesTopCustomersInquiry.php', '2', 'Shows the top customers sales for a selected date range'); +CREATE TABLE IF NOT EXISTS `supplierdiscounts` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `supplierno` varchar(10) NOT NULL, + `stockid` varchar(20) NOT NULL, + `discountnarrative` varchar(20) NOT NULL, + `discountpercent` double NOT NULL, + `discountamount` double NOT NULL, + `effectivefrom` date NOT NULL, + `effectiveto` date NOT NULL, + PRIMARY KEY (`id`), + KEY `supplierno` (`supplierno`), + KEY `effectivefrom` (`effectivefrom`), + KEY `effectiveto` (`effectiveto`), + KEY `stockid` (`stockid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; + UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2015-01-07 06:51:05
|
Revision: 7071 http://sourceforge.net/p/web-erp/reponame/7071 Author: daintree Date: 2015-01-07 06:50:58 +0000 (Wed, 07 Jan 2015) Log Message: ----------- Added missing SQL for suppliercontacts and supplierdiscounts and adding the script SalesTopCustomersInquiry to the scripts table Modified Paths: -------------- trunk/doc/Change.log trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-01-06 16:33:52 UTC (rev 7070) +++ trunk/doc/Change.log 2015-01-07 06:50:58 UTC (rev 7071) @@ -1,10 +1,11 @@ webERP Change Log +7/1/15 Phil: Added missing SQL for suppliercontacts and supplierdiscounts and adding the script SalesTopCustomersInquiry to the scripts table 05/01/15 RChacon: Allow turn on/off the dashboard display after login for an specific user. Add comments to code. 04/01/15 RChacon: In RevisionTranslations.php, add $Id, $ViewTopic, $BookMark and page_title_text. Add info to manual. Add comments to code. 04/01/15 RChacon: In SystemParameters.php, remove root path to config.php and add comments. 01/01/15 RChacon: Move default theme from session.inc to config.php. Add the ability to change the default theme in SystemParameters.php. -01/01/15 Exson: Make StockCategories.php strict sql mode compatible. +01/01/15 Exson: Make StockCategories.php strict sql mode compatible. 28/12/14 RChacon: Standardise labels and texts in Prices_Customer.php SpecialOrder.php and WWW_Access.php. Add $ViewTopic and $BookMark to WWW_Access.php 28/12/14 RChacon: Add comments, variables to link to the manual and titles in Z_CurrencyDebtorsBalances.php and Z_CurrencySuppliersBalances.php. 28/12/14 RChacon: Add comments, variables to link to the manual and titles in Z_Change*.php. Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-06 16:33:52 UTC (rev 7070) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-07 06:50:58 UTC (rev 7071) @@ -136,11 +136,11 @@ ALTER TABLE `stockdescriptiontranslations` ADD `longdescriptiontranslation` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Item''s long description'; -- Add a field to mark if a description needs revision: ALTER TABLE `stockdescriptiontranslations` ADD `needsrevision` TINYINT(1) NOT NULL DEFAULT '0'; --- +-- INSERT INTO `config` (`confname` ,`confvalue`) VALUES ('GoogleTranslatorAPIKey', ''); -- Assign a Page Security value to each translation script: -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES - ('AutomaticTranslationDescriptions.php', '15', 'Translates via Google Translator all empty translated descriptions'), +INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES + ('AutomaticTranslationDescriptions.php', '15', 'Translates via Google Translator all empty translated descriptions'), ('RevisionTranslations.php', '15', 'Human revision for automatic descriptions translations'); -- @@ -166,4 +166,21 @@ KEY `stockid` (`stockid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; + +CREATE TABLE IF NOT EXISTS `suppliercontacts` ( + `supplierid` varchar(10) NOT NULL DEFAULT '', + `contact` varchar(30) NOT NULL DEFAULT '', + `position` varchar(30) NOT NULL DEFAULT '', + `tel` varchar(30) NOT NULL DEFAULT '', + `fax` varchar(30) NOT NULL DEFAULT '', + `mobile` varchar(30) NOT NULL DEFAULT '', + `email` varchar(55) NOT NULL DEFAULT '', + `ordercontact` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`supplierid`,`contact`), + KEY `Contact` (`contact`), + KEY `SupplierID` (`supplierid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +ALTER TABLE `suppliercontacts` + ADD CONSTRAINT `suppliercontacts_ibfk_1` FOREIGN KEY (`supplierid`) REFERENCES `suppliers` (`supplierid`); UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2015-01-09 21:40:50
|
Revision: 7074 http://sourceforge.net/p/web-erp/reponame/7074 Author: daintree Date: 2015-01-09 21:40:47 +0000 (Fri, 09 Jan 2015) Log Message: ----------- Bob Thomas: Removed reference to AliasNbPages() now no longer part of TCPDF Modified Paths: -------------- trunk/doc/Change.log trunk/reportwriter/WriteReport.inc Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2015-01-07 08:11:52 UTC (rev 7073) +++ trunk/doc/Change.log 2015-01-09 21:40:47 UTC (rev 7074) @@ -1,5 +1,5 @@ webERP Change Log - +9/1/15 Bob Thomas: Removed reference to AliasNbPages() now no longer part of TCPDF 7/1/15 Phil: Added missing SQL for suppliercontacts and supplierdiscounts and adding the script SalesTopCustomersInquiry to the scripts table 05/01/15 RChacon: Allow turn on/off the dashboard display after login for an specific user. Add comments to code. 04/01/15 RChacon: In RevisionTranslations.php, add $Id, $ViewTopic, $BookMark and page_title_text. Add info to manual. Add comments to code. Modified: trunk/reportwriter/WriteReport.inc =================================================================== --- trunk/reportwriter/WriteReport.inc 2015-01-07 08:11:52 UTC (rev 7073) +++ trunk/reportwriter/WriteReport.inc 2015-01-09 21:40:47 UTC (rev 7074) @@ -21,7 +21,6 @@ $this->SetDrawColor(128,0,0); $this->SetLineWidth(.35); // 1 point - $this->AliasNbPages(); $this->AddPage(); } |
From: <dai...@us...> - 2015-01-13 09:10:36
|
Revision: 7079 http://sourceforge.net/p/web-erp/reponame/7079 Author: daintree Date: 2015-01-13 09:10:28 +0000 (Tue, 13 Jan 2015) Log Message: ----------- Modified Paths: -------------- trunk/SystemParameters.php trunk/config.distrib.php trunk/sql/mysql/upgrade4.11-4.12.sql Modified: trunk/SystemParameters.php =================================================================== --- trunk/SystemParameters.php 2015-01-12 10:49:04 UTC (rev 7078) +++ trunk/SystemParameters.php 2015-01-13 09:10:28 UTC (rev 7079) @@ -119,14 +119,13 @@ if ($_SESSION['DefaultDateFormat'] != $_POST['X_DefaultDateFormat'] ) { $sql[] = "UPDATE config SET confvalue = '".$_POST['X_DefaultDateFormat']."' WHERE confname = 'DefaultDateFormat'"; } - if($_SESSION['DefaultTheme'] != $_POST['X_DefaultTheme']) {// If not equal, update the default theme. - $sql[] = "UPDATE config SET confvalue = '".$_POST['X_DefaultTheme']."' WHERE confname = 'DefaultTheme'"; + if($DefaultTheme != $_POST['X_DefaultTheme']) {// If not equal, update the default theme. // BEGIN: Update the config.php file: $fhandle = fopen('config.php', 'r'); if($fhandle) { $content = fread($fhandle, filesize('config.php')); $content = str_replace(' ;\n', ';\n', $content);// Clean space before the end-of-php-line. - $content = str_replace('\''.$_SESSION['DefaultTheme'].'\';', '\''.$_POST['X_DefaultTheme'].'\';', $content); + $content = str_replace('\''.$DefaultTheme .'\';', '\''.$_POST['X_DefaultTheme'].'\';', $content); $fhandle = fopen('config.php','w'); if(!fwrite($fhandle,$content)) { prnMsg(_('Cannot write to the configuration file.'), 'error'); @@ -427,21 +426,25 @@ <td>' . _('The default date format for entry of dates and display.') . '</td></tr>'; // DefaultTheme: -echo '<tr style="outline: 1px solid"><td>' . _('Default Theme') . ':</td> - <td><select name="X_DefaultTheme">'; -$ThemeDirectories = scandir('css/');// List directories inside ~/css. Each diretory is a theme. -foreach($ThemeDirectories as $ThemeName) { - if(is_dir('css/'.$ThemeName) AND $ThemeName!='.' AND $ThemeName!='..' AND $ThemeName!='.svn') { - echo '<option'; - if($_SESSION['DefaultTheme'] == $ThemeName) { - echo ' selected="selected"'; +if (is_writable('config.php')) { + echo '<tr style="outline: 1px solid"><td>' . _('Default Theme') . ':</td> + <td><select name="X_DefaultTheme">'; + $ThemeDirectories = scandir('css');// List directories inside ~/css. Each diretory is a theme. + foreach($ThemeDirectories as $ThemeName) { + if(is_dir('css/'.$ThemeName) AND $ThemeName!='.' AND $ThemeName!='..' AND $ThemeName!='.svn') { + echo '<option'; + if ($DefaultTheme == $ThemeName) { + echo ' selected="selected"'; + } + echo ' value="'. $ThemeName.'">' . $ThemeName . '</option>'; } - echo ' value="'.$ThemeName.'">'.$ThemeName.'</option>'; } + echo '</select></td> + <td>' . _("The default theme to use for the login screen and the setup of new users. The users' theme selection will override it.") . '</td> + </tr>'; +} else { + echo '<input type="hidden" name="X_DefaultTheme" value="' . $DefaultTheme . '" />'; } -echo '</select></td> - <td>' . _("The default theme to use for the login screen and the setup of new users. The users' theme selection will override it.") . '</td></tr>'; - // ---------- New section: echo '<tr><th colspan="3">' . _('Accounts Receivable/Payable Settings') . '</th></tr>'; @@ -504,8 +507,8 @@ echo '<tr style="outline: 1px solid"> <td>' . _('Order Entry allows Line Item Narrative') . ':</td> <td><select name="X_AllowOrderLineItemNarrative"> - <option '.($_SESSION['AllowOrderLineItemNarrative']=='1'?'selected="selected" ':'').'value="1">' . _('Allow Narrative Entry') . '</option> - <option '.($_SESSION['AllowOrderLineItemNarrative']=='0'?'selected="selected" ':'').'value="0">' . _('No Narrative Line') . '</option> + <option ' . ($_SESSION['AllowOrderLineItemNarrative']=='1'?'selected="selected" ':'').'value="1">' . _('Allow Narrative Entry') . '</option> + <option ' . ($_SESSION['AllowOrderLineItemNarrative']=='0'?'selected="selected" ':'').'value="0">' . _('No Narrative Line') . '</option> </select></td> <td>' . _('Select whether or not to allow entry of narrative on order line items. This narrative will appear on invoices and packing slips. Useful mainly for service businesses.') . '</td> </tr>'; @@ -516,7 +519,8 @@ echo '<tr style="outline: 1px solid"> <td>' . _('Languages to Maintain Translations for Item Descriptions') . ':</td> <td><select name="X_ItemDescriptionLanguages[]" size="5" multiple="multiple" >'; - echo '<option value="">' . _('None') . '</option>'; + + echo '<option value=""' . (count($LanguagesArray)==0 ? '':'selected="selected"') . '>' . _('None') . '</option>'; foreach ($LanguagesArray as $LanguageEntry => $LanguageName){ if (isset($_POST['X_ItemDescriptionLanguages']) AND in_array($LanguageEntry,$_POST['X_ItemDescriptionLanguages'])){ echo '<option selected="selected" value="' . $LanguageEntry . '">' . $LanguageName['LanguageName'] . '</option>'; Modified: trunk/config.distrib.php =================================================================== --- trunk/config.distrib.php 2015-01-12 10:49:04 UTC (rev 7078) +++ trunk/config.distrib.php 2015-01-13 09:10:28 UTC (rev 7079) @@ -11,6 +11,10 @@ // Default theme to use for the login screen and the setup of new users. //The users' theme selection will override +//$DefaultTheme = 'professional'; +//$DefaultTheme = 'wood'; +//$DefaultTheme = 'silverwolf'; +//$DefaultTheme = 'gel'; $DefaultTheme = 'xenos'; // Whether to display the demo login and password or not on the login screen Modified: trunk/sql/mysql/upgrade4.11-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-12 10:49:04 UTC (rev 7078) +++ trunk/sql/mysql/upgrade4.11-4.12.sql 2015-01-13 09:10:28 UTC (rev 7079) @@ -146,7 +146,7 @@ -- -- Insert default theme value for login screen -- -INSERT INTO `config` (`confname`, `confvalue`) VALUES ('DefaultTheme', 'xenos'); + INSERT INTO scripts (`script`,`pagesecurity`,`description`) VALUES ('SalesTopCustomersInquiry.php', '2', 'Shows the top customers sales for a selected date range'); |