Compare commits
12 Commits
9a8acbe6a9
...
f9b7c2462b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9b7c2462b | ||
|
|
64a63d5748 | ||
|
|
cbf5645912 | ||
|
|
c70ab619e6 | ||
|
|
b8b076ebe7 | ||
| ea46083637 | |||
| 66e000879d | |||
|
|
7a3f58a551 | ||
|
|
e76b3fb61c | ||
|
|
fb866fb386 | ||
|
|
75dc09ca26 | ||
|
|
29fa933cb8 |
@@ -59,28 +59,29 @@ var EcmDropdownEditor_save = function(dom, container) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var doms = EcmDropdownEditor_parseArrays(dom);
|
var doms = EcmDropdownEditor_parseArrays(dom);
|
||||||
var params = new Array;
|
var params = [];
|
||||||
params[0] = dom; //name of list
|
params[0] = dom; //name of list
|
||||||
params[1] = doms;//list of values
|
params[1] = doms;//list of values
|
||||||
// AJAX call
|
// AJAX call
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
type : 'POST',
|
type : "POST",
|
||||||
url : 'index.php?entryPoint=HandleEcmAjax',
|
url : "index.php?entryPoint=HandleEcmAjax",
|
||||||
data : {
|
data : {
|
||||||
ecmclass : 'EcmDropdownEditor',
|
ecmclass : "EcmDropdownEditor",
|
||||||
job : 'saveDom',
|
job : "saveDom",
|
||||||
params : utf8_to_b64(JSON.stringifyNoSecurity(params)),
|
params : utf8_to_b64(JSON.stringifyNoSecurity(params)),
|
||||||
},
|
},
|
||||||
dataType : 'json',
|
dataType : "json",
|
||||||
async : false,
|
async : false,
|
||||||
success : function(response) {
|
success : function() {
|
||||||
var div = $('[name='+container+']');
|
setTimeout(function() {
|
||||||
div.hide();
|
|
||||||
EcmDropdownEditor_refreshField(container);
|
EcmDropdownEditor_refreshField(container);
|
||||||
return;
|
var div = $("[name="+container+"]");
|
||||||
|
div.hide();
|
||||||
|
}, 3000);
|
||||||
},
|
},
|
||||||
error : function(xhr, ajaxOptions, thrownError) {
|
error : function(xhr, ajaxOptions, thrownError) {
|
||||||
console.log(thrownError);
|
window.console.log(thrownError);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -94,16 +95,17 @@ var EcmDropdownEditor_refreshField = function(container) {
|
|||||||
params[1] = container;//list of values
|
params[1] = container;//list of values
|
||||||
// AJAX call
|
// AJAX call
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
type : 'POST',
|
type : "POST",
|
||||||
url : 'index.php?entryPoint=HandleEcmAjax',
|
url : "index.php?entryPoint=HandleEcmAjax",
|
||||||
data : {
|
data : {
|
||||||
ecmclass : 'EcmDropdownEditor',
|
ecmclass : "EcmDropdownEditor",
|
||||||
job : 'refreshField',
|
job : "refreshField",
|
||||||
params : utf8_to_b64(JSON.stringifyNoSecurity(params)),
|
params : utf8_to_b64(JSON.stringifyNoSecurity(params)),
|
||||||
},
|
},
|
||||||
dataType : 'json',
|
dataType : "json",
|
||||||
async : false,
|
async : false,
|
||||||
success : function(response) {
|
success : function(response) {
|
||||||
|
console.log('EditedDropdown', response);
|
||||||
var tmp = container.split("___");
|
var tmp = container.split("___");
|
||||||
$('form[name=EditView]').find('select[name='+tmp[0]+']').html(response[0]);
|
$('form[name=EditView]').find('select[name='+tmp[0]+']').html(response[0]);
|
||||||
return;
|
return;
|
||||||
|
|||||||
57
include/language/en_us.EcmDropdownEditor.php
Normal file → Executable file
57
include/language/en_us.EcmDropdownEditor.php
Normal file → Executable file
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// created: 2025-08-13 12:56:45
|
// created: 2025-09-04 18:29:22
|
||||||
$customDoms = array (
|
$customDoms = array (
|
||||||
'ecmproducts_attribute_dom' =>
|
'ecmproducts_attribute_dom' =>
|
||||||
array (
|
array (
|
||||||
@@ -11,8 +11,8 @@ $customDoms = array (
|
|||||||
array (
|
array (
|
||||||
'8bc92e86-d956-0df2-e34c-656e0bc9da04' => 'None',
|
'8bc92e86-d956-0df2-e34c-656e0bc9da04' => 'None',
|
||||||
'6db335cc-96d5-5185-6118-65761ec65583' => 'Liquid',
|
'6db335cc-96d5-5185-6118-65761ec65583' => 'Liquid',
|
||||||
'8112d0d3-baca-cd8a-3b00-6576321030cb' => 'Bottle B1_100ml',
|
'8112d0d3-baca-cd8a-3b00-6576321030cb' => 'Butelka IT_100 B1_100 ml',
|
||||||
'1441313f-245d-dfe7-92dd-6576255579fb' => 'Bottle B1_250ml',
|
'1441313f-245d-dfe7-92dd-6576255579fb' => 'Butelka IT_250 B1_250 ml',
|
||||||
'c2beb683-dd0a-c76f-fd2f-6576252c68de' => 'Bottle B1_500ml',
|
'c2beb683-dd0a-c76f-fd2f-6576252c68de' => 'Bottle B1_500ml',
|
||||||
'8a4c1e7b-fb17-681d-a9dd-65762566ca64' => 'Bottle B1_1000ml',
|
'8a4c1e7b-fb17-681d-a9dd-65762566ca64' => 'Bottle B1_1000ml',
|
||||||
'4d063e6a-9cf1-28f4-2e98-6576251a3e7f' => 'Tube standard',
|
'4d063e6a-9cf1-28f4-2e98-6576251a3e7f' => 'Tube standard',
|
||||||
@@ -29,24 +29,24 @@ $customDoms = array (
|
|||||||
'5048d070-7da8-a160-d0bd-659c6af595b4' => 'Kit 3in1',
|
'5048d070-7da8-a160-d0bd-659c6af595b4' => 'Kit 3in1',
|
||||||
'a1d41637-21c8-60e7-dfeb-65973bb8bc04' => 'Kit 4in1',
|
'a1d41637-21c8-60e7-dfeb-65973bb8bc04' => 'Kit 4in1',
|
||||||
'e47359f6-5f25-4d4b-c472-65b77152ae8a' => 'Kit 5in1',
|
'e47359f6-5f25-4d4b-c472-65b77152ae8a' => 'Kit 5in1',
|
||||||
'cd43ef35-031a-ce97-3d1c-65f41563046f' => 'Bottle D11_50ml (RPET)',
|
'cd43ef35-031a-ce97-3d1c-65f41563046f' => 'Butelka okrągła D11_50 ml (RPET)',
|
||||||
'b78c2842-b4f8-ad77-e7ea-65f41571c57e' => 'Bottle D11_250ml (RPET)',
|
'b78c2842-b4f8-ad77-e7ea-65f41571c57e' => 'Bottle D11_250ml (RPET)',
|
||||||
'901babfa-3d95-3a98-8dbf-659f00f4f91e' => 'Bottle D21_250ml',
|
'901babfa-3d95-3a98-8dbf-659f00f4f91e' => 'Butelka OD_0250 D21_250ml',
|
||||||
'62ea70ee-d2cc-e68b-d51b-661670a10c98' => 'Bottle D21_250ml ',
|
'62ea70ee-d2cc-e68b-d51b-661670a10c98' => 'Bottle D21_250ml ',
|
||||||
'c10933f2-62ce-cfb2-52b1-659f1f2b9e4a' => 'B D22_250ml (szyjka)',
|
'c10933f2-62ce-cfb2-52b1-659f1f2b9e4a' => 'Butelka DT_0250 D22_250ml (szyjka)',
|
||||||
'855e5265-8d2d-4682-8e4c-659f1d1ead09' => 'Bottle D23_250ml',
|
'855e5265-8d2d-4682-8e4c-659f1d1ead09' => 'Butelka D27Z_250ml (zmywarka)',
|
||||||
'e3a77ebf-9ba1-3776-3d80-67a9e325c268' => 'Bottle D24 250 ml (Ula)',
|
'e3a77ebf-9ba1-3776-3d80-67a9e325c268' => 'Bottle D24 250 ml (Ula)',
|
||||||
'359d7556-f107-92de-4121-659f1eafeb90' => 'B D11_500ml (RPET)',
|
'359d7556-f107-92de-4121-659f1eafeb90' => 'B D11_500ml (RPET)',
|
||||||
'90053c7e-98fb-873e-b414-659f1bc748cc' => 'Bottle D12_500ml',
|
'90053c7e-98fb-873e-b414-659f1bc748cc' => 'Bottle D12_500ml',
|
||||||
'9b883933-6bb0-cc85-29b0-659f03d60a98' => 'Bottle D21_500ml',
|
'9b883933-6bb0-cc85-29b0-659f03d60a98' => 'Bottle D21_500ml',
|
||||||
'8f4fdd3c-44f9-103b-3f40-659f1c128319' => 'Bottle D22_500ml',
|
'8f4fdd3c-44f9-103b-3f40-659f1c128319' => 'Butelka DT_0500 D22_500ml (szyjka)',
|
||||||
'307f61db-5fd9-3aa6-e701-65a04f4bba88' => 'B D23_500ml (nabłyszczacz)',
|
'307f61db-5fd9-3aa6-e701-65a04f4bba88' => 'Butelka NB_500 ml (nabłyszczacz)',
|
||||||
'5df47246-d0cd-4151-9bdd-65eede53aba5' => 'B D24_500ml (systemy mleczne)',
|
'5df47246-d0cd-4151-9bdd-65eede53aba5' => 'Butelka SM_500 ml (systemy mleczne)',
|
||||||
|
'87a2b609-9b67-de82-8f41-65eedd4613c9' => 'Butelka SM_1000 ml (systemy mleczne)',
|
||||||
'ab74cd2c-7720-5875-7ca5-66bb55a3e075' => 'Bottle D25_500ml (Ula)',
|
'ab74cd2c-7720-5875-7ca5-66bb55a3e075' => 'Bottle D25_500ml (Ula)',
|
||||||
'd7c10cb9-7459-1174-6315-661cdae38a39' => 'D11_1000ml',
|
'd7c10cb9-7459-1174-6315-661cdae38a39' => 'D11_1000ml',
|
||||||
'58664d9d-0295-3539-4662-659f18dc4b80' => 'Bottle',
|
'58664d9d-0295-3539-4662-659f18dc4b80' => 'Butelka OD_1000 D21_1000 ml',
|
||||||
'92a7ee9b-d953-fd7e-5c88-65c9bf1e144d' => 'B D22_1000ml (szyjka)',
|
'92a7ee9b-d953-fd7e-5c88-65c9bf1e144d' => 'B D22_1000ml (szyjka)',
|
||||||
'87a2b609-9b67-de82-8f41-65eedd4613c9' => 'D23_1000ml (systemy mleczne)',
|
|
||||||
'75980ea5-d89e-3923-2662-66bb55202244' => 'D24_1000ml (Ula)',
|
'75980ea5-d89e-3923-2662-66bb55202244' => 'D24_1000ml (Ula)',
|
||||||
'ba4f06a8-f6fb-4969-d4b9-6683e6b6b372' => 'D11_2000ml ',
|
'ba4f06a8-f6fb-4969-d4b9-6683e6b6b372' => 'D11_2000ml ',
|
||||||
'cb8f5e45-43e1-b62d-05d7-669646b4eb10' => 'Bottle D12_5000ml (kanister)',
|
'cb8f5e45-43e1-b62d-05d7-669646b4eb10' => 'Bottle D12_5000ml (kanister)',
|
||||||
@@ -62,7 +62,7 @@ $customDoms = array (
|
|||||||
'48369f61-18bd-53e6-070a-659f026773ac' => 'Box',
|
'48369f61-18bd-53e6-070a-659f026773ac' => 'Box',
|
||||||
'37dbeaa1-f183-3b3e-1b54-65aa78a662a2' => 'Jar 500 ml',
|
'37dbeaa1-f183-3b3e-1b54-65aa78a662a2' => 'Jar 500 ml',
|
||||||
'f13d7541-494d-75c7-2a35-65aa784b42a5' => 'Jar 1000 ml',
|
'f13d7541-494d-75c7-2a35-65aa784b42a5' => 'Jar 1000 ml',
|
||||||
'e703a7f9-d27d-b445-d946-66727a3940d9' => 'Jar 1500 ml',
|
'e703a7f9-d27d-b445-d946-66727a3940d9' => 'Słoik 1500 ml',
|
||||||
'da8d7be4-58dc-4f75-f547-65c310cd97dd' => 'Jar 65 ml',
|
'da8d7be4-58dc-4f75-f547-65c310cd97dd' => 'Jar 65 ml',
|
||||||
'e1a16dbf-7216-d184-b9ed-65c310aff4d4' => 'Jar 150 ml',
|
'e1a16dbf-7216-d184-b9ed-65c310aff4d4' => 'Jar 150 ml',
|
||||||
'2a9454a6-b2a1-150f-c307-65c31102cb28' => 'Jar 250 ml',
|
'2a9454a6-b2a1-150f-c307-65c31102cb28' => 'Jar 250 ml',
|
||||||
@@ -177,6 +177,7 @@ $customDoms = array (
|
|||||||
'11095313-0dd0-aa9b-df3a-682739877d33' => 'Coffix',
|
'11095313-0dd0-aa9b-df3a-682739877d33' => 'Coffix',
|
||||||
'd97b870b-86a1-1970-9cea-68527ecc5ad9' => 'Zenevo',
|
'd97b870b-86a1-1970-9cea-68527ecc5ad9' => 'Zenevo',
|
||||||
'c709e4cf-9ca7-c946-f5e3-688202ec4c24' => 'Aspico',
|
'c709e4cf-9ca7-c946-f5e3-688202ec4c24' => 'Aspico',
|
||||||
|
'8bf5f833-51a9-3913-aa0a-68b6d539a1b5' => 'MediaShop',
|
||||||
),
|
),
|
||||||
'ecmproducts_category_dom' =>
|
'ecmproducts_category_dom' =>
|
||||||
array (
|
array (
|
||||||
@@ -228,13 +229,28 @@ $customDoms = array (
|
|||||||
),
|
),
|
||||||
'ecmactions_category_dom' =>
|
'ecmactions_category_dom' =>
|
||||||
array (
|
array (
|
||||||
'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'Filling Capping Labeling',
|
'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'None',
|
||||||
'8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'Sets',
|
'8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'PK1',
|
||||||
'55020d96-73d5-7b29-3bab-654f4818e0cd' => 'Liquid Mixing',
|
'55020d96-73d5-7b29-3bab-654f4818e0cd' => 'HP1',
|
||||||
'9bc2bafc-0608-7bc7-468b-686a94772424' => 'Bisters',
|
'9bc2bafc-0608-7bc7-468b-686a94772424' => 'BL1',
|
||||||
'be37016b-0aa4-678c-9c4a-689c3673af3e' => 'Packing Blisters Into Packaging',
|
'347509e3-fff6-4db9-761e-68b2e36436c6' => 'Opis',
|
||||||
'e3e16e03-8e62-624e-f954-689c37059997' => 'Packing Tablets Into Jars',
|
'26c3b7fa-e1ac-66d9-517b-68b2e4c6cae8' => 'LNE2',
|
||||||
'416a2b50-4979-bc35-c83c-689c8a6640ae' => 'Packing into tubes',
|
'5664a1b1-42dc-2bb8-ad24-68b2e52df143' => 'LNE3',
|
||||||
|
'307b8935-5235-628f-aac1-68b2e56d3f4d' => 'LNE4',
|
||||||
|
'8d68df07-0779-5a23-aaf3-68b2e5d72a46' => 'LNE5',
|
||||||
|
'31174829-986e-4d7f-4262-68b2e73742e9' => 'Mieszalnik 100L',
|
||||||
|
'53d9cae1-1ec5-71e4-5a3c-68b2e77b6d92' => 'MDC5',
|
||||||
|
'de2448f8-45ac-6b2a-f2b1-68b2e7e40a6f' => 'HP2',
|
||||||
|
'3fea0360-a9d8-93fc-1984-68b2e89e4ec8' => 'FPH9',
|
||||||
|
'6159a89b-219c-bb4e-1505-68b2e9da1b7c' => 'LNEZ7',
|
||||||
|
'9bc005d7-5222-3d65-b754-68b2e9854af7' => 'LE10',
|
||||||
|
'b1176c04-4fe3-d347-9e3a-68b2e945b5c3' => 'FPH1',
|
||||||
|
'bc4422dc-8f80-4f54-26a6-68b2ea0cd2c0' => 'LNEZ8',
|
||||||
|
'd8208a7e-b810-91e5-ccfa-68b2eaa73abb' => 'LNAS1',
|
||||||
|
'f2364990-b244-064d-b5d1-68b2ebcd0ded' => 'MDC6',
|
||||||
|
'cc4905b6-a791-5c57-4721-68b2eb29e0fe' => 'TAB1',
|
||||||
|
'40e8149a-40ec-aeb0-4cdd-68b2eb52634b' => 'TAB2',
|
||||||
|
'b64ca8db-ff88-082c-887c-68b2ec98c15d' => 'TAB3',
|
||||||
),
|
),
|
||||||
'payment_method_dom' =>
|
'payment_method_dom' =>
|
||||||
array (
|
array (
|
||||||
@@ -321,6 +337,7 @@ $customDoms = array (
|
|||||||
'end_of_line' => 'Non Active',
|
'end_of_line' => 'Non Active',
|
||||||
'active' => 'Active',
|
'active' => 'Active',
|
||||||
'new' => 'New',
|
'new' => 'New',
|
||||||
|
'e8d1191e-2c7b-c24d-88e2-68b2bd076498' => 'test',
|
||||||
),
|
),
|
||||||
'ecmsales_status_dom' =>
|
'ecmsales_status_dom' =>
|
||||||
array (
|
array (
|
||||||
|
|||||||
57
include/language/pl_pl.EcmDropdownEditor.php
Normal file → Executable file
57
include/language/pl_pl.EcmDropdownEditor.php
Normal file → Executable file
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// created: 2025-08-13 12:56:45
|
// created: 2025-09-04 18:29:22
|
||||||
$customDoms = array (
|
$customDoms = array (
|
||||||
'ecmproducts_attribute_dom' =>
|
'ecmproducts_attribute_dom' =>
|
||||||
array (
|
array (
|
||||||
@@ -11,8 +11,8 @@ $customDoms = array (
|
|||||||
array (
|
array (
|
||||||
'8bc92e86-d956-0df2-e34c-656e0bc9da04' => 'None',
|
'8bc92e86-d956-0df2-e34c-656e0bc9da04' => 'None',
|
||||||
'6db335cc-96d5-5185-6118-65761ec65583' => 'Płyn',
|
'6db335cc-96d5-5185-6118-65761ec65583' => 'Płyn',
|
||||||
'8112d0d3-baca-cd8a-3b00-6576321030cb' => 'Butelka B1_100ml',
|
'8112d0d3-baca-cd8a-3b00-6576321030cb' => 'BT_IT_100',
|
||||||
'1441313f-245d-dfe7-92dd-6576255579fb' => 'Butelka B1_250ml',
|
'1441313f-245d-dfe7-92dd-6576255579fb' => 'BT_IT_250',
|
||||||
'c2beb683-dd0a-c76f-fd2f-6576252c68de' => 'Butelka B1_500ml',
|
'c2beb683-dd0a-c76f-fd2f-6576252c68de' => 'Butelka B1_500ml',
|
||||||
'8a4c1e7b-fb17-681d-a9dd-65762566ca64' => 'Butelka B1_1000ml',
|
'8a4c1e7b-fb17-681d-a9dd-65762566ca64' => 'Butelka B1_1000ml',
|
||||||
'4d063e6a-9cf1-28f4-2e98-6576251a3e7f' => 'Tuba standardowa',
|
'4d063e6a-9cf1-28f4-2e98-6576251a3e7f' => 'Tuba standardowa',
|
||||||
@@ -29,24 +29,24 @@ $customDoms = array (
|
|||||||
'5048d070-7da8-a160-d0bd-659c6af595b4' => 'Zestaw 3w1',
|
'5048d070-7da8-a160-d0bd-659c6af595b4' => 'Zestaw 3w1',
|
||||||
'a1d41637-21c8-60e7-dfeb-65973bb8bc04' => 'Zestaw 4w1',
|
'a1d41637-21c8-60e7-dfeb-65973bb8bc04' => 'Zestaw 4w1',
|
||||||
'e47359f6-5f25-4d4b-c472-65b77152ae8a' => 'Zestaw 5w1',
|
'e47359f6-5f25-4d4b-c472-65b77152ae8a' => 'Zestaw 5w1',
|
||||||
'cd43ef35-031a-ce97-3d1c-65f41563046f' => 'Butelka D11_50ml (RPET)',
|
'cd43ef35-031a-ce97-3d1c-65f41563046f' => 'BT_OK_0050 D11 (RPET)',
|
||||||
'b78c2842-b4f8-ad77-e7ea-65f41571c57e' => 'Butelka D11_250ml (RPET)',
|
'b78c2842-b4f8-ad77-e7ea-65f41571c57e' => 'Butelka D11_250ml (RPET)',
|
||||||
'901babfa-3d95-3a98-8dbf-659f00f4f91e' => 'Butelka D21_250ml (Odkamieniacz)',
|
'901babfa-3d95-3a98-8dbf-659f00f4f91e' => 'BT_OD_0250 (Odkamieniacz)',
|
||||||
'62ea70ee-d2cc-e68b-d51b-661670a10c98' => 'Butelka D21_250ml_new (Odkamieniacz)',
|
'62ea70ee-d2cc-e68b-d51b-661670a10c98' => 'Butelka D21_250ml_new (Odkamieniacz)',
|
||||||
'c10933f2-62ce-cfb2-52b1-659f1f2b9e4a' => 'Butelka D22_250ml (szyjka)',
|
'c10933f2-62ce-cfb2-52b1-659f1f2b9e4a' => 'BT_DT_0250 (szyjka)',
|
||||||
'855e5265-8d2d-4682-8e4c-659f1d1ead09' => 'Butelka D23_250ml (Zmywarka)',
|
'855e5265-8d2d-4682-8e4c-659f1d1ead09' => 'BT_PL_0250 D27Z (zmywarka)',
|
||||||
'e3a77ebf-9ba1-3776-3d80-67a9e325c268' => 'Butelka D24 250 ml (Ula)',
|
'e3a77ebf-9ba1-3776-3d80-67a9e325c268' => 'Butelka D24 250 ml (Ula)',
|
||||||
'359d7556-f107-92de-4121-659f1eafeb90' => 'Butelka D11_500ml (RPET)',
|
'359d7556-f107-92de-4121-659f1eafeb90' => 'Butelka D11_500ml (RPET)',
|
||||||
'90053c7e-98fb-873e-b414-659f1bc748cc' => 'Butelka D12_500ml (Dywan)',
|
'90053c7e-98fb-873e-b414-659f1bc748cc' => 'Butelka D12_500ml (Dywan)',
|
||||||
'9b883933-6bb0-cc85-29b0-659f03d60a98' => 'Butelka D21_500ml (Odkamieniacz)',
|
'9b883933-6bb0-cc85-29b0-659f03d60a98' => 'Butelka D21_500ml (Odkamieniacz)',
|
||||||
'8f4fdd3c-44f9-103b-3f40-659f1c128319' => 'Butelka D22_500ml (szyjka)',
|
'8f4fdd3c-44f9-103b-3f40-659f1c128319' => 'BT_DT_0500 (szyjka)',
|
||||||
'307f61db-5fd9-3aa6-e701-65a04f4bba88' => 'Butelka D23_500ml (nabłyszczacz)',
|
'307f61db-5fd9-3aa6-e701-65a04f4bba88' => 'BT_NB_500 (nabłyszczacz)',
|
||||||
'5df47246-d0cd-4151-9bdd-65eede53aba5' => 'Butelka D24_500ml (systemy mleczne)',
|
'5df47246-d0cd-4151-9bdd-65eede53aba5' => 'BT_SM_0500 (sys. mleczne)',
|
||||||
|
'87a2b609-9b67-de82-8f41-65eedd4613c9' => 'BT_SM_1000 (sys. mleczne)',
|
||||||
'ab74cd2c-7720-5875-7ca5-66bb55a3e075' => 'Butelka D25_500ml (Ula)',
|
'ab74cd2c-7720-5875-7ca5-66bb55a3e075' => 'Butelka D25_500ml (Ula)',
|
||||||
'd7c10cb9-7459-1174-6315-661cdae38a39' => 'Butelka D11_1000ml (RPET)',
|
'd7c10cb9-7459-1174-6315-661cdae38a39' => 'Butelka D11_1000ml (RPET)',
|
||||||
'58664d9d-0295-3539-4662-659f18dc4b80' => 'Butelka D21_1000ml (Odkamieniacz)',
|
'58664d9d-0295-3539-4662-659f18dc4b80' => 'BT_OD_1000 (Odkamieniacz)',
|
||||||
'92a7ee9b-d953-fd7e-5c88-65c9bf1e144d' => 'Butelka D22_1000ml (szyjka)',
|
'92a7ee9b-d953-fd7e-5c88-65c9bf1e144d' => 'Butelka D22_1000ml (szyjka)',
|
||||||
'87a2b609-9b67-de82-8f41-65eedd4613c9' => 'Butelka D23_1000ml (systemy mleczne)',
|
|
||||||
'75980ea5-d89e-3923-2662-66bb55202244' => 'Butelka D24_1000ml (Ula)',
|
'75980ea5-d89e-3923-2662-66bb55202244' => 'Butelka D24_1000ml (Ula)',
|
||||||
'ba4f06a8-f6fb-4969-d4b9-6683e6b6b372' => 'Butelka D11_2000ml (płyn do prania)',
|
'ba4f06a8-f6fb-4969-d4b9-6683e6b6b372' => 'Butelka D11_2000ml (płyn do prania)',
|
||||||
'cb8f5e45-43e1-b62d-05d7-669646b4eb10' => 'Butelka D12_5000ml (kanister)',
|
'cb8f5e45-43e1-b62d-05d7-669646b4eb10' => 'Butelka D12_5000ml (kanister)',
|
||||||
@@ -62,7 +62,7 @@ $customDoms = array (
|
|||||||
'48369f61-18bd-53e6-070a-659f026773ac' => 'Kartonik ',
|
'48369f61-18bd-53e6-070a-659f026773ac' => 'Kartonik ',
|
||||||
'37dbeaa1-f183-3b3e-1b54-65aa78a662a2' => 'Słoik 500 ml',
|
'37dbeaa1-f183-3b3e-1b54-65aa78a662a2' => 'Słoik 500 ml',
|
||||||
'f13d7541-494d-75c7-2a35-65aa784b42a5' => 'Słoik 1000 ml',
|
'f13d7541-494d-75c7-2a35-65aa784b42a5' => 'Słoik 1000 ml',
|
||||||
'e703a7f9-d27d-b445-d946-66727a3940d9' => 'Słoik 1500 ml',
|
'e703a7f9-d27d-b445-d946-66727a3940d9' => 'SL_1500',
|
||||||
'da8d7be4-58dc-4f75-f547-65c310cd97dd' => 'Słoik 65 ml',
|
'da8d7be4-58dc-4f75-f547-65c310cd97dd' => 'Słoik 65 ml',
|
||||||
'e1a16dbf-7216-d184-b9ed-65c310aff4d4' => 'Słoik 150 ml',
|
'e1a16dbf-7216-d184-b9ed-65c310aff4d4' => 'Słoik 150 ml',
|
||||||
'2a9454a6-b2a1-150f-c307-65c31102cb28' => 'Słoik 250 ml',
|
'2a9454a6-b2a1-150f-c307-65c31102cb28' => 'Słoik 250 ml',
|
||||||
@@ -177,6 +177,7 @@ $customDoms = array (
|
|||||||
'11095313-0dd0-aa9b-df3a-682739877d33' => 'Coffix',
|
'11095313-0dd0-aa9b-df3a-682739877d33' => 'Coffix',
|
||||||
'd97b870b-86a1-1970-9cea-68527ecc5ad9' => 'Zenevo',
|
'd97b870b-86a1-1970-9cea-68527ecc5ad9' => 'Zenevo',
|
||||||
'c709e4cf-9ca7-c946-f5e3-688202ec4c24' => 'Aspico',
|
'c709e4cf-9ca7-c946-f5e3-688202ec4c24' => 'Aspico',
|
||||||
|
'8bf5f833-51a9-3913-aa0a-68b6d539a1b5' => 'MediaShop',
|
||||||
),
|
),
|
||||||
'ecmproducts_category_dom' =>
|
'ecmproducts_category_dom' =>
|
||||||
array (
|
array (
|
||||||
@@ -228,13 +229,28 @@ $customDoms = array (
|
|||||||
),
|
),
|
||||||
'ecmactions_category_dom' =>
|
'ecmactions_category_dom' =>
|
||||||
array (
|
array (
|
||||||
'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'NZE',
|
'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'None',
|
||||||
'8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'Zestawy',
|
'8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'PK1',
|
||||||
'55020d96-73d5-7b29-3bab-654f4818e0cd' => 'Mieszanie',
|
'55020d96-73d5-7b29-3bab-654f4818e0cd' => 'HP1',
|
||||||
'9bc2bafc-0608-7bc7-468b-686a94772424' => 'Blistrowanie',
|
'9bc2bafc-0608-7bc7-468b-686a94772424' => 'BL1',
|
||||||
'be37016b-0aa4-678c-9c4a-689c3673af3e' => 'PBDO',
|
'347509e3-fff6-4db9-761e-68b2e36436c6' => 'LNE1',
|
||||||
'e3e16e03-8e62-624e-f954-689c37059997' => 'PTDS',
|
'26c3b7fa-e1ac-66d9-517b-68b2e4c6cae8' => 'LNE2',
|
||||||
'416a2b50-4979-bc35-c83c-689c8a6640ae' => 'PWT',
|
'5664a1b1-42dc-2bb8-ad24-68b2e52df143' => 'LNE3',
|
||||||
|
'307b8935-5235-628f-aac1-68b2e56d3f4d' => 'LNE4',
|
||||||
|
'8d68df07-0779-5a23-aaf3-68b2e5d72a46' => 'LNE5',
|
||||||
|
'31174829-986e-4d7f-4262-68b2e73742e9' => 'M1',
|
||||||
|
'53d9cae1-1ec5-71e4-5a3c-68b2e77b6d92' => 'MDC5',
|
||||||
|
'de2448f8-45ac-6b2a-f2b1-68b2e7e40a6f' => 'HP2',
|
||||||
|
'3fea0360-a9d8-93fc-1984-68b2e89e4ec8' => 'FPH9',
|
||||||
|
'6159a89b-219c-bb4e-1505-68b2e9da1b7c' => 'LNEZ7',
|
||||||
|
'9bc005d7-5222-3d65-b754-68b2e9854af7' => 'LE10',
|
||||||
|
'b1176c04-4fe3-d347-9e3a-68b2e945b5c3' => 'FPH1',
|
||||||
|
'bc4422dc-8f80-4f54-26a6-68b2ea0cd2c0' => 'LNEZ8',
|
||||||
|
'd8208a7e-b810-91e5-ccfa-68b2eaa73abb' => 'LNAS1',
|
||||||
|
'f2364990-b244-064d-b5d1-68b2ebcd0ded' => 'MDC6',
|
||||||
|
'cc4905b6-a791-5c57-4721-68b2eb29e0fe' => 'TAB1',
|
||||||
|
'40e8149a-40ec-aeb0-4cdd-68b2eb52634b' => 'TAB2',
|
||||||
|
'b64ca8db-ff88-082c-887c-68b2ec98c15d' => 'TAB3',
|
||||||
),
|
),
|
||||||
'payment_method_dom' =>
|
'payment_method_dom' =>
|
||||||
array (
|
array (
|
||||||
@@ -322,6 +338,7 @@ $customDoms = array (
|
|||||||
'end_of_line' => 'Nieaktywny',
|
'end_of_line' => 'Nieaktywny',
|
||||||
'active' => 'Aktywny',
|
'active' => 'Aktywny',
|
||||||
'new' => 'Nowość',
|
'new' => 'Nowość',
|
||||||
|
'e8d1191e-2c7b-c24d-88e2-68b2bd076498' => 'test',
|
||||||
),
|
),
|
||||||
'ecmsales_status_dom' =>
|
'ecmsales_status_dom' =>
|
||||||
array (
|
array (
|
||||||
|
|||||||
@@ -20,6 +20,21 @@ if(isset($_REQUEST['record'])){
|
|||||||
$focus->retrieve($_REQUEST['record']);
|
$focus->retrieve($_REQUEST['record']);
|
||||||
//if(isset($focus->id) && $focus->id != '')$focus->format_all_fields();
|
//if(isset($focus->id) && $focus->id != '')$focus->format_all_fields();
|
||||||
}
|
}
|
||||||
|
if(isset($focus->url5)){
|
||||||
|
$focus->url5 = '<a target="new" href="' .$focus->url5 . '">' . $focus->url5. '</a>';
|
||||||
|
}
|
||||||
|
if(isset($focus->url6)){
|
||||||
|
$focus->url6 = '<a target="new" href="' .$focus->url6 . '">' . $focus->url6. '</a>';
|
||||||
|
}
|
||||||
|
if(isset($focus->url7)){
|
||||||
|
$focus->url7 = '<a target="new" href="' .$focus->url7 . '">' . $focus->url7. '</a>';
|
||||||
|
}
|
||||||
|
if(isset($focus->url8)){
|
||||||
|
$focus->url8 = '<a target="new" href="' .$focus->url8 . '">' . $focus->url8. '</a>';
|
||||||
|
}
|
||||||
|
if(isset($focus->url9)){
|
||||||
|
$focus->url9 = '<a target="new" href="' .$focus->url9 . '">' . $focus->url9. '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
$json = getJSONobj();
|
$json = getJSONobj();
|
||||||
|
|
||||||
|
|||||||
@@ -171,6 +171,7 @@ function getRawMaterials() {
|
|||||||
}
|
}
|
||||||
function drawRawMaterials(data) {
|
function drawRawMaterials(data) {
|
||||||
$("#rawMaterialsTableContainer").html(rawMaterialsTablePrototype());
|
$("#rawMaterialsTableContainer").html(rawMaterialsTablePrototype());
|
||||||
|
// TODO: tutraj czasami się wiesza
|
||||||
data.forEach((el, index) => {
|
data.forEach((el, index) => {
|
||||||
var tr = $("<tr></tr>");
|
var tr = $("<tr></tr>");
|
||||||
tr.append("<td><input type=\"checkbox\" value=" + el.id + " class=\"rawMaterialCheck\" /></td>");
|
tr.append("<td><input type=\"checkbox\" value=" + el.id + " class=\"rawMaterialCheck\" /></td>");
|
||||||
|
|||||||
@@ -52,7 +52,8 @@ $(document).ready(function () {
|
|||||||
try {
|
try {
|
||||||
localStorage.setItem('productBySales_sort',
|
localStorage.setItem('productBySales_sort',
|
||||||
$("#allTable")[0].config.sortList[0][0] + '|' + $("#allTable")[0].config.sortList[0][1]);
|
$("#allTable")[0].config.sortList[0][0] + '|' + $("#allTable")[0].config.sortList[0][1]);
|
||||||
} catch { }
|
} catch {
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -66,13 +67,14 @@ $(document).ready(function () {
|
|||||||
var tmp = sort.split('|');
|
var tmp = sort.split('|');
|
||||||
$("#allTable")[0].config.sortList = [[parseInt(tmp[0]), parseInt(tmp[1])]];
|
$("#allTable")[0].config.sortList = [[parseInt(tmp[0]), parseInt(tmp[1])]];
|
||||||
$.tablesorter.sortOn($("#allTable")[0].config, [[parseInt(tmp[0]), parseInt(tmp[1])]]);
|
$.tablesorter.sortOn($("#allTable")[0].config, [[parseInt(tmp[0]), parseInt(tmp[1])]]);
|
||||||
} catch { }
|
} catch {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
$("#selectAll").click(function () {
|
$("#selectAll").click(function () {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
$(".allCheck").each(function() {
|
$(".allCheck").each(function () {
|
||||||
if ($(this).closest('tr').is(':visible')) {
|
if ($(this).closest('tr').is(':visible')) {
|
||||||
$(this).prop('checked', true);
|
$(this).prop('checked', true);
|
||||||
}
|
}
|
||||||
@@ -119,6 +121,7 @@ var TabsMainBlock = false;
|
|||||||
var Components;
|
var Components;
|
||||||
var RawMaterials;
|
var RawMaterials;
|
||||||
var OrderTypes
|
var OrderTypes
|
||||||
|
|
||||||
function SetTab(tab_name) {
|
function SetTab(tab_name) {
|
||||||
if (TabsMainBlock) return;
|
if (TabsMainBlock) return;
|
||||||
var TabMenu = document.getElementById('groupTabsPanels');
|
var TabMenu = document.getElementById('groupTabsPanels');
|
||||||
@@ -157,6 +160,7 @@ function SetTab(tab_name) {
|
|||||||
$("#hideReadyProducts").val() === "false" ? $("#toogleReadyProducts").val("Ukryj gotowe") : $("#toogleReadyProducts").val("Pokaz gotowe");
|
$("#hideReadyProducts").val() === "false" ? $("#toogleReadyProducts").val("Ukryj gotowe") : $("#toogleReadyProducts").val("Pokaz gotowe");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getComnponents() {
|
function getComnponents() {
|
||||||
var ids = [];
|
var ids = [];
|
||||||
$('input.allCheck:checkbox:checked').each(function () {
|
$('input.allCheck:checkbox:checked').each(function () {
|
||||||
@@ -191,6 +195,7 @@ function getComnponents() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawComponents(data) {
|
function drawComponents(data) {
|
||||||
$("#componentsTableContainer").html(componentsTablePrototype());
|
$("#componentsTableContainer").html(componentsTablePrototype());
|
||||||
data.forEach((el, index) => {
|
data.forEach((el, index) => {
|
||||||
@@ -201,17 +206,17 @@ function drawComponents(data) {
|
|||||||
} else {
|
} else {
|
||||||
position += '<br>';
|
position += '<br>';
|
||||||
}
|
}
|
||||||
position += "<img src=\"modules/EcmQuotes/images/add_position.gif\" style=\"margin-top: 3px; margin-right: 3px; cursor: pointer\" width=\"12\" alt=\"\" onclick=\"addComponentToProductionScheduler('"+el.productId+"','"+el.productQty+"')\">";
|
position += "<img src=\"modules/EcmQuotes/images/add_position.gif\" style=\"margin-top: 3px; margin-right: 3px; cursor: pointer\" width=\"12\" alt=\"\" onclick=\"addComponentToProductionScheduler('" + el.productId + "','" + el.productQty + "')\">";
|
||||||
tr.append(position);
|
tr.append(position);
|
||||||
tr.append("<td>" + (index + 1) + "</td>");
|
tr.append("<td>" + (index + 1) + "</td>");
|
||||||
tr.append("<td><a target=\"_blank\" href=\"index.php?module=EcmProducts&action=DetailView&record=" + el.productId + "\">" + el.productCode + "</a></td>");
|
tr.append("<td><a target=\"_blank\" href=\"index.php?module=EcmProducts&action=DetailView&record=" + el.productId + "\">" + el.productCode + "</a></td>");
|
||||||
tr.append("<td title=\"" + el.productFullName +"\">" + el.productName + "</td>");
|
tr.append("<td title=\"" + el.productFullName + "\">" + el.productName + "</td>");
|
||||||
tr.append("<td id=\"qty-" + el.productId + "\">" + el.productQty + "</td>");
|
tr.append("<td id=\"qty-" + el.productId + "\">" + el.productQty + "</td>");
|
||||||
tr.append("<td id=\"state-" + el.productId + "\">" + el.productStockState + "</td>");
|
tr.append("<td id=\"state-" + el.productId + "\">" + el.productStockState + "</td>");
|
||||||
tr.append("<td><a target=\"_blank\" href=\"index.php?module=EcmSales&action=DetailView&record=" + el.orderId + "\">" + el.orderNo + "</a></td>");
|
tr.append("<td><a target=\"_blank\" href=\"index.php?module=EcmSales&action=DetailView&record=" + el.orderId + "\">" + el.orderNo + "</a></td>");
|
||||||
tr.append("<td>" + el.orderType + "</td>");
|
tr.append("<td>" + el.orderType + "</td>");
|
||||||
tr.append("<td>" + el.orderStatus + "</td>");
|
tr.append("<td>" + el.orderStatus + "</td>");
|
||||||
tr.append("<td><a target=\"_blank\" href=\"index.php?module=EcmProducts&action=DetailView&record=" + el.mainProductId + "\">" + el.mainProductCode + "</a></td>");
|
tr.append("<td><a target=\"_blank\" href=\"index.php?module=EcmProducts&action=DetailView&record=" + el.mainProductId + "\">" + el.mainProductCode + "</a><input type=\"hidden\" value=" + el.mainProductId + " id=\"mainProductId-" + el.productId + "\"/></td>");
|
||||||
tr.append("<td>" + el.orderParent + "</td>");
|
tr.append("<td>" + el.orderParent + "</td>");
|
||||||
tr.append("<td>" + el.productShape + "</td>");
|
tr.append("<td>" + el.productShape + "</td>");
|
||||||
tr.append("<td>" + el.productBrand + "</td>");
|
tr.append("<td>" + el.productBrand + "</td>");
|
||||||
@@ -238,7 +243,7 @@ function drawComponents(data) {
|
|||||||
$("#selectAllComponents").attr('checked', false);
|
$("#selectAllComponents").attr('checked', false);
|
||||||
$("#selectAllComponents").click(function () {
|
$("#selectAllComponents").click(function () {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
$(".componentCheck").each(function() {
|
$(".componentCheck").each(function () {
|
||||||
if ($(this).closest('tr').is(':visible')) {
|
if ($(this).closest('tr').is(':visible')) {
|
||||||
$(this).prop('checked', true);
|
$(this).prop('checked', true);
|
||||||
}
|
}
|
||||||
@@ -248,6 +253,7 @@ function drawComponents(data) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterComponents() {
|
function filterComponents() {
|
||||||
let filtered = Components;
|
let filtered = Components;
|
||||||
if (!showReadyProducts) {
|
if (!showReadyProducts) {
|
||||||
@@ -259,6 +265,7 @@ function filterComponents() {
|
|||||||
drawComponents(filtered);
|
drawComponents(filtered);
|
||||||
updateComponentsPositions();
|
updateComponentsPositions();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRawMaterials(previousTab) {
|
function getRawMaterials(previousTab) {
|
||||||
var ids = [];
|
var ids = [];
|
||||||
if (previousTab === '1') {
|
if (previousTab === '1') {
|
||||||
@@ -273,10 +280,13 @@ function getRawMaterials(previousTab) {
|
|||||||
var tmp = [];
|
var tmp = [];
|
||||||
ids.forEach(el => {
|
ids.forEach(el => {
|
||||||
var qty = parseFloat($("#qty-" + el).html().trim());
|
var qty = parseFloat($("#qty-" + el).html().trim());
|
||||||
|
var mainId = $("#mainProductId-" + el).val();
|
||||||
var prod = {};
|
var prod = {};
|
||||||
prod.ecmproduct_id = el;
|
prod.ecmproduct_id = el;
|
||||||
prod.quantity = qty;
|
prod.quantity = qty;
|
||||||
|
if (el === mainId) {
|
||||||
tmp.push(prod);
|
tmp.push(prod);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
ids = tmp;
|
ids = tmp;
|
||||||
}
|
}
|
||||||
@@ -309,6 +319,7 @@ function getRawMaterials(previousTab) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawRawMaterials(data) {
|
function drawRawMaterials(data) {
|
||||||
$("#rawMaterialsTableContainer").html(rawMaterialsTablePrototype());
|
$("#rawMaterialsTableContainer").html(rawMaterialsTablePrototype());
|
||||||
data.forEach((el, index) => {
|
data.forEach((el, index) => {
|
||||||
@@ -316,7 +327,7 @@ function drawRawMaterials(data) {
|
|||||||
tr.append("<td><input type=\"checkbox\" value=" + el.productId + " class=\"rawMaterialCheck\" /></td>");
|
tr.append("<td><input type=\"checkbox\" value=" + el.productId + " class=\"rawMaterialCheck\" /></td>");
|
||||||
tr.append("<td>" + (index + 1) + "</td>");
|
tr.append("<td>" + (index + 1) + "</td>");
|
||||||
tr.append("<td><a target=\"_blank\" href=\"index.php?module=EcmProducts&action=DetailView&record=" + el.productId + "\">" + el.productCode + "</a></td>");
|
tr.append("<td><a target=\"_blank\" href=\"index.php?module=EcmProducts&action=DetailView&record=" + el.productId + "\">" + el.productCode + "</a></td>");
|
||||||
tr.append("<td title=\""+ el.productFullName +"\">" + el.productName + "</td>");
|
tr.append("<td title=\"" + el.productFullName + "\">" + el.productName + "</td>");
|
||||||
tr.append("<td id=\"qty-" + el.productId + "\">" + el.productQty + "</td>");
|
tr.append("<td id=\"qty-" + el.productId + "\">" + el.productQty + "</td>");
|
||||||
tr.append("<td>" + el.productUnit + "</td>");
|
tr.append("<td>" + el.productUnit + "</td>");
|
||||||
tr.append("<td id=\"state-" + el.productId + "\">" + el.productStockState + "</td>");
|
tr.append("<td id=\"state-" + el.productId + "\">" + el.productStockState + "</td>");
|
||||||
@@ -354,7 +365,7 @@ function drawRawMaterials(data) {
|
|||||||
$("#selectAllRawMaterials").attr('checked', false);
|
$("#selectAllRawMaterials").attr('checked', false);
|
||||||
$("#selectAllRawMaterials").click(function () {
|
$("#selectAllRawMaterials").click(function () {
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
$(".rawMaterialCheck").each(function() {
|
$(".rawMaterialCheck").each(function () {
|
||||||
if ($(this).closest('tr').is(':visible')) {
|
if ($(this).closest('tr').is(':visible')) {
|
||||||
$(this).prop('checked', true);
|
$(this).prop('checked', true);
|
||||||
}
|
}
|
||||||
@@ -364,6 +375,7 @@ function drawRawMaterials(data) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterRawMaterials() {
|
function filterRawMaterials() {
|
||||||
let filtered = RawMaterials;
|
let filtered = RawMaterials;
|
||||||
if (!showReadyProducts) {
|
if (!showReadyProducts) {
|
||||||
@@ -375,6 +387,7 @@ function filterRawMaterials() {
|
|||||||
drawRawMaterials(filtered);
|
drawRawMaterials(filtered);
|
||||||
updateRawMaterialsPositions();
|
updateRawMaterialsPositions();
|
||||||
}
|
}
|
||||||
|
|
||||||
function orderComponents() {
|
function orderComponents() {
|
||||||
var ids = [];
|
var ids = [];
|
||||||
$('input.componentCheck:checkbox:checked').each(function () {
|
$('input.componentCheck:checkbox:checked').each(function () {
|
||||||
@@ -395,6 +408,7 @@ function orderComponents() {
|
|||||||
$("#orderComponentsForm").submit();
|
$("#orderComponentsForm").submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createInsideOrder() {
|
function createInsideOrder() {
|
||||||
var ids = [];
|
var ids = [];
|
||||||
$('input.allCheck:checkbox:checked').each(function () {
|
$('input.allCheck:checkbox:checked').each(function () {
|
||||||
@@ -413,6 +427,7 @@ function createInsideOrder() {
|
|||||||
$("#insideOrderProducts").val(products.join('*'));
|
$("#insideOrderProducts").val(products.join('*'));
|
||||||
$("#createInsideOrderForm").submit();
|
$("#createInsideOrderForm").submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
function orderRawMaterials() {
|
function orderRawMaterials() {
|
||||||
var ids = [];
|
var ids = [];
|
||||||
$('input.rawMaterialCheck:checkbox:checked').each(function () {
|
$('input.rawMaterialCheck:checkbox:checked').each(function () {
|
||||||
@@ -433,6 +448,7 @@ function orderRawMaterials() {
|
|||||||
$("#orderRawMaterialsForm").submit();
|
$("#orderRawMaterialsForm").submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLoader(msg = "Pobieranie danych") {
|
function showLoader(msg = "Pobieranie danych") {
|
||||||
|
|
||||||
$.blockUI({
|
$.blockUI({
|
||||||
@@ -450,9 +466,11 @@ function showLoader(msg = "Pobieranie danych") {
|
|||||||
message: msg
|
message: msg
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideLoader() {
|
function hideLoader() {
|
||||||
$.unblockUI();
|
$.unblockUI();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateAllPositions() {
|
function updateAllPositions() {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var sum = 0;
|
var sum = 0;
|
||||||
@@ -465,6 +483,7 @@ function updateAllPositions() {
|
|||||||
});
|
});
|
||||||
$("#allTableSum").html(sum);
|
$("#allTableSum").html(sum);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateComponentsPositions() {
|
function updateComponentsPositions() {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var sum = 0;
|
var sum = 0;
|
||||||
@@ -477,6 +496,7 @@ function updateComponentsPositions() {
|
|||||||
});
|
});
|
||||||
$("#componentsTableSum").html(Math.ceil(sum));
|
$("#componentsTableSum").html(Math.ceil(sum));
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateRawMaterialsPositions() {
|
function updateRawMaterialsPositions() {
|
||||||
var i = 0;
|
var i = 0;
|
||||||
var sum = 0;
|
var sum = 0;
|
||||||
@@ -489,32 +509,34 @@ function updateRawMaterialsPositions() {
|
|||||||
});
|
});
|
||||||
$("#rawMaterialsTableSum").html(Math.ceil(sum));
|
$("#rawMaterialsTableSum").html(Math.ceil(sum));
|
||||||
}
|
}
|
||||||
|
|
||||||
function componentsTablePrototype() {
|
function componentsTablePrototype() {
|
||||||
return '<table id="componentsTable"><thead><tr><th class="filter-false"><input type="checkbox" id="selectAllComponents" /></th><th>Pozycja</th><th>Indeks</th><th>Nazwa</th><th>Ilość</th><th>Stan</th><th>ZS E5</th><th>Typ</th><th>Status</th><th>Produkt główny</th><th>Odbiorca</th><th>Forma</th><th>Marka</th><th>Data wysyłki</th></tr></thead><tbody aria-live="polite" aria-relevant="all"></tbody><tfoot><tr><td colspan=4></td><td id="componentsTableSum">0</td><td colspan="9"></td></tr></tfoot></table>'
|
return '<table id="componentsTable"><thead><tr><th class="filter-false"><input type="checkbox" id="selectAllComponents" /></th><th>Pozycja</th><th>Indeks</th><th>Nazwa</th><th>Ilość</th><th>Stan</th><th>ZS E5</th><th>Typ</th><th>Status</th><th>Produkt główny</th><th>Odbiorca</th><th>Forma</th><th>Marka</th><th>Data wysyłki</th></tr></thead><tbody aria-live="polite" aria-relevant="all"></tbody><tfoot><tr><td colspan=4></td><td id="componentsTableSum">0</td><td colspan="9"></td></tr></tfoot></table>'
|
||||||
}
|
}
|
||||||
|
|
||||||
function rawMaterialsTablePrototype() {
|
function rawMaterialsTablePrototype() {
|
||||||
return '<table id="rawMaterialsTable"><thead><tr><th class="filter-false"><input type="checkbox" id="selectAllRawMaterials" /></th><th>Pozycja</th><th>Indeks</th><th>Nazwa</th><th>Ilość</th><th>JM.</th><th>Stan</th><th>Zamówiono</th><th>Dostawca</th><th>Zamówienie</th><th>Adres magazynowy</th></tr></thead><tbody aria-live="polite" aria-relevant="all"></tbody><tfoot><tr><td colspan=4></td><td id="rawMaterialsTableSum">0</td><td colspan="6"></td></tr></tfoot></table>'
|
return '<table id="rawMaterialsTable"><thead><tr><th class="filter-false"><input type="checkbox" id="selectAllRawMaterials" /></th><th>Pozycja</th><th>Indeks</th><th>Nazwa</th><th>Ilość</th><th>JM.</th><th>Stan</th><th>Zamówiono</th><th>Dostawca</th><th>Zamówienie</th><th>Adres magazynowy</th></tr></thead><tbody aria-live="polite" aria-relevant="all"></tbody><tfoot><tr><td colspan=4></td><td id="rawMaterialsTableSum">0</td><td colspan="6"></td></tr></tfoot></table>'
|
||||||
}
|
}
|
||||||
|
|
||||||
function addToProductionScheduler(orderItemId) {
|
function addToProductionScheduler(orderItemId) {
|
||||||
showLoader("Trwa dodawanie elementu do harmonogramu produkcji...");
|
showLoader("Trwa dodawanie elementu do harmonogramu produkcji...");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "get",
|
method: "get",
|
||||||
url: $(location).attr("href") + "&to_pdf=1&ajaxAction=addToProductionScheduler&itemId=" + orderItemId,
|
url: $(location).attr("href") + "&to_pdf=1&ajaxAction=addToProductionScheduler&itemId=" + orderItemId,
|
||||||
success: function ()
|
success: function () {
|
||||||
{
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
$("#productScheduled-"+orderItemId).css('visibility', 'visible');
|
$("#productScheduled-" + orderItemId).css('visibility', 'visible');
|
||||||
window.alert("Dodano do harmonogramu produkcji.");
|
window.alert("Dodano do harmonogramu produkcji.");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function addComponentToProductionScheduler(productId, qty) {
|
function addComponentToProductionScheduler(productId, qty) {
|
||||||
showLoader("Trwa dodawanie elementu do harmonogramu produkcji...");
|
showLoader("Trwa dodawanie elementu do harmonogramu produkcji...");
|
||||||
$.ajax({
|
$.ajax({
|
||||||
method: "get",
|
method: "get",
|
||||||
url: $(location).attr("href") + "&to_pdf=1&ajaxAction=addComponentToProductionScheduler&productId=" + productId + "&qty=" + qty,
|
url: $(location).attr("href") + "&to_pdf=1&ajaxAction=addComponentToProductionScheduler&productId=" + productId + "&qty=" + qty,
|
||||||
success: function ()
|
success: function () {
|
||||||
{
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
window.alert("Dodano do harmonogramu produkcji.");
|
window.alert("Dodano do harmonogramu produkcji.");
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
ini_set('display_errors', 1);
|
ini_set('display_errors', 0);
|
||||||
ini_set('display_startup_errors', 1);
|
ini_set('display_startup_errors', 0);
|
||||||
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
|
//error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
|
||||||
|
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
global $app_list_strings;
|
global $app_list_strings;
|
||||||
@@ -135,10 +135,10 @@ if (!isset($_GET['ajaxAction'])) {
|
|||||||
} else {
|
} else {
|
||||||
switch ($_GET['ajaxAction']) {
|
switch ($_GET['ajaxAction']) {
|
||||||
case 'getComponents':
|
case 'getComponents':
|
||||||
echo getComponents2($_POST['ids']);
|
getComponents3($_POST['ids']);
|
||||||
break;
|
break;
|
||||||
case 'getRawMaterials':
|
case 'getRawMaterials':
|
||||||
echo getRawMaterials2($_POST['ids'], $_POST['type']);;
|
getRawMaterials2($_POST['ids'], $_POST['type']);;
|
||||||
break;
|
break;
|
||||||
case 'saveProductDescription':
|
case 'saveProductDescription':
|
||||||
saveProductDescription($_GET['itemId'], $_GET['description']);
|
saveProductDescription($_GET['itemId'], $_GET['description']);
|
||||||
@@ -162,6 +162,7 @@ function findProduct($array, $value)
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getComponents($ids, $dateFrom, $dateTo)
|
function getComponents($ids, $dateFrom, $dateTo)
|
||||||
{
|
{
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
@@ -236,6 +237,59 @@ function getComponents($ids, $dateFrom, $dateTo)
|
|||||||
}
|
}
|
||||||
echo json_encode($componentsData);
|
echo json_encode($componentsData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getComponents3($ids)
|
||||||
|
{
|
||||||
|
$db = $GLOBALS['db'];
|
||||||
|
global $app_list_strings;
|
||||||
|
|
||||||
|
$componentsData = array();
|
||||||
|
|
||||||
|
foreach ($ids as $id) {
|
||||||
|
$saleInfo = $db->fetchByAssoc($db->query("SELECT quantity, ecmproduct_id, description, ecmsale_id FROM ecmsaleitems WHERE id ='$id'"));
|
||||||
|
$saleQuery = "SELECT s.document_no, s.id, s.type, s.status, s.send_date, s.shipping_address_name
|
||||||
|
FROM ecmsales AS s
|
||||||
|
WHERE s.id = '" . $saleInfo['ecmsale_id'] . "'";
|
||||||
|
$saleData = $db->fetchByAssoc($db->query($saleQuery));
|
||||||
|
|
||||||
|
$products = array();
|
||||||
|
$products = array_merge(getProductComponents($saleInfo['ecmproduct_id'], $saleInfo['quantity']), $products);
|
||||||
|
|
||||||
|
$mainProduct = $db->fetchByAssoc($db->query(sprintf("SELECT code FROM ecmproducts WHERE id = '%s'", $saleInfo['ecmproduct_id'])));
|
||||||
|
|
||||||
|
foreach ($products as $product) {
|
||||||
|
$prodQuery = sprintf("SELECT p.id, p.code, p.name, p.shape, p.brand, p.ems_qty_in_stock,
|
||||||
|
p.vendor_part_no as kind, p.part_no as size
|
||||||
|
FROM ecmproducts AS p WHERE p.id = '%s' AND p.deleted = 0", $product['ecmproduct_id']);
|
||||||
|
$p = $db->fetchByAssoc($db->query($prodQuery));
|
||||||
|
|
||||||
|
$row = array();
|
||||||
|
$row['mainProductId'] = $saleInfo['ecmproduct_id'];
|
||||||
|
$row['mainProductCode'] = $mainProduct['code'];
|
||||||
|
$row['productId'] = $p['id'];
|
||||||
|
$row['productName'] = strlen($p['name']) > 55 ? substr($p['name'], 0, 55) . "..." : $p['name'];
|
||||||
|
$row['productFullName'] = $p['name'];
|
||||||
|
$row['productCode'] = strlen($p['code']) > 20 ? substr($p['code'], 0, 20) . "..." : $p['code'];
|
||||||
|
$row['productFullCode'] = $p['code'];
|
||||||
|
$row['productKind'] = $p['kind'] != null ? $p['kind'] : "";
|
||||||
|
$row['productSize'] = $p['size'];
|
||||||
|
$row['productShape'] = $app_list_strings['ecmproducts_shape_dom'][$p['shape']];
|
||||||
|
$row['productBrand'] = $app_list_strings['ecmproducts_brand_dom'][$p['brand']];
|
||||||
|
$row['productQty'] = $product['quantity'];
|
||||||
|
$row['productStockState'] = $p['ems_qty_in_stock'] | 0;
|
||||||
|
$row['orderNo'] = $saleData['document_no'];
|
||||||
|
$row['orderId'] = $saleData['id'];
|
||||||
|
$row['orderStatus'] = $app_list_strings['ecmsales_status_dom'][$saleData['status']];
|
||||||
|
$row['orderType'] = $app_list_strings['ecmsales_type_dom'][$saleData['type']];
|
||||||
|
$row['orderParent'] = (isset($saleData['shipping_address_name']) && $saleData['shipping_address_name'] != 'Adres korespondencyjny' ? $saleData['shipping_address_name'] : '');
|
||||||
|
$row['orderSendDate'] = $saleData['send_date'];
|
||||||
|
$componentsData[] = $row;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo json_encode($componentsData);
|
||||||
|
}
|
||||||
|
|
||||||
function getRawMaterials2($ids, $type)
|
function getRawMaterials2($ids, $type)
|
||||||
{
|
{
|
||||||
global $app_list_strings;
|
global $app_list_strings;
|
||||||
@@ -246,7 +300,8 @@ function getRawMaterials2($ids, $type)
|
|||||||
if ($type == 'sales') {
|
if ($type == 'sales') {
|
||||||
$productsQuery = "SELECT si.ecmproduct_id, SUM(si.quantity) as quantity
|
$productsQuery = "SELECT si.ecmproduct_id, SUM(si.quantity) as quantity
|
||||||
FROM ecmsaleitems AS si
|
FROM ecmsaleitems AS si
|
||||||
WHERE si.id IN ('" . $idsString . "')";
|
WHERE si.id IN ('" . $idsString . "')
|
||||||
|
GROUP BY si.id";
|
||||||
$prows = $db->query($productsQuery);
|
$prows = $db->query($productsQuery);
|
||||||
while ($p = $db->fetchByAssoc($prows)) {
|
while ($p = $db->fetchByAssoc($prows)) {
|
||||||
$prod = array();
|
$prod = array();
|
||||||
@@ -258,18 +313,9 @@ function getRawMaterials2($ids, $type)
|
|||||||
$products = $ids;
|
$products = $ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
$grouppedProducts = array_reduce($products, function ($carry, $item) {
|
|
||||||
if (isset($carry[$item['ecmproduct_id']])) {
|
|
||||||
$carry[$item['ecmproduct_id']]['productQty'] += $item['quantity'];
|
|
||||||
} else {
|
|
||||||
$carry[$item['ecmproduct_id']] = $item;
|
|
||||||
}
|
|
||||||
return $carry;
|
|
||||||
});
|
|
||||||
|
|
||||||
$rawMaterialsData = array();
|
$rawMaterialsData = array();
|
||||||
|
|
||||||
foreach ($grouppedProducts as $product) {
|
foreach ($products as $product) {
|
||||||
$rawMaterialsData = array_merge(
|
$rawMaterialsData = array_merge(
|
||||||
$rawMaterialsData,
|
$rawMaterialsData,
|
||||||
getProductRawMaterials($product['ecmproduct_id'], $product['quantity'])
|
getProductRawMaterials($product['ecmproduct_id'], $product['quantity'])
|
||||||
@@ -278,7 +324,7 @@ function getRawMaterials2($ids, $type)
|
|||||||
|
|
||||||
$grouppedRawMaterials = array_reduce($rawMaterialsData, function ($carry, $item) {
|
$grouppedRawMaterials = array_reduce($rawMaterialsData, function ($carry, $item) {
|
||||||
if (isset($carry[$item['ecmproduct_id']])) {
|
if (isset($carry[$item['ecmproduct_id']])) {
|
||||||
$carry[$item['ecmproduct_id']]['productQty'] += $item['quantity'];
|
$carry[$item['ecmproduct_id']]['quantity'] += $item['quantity'];
|
||||||
} else {
|
} else {
|
||||||
$carry[$item['ecmproduct_id']] = $item;
|
$carry[$item['ecmproduct_id']] = $item;
|
||||||
}
|
}
|
||||||
@@ -335,8 +381,9 @@ function getRawMaterials2($ids, $type)
|
|||||||
$row['stockAddress'] = (!empty($product['stock_addresses'])) ? $product['stock_addresses'] : "";
|
$row['stockAddress'] = (!empty($product['stock_addresses'])) ? $product['stock_addresses'] : "";
|
||||||
$response[] = $row;
|
$response[] = $row;
|
||||||
}
|
}
|
||||||
return json_encode($response);
|
echo json_encode($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRawMaterials($ids, $cids)
|
function getRawMaterials($ids, $cids)
|
||||||
{
|
{
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
@@ -422,6 +469,7 @@ function getRawMaterials($ids, $cids)
|
|||||||
|
|
||||||
echo json_encode($rawMaterialsData);
|
echo json_encode($rawMaterialsData);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getProductRawMaterials($productId, $quantity)
|
function getProductRawMaterials($productId, $quantity)
|
||||||
{
|
{
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
@@ -456,6 +504,7 @@ WHERE
|
|||||||
}
|
}
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addToProductionScheduler($orderItemId)
|
function addToProductionScheduler($orderItemId)
|
||||||
{
|
{
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
@@ -484,6 +533,7 @@ function addToProductionScheduler($orderItemId)
|
|||||||
$db->query($query);
|
$db->query($query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function addComponentToProductionScheduler($productId, $qty)
|
function addComponentToProductionScheduler($productId, $qty)
|
||||||
{
|
{
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
@@ -492,6 +542,7 @@ function addComponentToProductionScheduler($productId, $qty)
|
|||||||
generateUuidV4(), $qty, $current_user->id, $current_user->id, $productId);
|
generateUuidV4(), $qty, $current_user->id, $current_user->id, $productId);
|
||||||
$db->query($query);
|
$db->query($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getComponents2($ids)
|
function getComponents2($ids)
|
||||||
{
|
{
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
@@ -538,41 +589,9 @@ function getComponents2($ids)
|
|||||||
$componentsData[] = $row;
|
$componentsData[] = $row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return json_encode($componentsData);
|
return json_encode($componentsData);
|
||||||
|
|
||||||
/*
|
|
||||||
* $row['position'] = $i;
|
|
||||||
$row['id'] = $r['id'];
|
|
||||||
$row['productName'] = strlen($r['name']) > 55 ? substr($r['name'], 0, 55) . "..." : $r['name'];
|
|
||||||
$row['productFullName'] = $r['name'];
|
|
||||||
$row['productCode'] = strlen($r['code']) > 20 ? substr($r['code'], 0, 20) . "..." : $r['code'];
|
|
||||||
$row['productFullCode'] = $r['code'];
|
|
||||||
$row['productId'] = $r['ecmproduct_id'];
|
|
||||||
$row['productQty'] = $r['quantity'];
|
|
||||||
$row['qty'] = $r['scheduledQuantity'];
|
|
||||||
$row['productKind'] = $r['kind'];
|
|
||||||
$row['productSize'] = $r['size'];
|
|
||||||
$row['productShape'] = $app_list_strings['ecmproducts_shape_dom'][$r['shape']];
|
|
||||||
$row['productBrand'] = $app_list_strings['ecmproducts_brand_dom'][$r['brand']];
|
|
||||||
$row['orderNo'] = $r['document_no'];
|
|
||||||
$row['orderId'] = $r['orderId'];
|
|
||||||
$row['orderStatus'] = $app_list_strings['ecmsales_status_dom'][$r['status']];
|
|
||||||
$row['orderType'] = $app_list_strings['ecmsales_type_dom'][$r['type']];
|
|
||||||
$row['orderParent'] = $r['parent_name'];
|
|
||||||
$row['orderParentId'] = $r['parent_id'];
|
|
||||||
$row['orderSendDate'] = $r['send_date'];
|
|
||||||
$row['orderItemId'] = $r['item_id'];
|
|
||||||
$row['description'] = strlen($r['description']) > 0 ? substr($r['description'], 0, 30) : '';
|
|
||||||
$row['fullDescription'] = $r['description'];
|
|
||||||
$row['shippingTo'] = ($r['shipping_address_name'] == 'Adres korespondencyjny' ? '' : $r['shipping_address_name']);
|
|
||||||
$row['productionDate'] = $r['production_date'] == '0000-00-00' ? '' : $r['production_date'];
|
|
||||||
$row['productStockState'] = $r['stockState'] | 0;
|
|
||||||
$row['mainProductId'] = $r['main_product_id'];
|
|
||||||
$row['mainProductCode'] = $r['main_product_code'];
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getProductComponents($productId, $quantity)
|
function getProductComponents($productId, $quantity)
|
||||||
{
|
{
|
||||||
$db = $GLOBALS['db'];
|
$db = $GLOBALS['db'];
|
||||||
@@ -612,6 +631,7 @@ HAVING
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateUuidV4()
|
function generateUuidV4()
|
||||||
{
|
{
|
||||||
$data = openssl_random_pseudo_bytes(16);
|
$data = openssl_random_pseudo_bytes(16);
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ $(document).ready(
|
|||||||
SetTab('ITEMS');
|
SetTab('ITEMS');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
calculateDate($("#delivery_date").val());
|
||||||
});
|
});
|
||||||
// handle save
|
// handle save
|
||||||
var check_form_ = check_form;
|
var check_form_ = check_form;
|
||||||
|
|||||||
@@ -23,6 +23,13 @@ function calculateDate($date){
|
|||||||
$date = new Datetime($date);
|
$date = new Datetime($date);
|
||||||
$date->modify('-1 day');
|
$date->modify('-1 day');
|
||||||
$tmp['date']=$date->format("d.m.Y");
|
$tmp['date']=$date->format("d.m.Y");
|
||||||
|
$tmp['date_day']=date('N', strtotime($tmp['date']));
|
||||||
|
if($tmp['date_day']==7){
|
||||||
|
$date->modify('-2 day');
|
||||||
|
} else if($tmp['date_day']==6){
|
||||||
|
$date->modify('-1 day');
|
||||||
|
}
|
||||||
|
$tmp['date']=$date->format("d.m.Y");
|
||||||
echo json_encode($tmp);
|
echo json_encode($tmp);
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user