This commit is contained in:
2025-01-23 16:10:25 +00:00
parent a4a65d5b4f
commit 8ecc410394
9 changed files with 52 additions and 21 deletions

View File

@@ -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';

View File

@@ -1,5 +1,5 @@
<?php
// created: 2024-12-20 08:25:23
// created: 2025-01-23 12:37:10
$customDoms = array (
'ecmproducts_attribute_dom' =>
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' =>

View File

@@ -1,5 +1,5 @@
<?php
// created: 2024-12-20 08:25:23
// created: 2025-01-23 12:37:10
$customDoms = array (
'ecmproducts_attribute_dom' =>
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' =>

View File

@@ -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('&quot;', "", $res['name']);
$row['product_code'] = $res['code'];
$row['ecmproductcategory_id'] = $res['product_category_id'];
$row['unit_id'] = $res['unit_id'];

View File

@@ -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');
?>

View File

@@ -5,7 +5,7 @@ $content = '
<table style="width: 100%; font-size: 8pt;">
<tr>
<td style="width: ' . $w . '%">
<b><h1>Zamówienie wewnętrzne</h1></b>
<b><h1>Przyjęcie produkcyjne</h1></b>
</td>
<td style="width: ' . $w2 . '%">
Numer:

View File

@@ -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',

View File

@@ -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);
},
});
}
}
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();
}

View File

@@ -80,7 +80,11 @@
<input class="button" id="deleteBtn" value="Usuń" type="button">&nbsp;&nbsp;&nbsp;
<input class="button" id="excelBtn" value="Excel" type="button">
<input class="button" id="pdfBtn" value="PDF" type="button">
<input class="button" id="productionBtn" value="RW/PW" type="button">
<input class="button" value="Utwórz zamówienie wewnętrzne" type="button" id="createInsideOrder"/>
<form action="index.php?module=EcmInsideOrders&action=EditView&fromProductsBySalesReport=true" method="post"
target="_blank" id="createInsideOrderForm">
<input id="insideOrderProducts" name="insideOrderProducts" type="hidden" value=""/>
</form>
<div id="1">
<table id="allTable">
@@ -110,6 +114,7 @@
<tr>
<td>
<input type="checkbox" value="{$ROW.id}" class="allCheck"/>
<input type="hidden" id="productId-{$ROW.id}" value="{$ROW.productId}">
<!--
<img src="modules/EcmQuotes/images/add_position.gif" style="margin-top: 3px; margin-right: 3px; cursor: pointer" width="12" alt="Duplikuj" onclick="duplicatePosition('{$ROW.id}')">
<img src="modules/EcmQuotes/images/deleterow.gif" style="margin-top: 3px; margin-right: 3px; cursor: pointer" width="12" alt="Usuń" onclick="removePosition('{$ROW.id}')">