diff --git a/REST/functions.php b/REST/functions.php index e4995679..c0cb292a 100644 --- a/REST/functions.php +++ b/REST/functions.php @@ -39,13 +39,13 @@ echo ''.$exists['document_no'].''; die(); } - + $res = makeCUrlRequest("https://crm.twinpol.com/REST/index.php?key=d68dac4c-f784-4e1b-8267-9ffcfa0eda4c&action=getSale&record=".$record); $sale = json_decode($res); $sale->position_list = json_decode($sale->position_list); echo "Numer dokumentu TwinPol: ".$sale->document_no."
"; - $gotAllProducts = true; // hope :) + $gotAllProducts = true; // hope :) $newPositionList = array(); $total_netto = 0; $total_brutto = 0; $total_discount = 0; $vats = array(); foreach ( $sale->position_list as $product ) { @@ -84,7 +84,7 @@ } $prod['quantity'] = $product->quantity; $prod['discount'] = $product->discount; - $prod['price_start'] = $price_start; + $prod['price_start'] = $price_start; $prod['price_netto'] = round($price_start - ($price_start * ($product->discount / 100)),2); $prod['ecmvat_id'] = $fvPrice['ecmvat_id']; $prod['ecmvat_value'] = $fvPrice['ecmvat_value']; @@ -105,7 +105,7 @@ $prod['date_entered'] = date('Y-m-d H:i:s'); $prod['date_modified'] = date('Y-m-d H:i:s'); - $prod['modified_user_id'] = null; + $prod['modified_user_id'] = null; $prod['assigned_user_id'] = null; $prod['created_by'] = null; $prod['deleted'] = '0'; @@ -167,7 +167,7 @@ $new->shipping_nip = $sale->parent_nip; $new->edi_zs_id = $sale->id; $new->edi_zs_document_no = $sale->document_no; - $new->pdf_text = + $new->pdf_text = "Dostawa ".$sale->shipping_address_name." ".$sale->shipping_address_street." diff --git a/cron.php b/cron.php index fab8adce..b0d2a84b 100644 --- a/cron.php +++ b/cron.php @@ -98,7 +98,6 @@ if($timestamp[0] < strtotime(date('H:i'))) { $s = new Scheduler(); $s->flushDeadJobs(); $s->checkPendingJobs(); - $GLOBALS['log']->info('Scheduler - tutaj dochodzÄ™'); } else { $GLOBALS['log']->fatal('Scheduler cannot write PID file. Please check permissions on '.$cachePath); } @@ -107,4 +106,3 @@ if($timestamp[0] < strtotime(date('H:i'))) { } $exit_on_cleanup = true; sugar_cleanup($exit_on_cleanup); -?> \ No newline at end of file diff --git a/custom/application/Ext/Language/en_us.lang.ext.php b/custom/application/Ext/Language/en_us.lang.ext.php index 69d46b29..c3d77f14 100755 --- a/custom/application/Ext/Language/en_us.lang.ext.php +++ b/custom/application/Ext/Language/en_us.lang.ext.php @@ -1,8 +1,8 @@ 'From Fair' ); - -$app_list_strings['moduleList']['EcmDeliveryConditions'] = 'Delivery Conditions'; - -$app_list_strings['moduleList']['EcmPaymentConditions'] = 'Payment Conditions'; +$app_list_strings['moduleList']['EcmDeliveryConditions'] = 'Delivery Conditions'; + + +$app_list_strings['moduleList']['EcmPaymentConditions'] = 'Payment Conditions'; $app_list_strings['moduleList']['EcmTexts']='Texts'; - -$app_list_strings['moduleList']['EcmInvoiceOuts'] = 'Invoices'; -$app_list_strings['ecminvoiceouts_parent_dom'] = array ( - 'Accounts' => $app_list_strings['moduleList']['Accounts'], - 'Contacts' => $app_list_strings['moduleList']['Contacts'], -); -$app_list_strings['ecminvoiceouts_status_dom'] = array ( - 'registered' => 'Registered', - 'not_accepted' => 'Not Accepted', - 'accepted' => 'Accepted', - 'mailed' => 'Sent', - 'printed' => 'Printed', - 'paid' => 'Paid', - 'admonition' => 'Admonition', -); -$app_list_strings['ecminvoiceouts_type_dom'] = array ( - 'normal' => 'Normal', - 'correct' => 'Correct', -); + +$app_list_strings['moduleList']['EcmInvoiceOuts'] = 'Invoices'; +$app_list_strings['ecminvoiceouts_parent_dom'] = array ( + //'Accounts' => $app_list_strings['moduleList']['Accounts'], + //'Contacts' => $app_list_strings['moduleList']['Contacts'], +); +$app_list_strings['ecminvoiceouts_status_dom'] = array ( + 'registered' => 'Registered', + 'not_accepted' => 'Not Accepted', + 'accepted' => 'Accepted', + 'mailed' => 'Sent', + 'printed' => 'Printed', + 'paid' => 'Paid', + 'admonition' => 'Admonition', +); +$app_list_strings['ecminvoiceouts_type_dom'] = array ( + 'normal' => 'Normal', + 'correct' => 'Correct', +); @@ -74,13 +74,13 @@ $app_list_strings['ecmproducts_product_size_dom'] = array( $app_list_strings['ecmproducts_product_brand_dom'] = array( 'brak' => 'Brak', ); - - -$mod_strings['LBL_ECMDOCUMENTTEMPLATES_TITLE'] = 'Document Templates'; -$mod_strings['LBL_ECMDOCUMENTTEMPLATES_DESC'] = 'Here You can set informations contained with pdf file for Invoices, Offers...'; -$mod_strings['LBL_SETTINGS_OF_ECMDOCUMENTTEMPLATES'] = 'Document Templates'; -$mod_strings['LBL_ECMDOCUMENTTEMPLATES'] = 'Settings for pdf file'; - + + +$mod_strings['LBL_ECMDOCUMENTTEMPLATES_TITLE'] = 'Document Templates'; +$mod_strings['LBL_ECMDOCUMENTTEMPLATES_DESC'] = 'Here You can set informations contained with pdf file for Invoices, Offers...'; +$mod_strings['LBL_SETTINGS_OF_ECMDOCUMENTTEMPLATES'] = 'Document Templates'; +$mod_strings['LBL_ECMDOCUMENTTEMPLATES'] = 'Settings for pdf file'; + $app_list_strings['moduleList']['EcmGroupSales']='Group Sales'; diff --git a/custom/application/Ext/Language/pl_pl.lang.ext.php b/custom/application/Ext/Language/pl_pl.lang.ext.php index ef435465..6ccfed63 100755 --- a/custom/application/Ext/Language/pl_pl.lang.ext.php +++ b/custom/application/Ext/Language/pl_pl.lang.ext.php @@ -1,35 +1,35 @@ $app_list_strings['moduleList']['Accounts'], - 'Contacts' => $app_list_strings['moduleList']['Contacts'], - ); - $app_list_strings['ecminvoiceouts_type_dom'] = array ( - 'normal' => 'Normalna', - 'correct' => 'Korekta', - ); - $app_list_strings['ecminvoiceouts_status_dom'] = array ( - 'registered' => 'Zarejestrowana', - 'not_accepted' => 'Niezaakceptowana', - 'accepted' => 'Zaakceptowana', - 'mailed' => 'WysÅ‚ana', - 'printed' => 'Wydrukowana', - 'paid' => 'ZapÅ‚acona', - 'admonition' => 'Upomnienie', - ); - $app_list_strings['ecminvoiceouts_type_dom'] = array ( - 'normal' => 'Normalna', - 'correct' => 'Korekta', - ); - -$app_list_strings['moduleList']['EcmProductsDocumentsRelations']='Relacja z Produktami'; + $app_list_strings['moduleList']['EcmInvoiceOuts'] = 'Faktury'; + $app_list_strings['ecminvoiceouts_parent_dom'] = array ( + //'Accounts' => $app_list_strings['moduleList']['Accounts'], + //'Contacts' => $app_list_strings['moduleList']['Contacts'], + ); + $app_list_strings['ecminvoiceouts_type_dom'] = array ( + 'normal' => 'Normalna', + 'correct' => 'Korekta', + ); + $app_list_strings['ecminvoiceouts_status_dom'] = array ( + 'registered' => 'Zarejestrowana', + 'not_accepted' => 'Niezaakceptowana', + 'accepted' => 'Zaakceptowana', + 'mailed' => 'WysÅ‚ana', + 'printed' => 'Wydrukowana', + 'paid' => 'ZapÅ‚acona', + 'admonition' => 'Upomnienie', + ); + $app_list_strings['ecminvoiceouts_type_dom'] = array ( + 'normal' => 'Normalna', + 'correct' => 'Korekta', + ); - -$app_list_strings['moduleList']['EcmPaymentConditions'] = 'Warunki PÅ‚atnoÅ›ci'; + +$app_list_strings['moduleList']['EcmProductsDocumentsRelations']='Relacja z Produktami'; + + +$app_list_strings['moduleList']['EcmPaymentConditions'] = 'Warunki PÅ‚atnoÅ›ci'; @@ -47,8 +47,8 @@ $app_list_strings['ecmproducts_product_size_dom'] = array( $app_list_strings['ecmproducts_product_brand_dom'] = array( 'brak' => 'Brak', ); - -$app_list_strings['moduleList']['EcmDeliveryConditions'] = 'Warunki Przesy³ki'; + +$app_list_strings['moduleList']['EcmDeliveryConditions'] = 'Warunki Przesy�ki'; $app_list_strings['moduleList']['EcmDocumentTemplates']='Szablony Dokumentów'; diff --git a/importE5EDISales.php b/importE5EDISales.php index a2b9e1f3..9358e35c 100644 --- a/importE5EDISales.php +++ b/importE5EDISales.php @@ -62,7 +62,7 @@ function checkEDISales() $s->document_no = $s->formatNumber($number); $s->edi_file = $order; $s->type = 'sales_order'; - $s->status = 's30'; + $s->status = 's60'; $s->ecmlanguage = 'pl_pl'; $a = new Account(); $a->retrieve($s->parent_id); diff --git a/include/language/en_us.EcmDropdownEditor.php b/include/language/en_us.EcmDropdownEditor.php index f15e60e4..9778bb8f 100644 --- a/include/language/en_us.EcmDropdownEditor.php +++ b/include/language/en_us.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -41,10 +41,14 @@ $customDoms = array ( '8f4fdd3c-44f9-103b-3f40-659f1c128319' => 'Bottle D22_500ml', '307f61db-5fd9-3aa6-e701-65a04f4bba88' => 'B D23_500ml (nabÅ‚yszczacz)', '5df47246-d0cd-4151-9bdd-65eede53aba5' => 'B D24_500ml (systemy mleczne)', + 'ab74cd2c-7720-5875-7ca5-66bb55a3e075' => 'Bottle D25_500ml (Ula)', 'd7c10cb9-7459-1174-6315-661cdae38a39' => 'D11_1000ml', '58664d9d-0295-3539-4662-659f18dc4b80' => 'Bottle', '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)', + 'ba4f06a8-f6fb-4969-d4b9-6683e6b6b372' => 'D11_2000ml ', + 'cb8f5e45-43e1-b62d-05d7-669646b4eb10' => 'Bottle D12_5000ml (kanister)', '820341fa-0db5-9d74-7544-659f17560658' => 'Kit ', '567da064-cd31-0416-2ad3-6581cc870e96' => 'Doypack 110x180mm', 'edf38614-90c3-50a7-56e8-65dda2d891c2' => 'Doypack 130x220mm', @@ -57,18 +61,22 @@ $customDoms = array ( '48369f61-18bd-53e6-070a-659f026773ac' => 'Box', '37dbeaa1-f183-3b3e-1b54-65aa78a662a2' => 'Jar 500 ml', 'f13d7541-494d-75c7-2a35-65aa784b42a5' => 'Jar 1000 ml', + 'e703a7f9-d27d-b445-d946-66727a3940d9' => 'Jar 1500 ml', 'da8d7be4-58dc-4f75-f547-65c310cd97dd' => 'Jar 65 ml', 'e1a16dbf-7216-d184-b9ed-65c310aff4d4' => 'Jar 150 ml', '2a9454a6-b2a1-150f-c307-65c31102cb28' => 'Jar 250 ml', - '3acd80de-8dcc-ced9-c2fa-65eee6ae9949' => 'Foam 100 ml', + '3acd80de-8dcc-ced9-c2fa-65eee6ae9949' => 'Spray 100 ml', '6014bd30-9be6-4348-5b3a-6603f015f392' => 'Bucket 2,75l', '786f48d6-16e7-a0a4-4aec-6628a16a0f89' => 'Foam 100ml', '349b50d1-0a7b-b3bd-e72e-662b42ca98ae' => 'Foam 400ml', + 'cb66a685-53e1-5f87-0a25-66967c7cb63b' => 'Doypack 210x285mm', + '75f4bd2a-51a8-0767-635e-66dde15af79e' => 'Foam 200ml', ), 'ecmproducts_brand_dom' => array ( '6c5722f6-33b3-41c3-a878-e2f7628e8360' => 'None', '3dc7c0bb-3d26-427c-9ff0-6319ead2e988' => 'Soyeco', + '33fb10ad-55f6-54ac-73e5-66bb6130d36f' => 'Soyeco amz', '5820a5e7-8fd4-48bd-ab28-bfd60c321c15' => 'Frischer', '2499563d-3671-c19a-c407-6628c97df75c' => 'Frischer amz', 'c0a6f467-9021-47cc-9b31-9398d9c2e898' => 'e5', @@ -130,6 +138,17 @@ $customDoms = array ( '1ba0e21f-9a07-b93c-5e2f-65e8c7bb833d' => 'Purivita', '5cc10610-e61e-846f-96a7-6613b79abce2' => 'Frischer Winner', '8fb7cdf2-b9a9-ab07-d297-661670fb6120' => 'Aqualogis', + 'd56c3876-c214-3829-f7b9-66618595d478' => 'Caffedelmondo', + 'a7ca98eb-9a5d-660b-f483-666c350903c9' => 'Wilfa', + '2f641941-0ba1-b88b-2cb1-6684f93ef879' => 'Beko', + '89adb9a7-9d3e-1ec6-a4cf-668e2e46f158' => 'Aroca', + '26b07787-4207-7ab5-40fa-669527407b5a' => 'APM', + '47c4e190-198c-dcb6-612b-66978335a059' => 'Reus', + 'a8a956e1-8288-2976-b71c-66bb3b8c3b8e' => 'Drekker', + '510f0cc2-1a76-3821-dbf2-66bb9e51bfc1' => 'NextProvider', + 'd5f819ff-297b-c0d8-cfcd-66d0d0103806' => 'EcoExpert', + '4144e574-4870-fa26-25a0-66d85b094f7b' => 'Office Discount', + 'e00b0e4a-ba66-796d-3bcb-66d89240c2cd' => 'Printus', ), 'ecmproducts_category_dom' => array ( @@ -257,7 +276,7 @@ $customDoms = array ( array ( 'sales_order' => 'Sales Order', 'gratis' => 'Samples', - 'b2c' => 'Stock states', + 'b2c' => 'For stock', 'b2b' => 'Import', 'interval_order' => 'Zamówienie okresowe', ), @@ -274,9 +293,7 @@ $customDoms = array ( 's30' => 'Accepted', 's40' => 'Not Accepted', 's50' => 'Sent', - 's60' => 'Won', - 's70' => 'Lost', - 's80' => 'Delivery Note', + 's60' => 'From Stock', '93cc9f90-9a94-5502-50a9-66264b2fd03a' => 'Closed', ), ); diff --git a/include/language/pl_pl.EcmDropdownEditor.php b/include/language/pl_pl.EcmDropdownEditor.php index 679558b8..914e9018 100644 --- a/include/language/pl_pl.EcmDropdownEditor.php +++ b/include/language/pl_pl.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -41,10 +41,14 @@ $customDoms = array ( '8f4fdd3c-44f9-103b-3f40-659f1c128319' => 'Butelka D22_500ml (szyjka)', '307f61db-5fd9-3aa6-e701-65a04f4bba88' => 'Butelka D23_500ml (nabÅ‚yszczacz)', '5df47246-d0cd-4151-9bdd-65eede53aba5' => 'Butelka D24_500ml (systemy mleczne)', + 'ab74cd2c-7720-5875-7ca5-66bb55a3e075' => 'Butelka D25_500ml (Ula)', 'd7c10cb9-7459-1174-6315-661cdae38a39' => 'Butelka D11_1000ml (RPET)', '58664d9d-0295-3539-4662-659f18dc4b80' => 'Butelka D21_1000ml (Odkamieniacz)', '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)', + 'ba4f06a8-f6fb-4969-d4b9-6683e6b6b372' => 'Butelka D11_2000ml (pÅ‚yn do prania)', + 'cb8f5e45-43e1-b62d-05d7-669646b4eb10' => 'Butelka D12_5000ml (kanister)', '820341fa-0db5-9d74-7544-659f17560658' => 'Zestaw D1_500ml+zapas', '567da064-cd31-0416-2ad3-6581cc870e96' => 'Doypack 110x180mm', 'edf38614-90c3-50a7-56e8-65dda2d891c2' => 'Doypack 130x220mm', @@ -57,18 +61,22 @@ $customDoms = array ( '48369f61-18bd-53e6-070a-659f026773ac' => 'Kartonik ', '37dbeaa1-f183-3b3e-1b54-65aa78a662a2' => 'SÅ‚oik 500 ml', 'f13d7541-494d-75c7-2a35-65aa784b42a5' => 'SÅ‚oik 1000 ml', + 'e703a7f9-d27d-b445-d946-66727a3940d9' => 'SÅ‚oik 1500 ml', 'da8d7be4-58dc-4f75-f547-65c310cd97dd' => 'SÅ‚oik 65 ml', 'e1a16dbf-7216-d184-b9ed-65c310aff4d4' => 'SÅ‚oik 150 ml', '2a9454a6-b2a1-150f-c307-65c31102cb28' => 'SÅ‚oik 250 ml', - '3acd80de-8dcc-ced9-c2fa-65eee6ae9949' => 'Pianka 100 ml', + '3acd80de-8dcc-ced9-c2fa-65eee6ae9949' => 'Spray 100 ml', '6014bd30-9be6-4348-5b3a-6603f015f392' => 'Wiadro 2,75l', '786f48d6-16e7-a0a4-4aec-6628a16a0f89' => 'Pianka 100ml', '349b50d1-0a7b-b3bd-e72e-662b42ca98ae' => 'Pianka 400ml', + 'cb66a685-53e1-5f87-0a25-66967c7cb63b' => 'Doypack 210x285mm', + '75f4bd2a-51a8-0767-635e-66dde15af79e' => 'Pianka 200ml', ), 'ecmproducts_brand_dom' => array ( '6c5722f6-33b3-41c3-a878-e2f7628e8360' => 'None', '3dc7c0bb-3d26-427c-9ff0-6319ead2e988' => 'Soyeco', + '33fb10ad-55f6-54ac-73e5-66bb6130d36f' => 'Soyeco amz', '5820a5e7-8fd4-48bd-ab28-bfd60c321c15' => 'Frischer', '2499563d-3671-c19a-c407-6628c97df75c' => 'Frischer amz', 'c0a6f467-9021-47cc-9b31-9398d9c2e898' => 'e5', @@ -130,6 +138,17 @@ $customDoms = array ( '1ba0e21f-9a07-b93c-5e2f-65e8c7bb833d' => 'Purivita', '5cc10610-e61e-846f-96a7-6613b79abce2' => 'Frischer Winner', '8fb7cdf2-b9a9-ab07-d297-661670fb6120' => 'Aqualogis', + 'd56c3876-c214-3829-f7b9-66618595d478' => 'Caffedelmondo', + 'a7ca98eb-9a5d-660b-f483-666c350903c9' => 'Wilfa', + '2f641941-0ba1-b88b-2cb1-6684f93ef879' => 'Beko', + '89adb9a7-9d3e-1ec6-a4cf-668e2e46f158' => 'Aroca', + '26b07787-4207-7ab5-40fa-669527407b5a' => 'APM', + '47c4e190-198c-dcb6-612b-66978335a059' => 'Reus', + 'a8a956e1-8288-2976-b71c-66bb3b8c3b8e' => 'Drekker', + '510f0cc2-1a76-3821-dbf2-66bb9e51bfc1' => 'NextProvider', + 'd5f819ff-297b-c0d8-cfcd-66d0d0103806' => 'EcoExpert', + '4144e574-4870-fa26-25a0-66d85b094f7b' => 'Office Discount', + 'e00b0e4a-ba66-796d-3bcb-66d89240c2cd' => 'Printus', ), 'ecmproducts_category_dom' => array ( @@ -258,7 +277,7 @@ $customDoms = array ( array ( 'sales_order' => 'Zamówienie sprzedaży', 'gratis' => 'Próbki', - 'b2c' => 'Stany magazynowe', + 'b2c' => 'Produkcja na magazyn', 'b2b' => 'Import', 'interval_order' => 'Zamówienie okresowe', ), @@ -270,14 +289,12 @@ $customDoms = array ( ), 'ecmsales_status_dom' => array ( - 's10' => 'Zarejestrowany', + 's10' => 'Planowany', 's20' => 'OczekujÄ…cy', 's30' => 'Zaakceptowany', - 's40' => 'Niezaakceptowany', + 's40' => 'Odrzucone', 's50' => 'WysÅ‚any', - 's60' => 'Wygrany', - 's70' => 'Odrzucony', - 's80' => 'Dokument Przewozowy', + 's60' => 'Realizacja ze stanów magazynowych', '93cc9f90-9a94-5502-50a9-66264b2fd03a' => 'Zrealizowany ', ), ); diff --git a/index.php b/index.php index 40c18535..5021c042 100755 --- a/index.php +++ b/index.php @@ -1,4 +1,6 @@ load( 'currencies.xml' ); $tmp = $doc->getElementsByTagName("data_publikacji"); +var_dump($tmp); $cur_date = $tmp->item(0)->nodeValue; $tmp = $doc->getElementsByTagName("numer_tabeli"); $table_name = $tmp->item(0)->nodeValue; @@ -58,7 +62,7 @@ foreach ($poz as $p) { $currencies[$kod]['kurs']=$kurs; } } -var_dump($currencies); +//var_dump($currencies); //save values into db foreach ($currencies as $key=>$value) { mysql_query("INSERT INTO currency_nbp_archive VALUES ('".$cur_date."', '".$value['id']."', '".$key."', ".str_replace(",",".",$value['kurs']).",'".$table_name."')"); @@ -69,5 +73,4 @@ foreach ($currencies as $key=>$value) { //delete xls unlink("./currencies.xml"); - -?> \ No newline at end of file +*/ \ No newline at end of file diff --git a/modules/EcmInvoiceOuts/DetailView.php b/modules/EcmInvoiceOuts/DetailView.php index 0c05a67d..e6d1ce82 100644 --- a/modules/EcmInvoiceOuts/DetailView.php +++ b/modules/EcmInvoiceOuts/DetailView.php @@ -138,6 +138,29 @@ AND c.deleted='0' AND c.canceled='0'; } $edit->ss->assign ( "INVOICES_INFO", substr($inv,0,-6) ); +if ($focus->parent_id === '1b9643ca-5b1a-8f9b-b809-586b5619b068') { + require_once('REST/config.php'); + + $curl = curl_init(); + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET' ); + curl_setopt($curl, CURLOPT_VERBOSE, 1); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($curl, CURLOPT_URL, 'https://crm.twinpol.com/REST/index.php?action=getStocks&key='.$restConfig['twinpolKey']); + $twinpolStocks = json_decode(curl_exec($curl)); + + $btn =''; + $btn .= ''; + + $edit->ss->assign('CREATE_PZ', $btn); +} $edit->bean = $focus; $edit->tplFile = 'include/ECM/EcmViews/DetailView/Tabs/DetailView.tpl'; diff --git a/modules/EcmInvoiceOuts/metadata/detailviewdefs.php b/modules/EcmInvoiceOuts/metadata/detailviewdefs.php index c232929a..c3046e1c 100644 --- a/modules/EcmInvoiceOuts/metadata/detailviewdefs.php +++ b/modules/EcmInvoiceOuts/metadata/detailviewdefs.php @@ -91,7 +91,7 @@ $viewdefs ['EcmInvoiceOuts'] ['DetailView'] = array ( 'customCode' => '', ) , array ( - 'customCode' => '{if $CAN_CREATE_PZ == true} {/if}' + 'customCode' => '{$CREATE_PZ}' ) ) , diff --git a/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.js b/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.js index d98584d1..e72f5bce 100644 --- a/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.js +++ b/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.js @@ -44,7 +44,7 @@ $(document).ready(function () { match: true }); }, - 13: function ($cell, indx) { + 12: function ($cell, indx) { return $.tablesorter.filterFormatter.select2($cell, indx, { match: true }); @@ -52,7 +52,7 @@ $(document).ready(function () { }, }, headers: { - 17: { sorter: 'production_date' }, + 16: { sorter: 'production_date'}, }, }); $("#allTable").bind('filterEnd', function (event, config) { diff --git a/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.php b/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.php index 6cf80d5b..8af5e301 100644 --- a/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.php +++ b/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.php @@ -37,7 +37,7 @@ if (!isset($_GET['ajaxAction'])) { ON si.ecmproduct_id = p.id LEFT JOIN ecmstockstates AS ss ON ss.product_id = si.ecmproduct_id AND ss.stock_id = 'c7afd71a-4c3a-bde4-138d-4acaee1644e4' - WHERE s.delivery_date > '$dateFrom' AND s.status IN ('s10', 's20', 's30')"; + WHERE s.delivery_date > '$dateFrom'"; if (is_array($_GET['exclude']) && count($_GET['exclude']) > 0) { foreach ($_GET['exclude'] as $name) { if (strlen($name) > 0) { @@ -88,6 +88,7 @@ if (!isset($_GET['ajaxAction'])) { $row['orderNo'] = $r['document_no']; $row['orderId'] = $r['id']; $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['orderRegisterDate'] = $r['register_date']; diff --git a/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.tpl b/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.tpl index c189466b..2f3fed1b 100644 --- a/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.tpl +++ b/modules/EcmReports/BimIT-Reports/productsBySales/productsBySales.tpl @@ -1,14 +1,14 @@ + src="modules/EcmReports/BimIT-Reports/lib/tablesorter-2.31.3/dist/js/jquery.tablesorter.js"> @@ -16,58 +16,58 @@ - - - - + + + +
- - -

Produkcja

-
+ + +

Produkcja

+
- - - - + + + + + cellspacing="0">
Data wysyÅ‚ki: od   + value="{$dateFrom}" autocomplete="off">   do   + maxlength="10" type="text"> Enter Date    @@ -75,7 +75,8 @@ +
- + target="_blank" id="createInsideOrderForm"> + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - {foreach from=$allData item=ROW name=loop} + {foreach from=$allData item=ROW name=loop} - {if $smarty.foreach.loop.index % 2 == 1} - + {if $smarty.foreach.loop.index % 2 == 1} + {else} - - {/if} - - - - - - - - - - - - - - - - - - - - - {/foreach} + + {/if} + + + + + + + + + + + + + + + + + + + + {/foreach} - - - - - + + + + +
PozycjaIndeksNazwaIlośćStanZS E5StatusZamawiającyOdbiorcaRodzajRozmiarFormaMarkaData rejestracjiData wysyłkiData dostawyData produkcjiUwagi
PozycjaIndeksNazwaIlośćStanZS E5TypStatusZamawiającyOdbiorcaFormaMarkaData rejestracjiData wysyłkiData dostawyData produkcjiUwagi
- - - - {$ROW.position} - - - {$ROW.productCode} - - - {$ROW.productName} - - {$ROW.productQty} - - {$ROW.productStockState} - - - {$ROW.orderNo} - - - {$ROW.orderStatus} - - - {$ROW.orderParent} - - - {$ROW.shippingTo} - - {$ROW.productKind} - - {$ROW.productSize} - - {$ROW.productShape} - - {$ROW.productBrand} - - {$ROW.orderRegisterDate} - - {$ROW.orderSendDate} - - {$ROW.orderDeliveryDate} - - - - - -
- -
{$ROW.description} -
- -
+ + + + {$ROW.position} + + + {$ROW.productCode} + + + {$ROW.productName} + + {$ROW.productQty} + + {$ROW.productStockState} + + + {$ROW.orderNo} + + + {$ROW.orderType} + + {$ROW.orderStatus} + + + {$ROW.orderParent} + + + {$ROW.shippingTo} + + {$ROW.productShape} + + {$ROW.productBrand} + + {$ROW.orderRegisterDate} + + {$ROW.orderSendDate} + + {$ROW.orderDeliveryDate} + + + + + +
+ +
{$ROW.description} +
+ +
0
0