diff --git a/include/language/en_us.EcmDropdownEditor.php b/include/language/en_us.EcmDropdownEditor.php index 08350b94..ca92b5fe 100644 --- a/include/language/en_us.EcmDropdownEditor.php +++ b/include/language/en_us.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -194,6 +194,7 @@ $customDoms = array ( '6fadf5e0-693e-6b9d-213c-66222fd03bdf' => 'Fabric Surface Cleaners', 'f2156355-d06b-2904-d759-67923795c77b' => 'Oven Cleaners', '27697ebf-0d8e-5156-528e-679237ffd78f' => 'Toilet Cleaners', + 'f03ef1ce-e218-97eb-623e-679d00f02f98' => 'Car Cleaning', ), 'ecmquotes_status_dom' => array ( diff --git a/include/language/pl_pl.EcmDropdownEditor.php b/include/language/pl_pl.EcmDropdownEditor.php index 714f2678..1e6d31d8 100644 --- a/include/language/pl_pl.EcmDropdownEditor.php +++ b/include/language/pl_pl.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -194,6 +194,7 @@ $customDoms = array ( '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', + 'f03ef1ce-e218-97eb-623e-679d00f02f98' => 'Środki do czyszczenia samochodów', ), 'ecmquotes_status_dom' => array ( diff --git a/modules/EcmReports/ReportSales.inc.php b/modules/EcmReports/ReportSales.inc.php index 604fbb7e..2169e965 100644 --- a/modules/EcmReports/ReportSales.inc.php +++ b/modules/EcmReports/ReportSales.inc.php @@ -126,13 +126,16 @@ ELSE pozycja.price_purchase*pozycja.quantity_corrected END - ) as koszt + ) as koszt, + sum(s.quantity) AS 'state' FROM ecminvoiceoutitems pozycja JOIN ecminvoiceouts faktura ON pozycja.ecminvoiceout_id = faktura.id LEFT JOIN ecmproducts produkt ON pozycja.ecmproduct_id = produkt.id + LEFT JOIN + ecmstockstates s ON s.product_id = pozycja.ecmproduct_id WHERE faktura.register_date BETWEEN '".$date_from_to_query->format('Y-m-d')."' AND @@ -153,6 +156,8 @@ } $query .= "GROUP BY pozycja.id COLLATE utf8_polish_ci;"; + + echo $query; }else if ($searchBy=="contractor"){ @@ -243,6 +248,7 @@ $row["name"] = $r["name"]; $row["code"]=$r["code"]; + $row["state"]=$r["state"]; $row["parent_id"]=$r["parent_id"]; $row["type"]=$r["type"]; @@ -442,6 +448,7 @@ $tmp2[$key1][$key2][$i]["id"]=$element3["id"]; $tmp2[$key1][$key2][$i]["name"]=$element3["name"]; $tmp2[$key1][$key2][$i]["code"]=$element3["code"]; + $tmp2[$key1][$key2][$i]["state"]=$element3["state"]; $tmp2[$key1][$key2][$i]["parent_id"]=$element3["parent_id"]; } //if($element3["type"]=="normal") diff --git a/modules/EcmReports/tpls/ReportSales.tpl b/modules/EcmReports/tpls/ReportSales.tpl index f8faea3d..8d303d81 100644 --- a/modules/EcmReports/tpls/ReportSales.tpl +++ b/modules/EcmReports/tpls/ReportSales.tpl @@ -247,6 +247,7 @@ {$MOD.LBL_PRODUCTS} {if $searchBy=="product"} Indeks + Stan {/if} {$MOD.LBL_SOLD_AMOUNT} {$MOD.LBL_VALUE_SALES} @@ -269,6 +270,7 @@ {/if} {if $searchBy=="product"} + {/if} {$DATA.$CATNAME.IloscSum|number_format:0:",":"." } {$DATA.$CATNAME.SoldSum|number_format:2:",":"." } @@ -289,6 +291,7 @@ [+] {$CAT2NAME} {if $searchBy=="product"} + {/if} {$CAT.$CAT2NAME.IloscSum2|number_format:0:",":"." } {$CAT.$CAT2NAME.SoldSum2|number_format:2:",":"." } @@ -326,6 +329,7 @@ {/if} {if $searchBy=="product"} {$ROW.code} + {$ROW.state} {/if} {$ROW.ilosc|number_format:0:",":"."} {$ROW.netto|number_format:2:",":"."} @@ -347,6 +351,7 @@ {$MOD.LBL_SUM}: {if $searchBy=="product"} + {/if} {$SUM.IloscSumSum|number_format:0:",":"." } {$SUM.SoldSumSum|number_format:2:",":"." }