From 8ecc410394dcf2bc9d516e568f48fe85fa0a72cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Thu, 23 Jan 2025 16:10:25 +0000 Subject: [PATCH] PP --- custom/include/language/pl_pl.lang.php | 2 +- include/language/en_us.EcmDropdownEditor.php | 11 ++++++---- include/language/pl_pl.EcmDropdownEditor.php | 11 ++++++---- modules/EcmInsideOrders/EditView.php | 4 ++-- modules/EcmInsideOrders/Menu.php | 4 ++-- .../EcmInsideOrders/PDFTemplate/content.php | 2 +- .../EcmInsideOrders/language/pl_pl.lang.php | 10 ++++----- .../productionSchedule/productionSchedule.js | 22 ++++++++++++++++++- .../productionSchedule/productionSchedule.tpl | 7 +++++- 9 files changed, 52 insertions(+), 21 deletions(-) diff --git a/custom/include/language/pl_pl.lang.php b/custom/include/language/pl_pl.lang.php index 3a0303fa..85ebd417 100755 --- a/custom/include/language/pl_pl.lang.php +++ b/custom/include/language/pl_pl.lang.php @@ -849,7 +849,7 @@ $app_list_strings['moduleList']['EcmGroupSales'] = 'Ustawienia'; $app_list_strings['moduleList']['EcmTexts'] = 'Teksty'; $app_list_strings['moduleList']['EcmDocumentTemplates'] = 'Szablony'; $app_list_strings['moduleList']['EcmDeliveryConditions'] = 'Warunki Przesyłki'; -$app_list_strings['moduleList']['EcmInsideOrders'] = 'Zamówienia wewnętrzne'; +$app_list_strings['moduleList']['EcmInsideOrders'] = 'Przyjęcie produkcyjne'; $app_list_strings['moduleList']['EcmStockStates'] = 'Stany magazynowe'; $app_list_strings['moduleList']['EcmStocks'] = 'Magazyny'; $app_list_strings['moduleList']['EcmStockOperations'] = 'Operacje magazynowe'; diff --git a/include/language/en_us.EcmDropdownEditor.php b/include/language/en_us.EcmDropdownEditor.php index 88db959c..08350b94 100644 --- a/include/language/en_us.EcmDropdownEditor.php +++ b/include/language/en_us.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -153,6 +153,7 @@ $customDoms = array ( '661bc56d-f77f-6d98-98be-672a06cf59ee' => 'AVCedukacja', '8d09cc5f-2348-6d22-80dc-6736057e390d' => 'Seltino', '7ceeacc7-e79b-4eb0-2aa3-676529593a3c' => 'PureNest', + 'ca4ee928-3385-d7f8-090e-678e697c3b8e' => 'gc clean!', ), 'ecmproducts_category_dom' => array ( @@ -191,6 +192,8 @@ $customDoms = array ( 'cc5cf218-3162-3d94-3b71-654fef87a706' => 'Surface cleaners', 'c3b67c3e-e8b7-a434-b6a5-65853203d09a' => 'Office equipment cleaners', '6fadf5e0-693e-6b9d-213c-66222fd03bdf' => 'Fabric Surface Cleaners', + 'f2156355-d06b-2904-d759-67923795c77b' => 'Oven Cleaners', + '27697ebf-0d8e-5156-528e-679237ffd78f' => 'Toilet Cleaners', ), 'ecmquotes_status_dom' => array ( @@ -200,9 +203,9 @@ $customDoms = array ( ), 'ecmactions_category_dom' => array ( - 'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'Bottle Liquids', - 'f87b0591-14fd-b35f-1da5-54d1d584fd25' => 'Tube Wipes', - '8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'Soft Pack Wet Wipes', + 'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'Line no 1', + 'f87b0591-14fd-b35f-1da5-54d1d584fd25' => 'Line no 2', + '8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'Sets', '55020d96-73d5-7b29-3bab-654f4818e0cd' => 'Tablets', ), 'payment_method_dom' => diff --git a/include/language/pl_pl.EcmDropdownEditor.php b/include/language/pl_pl.EcmDropdownEditor.php index 153bac26..714f2678 100644 --- a/include/language/pl_pl.EcmDropdownEditor.php +++ b/include/language/pl_pl.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -153,6 +153,7 @@ $customDoms = array ( '661bc56d-f77f-6d98-98be-672a06cf59ee' => 'AVCedukacja', '8d09cc5f-2348-6d22-80dc-6736057e390d' => 'Seltino', '7ceeacc7-e79b-4eb0-2aa3-676529593a3c' => 'PureNest', + 'ca4ee928-3385-d7f8-090e-678e697c3b8e' => 'gc clean!', ), 'ecmproducts_category_dom' => array ( @@ -191,6 +192,8 @@ $customDoms = array ( 'cc5cf218-3162-3d94-3b71-654fef87a706' => 'Środki do czyszczenia powierzchni', 'c3b67c3e-e8b7-a434-b6a5-65853203d09a' => 'Środki do czyszczenia sprzętu biurowego', '6fadf5e0-693e-6b9d-213c-66222fd03bdf' => 'Środki do czyszczenia powierzchni materiałowych', + 'f2156355-d06b-2904-d759-67923795c77b' => 'Środki do czyszczenia piekarnika', + '27697ebf-0d8e-5156-528e-679237ffd78f' => 'Środki do czyszczenia toalet', ), 'ecmquotes_status_dom' => array ( @@ -200,9 +203,9 @@ $customDoms = array ( ), 'ecmactions_category_dom' => array ( - 'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'Płyny w butelkach', - 'f87b0591-14fd-b35f-1da5-54d1d584fd25' => 'Chusteczki w tubach', - '8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'Chusteczki w folii', + 'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'Linia nr 1', + 'f87b0591-14fd-b35f-1da5-54d1d584fd25' => 'Linia nr 2', + '8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'Składanie zestawów', '55020d96-73d5-7b29-3bab-654f4818e0cd' => 'Tabletki', ), 'payment_method_dom' => diff --git a/modules/EcmInsideOrders/EditView.php b/modules/EcmInsideOrders/EditView.php index 308e92d4..3f95920a 100644 --- a/modules/EcmInsideOrders/EditView.php +++ b/modules/EcmInsideOrders/EditView.php @@ -64,7 +64,7 @@ else { SELECT name, code, unit_id, product_category_id FROM ecmproducts WHERE id='".$row['product_id']."'")); - $row['name'] = $res['name']; + $row['name'] = str_replace('"', "'", $res['name']); $row['product_code'] = $res['code']; $row['ecmproductcategory_id'] = $res['product_category_id']; $row['unit_id'] = $res['unit_id']; @@ -87,7 +87,7 @@ else { SELECT name, code, unit_id, product_category_id FROM ecmproducts WHERE id='".$row['product_id']."'")); - $row['name'] = $res['name']; + $row['name'] = str_replace('"', "", $res['name']); $row['product_code'] = $res['code']; $row['ecmproductcategory_id'] = $res['product_category_id']; $row['unit_id'] = $res['unit_id']; diff --git a/modules/EcmInsideOrders/Menu.php b/modules/EcmInsideOrders/Menu.php index 2c1ecdc3..d302c0ea 100644 --- a/modules/EcmInsideOrders/Menu.php +++ b/modules/EcmInsideOrders/Menu.php @@ -98,9 +98,9 @@ if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); global $mod_strings, $current_user; - if(ACLController::checkAccess('EcmInsideOrders', "edit", true)) $module_menu [] = Array("index.php?module=".'EcmInsideOrders'."&action=EditView&return_module=".'EcmInsideOrders'."&return_action=DetailView", translate('LNK_NEW_'.'ECMNEWINSIDEORDERS', 'EcmInsideOrders'),"CreateEcmInsideOrders", 'EcmInsideOrders'); +$module_menu [] = Array("index.php?module=".'EcmInsideOrders'."&action=EditView&return_module=".'EcmInsideOrders'."&return_action=DetailView", translate('LNK_NEW_'.'ECMNEWINSIDEORDERS', 'EcmInsideOrders'),"CreateEcmInsideOrders", 'EcmInsideOrders'); - if(ACLController::checkAccess('EcmInsideOrders', "list", true)) $module_menu [] = Array("index.php?module=EcmInsideOrders&action=index&return_module=EcmInsideOrders&return_action=DetailView", translate('LNK_ECMNEWINSIDEORDERS_LIST','EcmInsideOrders'),"EcmInsideOrders", 'EcmInsideOrders'); +$module_menu [] = Array("index.php?module=EcmInsideOrders&action=index&return_module=EcmInsideOrders&return_action=DetailView", translate('LNK_ECMNEWINSIDEORDERS_LIST','EcmInsideOrders'),"EcmInsideOrders", 'EcmInsideOrders'); ?> diff --git a/modules/EcmInsideOrders/PDFTemplate/content.php b/modules/EcmInsideOrders/PDFTemplate/content.php index 3f4b44b2..ef2ce181 100644 --- a/modules/EcmInsideOrders/PDFTemplate/content.php +++ b/modules/EcmInsideOrders/PDFTemplate/content.php @@ -5,7 +5,7 @@ $content = '
-

Zamówienie wewnętrzne

+

Przyjęcie produkcyjne

Numer: diff --git a/modules/EcmInsideOrders/language/pl_pl.lang.php b/modules/EcmInsideOrders/language/pl_pl.lang.php index 6c70b0f0..17561856 100644 --- a/modules/EcmInsideOrders/language/pl_pl.lang.php +++ b/modules/EcmInsideOrders/language/pl_pl.lang.php @@ -153,11 +153,11 @@ $mod_strings = array ( 'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie', - 'LBL_LIST_FORM_TITLE' => 'Lista Ofert', + 'LBL_LIST_FORM_TITLE' => 'Lista ', - 'LBL_NEW_FORM_TITLE' => 'Nowa Oferta', + 'LBL_NEW_FORM_TITLE' => 'Nowa dokument PP', - 'LBL_DETAILS' => 'Szczególy Oferty', + 'LBL_DETAILS' => 'Szczególy', 'LBL_ITEMS' => 'Zalaczone Produkty:', @@ -182,8 +182,8 @@ $mod_strings = array ( 'LBL_ID' => 'Id', 'LBL_NAME' => 'Nazwa', - 'LNK_ECMNEWINSIDEORDERS_LIST'=> 'Lista zamówień towaru', - 'LNK_NEW_ECMNEWINSIDEORDERS'=>'Utwórz zamówienie towaru', + 'LNK_ECMNEWINSIDEORDERS_LIST'=> 'Lista dokumentów PP', + 'LNK_NEW_ECMNEWINSIDEORDERS'=>'Utwórz dokument PP', 'LBL_DESCRIPTION' => 'Opis', diff --git a/modules/EcmReports/BimIT-Reports/productionSchedule/productionSchedule.js b/modules/EcmReports/BimIT-Reports/productionSchedule/productionSchedule.js index ea231115..d01cbeb0 100644 --- a/modules/EcmReports/BimIT-Reports/productionSchedule/productionSchedule.js +++ b/modules/EcmReports/BimIT-Reports/productionSchedule/productionSchedule.js @@ -90,6 +90,7 @@ $(document).ready(function () { $("#excelBtn").click(() => { exportExcel(); }); $("#pdfBtn").click(() => { window.alert("In progress."); }); $("#productionBtn").click(() => { window.alert("In progress."); }); + $("#createInsideOrder").click(createInsideOrder); }); function editQty(id) { @@ -210,4 +211,23 @@ function exportExcel() { window.console.log(data); }, }); -} \ No newline at end of file +} + +function createInsideOrder() { + var ids = []; + $('input.allCheck:checkbox:checked').each(function () { + ids.push($(this).val()); + }); + if (ids.length === 0) { + alert('Wybierz pozycje.'); + return; + } + var products = []; + ids.forEach(el => { + const qty = parseFloat($("#qtyInput-" + el).val().trim()); + const id = $("#productId-" + el).val(); + products.push(id + "|" + qty); + }); + $("#insideOrderProducts").val(products.join('*')); + $("#createInsideOrderForm").submit(); + } \ No newline at end of file diff --git a/modules/EcmReports/BimIT-Reports/productionSchedule/productionSchedule.tpl b/modules/EcmReports/BimIT-Reports/productionSchedule/productionSchedule.tpl index d18a2d78..4ff5f0da 100644 --- a/modules/EcmReports/BimIT-Reports/productionSchedule/productionSchedule.tpl +++ b/modules/EcmReports/BimIT-Reports/productionSchedule/productionSchedule.tpl @@ -80,7 +80,11 @@     - + +
+ +
@@ -110,6 +114,7 @@
+