diff --git a/.gitignore b/.gitignore index 68a9439b..1c5139cb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ !.gitignore !*.php +!*.inc !*.html !*.js !*.css @@ -15,4 +16,4 @@ # ...even if they are in subdirectories !*/ -cache/ \ No newline at end of file +cache/ diff --git a/include/ECM/EcmDropdownEditor/EcmDropdownEditor.inc b/include/ECM/EcmDropdownEditor/EcmDropdownEditor.inc new file mode 100644 index 00000000..e5f9f157 --- /dev/null +++ b/include/ECM/EcmDropdownEditor/EcmDropdownEditor.inc @@ -0,0 +1,119 @@ + $val) + * $app_list_strings[$key] = $val; + * } + * //end mz + */ +class EcmDropdownEditor { + const MY_PATH = "include/ECM/EcmDropdownEditor/"; + private $module; + private $fieldName; + private $dom; // name of edited list + private $dropdowns; // values of edited list + private $languages; // Sugar languages list + private $container; //name of div with edit form + public function EcmDropdownEditor($module, $container) { + $this->module = $module; + $this->languages = get_languages (); + $this->container = $container; + $tmp = explode ( "___", $container ); + $this->fieldName = $tmp [0]; + } + + // Get all dropdowns from module vardefs (including all Sugar languages) + private function getDropdowns() { + // get list values + global $sugar_config; // just to get current language + $l = array (); + foreach ( $this->languages as $id => $lang ) { + $l [$id] = return_app_list_strings_language ( $id ); + } + // get dom name + include_once ('modules/' . $this->module . '/vardefs.php'); + //evolpe begin + if(file_exists('custom/modules/' . $this->module . '/Ext/Vardefs/vardefs.ext.php')){ + include('custom/modules/' . $this->module . '/Ext/Vardefs/vardefs.ext.php'); + } + //evolpe end + $this->dom = $dictionary [substr ( $this->module, 0, - 1 )] ['fields'] [$this->fieldName] ['options']; + $tmp = array (); + foreach ( $l [$sugar_config ['default_language']] [$this->dom] as $key => $value ) { + $tmp [$key] = array (); + foreach ( $this->languages as $id => $lang ) + $tmp [$key] [$id] = $l [$id] [$this->dom] [$key]; + } + $this->dropdowns[$this->dom] = $tmp; + unset ( $tmp ); + return true; + } + public function DrawEditView() { + $this->getDropdowns (); + $smarty = new Sugar_Smarty (); + $smarty->assign ( 'DROPDOWNS', $this->dropdowns ); + $smarty->assign ( 'LANGUAGES', $this->languages ); + $smarty->assign ( 'CONTAINER', $this->container ); + return $smarty->fetch ( self::MY_PATH . 'EditView.tpl' ); + } + public static function getOptionTemplate() { + $smarty = new Sugar_Smarty (); + $smarty->assign ( 'KEY', create_guid () ); + $smarty->assign ( 'LANGUAGES', get_languages () ); + return $smarty->fetch ( self::MY_PATH . 'addOption.tpl' ); + } + public static function saveDom($name, $normal) { + require_once 'include/utils/file_utils.php'; + // save normal + foreach ( $normal as $lang => $options ) { + $customDoms = null; + $path = 'include/language/' . $lang . '.EcmDropdownEditor.php'; + if (file_exists ( $path )) + require ($path); + else + $customDoms = array (); + $customDoms [$name] = array (); + foreach ( $options as $key => $val ) + $customDoms [$name] [$key] = $val; + write_array_to_file ( 'customDoms', $customDoms, $path ); + } + // clear sugar cache + include_once ('modules/Administration/QuickRepairAndRebuild.php'); + $repair = new RepairAndClear (); + $modules = array ( + 'All Modules' + ); + $selected_actions = array ( + 'clearTpls', + 'clearJsLangFiles', + 'clearLangFiles' + ); + $repair->repairAndClearAll ( $selected_actions, $modules, false, false ); + return 1; + } + + public function getOptionsHTML() { + // get dom names + include_once ('modules/' . $this->module . '/vardefs.php'); + //evolpe begin + if(file_exists('custom/modules/' . $this->module . '/Ext/Vardefs/vardefs.ext.php')){ + include('custom/modules/' . $this->module . '/Ext/Vardefs/vardefs.ext.php'); + } + //evolpe end + $dom = $dictionary [substr ( $this->module, 0, - 1 )] ['fields'] [$this->fieldName] ['options']; + //current language + global $current_language; + $options = return_app_list_strings_language($current_language); + + $smarty = new Sugar_Smarty (); + $smarty->assign ( 'OPTIONS', $options[$dom] ); + return $smarty->fetch ( self::MY_PATH . 'createOptions.tpl' ); + } +} +?> \ No newline at end of file diff --git a/include/ECM/EcmJsTable/EcmJsTable.inc b/include/ECM/EcmJsTable/EcmJsTable.inc new file mode 100644 index 00000000..f67653ea --- /dev/null +++ b/include/ECM/EcmJsTable/EcmJsTable.inc @@ -0,0 +1,11 @@ +assign ( 'METADATA', $metadata ); + $smarty->assign ( 'TYPE', $type ); + return $smarty->fetch ( self::MY_PATH . 'header.tpl' ); + } +} +?> \ No newline at end of file diff --git a/include/ECM/EcmMultiPdf/EcmMultiPdf.inc b/include/ECM/EcmMultiPdf/EcmMultiPdf.inc new file mode 100644 index 00000000..a454a9e7 --- /dev/null +++ b/include/ECM/EcmMultiPdf/EcmMultiPdf.inc @@ -0,0 +1,76 @@ +'moduleName', 'record'=>'record_id') + private $status; + private $count; + private $temp_files; // array with temponary file names + private $s; // class strings + function __construct($documents, $outputfile = 'multi.pdf') { + $this->documents = $documents; + $this->outputfile = strtolower ( substr ( $outputfile, - 4 ) ) == '.pdf' ? strtolower ( substr ( $outputfile, 0, - 4 ) ) .'_'. create_guid () . '.pdf' : $outputfile .'_'. create_guid () . '.pdf'; + $this->count = sizeof ( $this->documents ); + $this->temp_files = array (); + // create temp dir if not exists + if (! is_dir ( self::TEMP_DIR )) + mkdir ( self::TEMP_DIR ); + } + /* + * Function creates pdf + * return: + * file path on succes + * -1: prepareDosc error + * -2: mergeFiles error + */ + public function process() { + if (! $this->prepareDocs ()) + return - 1; + if (! $this->mergeFiles ()) + return - 2; + $this->deleteTempFiles (); + return self::TEMP_DIR . $this->outputfile; + } + private function prepareDocs() { + if (! is_array ( $this->documents ) || $this->count == 0) + return false; + + for($i = 0; $i < $this->count; $i ++) { + $doc = ( array ) $this->documents [$i]; // cast from object to array when it's axaj call + if (! is_array ( $doc ) || sizeof ( $doc ) != 2 || ! $doc ['module'] || ! $doc ['record']) + return false; + if (! file_exists ( 'modules/' . $doc ['module'] . '/createPDF.php' )) + return false; + include_once 'modules/' . $doc ['module'] . '/createPDF.php'; + $generator = 'create' . substr ( $doc ['module'], 0, - 1 ) . 'Pdf'; + $filename = basename ( $generator ( $doc ['record'], 'MULTIPDF' ) ); + $this->temp_files [$i] = $filename; + } + return true; + } + private function mergeFiles() { + include_once self::MY_PATH . 'PDFMerger.php'; + $merger = new PDFMerger (); + $errors = array (); + for($i = 0; $i < $this->count; $i ++) + if (file_exists ( self::TEMP_DIR . $this->temp_files [$i] )) + $merger->addPDF ( self::TEMP_DIR . $this->temp_files [$i], 'all' ); + else + return -2; + if (!file_put_contents ( self::TEMP_DIR . $this->outputfile, $merger->merge ( 'string', $this->outputfile ) )); + return -2; + return true; // file is ready + } + private function deleteTempFiles() { + if (sizeof ( $this->temp_files ) == 0) + return; + foreach ( $this->temp_files as $f ) + unlink ( self::TEMP_DIR . $f ); + } +} +?> \ No newline at end of file diff --git a/include/ECM/EcmSendMail/EcmSendMail.inc b/include/ECM/EcmSendMail/EcmSendMail.inc new file mode 100644 index 00000000..fc073361 --- /dev/null +++ b/include/ECM/EcmSendMail/EcmSendMail.inc @@ -0,0 +1,181 @@ +OBCharset = $locale->getPrecedentPreference ( 'default_email_charset' ); + // get labels if exists + if (file_exists ( 'include/ECM/EcmSendMail/' . $current_language . '.php' )) + include_once ('include/ECM/EcmSendMail/' . $current_language . '.php'); + else + // othervise load en_us + include_once ('include/ECM/EcmSendMail/en_us.php'); + $this->s = $strings; + + //create temp dir if not exists + if (!is_dir(self::TEMP_DIR)) + mkdir(self::TEMP_DIR); + } + public function sendMail() { + include_once ('include/SugarPHPMailer.php'); + include_once ('include/utils/db_utils.php'); // for from_html function + + $mail = new SugarPHPMailer (); + $mail->prepForOutbound (); + $mail->setMailerForSystem (); + + // clear addresses + $mail->ClearAllRecipients (); + $mail->ClearReplyTos (); + $mail->ClearCCs (); + $mail->ClearBCCs (); + + // Add recipients + if (! is_array ( $this->to_addresses ) || sizeof ( $this->to_addresses ) == 0) { + $this->status = $this->s ['LBL_NO_TO_ADDRESS']; + return; + } + foreach ( $this->to_addresses as $k => $v ) + $mail->AddAddress ( $k, $this->t ( $v ) ); // function t() is explained below + + // Add CC + if (is_array ( $this->cc_addresses ) || sizeof ( $this->cc_addresses ) > 0) { + foreach ( $this->cc_addresses as $k => $v ) + $mail->AddCC ( $k, $this->t ( $v ) ); + } + + // Add BCC + if (is_array ( $this->bcc_addresses ) || sizeof ( $this->bcc_addresses ) > 0) { + foreach ( $this->bcc_addresses as $k => $v ) + $mail->AddBCC ( $k, $this->t ( $v ) ); + } + + // if sender is not defined by setSender(), get values from user settings + if (! $this->from || ! $this->fromName) { + global $current_user; + $u = new User (); + $u->retrieve ( $current_user->id ); + } + if (! $this->from) + $this->from = $u->emailAddress->getPrimaryAddress ( $u ); + if (! $this->fromName) + $this->fromName = (! empty ( $replyToName )) ? $current_user->getPreference ( 'mail_fromname' ) : $current_user->full_name; + if ($u) + unset ( $u ); + + $mail->From = $this->from; + $mail->FromName = $this->fromName; + + // Add reply to informations if they're setted + if ($this->replyToName && $this->replyTo) + $mail->AddReplyTo ( $this->replyTo, $this->replyToName ); + + $mail->Sender = $mail->From; /* set Return-Path field in header to reduce spam score in emails sent via Sugar's Email module */ + + // Add subject + $mail->Subject = $this->subject; + // Prepare and add message + // Using code from handleBodyInHTMLformat(), /modules/Email/Email.php + $mail->IsHTML ( true ); + $mail->Body = from_html ( wordwrap ( $this->message, 996 ) ); + $plainText = from_html ( $this->description_html ); + $plainText = strip_tags ( br2nl ( $plainText ) ); + $mail->AltBody = $plainText; + + // add attachments + if (is_array ( $this->attachments ) && sizeof ( $this->attachments ) > 0) { + foreach ( $this->attachments as $f ) { + $filename = $f; + $location = self::TEMP_DIR.$filename; + if (! file_exists ( $location ) || is_dir ( $location )) { + $this->status = $this->s ['LBL_NO_ATTACHMENT'] . $filename; + return; + } + // get file mime type + $finfo = finfo_open ( FILEINFO_MIME_TYPE ); + $mime_type = finfo_file ( $finfo, $location ); + finfo_close ( $finfo ); + // add attachment + $mail->AddAttachment ( $location, $this->t ( $filename ), 'base64', $mime_type ); + } + } + + // Send mail, log if there is error + echo "?"; + if (! $mail->Send ()) { + echo ' tu?'; + var_dump( $mail->ErrorInfo); + $this->status = $this->s ['LBL_SEND_ERROR']; + return; + } + + if ($this->clearTemp) + $this->deleteTempFiles (); + + $this->status = 1; + } + private function deleteTempFiles() { + foreach ( $this->attachments as $f ) + unlink ( self::TEMP_DIR.$f ); + } + // helper function to translate charset + private function t($s) { + global $locale; + return $locale->translateCharsetMIME ( trim ( $s ), 'UTF-8', $this->OBCharset ); + } + // swetery ;) + public function setSubject($subject) { + $this->subject = $this->t ( $subject ); + } + public function setMessage($message) { + $this->message = $message; + } + public function setAddresses($to_addresses) { + $this->to_addresses = $to_addresses; + } + public function setCCAddresses($cc_addresses) { + $this->cc_addresses = $cc_addresses; + } + public function setBCCAddresses($bcc_addresses) { + $this->bcc_addresses = $bcc_addresses; + } + public function setAttachments($attachments) { + $this->attachments = $attachments; + } + public function setSender($from, $fromName) { + $this->from = $from; + $this->fromName = $this->t ( $fromName ); + } + public function setReplyTo($replyTo, $replyToName) { + $this->replyTo = $replyTo; + $this->replyToName = $this->t ( $replyToName ); + } + public function setClearTemp($clearTemp) { + $this->clearTemp = $clearTemp; + } + // getery ;) + public function getStatus() { + return $this->status; + } +} +?> \ No newline at end of file diff --git a/include/ECM/open_flash_chart2/perl-ofc-library/list_all_tests.inc b/include/ECM/open_flash_chart2/perl-ofc-library/list_all_tests.inc new file mode 100644 index 00000000..599241df --- /dev/null +++ b/include/ECM/open_flash_chart2/perl-ofc-library/list_all_tests.inc @@ -0,0 +1,10 @@ +

OFC Test Suite - PERL

+ diff --git a/include/language/en_us.EcmDropdownEditor.php b/include/language/en_us.EcmDropdownEditor.php index 2a0b54da..e9651a96 100644 --- a/include/language/en_us.EcmDropdownEditor.php +++ b/include/language/en_us.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -225,9 +225,9 @@ $customDoms = array ( 'ecmactions_category_dom' => array ( 'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'Filling Capping Labeling', - 'f87b0591-14fd-b35f-1da5-54d1d584fd25' => 'Filling Capping', '8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'Sets', '55020d96-73d5-7b29-3bab-654f4818e0cd' => 'Liquid Mixing', + '9bc2bafc-0608-7bc7-468b-686a94772424' => 'Bisters', ), 'payment_method_dom' => array ( diff --git a/include/language/pl_pl.EcmDropdownEditor.php b/include/language/pl_pl.EcmDropdownEditor.php index 3dc6eb9b..aff3e1d9 100644 --- a/include/language/pl_pl.EcmDropdownEditor.php +++ b/include/language/pl_pl.EcmDropdownEditor.php @@ -1,5 +1,5 @@ array ( @@ -225,9 +225,9 @@ $customDoms = array ( 'ecmactions_category_dom' => array ( 'dd4ddbad-c949-0ee5-fb73-54cb9b6c86ef' => 'NZE', - 'f87b0591-14fd-b35f-1da5-54d1d584fd25' => 'NZ', '8519dfc8-5eec-0233-7f84-54d1fe00e9fc' => 'Zestawy', '55020d96-73d5-7b29-3bab-654f4818e0cd' => 'Mieszanie', + '9bc2bafc-0608-7bc7-468b-686a94772424' => 'Blistrowanie', ), 'payment_method_dom' => array ( diff --git a/modules/EcmProducts/QRcodes/.png b/modules/EcmProducts/QRcodes/.png index ea769853..aaf1eb3c 100644 Binary files a/modules/EcmProducts/QRcodes/.png and b/modules/EcmProducts/QRcodes/.png differ diff --git a/modules/EcmProducts/QRcodes/15cb36f3-8c47-7a0e-d7d4-68384e3af6c5.png b/modules/EcmProducts/QRcodes/15cb36f3-8c47-7a0e-d7d4-68384e3af6c5.png index 28d388c7..3689d94c 100644 Binary files a/modules/EcmProducts/QRcodes/15cb36f3-8c47-7a0e-d7d4-68384e3af6c5.png and b/modules/EcmProducts/QRcodes/15cb36f3-8c47-7a0e-d7d4-68384e3af6c5.png differ diff --git a/modules/EcmProducts/QRcodes/161d9fc8-dd40-54fc-064d-666ac20d4188.png b/modules/EcmProducts/QRcodes/161d9fc8-dd40-54fc-064d-666ac20d4188.png index 22ff3237..cbe06d17 100644 Binary files a/modules/EcmProducts/QRcodes/161d9fc8-dd40-54fc-064d-666ac20d4188.png and b/modules/EcmProducts/QRcodes/161d9fc8-dd40-54fc-064d-666ac20d4188.png differ diff --git a/modules/EcmProducts/QRcodes/18261bea-e61c-cf68-5030-67f52e19dedf.png b/modules/EcmProducts/QRcodes/18261bea-e61c-cf68-5030-67f52e19dedf.png index 8b3a2725..f21acf09 100644 Binary files a/modules/EcmProducts/QRcodes/18261bea-e61c-cf68-5030-67f52e19dedf.png and b/modules/EcmProducts/QRcodes/18261bea-e61c-cf68-5030-67f52e19dedf.png differ diff --git a/modules/EcmProducts/QRcodes/1b2f6a77-058d-566e-9ded-6839a73fb230.png b/modules/EcmProducts/QRcodes/1b2f6a77-058d-566e-9ded-6839a73fb230.png index 2b9c3613..c76882b7 100644 Binary files a/modules/EcmProducts/QRcodes/1b2f6a77-058d-566e-9ded-6839a73fb230.png and b/modules/EcmProducts/QRcodes/1b2f6a77-058d-566e-9ded-6839a73fb230.png differ diff --git a/modules/EcmProducts/QRcodes/1ced59b9-6f8a-5dc3-6738-6671395f270b.png b/modules/EcmProducts/QRcodes/1ced59b9-6f8a-5dc3-6738-6671395f270b.png index bb4c2f71..fe4c7a20 100644 Binary files a/modules/EcmProducts/QRcodes/1ced59b9-6f8a-5dc3-6738-6671395f270b.png and b/modules/EcmProducts/QRcodes/1ced59b9-6f8a-5dc3-6738-6671395f270b.png differ diff --git a/modules/EcmProducts/QRcodes/1db20a83-a083-ab1a-cb91-6784f54bed1f.png b/modules/EcmProducts/QRcodes/1db20a83-a083-ab1a-cb91-6784f54bed1f.png index 216d4403..86b1f59f 100644 Binary files a/modules/EcmProducts/QRcodes/1db20a83-a083-ab1a-cb91-6784f54bed1f.png and b/modules/EcmProducts/QRcodes/1db20a83-a083-ab1a-cb91-6784f54bed1f.png differ diff --git a/modules/EcmProducts/QRcodes/1e4ccae7-8f0b-0ffe-9745-679c850a1e72.png b/modules/EcmProducts/QRcodes/1e4ccae7-8f0b-0ffe-9745-679c850a1e72.png index 7f62fef5..54549a11 100644 Binary files a/modules/EcmProducts/QRcodes/1e4ccae7-8f0b-0ffe-9745-679c850a1e72.png and b/modules/EcmProducts/QRcodes/1e4ccae7-8f0b-0ffe-9745-679c850a1e72.png differ diff --git a/modules/EcmProducts/QRcodes/1edc137c-e82e-56d5-bd47-5c00f5715a3c.png b/modules/EcmProducts/QRcodes/1edc137c-e82e-56d5-bd47-5c00f5715a3c.png index ea5365a4..c188d338 100644 Binary files a/modules/EcmProducts/QRcodes/1edc137c-e82e-56d5-bd47-5c00f5715a3c.png and b/modules/EcmProducts/QRcodes/1edc137c-e82e-56d5-bd47-5c00f5715a3c.png differ diff --git a/modules/EcmProducts/QRcodes/20e3f128-ffcb-34ce-e4c3-66728a21184b.png b/modules/EcmProducts/QRcodes/20e3f128-ffcb-34ce-e4c3-66728a21184b.png index 17d880c6..def8d008 100644 Binary files a/modules/EcmProducts/QRcodes/20e3f128-ffcb-34ce-e4c3-66728a21184b.png and b/modules/EcmProducts/QRcodes/20e3f128-ffcb-34ce-e4c3-66728a21184b.png differ diff --git a/modules/EcmProducts/QRcodes/23809083-b160-363a-8c30-6819b2b6844c.png b/modules/EcmProducts/QRcodes/23809083-b160-363a-8c30-6819b2b6844c.png index b263973b..d145b0dd 100644 Binary files a/modules/EcmProducts/QRcodes/23809083-b160-363a-8c30-6819b2b6844c.png and b/modules/EcmProducts/QRcodes/23809083-b160-363a-8c30-6819b2b6844c.png differ diff --git a/modules/EcmProducts/QRcodes/252bc2b2-e260-98cb-318a-5ef5de3d80f7.png b/modules/EcmProducts/QRcodes/252bc2b2-e260-98cb-318a-5ef5de3d80f7.png index e861c813..cc79d232 100644 Binary files a/modules/EcmProducts/QRcodes/252bc2b2-e260-98cb-318a-5ef5de3d80f7.png and b/modules/EcmProducts/QRcodes/252bc2b2-e260-98cb-318a-5ef5de3d80f7.png differ diff --git a/modules/EcmProducts/QRcodes/255b5885-c8e0-8414-8f47-676e65602420.png b/modules/EcmProducts/QRcodes/255b5885-c8e0-8414-8f47-676e65602420.png index 10dc5f86..3a941a4a 100644 Binary files a/modules/EcmProducts/QRcodes/255b5885-c8e0-8414-8f47-676e65602420.png and b/modules/EcmProducts/QRcodes/255b5885-c8e0-8414-8f47-676e65602420.png differ diff --git a/modules/EcmProducts/QRcodes/274e160a-67bf-272f-80cd-52302b1cbb4d.png b/modules/EcmProducts/QRcodes/274e160a-67bf-272f-80cd-52302b1cbb4d.png index e2cb0961..fb049ff9 100644 Binary files a/modules/EcmProducts/QRcodes/274e160a-67bf-272f-80cd-52302b1cbb4d.png and b/modules/EcmProducts/QRcodes/274e160a-67bf-272f-80cd-52302b1cbb4d.png differ diff --git a/modules/EcmProducts/QRcodes/280e0f96-9dc8-5906-cd2a-66dac21f58c9.png b/modules/EcmProducts/QRcodes/280e0f96-9dc8-5906-cd2a-66dac21f58c9.png index 00aed973..06989624 100644 Binary files a/modules/EcmProducts/QRcodes/280e0f96-9dc8-5906-cd2a-66dac21f58c9.png and b/modules/EcmProducts/QRcodes/280e0f96-9dc8-5906-cd2a-66dac21f58c9.png differ diff --git a/modules/EcmProducts/QRcodes/2a00975b-4698-cb1a-ec91-61f28dd233e8.png b/modules/EcmProducts/QRcodes/2a00975b-4698-cb1a-ec91-61f28dd233e8.png index 566805f1..92677504 100644 Binary files a/modules/EcmProducts/QRcodes/2a00975b-4698-cb1a-ec91-61f28dd233e8.png and b/modules/EcmProducts/QRcodes/2a00975b-4698-cb1a-ec91-61f28dd233e8.png differ diff --git a/modules/EcmProducts/QRcodes/2af60c9a-6e06-fa8a-65c5-68370dc11f8f.png b/modules/EcmProducts/QRcodes/2af60c9a-6e06-fa8a-65c5-68370dc11f8f.png index e4c4e4d2..43ebe9df 100644 Binary files a/modules/EcmProducts/QRcodes/2af60c9a-6e06-fa8a-65c5-68370dc11f8f.png and b/modules/EcmProducts/QRcodes/2af60c9a-6e06-fa8a-65c5-68370dc11f8f.png differ diff --git a/modules/EcmProducts/QRcodes/2b42b56d-af1d-ebdb-bdcb-6801ea2adcbe.png b/modules/EcmProducts/QRcodes/2b42b56d-af1d-ebdb-bdcb-6801ea2adcbe.png index 3071d4ca..e57f0fbc 100644 Binary files a/modules/EcmProducts/QRcodes/2b42b56d-af1d-ebdb-bdcb-6801ea2adcbe.png and b/modules/EcmProducts/QRcodes/2b42b56d-af1d-ebdb-bdcb-6801ea2adcbe.png differ diff --git a/modules/EcmProducts/QRcodes/2e339905-b122-7558-2bb7-66f14c757502.png b/modules/EcmProducts/QRcodes/2e339905-b122-7558-2bb7-66f14c757502.png index ebef09f0..d9e9aa9a 100644 Binary files a/modules/EcmProducts/QRcodes/2e339905-b122-7558-2bb7-66f14c757502.png and b/modules/EcmProducts/QRcodes/2e339905-b122-7558-2bb7-66f14c757502.png differ diff --git a/modules/EcmProducts/QRcodes/2fd8a4b6-38ac-46c6-9892-668e474bb712.png b/modules/EcmProducts/QRcodes/2fd8a4b6-38ac-46c6-9892-668e474bb712.png index 31cb7634..72f4511c 100644 Binary files a/modules/EcmProducts/QRcodes/2fd8a4b6-38ac-46c6-9892-668e474bb712.png and b/modules/EcmProducts/QRcodes/2fd8a4b6-38ac-46c6-9892-668e474bb712.png differ diff --git a/modules/EcmProducts/QRcodes/326c6207-0a98-eb97-0ea3-609295a2cc31.png b/modules/EcmProducts/QRcodes/326c6207-0a98-eb97-0ea3-609295a2cc31.png index 92f3dacd..3e15bfb8 100644 Binary files a/modules/EcmProducts/QRcodes/326c6207-0a98-eb97-0ea3-609295a2cc31.png and b/modules/EcmProducts/QRcodes/326c6207-0a98-eb97-0ea3-609295a2cc31.png differ diff --git a/modules/EcmProducts/QRcodes/34b688c2-33e2-29eb-67e7-4e4a393943f9.png b/modules/EcmProducts/QRcodes/34b688c2-33e2-29eb-67e7-4e4a393943f9.png index f5b3cc96..63c97b49 100644 Binary files a/modules/EcmProducts/QRcodes/34b688c2-33e2-29eb-67e7-4e4a393943f9.png and b/modules/EcmProducts/QRcodes/34b688c2-33e2-29eb-67e7-4e4a393943f9.png differ diff --git a/modules/EcmProducts/QRcodes/37874195-1f3a-54ee-3541-672a07b6605c.png b/modules/EcmProducts/QRcodes/37874195-1f3a-54ee-3541-672a07b6605c.png index f3275aa7..edf698c7 100644 Binary files a/modules/EcmProducts/QRcodes/37874195-1f3a-54ee-3541-672a07b6605c.png and b/modules/EcmProducts/QRcodes/37874195-1f3a-54ee-3541-672a07b6605c.png differ diff --git a/modules/EcmProducts/QRcodes/3b2bd731-9711-dae5-4e2d-67239f8891c8.png b/modules/EcmProducts/QRcodes/3b2bd731-9711-dae5-4e2d-67239f8891c8.png index 56f3319f..f99d2948 100644 Binary files a/modules/EcmProducts/QRcodes/3b2bd731-9711-dae5-4e2d-67239f8891c8.png and b/modules/EcmProducts/QRcodes/3b2bd731-9711-dae5-4e2d-67239f8891c8.png differ diff --git a/modules/EcmProducts/QRcodes/3b941bc5-5c72-9e59-076e-6486da720403.png b/modules/EcmProducts/QRcodes/3b941bc5-5c72-9e59-076e-6486da720403.png index 63b150cf..81214bb4 100644 Binary files a/modules/EcmProducts/QRcodes/3b941bc5-5c72-9e59-076e-6486da720403.png and b/modules/EcmProducts/QRcodes/3b941bc5-5c72-9e59-076e-6486da720403.png differ diff --git a/modules/EcmProducts/QRcodes/3d84d6b0-cbe6-ffd3-5e95-60868bd701aa.png b/modules/EcmProducts/QRcodes/3d84d6b0-cbe6-ffd3-5e95-60868bd701aa.png index dbce1819..16ab4702 100644 Binary files a/modules/EcmProducts/QRcodes/3d84d6b0-cbe6-ffd3-5e95-60868bd701aa.png and b/modules/EcmProducts/QRcodes/3d84d6b0-cbe6-ffd3-5e95-60868bd701aa.png differ diff --git a/modules/EcmProducts/QRcodes/3e7de7c7-748f-1e3a-fb59-686cb737ed3e.png b/modules/EcmProducts/QRcodes/3e7de7c7-748f-1e3a-fb59-686cb737ed3e.png new file mode 100644 index 00000000..01429b67 Binary files /dev/null and b/modules/EcmProducts/QRcodes/3e7de7c7-748f-1e3a-fb59-686cb737ed3e.png differ diff --git a/modules/EcmProducts/QRcodes/40192c96-5cd5-b255-f3e2-5e70999230a2.png b/modules/EcmProducts/QRcodes/40192c96-5cd5-b255-f3e2-5e70999230a2.png index 0ef094c6..2106019b 100644 Binary files a/modules/EcmProducts/QRcodes/40192c96-5cd5-b255-f3e2-5e70999230a2.png and b/modules/EcmProducts/QRcodes/40192c96-5cd5-b255-f3e2-5e70999230a2.png differ diff --git a/modules/EcmProducts/QRcodes/40ddd802-c0db-4dc0-0614-6405be03a747.png b/modules/EcmProducts/QRcodes/40ddd802-c0db-4dc0-0614-6405be03a747.png index c104cdb3..e5b45090 100644 Binary files a/modules/EcmProducts/QRcodes/40ddd802-c0db-4dc0-0614-6405be03a747.png and b/modules/EcmProducts/QRcodes/40ddd802-c0db-4dc0-0614-6405be03a747.png differ diff --git a/modules/EcmProducts/QRcodes/4197d3b2-6cad-2dc5-2efc-67e66ad4718e.png b/modules/EcmProducts/QRcodes/4197d3b2-6cad-2dc5-2efc-67e66ad4718e.png index 78f3559c..2f94d4a7 100644 Binary files a/modules/EcmProducts/QRcodes/4197d3b2-6cad-2dc5-2efc-67e66ad4718e.png and b/modules/EcmProducts/QRcodes/4197d3b2-6cad-2dc5-2efc-67e66ad4718e.png differ diff --git a/modules/EcmProducts/QRcodes/44207b1a-5658-456c-92f3-66b48d835e38.png b/modules/EcmProducts/QRcodes/44207b1a-5658-456c-92f3-66b48d835e38.png index d32d98ed..f04161a6 100644 Binary files a/modules/EcmProducts/QRcodes/44207b1a-5658-456c-92f3-66b48d835e38.png and b/modules/EcmProducts/QRcodes/44207b1a-5658-456c-92f3-66b48d835e38.png differ diff --git a/modules/EcmProducts/QRcodes/463c87c9-66b1-eb50-3d45-674edfed059e.png b/modules/EcmProducts/QRcodes/463c87c9-66b1-eb50-3d45-674edfed059e.png index 4a857080..69625f91 100644 Binary files a/modules/EcmProducts/QRcodes/463c87c9-66b1-eb50-3d45-674edfed059e.png and b/modules/EcmProducts/QRcodes/463c87c9-66b1-eb50-3d45-674edfed059e.png differ diff --git a/modules/EcmProducts/QRcodes/4687ff2d-5006-bdf3-2806-678a3b1805a2.png b/modules/EcmProducts/QRcodes/4687ff2d-5006-bdf3-2806-678a3b1805a2.png index a7910c2a..c445bcd5 100644 Binary files a/modules/EcmProducts/QRcodes/4687ff2d-5006-bdf3-2806-678a3b1805a2.png and b/modules/EcmProducts/QRcodes/4687ff2d-5006-bdf3-2806-678a3b1805a2.png differ diff --git a/modules/EcmProducts/QRcodes/4bc32f98-e12d-5531-020c-6866732eac6f.png b/modules/EcmProducts/QRcodes/4bc32f98-e12d-5531-020c-6866732eac6f.png index de573eeb..793f6748 100644 Binary files a/modules/EcmProducts/QRcodes/4bc32f98-e12d-5531-020c-6866732eac6f.png and b/modules/EcmProducts/QRcodes/4bc32f98-e12d-5531-020c-6866732eac6f.png differ diff --git a/modules/EcmProducts/QRcodes/4dbd2c35-1a8d-9f14-13e1-606d5f56f066.png b/modules/EcmProducts/QRcodes/4dbd2c35-1a8d-9f14-13e1-606d5f56f066.png index 9cc21675..5ee19b78 100644 Binary files a/modules/EcmProducts/QRcodes/4dbd2c35-1a8d-9f14-13e1-606d5f56f066.png and b/modules/EcmProducts/QRcodes/4dbd2c35-1a8d-9f14-13e1-606d5f56f066.png differ diff --git a/modules/EcmProducts/QRcodes/4e16df48-490e-6f9c-4287-67f660754a0b.png b/modules/EcmProducts/QRcodes/4e16df48-490e-6f9c-4287-67f660754a0b.png index e664302b..be60ef32 100644 Binary files a/modules/EcmProducts/QRcodes/4e16df48-490e-6f9c-4287-67f660754a0b.png and b/modules/EcmProducts/QRcodes/4e16df48-490e-6f9c-4287-67f660754a0b.png differ diff --git a/modules/EcmProducts/QRcodes/4e896cb3-27d7-5b17-7323-6839a41098d7.png b/modules/EcmProducts/QRcodes/4e896cb3-27d7-5b17-7323-6839a41098d7.png index 213e5b0b..40dd248c 100644 Binary files a/modules/EcmProducts/QRcodes/4e896cb3-27d7-5b17-7323-6839a41098d7.png and b/modules/EcmProducts/QRcodes/4e896cb3-27d7-5b17-7323-6839a41098d7.png differ diff --git a/modules/EcmProducts/QRcodes/4ea7c5f5-c713-9915-b37f-6374c9dc1c6e.png b/modules/EcmProducts/QRcodes/4ea7c5f5-c713-9915-b37f-6374c9dc1c6e.png index 871387e0..ba425b43 100644 Binary files a/modules/EcmProducts/QRcodes/4ea7c5f5-c713-9915-b37f-6374c9dc1c6e.png and b/modules/EcmProducts/QRcodes/4ea7c5f5-c713-9915-b37f-6374c9dc1c6e.png differ diff --git a/modules/EcmProducts/QRcodes/4efa42e0-4e13-2dfa-227c-66964718d3ef.png b/modules/EcmProducts/QRcodes/4efa42e0-4e13-2dfa-227c-66964718d3ef.png index e7615433..69353be6 100644 Binary files a/modules/EcmProducts/QRcodes/4efa42e0-4e13-2dfa-227c-66964718d3ef.png and b/modules/EcmProducts/QRcodes/4efa42e0-4e13-2dfa-227c-66964718d3ef.png differ diff --git a/modules/EcmProducts/QRcodes/527aab56-ce5d-5125-5b22-66bb3e2016aa.png b/modules/EcmProducts/QRcodes/527aab56-ce5d-5125-5b22-66bb3e2016aa.png index 7c0ecdbe..b37fff66 100644 Binary files a/modules/EcmProducts/QRcodes/527aab56-ce5d-5125-5b22-66bb3e2016aa.png and b/modules/EcmProducts/QRcodes/527aab56-ce5d-5125-5b22-66bb3e2016aa.png differ diff --git a/modules/EcmProducts/QRcodes/563.png b/modules/EcmProducts/QRcodes/563.png index 57634001..f085e557 100644 Binary files a/modules/EcmProducts/QRcodes/563.png and b/modules/EcmProducts/QRcodes/563.png differ diff --git a/modules/EcmProducts/QRcodes/57170bc1-1de1-6618-1e04-67f65fe22ced.png b/modules/EcmProducts/QRcodes/57170bc1-1de1-6618-1e04-67f65fe22ced.png index 8bcb5ccc..59a7fc1c 100644 Binary files a/modules/EcmProducts/QRcodes/57170bc1-1de1-6618-1e04-67f65fe22ced.png and b/modules/EcmProducts/QRcodes/57170bc1-1de1-6618-1e04-67f65fe22ced.png differ diff --git a/modules/EcmProducts/QRcodes/576290f1-996e-6570-635d-67fe3b66f2cf.png b/modules/EcmProducts/QRcodes/576290f1-996e-6570-635d-67fe3b66f2cf.png index c4c58595..d9b2bc82 100644 Binary files a/modules/EcmProducts/QRcodes/576290f1-996e-6570-635d-67fe3b66f2cf.png and b/modules/EcmProducts/QRcodes/576290f1-996e-6570-635d-67fe3b66f2cf.png differ diff --git a/modules/EcmProducts/QRcodes/580c9c46-fc44-3e4d-2521-6411d41e454c.png b/modules/EcmProducts/QRcodes/580c9c46-fc44-3e4d-2521-6411d41e454c.png index 169a0383..1af818b1 100644 Binary files a/modules/EcmProducts/QRcodes/580c9c46-fc44-3e4d-2521-6411d41e454c.png and b/modules/EcmProducts/QRcodes/580c9c46-fc44-3e4d-2521-6411d41e454c.png differ diff --git a/modules/EcmProducts/QRcodes/598e03b0-680a-5a42-f5ad-58d252e1e5c9.png b/modules/EcmProducts/QRcodes/598e03b0-680a-5a42-f5ad-58d252e1e5c9.png index 2ddee971..663cea85 100644 Binary files a/modules/EcmProducts/QRcodes/598e03b0-680a-5a42-f5ad-58d252e1e5c9.png and b/modules/EcmProducts/QRcodes/598e03b0-680a-5a42-f5ad-58d252e1e5c9.png differ diff --git a/modules/EcmProducts/QRcodes/5bd5a4a0-be5e-609f-ed3a-4e3be4ef576e.png b/modules/EcmProducts/QRcodes/5bd5a4a0-be5e-609f-ed3a-4e3be4ef576e.png index add098ce..e299b347 100644 Binary files a/modules/EcmProducts/QRcodes/5bd5a4a0-be5e-609f-ed3a-4e3be4ef576e.png and b/modules/EcmProducts/QRcodes/5bd5a4a0-be5e-609f-ed3a-4e3be4ef576e.png differ diff --git a/modules/EcmProducts/QRcodes/5c2b7112-95a9-4edf-4b82-5a2a4ce56865.png b/modules/EcmProducts/QRcodes/5c2b7112-95a9-4edf-4b82-5a2a4ce56865.png index d92e0d7b..d5a66152 100644 Binary files a/modules/EcmProducts/QRcodes/5c2b7112-95a9-4edf-4b82-5a2a4ce56865.png and b/modules/EcmProducts/QRcodes/5c2b7112-95a9-4edf-4b82-5a2a4ce56865.png differ diff --git a/modules/EcmProducts/QRcodes/5cb20da9-da44-3bd2-3dc7-5b34a93264cd.png b/modules/EcmProducts/QRcodes/5cb20da9-da44-3bd2-3dc7-5b34a93264cd.png index afebcb59..6f22d812 100644 Binary files a/modules/EcmProducts/QRcodes/5cb20da9-da44-3bd2-3dc7-5b34a93264cd.png and b/modules/EcmProducts/QRcodes/5cb20da9-da44-3bd2-3dc7-5b34a93264cd.png differ diff --git a/modules/EcmProducts/QRcodes/5d44059d-8c88-0932-6dbb-52b15e4f1036.png b/modules/EcmProducts/QRcodes/5d44059d-8c88-0932-6dbb-52b15e4f1036.png index 4660d68d..1b1d2f5d 100644 Binary files a/modules/EcmProducts/QRcodes/5d44059d-8c88-0932-6dbb-52b15e4f1036.png and b/modules/EcmProducts/QRcodes/5d44059d-8c88-0932-6dbb-52b15e4f1036.png differ diff --git a/modules/EcmProducts/QRcodes/5deca060-8f21-ff74-2c82-67d92316cd3b.png b/modules/EcmProducts/QRcodes/5deca060-8f21-ff74-2c82-67d92316cd3b.png index 1e410a6b..1cbd3ee0 100644 Binary files a/modules/EcmProducts/QRcodes/5deca060-8f21-ff74-2c82-67d92316cd3b.png and b/modules/EcmProducts/QRcodes/5deca060-8f21-ff74-2c82-67d92316cd3b.png differ diff --git a/modules/EcmProducts/QRcodes/5e493ed8-487b-6082-8c85-65c491911380.png b/modules/EcmProducts/QRcodes/5e493ed8-487b-6082-8c85-65c491911380.png index 26875cb4..94cb5b62 100644 Binary files a/modules/EcmProducts/QRcodes/5e493ed8-487b-6082-8c85-65c491911380.png and b/modules/EcmProducts/QRcodes/5e493ed8-487b-6082-8c85-65c491911380.png differ diff --git a/modules/EcmProducts/QRcodes/5fd8de7f-57b1-bc1a-8e08-52302b036908.png b/modules/EcmProducts/QRcodes/5fd8de7f-57b1-bc1a-8e08-52302b036908.png index 73673e55..e0bcc2e2 100644 Binary files a/modules/EcmProducts/QRcodes/5fd8de7f-57b1-bc1a-8e08-52302b036908.png and b/modules/EcmProducts/QRcodes/5fd8de7f-57b1-bc1a-8e08-52302b036908.png differ diff --git a/modules/EcmProducts/QRcodes/5ffbc23a-ed3d-3cc1-1d1a-679c7b7c6aa7.png b/modules/EcmProducts/QRcodes/5ffbc23a-ed3d-3cc1-1d1a-679c7b7c6aa7.png index bf4176e2..2587cd0a 100644 Binary files a/modules/EcmProducts/QRcodes/5ffbc23a-ed3d-3cc1-1d1a-679c7b7c6aa7.png and b/modules/EcmProducts/QRcodes/5ffbc23a-ed3d-3cc1-1d1a-679c7b7c6aa7.png differ diff --git a/modules/EcmProducts/QRcodes/60c42236-5e7d-24fe-8d5c-65a7e8bbf7d8.png b/modules/EcmProducts/QRcodes/60c42236-5e7d-24fe-8d5c-65a7e8bbf7d8.png index d2e7fabc..d4c419c9 100644 Binary files a/modules/EcmProducts/QRcodes/60c42236-5e7d-24fe-8d5c-65a7e8bbf7d8.png and b/modules/EcmProducts/QRcodes/60c42236-5e7d-24fe-8d5c-65a7e8bbf7d8.png differ diff --git a/modules/EcmProducts/QRcodes/62d131ea-17b5-ec06-22b9-68527f45228c.png b/modules/EcmProducts/QRcodes/62d131ea-17b5-ec06-22b9-68527f45228c.png index 6609ea9f..7ed6fff7 100644 Binary files a/modules/EcmProducts/QRcodes/62d131ea-17b5-ec06-22b9-68527f45228c.png and b/modules/EcmProducts/QRcodes/62d131ea-17b5-ec06-22b9-68527f45228c.png differ diff --git a/modules/EcmProducts/QRcodes/6672e0e9-d466-7f03-115f-684fc3b081d5.png b/modules/EcmProducts/QRcodes/6672e0e9-d466-7f03-115f-684fc3b081d5.png index 0b1b7b40..43ce3619 100644 Binary files a/modules/EcmProducts/QRcodes/6672e0e9-d466-7f03-115f-684fc3b081d5.png and b/modules/EcmProducts/QRcodes/6672e0e9-d466-7f03-115f-684fc3b081d5.png differ diff --git a/modules/EcmProducts/QRcodes/6830c857-d992-db2c-69fc-677e9129f4fb.png b/modules/EcmProducts/QRcodes/6830c857-d992-db2c-69fc-677e9129f4fb.png index cd23b6ce..cc9ec2ce 100644 Binary files a/modules/EcmProducts/QRcodes/6830c857-d992-db2c-69fc-677e9129f4fb.png and b/modules/EcmProducts/QRcodes/6830c857-d992-db2c-69fc-677e9129f4fb.png differ diff --git a/modules/EcmProducts/QRcodes/68e1a4fb-1540-50fa-5b06-678e6967ccd9.png b/modules/EcmProducts/QRcodes/68e1a4fb-1540-50fa-5b06-678e6967ccd9.png index 6e77f9c3..b1d7923c 100644 Binary files a/modules/EcmProducts/QRcodes/68e1a4fb-1540-50fa-5b06-678e6967ccd9.png and b/modules/EcmProducts/QRcodes/68e1a4fb-1540-50fa-5b06-678e6967ccd9.png differ diff --git a/modules/EcmProducts/QRcodes/6955b992-29c9-21fe-c966-5b34880dec58.png b/modules/EcmProducts/QRcodes/6955b992-29c9-21fe-c966-5b34880dec58.png index 239eb391..e3e630c9 100644 Binary files a/modules/EcmProducts/QRcodes/6955b992-29c9-21fe-c966-5b34880dec58.png and b/modules/EcmProducts/QRcodes/6955b992-29c9-21fe-c966-5b34880dec58.png differ diff --git a/modules/EcmProducts/QRcodes/6994c82e-ef58-9959-a023-660fe8146461.png b/modules/EcmProducts/QRcodes/6994c82e-ef58-9959-a023-660fe8146461.png index 70385cc7..165317bd 100644 Binary files a/modules/EcmProducts/QRcodes/6994c82e-ef58-9959-a023-660fe8146461.png and b/modules/EcmProducts/QRcodes/6994c82e-ef58-9959-a023-660fe8146461.png differ diff --git a/modules/EcmProducts/QRcodes/69c833e7-a384-8345-c411-67dc2ba3ad26.png b/modules/EcmProducts/QRcodes/69c833e7-a384-8345-c411-67dc2ba3ad26.png index f7a92130..6e91c307 100644 Binary files a/modules/EcmProducts/QRcodes/69c833e7-a384-8345-c411-67dc2ba3ad26.png and b/modules/EcmProducts/QRcodes/69c833e7-a384-8345-c411-67dc2ba3ad26.png differ diff --git a/modules/EcmProducts/QRcodes/6b3bde62-ed90-321d-f259-52b15fa8a6f8.png b/modules/EcmProducts/QRcodes/6b3bde62-ed90-321d-f259-52b15fa8a6f8.png index bcde4583..ae0491a3 100644 Binary files a/modules/EcmProducts/QRcodes/6b3bde62-ed90-321d-f259-52b15fa8a6f8.png and b/modules/EcmProducts/QRcodes/6b3bde62-ed90-321d-f259-52b15fa8a6f8.png differ diff --git a/modules/EcmProducts/QRcodes/6c7ccf79-c1b4-2113-8a35-6364a5878926.png b/modules/EcmProducts/QRcodes/6c7ccf79-c1b4-2113-8a35-6364a5878926.png index 4fcc9194..67c76c61 100644 Binary files a/modules/EcmProducts/QRcodes/6c7ccf79-c1b4-2113-8a35-6364a5878926.png and b/modules/EcmProducts/QRcodes/6c7ccf79-c1b4-2113-8a35-6364a5878926.png differ diff --git a/modules/EcmProducts/QRcodes/6ede443c-94e5-2879-0e9c-6672892ed7fb.png b/modules/EcmProducts/QRcodes/6ede443c-94e5-2879-0e9c-6672892ed7fb.png index f934c251..4bc67d75 100644 Binary files a/modules/EcmProducts/QRcodes/6ede443c-94e5-2879-0e9c-6672892ed7fb.png and b/modules/EcmProducts/QRcodes/6ede443c-94e5-2879-0e9c-6672892ed7fb.png differ diff --git a/modules/EcmProducts/QRcodes/6f46fcdb-5b4c-24bc-f78d-62a963314be5.png b/modules/EcmProducts/QRcodes/6f46fcdb-5b4c-24bc-f78d-62a963314be5.png index fb25efa0..4442f6bd 100644 Binary files a/modules/EcmProducts/QRcodes/6f46fcdb-5b4c-24bc-f78d-62a963314be5.png and b/modules/EcmProducts/QRcodes/6f46fcdb-5b4c-24bc-f78d-62a963314be5.png differ diff --git a/modules/EcmProducts/QRcodes/735c0394-3999-b593-bc4d-685d29db6b40.png b/modules/EcmProducts/QRcodes/735c0394-3999-b593-bc4d-685d29db6b40.png index 89559d02..6552d243 100644 Binary files a/modules/EcmProducts/QRcodes/735c0394-3999-b593-bc4d-685d29db6b40.png and b/modules/EcmProducts/QRcodes/735c0394-3999-b593-bc4d-685d29db6b40.png differ diff --git a/modules/EcmProducts/QRcodes/74872376-489b-efed-0cf4-660fe9ef6d6f.png b/modules/EcmProducts/QRcodes/74872376-489b-efed-0cf4-660fe9ef6d6f.png index 584fbe0f..b8a59aef 100644 Binary files a/modules/EcmProducts/QRcodes/74872376-489b-efed-0cf4-660fe9ef6d6f.png and b/modules/EcmProducts/QRcodes/74872376-489b-efed-0cf4-660fe9ef6d6f.png differ diff --git a/modules/EcmProducts/QRcodes/75955d3f-a654-73d8-002d-663b42431428.png b/modules/EcmProducts/QRcodes/75955d3f-a654-73d8-002d-663b42431428.png index 8f5b3aac..af0798d5 100644 Binary files a/modules/EcmProducts/QRcodes/75955d3f-a654-73d8-002d-663b42431428.png and b/modules/EcmProducts/QRcodes/75955d3f-a654-73d8-002d-663b42431428.png differ diff --git a/modules/EcmProducts/QRcodes/76b1effe-9e76-6ea1-c4b3-6752c5b11d31.png b/modules/EcmProducts/QRcodes/76b1effe-9e76-6ea1-c4b3-6752c5b11d31.png index c8dd63ed..352b8e51 100644 Binary files a/modules/EcmProducts/QRcodes/76b1effe-9e76-6ea1-c4b3-6752c5b11d31.png and b/modules/EcmProducts/QRcodes/76b1effe-9e76-6ea1-c4b3-6752c5b11d31.png differ diff --git a/modules/EcmProducts/QRcodes/77af2973-f7f9-df38-51e2-632923c96bf7.png b/modules/EcmProducts/QRcodes/77af2973-f7f9-df38-51e2-632923c96bf7.png index 977916e5..19d06e02 100644 Binary files a/modules/EcmProducts/QRcodes/77af2973-f7f9-df38-51e2-632923c96bf7.png and b/modules/EcmProducts/QRcodes/77af2973-f7f9-df38-51e2-632923c96bf7.png differ diff --git a/modules/EcmProducts/QRcodes/7a3aa1e2-19b3-dd5a-7874-67e1b9ffe5f5.png b/modules/EcmProducts/QRcodes/7a3aa1e2-19b3-dd5a-7874-67e1b9ffe5f5.png index ebf49415..dc34b027 100644 Binary files a/modules/EcmProducts/QRcodes/7a3aa1e2-19b3-dd5a-7874-67e1b9ffe5f5.png and b/modules/EcmProducts/QRcodes/7a3aa1e2-19b3-dd5a-7874-67e1b9ffe5f5.png differ diff --git a/modules/EcmProducts/QRcodes/7ab2daa3-317e-ddbd-c1a5-58e7821956c7.png b/modules/EcmProducts/QRcodes/7ab2daa3-317e-ddbd-c1a5-58e7821956c7.png index fc64adc3..fc6d8139 100644 Binary files a/modules/EcmProducts/QRcodes/7ab2daa3-317e-ddbd-c1a5-58e7821956c7.png and b/modules/EcmProducts/QRcodes/7ab2daa3-317e-ddbd-c1a5-58e7821956c7.png differ diff --git a/modules/EcmProducts/QRcodes/7cb54144-ad20-0e06-8d79-5fd22df7b2f0.png b/modules/EcmProducts/QRcodes/7cb54144-ad20-0e06-8d79-5fd22df7b2f0.png index fdd85573..76180211 100644 Binary files a/modules/EcmProducts/QRcodes/7cb54144-ad20-0e06-8d79-5fd22df7b2f0.png and b/modules/EcmProducts/QRcodes/7cb54144-ad20-0e06-8d79-5fd22df7b2f0.png differ diff --git a/modules/EcmProducts/QRcodes/7da6fa9a-0dca-c5ed-3af8-60868c1cd19b.png b/modules/EcmProducts/QRcodes/7da6fa9a-0dca-c5ed-3af8-60868c1cd19b.png index 37ea29cc..610b6ff1 100644 Binary files a/modules/EcmProducts/QRcodes/7da6fa9a-0dca-c5ed-3af8-60868c1cd19b.png and b/modules/EcmProducts/QRcodes/7da6fa9a-0dca-c5ed-3af8-60868c1cd19b.png differ diff --git a/modules/EcmProducts/QRcodes/7e0aa934-88a4-3ff9-9fc9-6808d9179874.png b/modules/EcmProducts/QRcodes/7e0aa934-88a4-3ff9-9fc9-6808d9179874.png index 554555f3..94fbc9e9 100644 Binary files a/modules/EcmProducts/QRcodes/7e0aa934-88a4-3ff9-9fc9-6808d9179874.png and b/modules/EcmProducts/QRcodes/7e0aa934-88a4-3ff9-9fc9-6808d9179874.png differ diff --git a/modules/EcmProducts/QRcodes/8219ff87-d39a-9d84-f2c3-66964490f7f8.png b/modules/EcmProducts/QRcodes/8219ff87-d39a-9d84-f2c3-66964490f7f8.png index cad5767b..09f632cc 100644 Binary files a/modules/EcmProducts/QRcodes/8219ff87-d39a-9d84-f2c3-66964490f7f8.png and b/modules/EcmProducts/QRcodes/8219ff87-d39a-9d84-f2c3-66964490f7f8.png differ diff --git a/modules/EcmProducts/QRcodes/8375fe8a-dc7d-5002-057e-59fc8a0d5bb8.png b/modules/EcmProducts/QRcodes/8375fe8a-dc7d-5002-057e-59fc8a0d5bb8.png index c55b2c0a..2c80aeb7 100644 Binary files a/modules/EcmProducts/QRcodes/8375fe8a-dc7d-5002-057e-59fc8a0d5bb8.png and b/modules/EcmProducts/QRcodes/8375fe8a-dc7d-5002-057e-59fc8a0d5bb8.png differ diff --git a/modules/EcmProducts/QRcodes/8407b45a-08d7-a91a-891c-67b83404239d.png b/modules/EcmProducts/QRcodes/8407b45a-08d7-a91a-891c-67b83404239d.png index 819671f0..0cd993d5 100644 Binary files a/modules/EcmProducts/QRcodes/8407b45a-08d7-a91a-891c-67b83404239d.png and b/modules/EcmProducts/QRcodes/8407b45a-08d7-a91a-891c-67b83404239d.png differ diff --git a/modules/EcmProducts/QRcodes/8420fd91-cb3a-c5db-fe5f-660fe99c0d24.png b/modules/EcmProducts/QRcodes/8420fd91-cb3a-c5db-fe5f-660fe99c0d24.png index a48982b1..6206e2c5 100644 Binary files a/modules/EcmProducts/QRcodes/8420fd91-cb3a-c5db-fe5f-660fe99c0d24.png and b/modules/EcmProducts/QRcodes/8420fd91-cb3a-c5db-fe5f-660fe99c0d24.png differ diff --git a/modules/EcmProducts/QRcodes/855dfd33-3890-5929-d1b7-59e851428cf5.png b/modules/EcmProducts/QRcodes/855dfd33-3890-5929-d1b7-59e851428cf5.png index 74961879..07c1c9b7 100644 Binary files a/modules/EcmProducts/QRcodes/855dfd33-3890-5929-d1b7-59e851428cf5.png and b/modules/EcmProducts/QRcodes/855dfd33-3890-5929-d1b7-59e851428cf5.png differ diff --git a/modules/EcmProducts/QRcodes/85b5cb88-6280-4794-3326-52721e1df45f.png b/modules/EcmProducts/QRcodes/85b5cb88-6280-4794-3326-52721e1df45f.png index a714b05c..f5d3550b 100644 Binary files a/modules/EcmProducts/QRcodes/85b5cb88-6280-4794-3326-52721e1df45f.png and b/modules/EcmProducts/QRcodes/85b5cb88-6280-4794-3326-52721e1df45f.png differ diff --git a/modules/EcmProducts/QRcodes/86d1267c-38e1-980a-c1c8-685e87b831d8.png b/modules/EcmProducts/QRcodes/86d1267c-38e1-980a-c1c8-685e87b831d8.png index cf77c0c6..e92f2c0c 100644 Binary files a/modules/EcmProducts/QRcodes/86d1267c-38e1-980a-c1c8-685e87b831d8.png and b/modules/EcmProducts/QRcodes/86d1267c-38e1-980a-c1c8-685e87b831d8.png differ diff --git a/modules/EcmProducts/QRcodes/87323c1c-2440-2f28-e8c2-637f19e5bd15.png b/modules/EcmProducts/QRcodes/87323c1c-2440-2f28-e8c2-637f19e5bd15.png index 71edec21..31cc0a74 100644 Binary files a/modules/EcmProducts/QRcodes/87323c1c-2440-2f28-e8c2-637f19e5bd15.png and b/modules/EcmProducts/QRcodes/87323c1c-2440-2f28-e8c2-637f19e5bd15.png differ diff --git a/modules/EcmProducts/QRcodes/87e43d52-6e2d-1069-de88-4fe1b1e800a3.png b/modules/EcmProducts/QRcodes/87e43d52-6e2d-1069-de88-4fe1b1e800a3.png index 6b4d85c5..b931dfa2 100644 Binary files a/modules/EcmProducts/QRcodes/87e43d52-6e2d-1069-de88-4fe1b1e800a3.png and b/modules/EcmProducts/QRcodes/87e43d52-6e2d-1069-de88-4fe1b1e800a3.png differ diff --git a/modules/EcmProducts/QRcodes/8dbfef36-58ee-b161-e3f2-679c81d13012.png b/modules/EcmProducts/QRcodes/8dbfef36-58ee-b161-e3f2-679c81d13012.png index 3c0756ea..7ee9c7b8 100644 Binary files a/modules/EcmProducts/QRcodes/8dbfef36-58ee-b161-e3f2-679c81d13012.png and b/modules/EcmProducts/QRcodes/8dbfef36-58ee-b161-e3f2-679c81d13012.png differ diff --git a/modules/EcmProducts/QRcodes/8de5035b-c64a-8171-1fa8-6801ec98db7a.png b/modules/EcmProducts/QRcodes/8de5035b-c64a-8171-1fa8-6801ec98db7a.png index 221d46eb..5ead8b61 100644 Binary files a/modules/EcmProducts/QRcodes/8de5035b-c64a-8171-1fa8-6801ec98db7a.png and b/modules/EcmProducts/QRcodes/8de5035b-c64a-8171-1fa8-6801ec98db7a.png differ diff --git a/modules/EcmProducts/QRcodes/92510545-baa7-d56e-67a8-6690e707dbe9.png b/modules/EcmProducts/QRcodes/92510545-baa7-d56e-67a8-6690e707dbe9.png index 16c4f9b0..6c25a90a 100644 Binary files a/modules/EcmProducts/QRcodes/92510545-baa7-d56e-67a8-6690e707dbe9.png and b/modules/EcmProducts/QRcodes/92510545-baa7-d56e-67a8-6690e707dbe9.png differ diff --git a/modules/EcmProducts/QRcodes/93481b8c-74ec-3925-704d-58dba317ed24.png b/modules/EcmProducts/QRcodes/93481b8c-74ec-3925-704d-58dba317ed24.png index fb4321a0..5e9e9b7b 100644 Binary files a/modules/EcmProducts/QRcodes/93481b8c-74ec-3925-704d-58dba317ed24.png and b/modules/EcmProducts/QRcodes/93481b8c-74ec-3925-704d-58dba317ed24.png differ diff --git a/modules/EcmProducts/QRcodes/94436e4e-d7ce-0c50-6a2f-59f6cdfe6af3.png b/modules/EcmProducts/QRcodes/94436e4e-d7ce-0c50-6a2f-59f6cdfe6af3.png index 96a8928c..84e90ec4 100644 Binary files a/modules/EcmProducts/QRcodes/94436e4e-d7ce-0c50-6a2f-59f6cdfe6af3.png and b/modules/EcmProducts/QRcodes/94436e4e-d7ce-0c50-6a2f-59f6cdfe6af3.png differ diff --git a/modules/EcmProducts/QRcodes/954f72da-321c-68f7-fcfa-5d89e940889a.png b/modules/EcmProducts/QRcodes/954f72da-321c-68f7-fcfa-5d89e940889a.png index 18ee7bee..b83f8840 100644 Binary files a/modules/EcmProducts/QRcodes/954f72da-321c-68f7-fcfa-5d89e940889a.png and b/modules/EcmProducts/QRcodes/954f72da-321c-68f7-fcfa-5d89e940889a.png differ diff --git a/modules/EcmProducts/QRcodes/95b838bc-cbb4-fb4a-e652-59f8100a5141.png b/modules/EcmProducts/QRcodes/95b838bc-cbb4-fb4a-e652-59f8100a5141.png index 8937dba9..42599676 100644 Binary files a/modules/EcmProducts/QRcodes/95b838bc-cbb4-fb4a-e652-59f8100a5141.png and b/modules/EcmProducts/QRcodes/95b838bc-cbb4-fb4a-e652-59f8100a5141.png differ diff --git a/modules/EcmProducts/QRcodes/995ebe28-3475-5120-07af-681076f37377.png b/modules/EcmProducts/QRcodes/995ebe28-3475-5120-07af-681076f37377.png index a1821485..90ab035a 100644 Binary files a/modules/EcmProducts/QRcodes/995ebe28-3475-5120-07af-681076f37377.png and b/modules/EcmProducts/QRcodes/995ebe28-3475-5120-07af-681076f37377.png differ diff --git a/modules/EcmProducts/QRcodes/99dfd27f-fa16-ffc1-78c8-6784f52f3083.png b/modules/EcmProducts/QRcodes/99dfd27f-fa16-ffc1-78c8-6784f52f3083.png index b967e693..3d828a03 100644 Binary files a/modules/EcmProducts/QRcodes/99dfd27f-fa16-ffc1-78c8-6784f52f3083.png and b/modules/EcmProducts/QRcodes/99dfd27f-fa16-ffc1-78c8-6784f52f3083.png differ diff --git a/modules/EcmProducts/QRcodes/9a68683c-0f77-2e44-9432-680911015a10.png b/modules/EcmProducts/QRcodes/9a68683c-0f77-2e44-9432-680911015a10.png index e5890bc7..009f40b1 100644 Binary files a/modules/EcmProducts/QRcodes/9a68683c-0f77-2e44-9432-680911015a10.png and b/modules/EcmProducts/QRcodes/9a68683c-0f77-2e44-9432-680911015a10.png differ diff --git a/modules/EcmProducts/QRcodes/9b474b53-2f73-133d-5af0-679c7daf766c.png b/modules/EcmProducts/QRcodes/9b474b53-2f73-133d-5af0-679c7daf766c.png index e17d49ed..e8e26151 100644 Binary files a/modules/EcmProducts/QRcodes/9b474b53-2f73-133d-5af0-679c7daf766c.png and b/modules/EcmProducts/QRcodes/9b474b53-2f73-133d-5af0-679c7daf766c.png differ diff --git a/modules/EcmProducts/QRcodes/9c50a6bc-fe7c-7aa4-5943-5d89e8d9f25f.png b/modules/EcmProducts/QRcodes/9c50a6bc-fe7c-7aa4-5943-5d89e8d9f25f.png index 4db7aba2..f3d6c2b8 100644 Binary files a/modules/EcmProducts/QRcodes/9c50a6bc-fe7c-7aa4-5943-5d89e8d9f25f.png and b/modules/EcmProducts/QRcodes/9c50a6bc-fe7c-7aa4-5943-5d89e8d9f25f.png differ diff --git a/modules/EcmProducts/QRcodes/9dee906f-3626-f969-c147-678f9ac0bc27.png b/modules/EcmProducts/QRcodes/9dee906f-3626-f969-c147-678f9ac0bc27.png index 132e0455..40b97e97 100644 Binary files a/modules/EcmProducts/QRcodes/9dee906f-3626-f969-c147-678f9ac0bc27.png and b/modules/EcmProducts/QRcodes/9dee906f-3626-f969-c147-678f9ac0bc27.png differ diff --git a/modules/EcmProducts/QRcodes/a0380c74-fc89-3984-017f-677e9090fd15.png b/modules/EcmProducts/QRcodes/a0380c74-fc89-3984-017f-677e9090fd15.png index 983fe1f7..30dbe61d 100644 Binary files a/modules/EcmProducts/QRcodes/a0380c74-fc89-3984-017f-677e9090fd15.png and b/modules/EcmProducts/QRcodes/a0380c74-fc89-3984-017f-677e9090fd15.png differ diff --git a/modules/EcmProducts/QRcodes/a3f3afed-9ccc-f312-8ab3-68527fedd79b.png b/modules/EcmProducts/QRcodes/a3f3afed-9ccc-f312-8ab3-68527fedd79b.png index 2f79a881..16d09d3b 100644 Binary files a/modules/EcmProducts/QRcodes/a3f3afed-9ccc-f312-8ab3-68527fedd79b.png and b/modules/EcmProducts/QRcodes/a3f3afed-9ccc-f312-8ab3-68527fedd79b.png differ diff --git a/modules/EcmProducts/QRcodes/a5ca1c48-3c67-146c-f4d5-67dbd542bd4a.png b/modules/EcmProducts/QRcodes/a5ca1c48-3c67-146c-f4d5-67dbd542bd4a.png index 233d3596..ca8b9660 100644 Binary files a/modules/EcmProducts/QRcodes/a5ca1c48-3c67-146c-f4d5-67dbd542bd4a.png and b/modules/EcmProducts/QRcodes/a5ca1c48-3c67-146c-f4d5-67dbd542bd4a.png differ diff --git a/modules/EcmProducts/QRcodes/a61e0ec8-da3d-c023-3182-596efb44ca92.png b/modules/EcmProducts/QRcodes/a61e0ec8-da3d-c023-3182-596efb44ca92.png index 7aacb7b7..c3a04b30 100644 Binary files a/modules/EcmProducts/QRcodes/a61e0ec8-da3d-c023-3182-596efb44ca92.png and b/modules/EcmProducts/QRcodes/a61e0ec8-da3d-c023-3182-596efb44ca92.png differ diff --git a/modules/EcmProducts/QRcodes/a63a1110-d528-0605-6afe-524d12b73fc0.png b/modules/EcmProducts/QRcodes/a63a1110-d528-0605-6afe-524d12b73fc0.png index a53961df..a97e1ad5 100644 Binary files a/modules/EcmProducts/QRcodes/a63a1110-d528-0605-6afe-524d12b73fc0.png and b/modules/EcmProducts/QRcodes/a63a1110-d528-0605-6afe-524d12b73fc0.png differ diff --git a/modules/EcmProducts/QRcodes/a6ec28f8-5ab0-ca0a-5808-5bfe9ef4c9fb.png b/modules/EcmProducts/QRcodes/a6ec28f8-5ab0-ca0a-5808-5bfe9ef4c9fb.png index 078c3cd2..056932d5 100644 Binary files a/modules/EcmProducts/QRcodes/a6ec28f8-5ab0-ca0a-5808-5bfe9ef4c9fb.png and b/modules/EcmProducts/QRcodes/a6ec28f8-5ab0-ca0a-5808-5bfe9ef4c9fb.png differ diff --git a/modules/EcmProducts/QRcodes/aa7a3741-11b0-ecf9-5da7-61f28d668a4f.png b/modules/EcmProducts/QRcodes/aa7a3741-11b0-ecf9-5da7-61f28d668a4f.png index e1063336..797eb02a 100644 Binary files a/modules/EcmProducts/QRcodes/aa7a3741-11b0-ecf9-5da7-61f28d668a4f.png and b/modules/EcmProducts/QRcodes/aa7a3741-11b0-ecf9-5da7-61f28d668a4f.png differ diff --git a/modules/EcmProducts/QRcodes/acd5db10-41e0-49e1-d776-66162ed6032c.png b/modules/EcmProducts/QRcodes/acd5db10-41e0-49e1-d776-66162ed6032c.png index 93295584..75103cc3 100644 Binary files a/modules/EcmProducts/QRcodes/acd5db10-41e0-49e1-d776-66162ed6032c.png and b/modules/EcmProducts/QRcodes/acd5db10-41e0-49e1-d776-66162ed6032c.png differ diff --git a/modules/EcmProducts/QRcodes/af04ba53-c4ff-e72b-8e36-65aa74d137ca.png b/modules/EcmProducts/QRcodes/af04ba53-c4ff-e72b-8e36-65aa74d137ca.png index d553393a..f8161de0 100644 Binary files a/modules/EcmProducts/QRcodes/af04ba53-c4ff-e72b-8e36-65aa74d137ca.png and b/modules/EcmProducts/QRcodes/af04ba53-c4ff-e72b-8e36-65aa74d137ca.png differ diff --git a/modules/EcmProducts/QRcodes/b4381359-a52c-41e7-b84a-5ee0c1fee4f6.png b/modules/EcmProducts/QRcodes/b4381359-a52c-41e7-b84a-5ee0c1fee4f6.png index ce332dc1..e65945df 100644 Binary files a/modules/EcmProducts/QRcodes/b4381359-a52c-41e7-b84a-5ee0c1fee4f6.png and b/modules/EcmProducts/QRcodes/b4381359-a52c-41e7-b84a-5ee0c1fee4f6.png differ diff --git a/modules/EcmProducts/QRcodes/b5129abf-992a-d9b9-5256-6720a012c45d.png b/modules/EcmProducts/QRcodes/b5129abf-992a-d9b9-5256-6720a012c45d.png index f5096931..c0cf6ef9 100644 Binary files a/modules/EcmProducts/QRcodes/b5129abf-992a-d9b9-5256-6720a012c45d.png and b/modules/EcmProducts/QRcodes/b5129abf-992a-d9b9-5256-6720a012c45d.png differ diff --git a/modules/EcmProducts/QRcodes/b54aaa74-3e5e-25af-1abd-4fb654dd88ce.png b/modules/EcmProducts/QRcodes/b54aaa74-3e5e-25af-1abd-4fb654dd88ce.png index c1ec92f1..4fd9d235 100644 Binary files a/modules/EcmProducts/QRcodes/b54aaa74-3e5e-25af-1abd-4fb654dd88ce.png and b/modules/EcmProducts/QRcodes/b54aaa74-3e5e-25af-1abd-4fb654dd88ce.png differ diff --git a/modules/EcmProducts/QRcodes/bb25f810-a74b-c5c2-79da-61a6156f2101.png b/modules/EcmProducts/QRcodes/bb25f810-a74b-c5c2-79da-61a6156f2101.png index ad212215..16d9df26 100644 Binary files a/modules/EcmProducts/QRcodes/bb25f810-a74b-c5c2-79da-61a6156f2101.png and b/modules/EcmProducts/QRcodes/bb25f810-a74b-c5c2-79da-61a6156f2101.png differ diff --git a/modules/EcmProducts/QRcodes/bbf37c28-645b-443b-72f4-5f69cb97fb5a.png b/modules/EcmProducts/QRcodes/bbf37c28-645b-443b-72f4-5f69cb97fb5a.png index b5d6d7b2..77b21f71 100644 Binary files a/modules/EcmProducts/QRcodes/bbf37c28-645b-443b-72f4-5f69cb97fb5a.png and b/modules/EcmProducts/QRcodes/bbf37c28-645b-443b-72f4-5f69cb97fb5a.png differ diff --git a/modules/EcmProducts/QRcodes/bcc9917b-25fd-66ab-5581-5a61dfec0d2d.png b/modules/EcmProducts/QRcodes/bcc9917b-25fd-66ab-5581-5a61dfec0d2d.png index 95716f4b..e515989b 100644 Binary files a/modules/EcmProducts/QRcodes/bcc9917b-25fd-66ab-5581-5a61dfec0d2d.png and b/modules/EcmProducts/QRcodes/bcc9917b-25fd-66ab-5581-5a61dfec0d2d.png differ diff --git a/modules/EcmProducts/QRcodes/be02d32b-4c36-9ca0-58a0-66ebbef06dd4.png b/modules/EcmProducts/QRcodes/be02d32b-4c36-9ca0-58a0-66ebbef06dd4.png index 5197ba1b..06aa67af 100644 Binary files a/modules/EcmProducts/QRcodes/be02d32b-4c36-9ca0-58a0-66ebbef06dd4.png and b/modules/EcmProducts/QRcodes/be02d32b-4c36-9ca0-58a0-66ebbef06dd4.png differ diff --git a/modules/EcmProducts/QRcodes/be7ef69e-2371-b0db-672e-624bd35d1c57.png b/modules/EcmProducts/QRcodes/be7ef69e-2371-b0db-672e-624bd35d1c57.png index 1dcea284..acd7d50c 100644 Binary files a/modules/EcmProducts/QRcodes/be7ef69e-2371-b0db-672e-624bd35d1c57.png and b/modules/EcmProducts/QRcodes/be7ef69e-2371-b0db-672e-624bd35d1c57.png differ diff --git a/modules/EcmProducts/QRcodes/c147b3ea-9ffe-9171-7102-686cb7196e52.png b/modules/EcmProducts/QRcodes/c147b3ea-9ffe-9171-7102-686cb7196e52.png new file mode 100644 index 00000000..e2e26d90 Binary files /dev/null and b/modules/EcmProducts/QRcodes/c147b3ea-9ffe-9171-7102-686cb7196e52.png differ diff --git a/modules/EcmProducts/QRcodes/c1d24d6c-504b-c842-549a-65af8ca98d71.png b/modules/EcmProducts/QRcodes/c1d24d6c-504b-c842-549a-65af8ca98d71.png index 66e9d68b..0aacda08 100644 Binary files a/modules/EcmProducts/QRcodes/c1d24d6c-504b-c842-549a-65af8ca98d71.png and b/modules/EcmProducts/QRcodes/c1d24d6c-504b-c842-549a-65af8ca98d71.png differ diff --git a/modules/EcmProducts/QRcodes/c1ddab71-b971-d2bc-86b5-67d004bcd368.png b/modules/EcmProducts/QRcodes/c1ddab71-b971-d2bc-86b5-67d004bcd368.png index fda7c824..30c3d3f9 100644 Binary files a/modules/EcmProducts/QRcodes/c1ddab71-b971-d2bc-86b5-67d004bcd368.png and b/modules/EcmProducts/QRcodes/c1ddab71-b971-d2bc-86b5-67d004bcd368.png differ diff --git a/modules/EcmProducts/QRcodes/c29f01c8-984c-5235-d0f5-686bfd2b79d9.png b/modules/EcmProducts/QRcodes/c29f01c8-984c-5235-d0f5-686bfd2b79d9.png new file mode 100644 index 00000000..8c92389b Binary files /dev/null and b/modules/EcmProducts/QRcodes/c29f01c8-984c-5235-d0f5-686bfd2b79d9.png differ diff --git a/modules/EcmProducts/QRcodes/ca12241c-09a4-76c0-f5da-5a9538ff0502.png b/modules/EcmProducts/QRcodes/ca12241c-09a4-76c0-f5da-5a9538ff0502.png index 1fd76f96..1d50a62a 100644 Binary files a/modules/EcmProducts/QRcodes/ca12241c-09a4-76c0-f5da-5a9538ff0502.png and b/modules/EcmProducts/QRcodes/ca12241c-09a4-76c0-f5da-5a9538ff0502.png differ diff --git a/modules/EcmProducts/QRcodes/cb820150-5f59-b7f1-11c5-5a61e00da77e.png b/modules/EcmProducts/QRcodes/cb820150-5f59-b7f1-11c5-5a61e00da77e.png index cae98491..16fc4c57 100644 Binary files a/modules/EcmProducts/QRcodes/cb820150-5f59-b7f1-11c5-5a61e00da77e.png and b/modules/EcmProducts/QRcodes/cb820150-5f59-b7f1-11c5-5a61e00da77e.png differ diff --git a/modules/EcmProducts/QRcodes/d0c3ef01-33b4-8e00-8752-5948de1ed64a.png b/modules/EcmProducts/QRcodes/d0c3ef01-33b4-8e00-8752-5948de1ed64a.png index 49129174..d0a7d0e0 100644 Binary files a/modules/EcmProducts/QRcodes/d0c3ef01-33b4-8e00-8752-5948de1ed64a.png and b/modules/EcmProducts/QRcodes/d0c3ef01-33b4-8e00-8752-5948de1ed64a.png differ diff --git a/modules/EcmProducts/QRcodes/d12c07cc-3d1d-9197-6696-5bffea2c6102.png b/modules/EcmProducts/QRcodes/d12c07cc-3d1d-9197-6696-5bffea2c6102.png index 734c9575..6cc59695 100644 Binary files a/modules/EcmProducts/QRcodes/d12c07cc-3d1d-9197-6696-5bffea2c6102.png and b/modules/EcmProducts/QRcodes/d12c07cc-3d1d-9197-6696-5bffea2c6102.png differ diff --git a/modules/EcmProducts/QRcodes/d1f766f7-1c67-2b65-a354-541af06e26bd.png b/modules/EcmProducts/QRcodes/d1f766f7-1c67-2b65-a354-541af06e26bd.png index 9220046f..48955b38 100644 Binary files a/modules/EcmProducts/QRcodes/d1f766f7-1c67-2b65-a354-541af06e26bd.png and b/modules/EcmProducts/QRcodes/d1f766f7-1c67-2b65-a354-541af06e26bd.png differ diff --git a/modules/EcmProducts/QRcodes/d4f18e05-e508-3366-ad1b-672b3e927992.png b/modules/EcmProducts/QRcodes/d4f18e05-e508-3366-ad1b-672b3e927992.png index c1b196e0..4226e9c4 100644 Binary files a/modules/EcmProducts/QRcodes/d4f18e05-e508-3366-ad1b-672b3e927992.png and b/modules/EcmProducts/QRcodes/d4f18e05-e508-3366-ad1b-672b3e927992.png differ diff --git a/modules/EcmProducts/QRcodes/d62e903b-c9bf-d114-62d0-5b9103ffd47e.png b/modules/EcmProducts/QRcodes/d62e903b-c9bf-d114-62d0-5b9103ffd47e.png index aebc92f0..89e41882 100644 Binary files a/modules/EcmProducts/QRcodes/d62e903b-c9bf-d114-62d0-5b9103ffd47e.png and b/modules/EcmProducts/QRcodes/d62e903b-c9bf-d114-62d0-5b9103ffd47e.png differ diff --git a/modules/EcmProducts/QRcodes/d6330f0a-d5c7-fd66-fcaa-62904e1dcd44.png b/modules/EcmProducts/QRcodes/d6330f0a-d5c7-fd66-fcaa-62904e1dcd44.png index 99ccc690..880d1e9a 100644 Binary files a/modules/EcmProducts/QRcodes/d6330f0a-d5c7-fd66-fcaa-62904e1dcd44.png and b/modules/EcmProducts/QRcodes/d6330f0a-d5c7-fd66-fcaa-62904e1dcd44.png differ diff --git a/modules/EcmProducts/QRcodes/d7536f1b-1041-874a-4d12-5720697a11df.png b/modules/EcmProducts/QRcodes/d7536f1b-1041-874a-4d12-5720697a11df.png index 0ea9259a..b815b488 100644 Binary files a/modules/EcmProducts/QRcodes/d7536f1b-1041-874a-4d12-5720697a11df.png and b/modules/EcmProducts/QRcodes/d7536f1b-1041-874a-4d12-5720697a11df.png differ diff --git a/modules/EcmProducts/QRcodes/d89a3289-e1da-3948-b601-65a7e988ae45.png b/modules/EcmProducts/QRcodes/d89a3289-e1da-3948-b601-65a7e988ae45.png index acf8a87b..deaf4c69 100644 Binary files a/modules/EcmProducts/QRcodes/d89a3289-e1da-3948-b601-65a7e988ae45.png and b/modules/EcmProducts/QRcodes/d89a3289-e1da-3948-b601-65a7e988ae45.png differ diff --git a/modules/EcmProducts/QRcodes/d920c9a9-866a-8192-30f9-66728971e8fd.png b/modules/EcmProducts/QRcodes/d920c9a9-866a-8192-30f9-66728971e8fd.png index 8d02d9c0..e6c666d9 100644 Binary files a/modules/EcmProducts/QRcodes/d920c9a9-866a-8192-30f9-66728971e8fd.png and b/modules/EcmProducts/QRcodes/d920c9a9-866a-8192-30f9-66728971e8fd.png differ diff --git a/modules/EcmProducts/QRcodes/db903c36-cad9-5dc7-0d36-59c4b90701cc.png b/modules/EcmProducts/QRcodes/db903c36-cad9-5dc7-0d36-59c4b90701cc.png index 54b3dfb1..91043314 100644 Binary files a/modules/EcmProducts/QRcodes/db903c36-cad9-5dc7-0d36-59c4b90701cc.png and b/modules/EcmProducts/QRcodes/db903c36-cad9-5dc7-0d36-59c4b90701cc.png differ diff --git a/modules/EcmProducts/QRcodes/dd8176dd-9a4d-ee2e-0704-678f99576aef.png b/modules/EcmProducts/QRcodes/dd8176dd-9a4d-ee2e-0704-678f99576aef.png index 85fc6f2e..b82bd505 100644 Binary files a/modules/EcmProducts/QRcodes/dd8176dd-9a4d-ee2e-0704-678f99576aef.png and b/modules/EcmProducts/QRcodes/dd8176dd-9a4d-ee2e-0704-678f99576aef.png differ diff --git a/modules/EcmProducts/QRcodes/dec9d2da-3cea-16a0-f37c-6374c7016369.png b/modules/EcmProducts/QRcodes/dec9d2da-3cea-16a0-f37c-6374c7016369.png index 082be768..78ae1849 100644 Binary files a/modules/EcmProducts/QRcodes/dec9d2da-3cea-16a0-f37c-6374c7016369.png and b/modules/EcmProducts/QRcodes/dec9d2da-3cea-16a0-f37c-6374c7016369.png differ diff --git a/modules/EcmProducts/QRcodes/df5043bc-494e-be48-2772-66f14bb84920.png b/modules/EcmProducts/QRcodes/df5043bc-494e-be48-2772-66f14bb84920.png index e2a09edb..2abd43c9 100644 Binary files a/modules/EcmProducts/QRcodes/df5043bc-494e-be48-2772-66f14bb84920.png and b/modules/EcmProducts/QRcodes/df5043bc-494e-be48-2772-66f14bb84920.png differ diff --git a/modules/EcmProducts/QRcodes/df8f5a83-7d95-fe92-3ef3-667d2f61819b.png b/modules/EcmProducts/QRcodes/df8f5a83-7d95-fe92-3ef3-667d2f61819b.png index 1268f289..52f450dd 100644 Binary files a/modules/EcmProducts/QRcodes/df8f5a83-7d95-fe92-3ef3-667d2f61819b.png and b/modules/EcmProducts/QRcodes/df8f5a83-7d95-fe92-3ef3-667d2f61819b.png differ diff --git a/modules/EcmProducts/QRcodes/e13605bc-ee39-39f1-cb56-60499f855b57.png b/modules/EcmProducts/QRcodes/e13605bc-ee39-39f1-cb56-60499f855b57.png index 783924dc..45532497 100644 Binary files a/modules/EcmProducts/QRcodes/e13605bc-ee39-39f1-cb56-60499f855b57.png and b/modules/EcmProducts/QRcodes/e13605bc-ee39-39f1-cb56-60499f855b57.png differ diff --git a/modules/EcmProducts/QRcodes/e3924420-e866-bd87-19f4-67e669c2c2d6.png b/modules/EcmProducts/QRcodes/e3924420-e866-bd87-19f4-67e669c2c2d6.png index 6337fe1f..d76c810e 100644 Binary files a/modules/EcmProducts/QRcodes/e3924420-e866-bd87-19f4-67e669c2c2d6.png and b/modules/EcmProducts/QRcodes/e3924420-e866-bd87-19f4-67e669c2c2d6.png differ diff --git a/modules/EcmProducts/QRcodes/e6b057a9-9f93-56f0-c7a4-5abb48bbe5cc.png b/modules/EcmProducts/QRcodes/e6b057a9-9f93-56f0-c7a4-5abb48bbe5cc.png index e3a0f9e3..88b74aa6 100644 Binary files a/modules/EcmProducts/QRcodes/e6b057a9-9f93-56f0-c7a4-5abb48bbe5cc.png and b/modules/EcmProducts/QRcodes/e6b057a9-9f93-56f0-c7a4-5abb48bbe5cc.png differ diff --git a/modules/EcmProducts/QRcodes/ebcc1402-4604-546a-8772-563c95d375fc.png b/modules/EcmProducts/QRcodes/ebcc1402-4604-546a-8772-563c95d375fc.png index f3151f75..d3b86f64 100644 Binary files a/modules/EcmProducts/QRcodes/ebcc1402-4604-546a-8772-563c95d375fc.png and b/modules/EcmProducts/QRcodes/ebcc1402-4604-546a-8772-563c95d375fc.png differ diff --git a/modules/EcmProducts/QRcodes/ec07aae0-fa3a-d517-e941-573efe843fe6.png b/modules/EcmProducts/QRcodes/ec07aae0-fa3a-d517-e941-573efe843fe6.png index 4d4602b0..33b63d4e 100644 Binary files a/modules/EcmProducts/QRcodes/ec07aae0-fa3a-d517-e941-573efe843fe6.png and b/modules/EcmProducts/QRcodes/ec07aae0-fa3a-d517-e941-573efe843fe6.png differ diff --git a/modules/EcmProducts/QRcodes/ec09d4bb-9153-db15-b153-53e0d3a1f7db.png b/modules/EcmProducts/QRcodes/ec09d4bb-9153-db15-b153-53e0d3a1f7db.png index d73b7edd..24faa20a 100644 Binary files a/modules/EcmProducts/QRcodes/ec09d4bb-9153-db15-b153-53e0d3a1f7db.png and b/modules/EcmProducts/QRcodes/ec09d4bb-9153-db15-b153-53e0d3a1f7db.png differ diff --git a/modules/EcmProducts/QRcodes/ec15c9f1-b708-7fc5-1b4e-6621fa86ee28.png b/modules/EcmProducts/QRcodes/ec15c9f1-b708-7fc5-1b4e-6621fa86ee28.png index 85fc2b69..608b4c66 100644 Binary files a/modules/EcmProducts/QRcodes/ec15c9f1-b708-7fc5-1b4e-6621fa86ee28.png and b/modules/EcmProducts/QRcodes/ec15c9f1-b708-7fc5-1b4e-6621fa86ee28.png differ diff --git a/modules/EcmProducts/QRcodes/ec1a2530-db3d-1d7b-4036-5f0c0d718539.png b/modules/EcmProducts/QRcodes/ec1a2530-db3d-1d7b-4036-5f0c0d718539.png index c7692a81..bcfa7a84 100644 Binary files a/modules/EcmProducts/QRcodes/ec1a2530-db3d-1d7b-4036-5f0c0d718539.png and b/modules/EcmProducts/QRcodes/ec1a2530-db3d-1d7b-4036-5f0c0d718539.png differ diff --git a/modules/EcmProducts/QRcodes/ef49eedb-64cc-9c59-80d3-6332c3c44ae6.png b/modules/EcmProducts/QRcodes/ef49eedb-64cc-9c59-80d3-6332c3c44ae6.png index bc98b0fb..0b5e7ee2 100644 Binary files a/modules/EcmProducts/QRcodes/ef49eedb-64cc-9c59-80d3-6332c3c44ae6.png and b/modules/EcmProducts/QRcodes/ef49eedb-64cc-9c59-80d3-6332c3c44ae6.png differ diff --git a/modules/EcmProducts/QRcodes/ef739093-e3b0-8685-2c6f-4ae59551dfe2.png b/modules/EcmProducts/QRcodes/ef739093-e3b0-8685-2c6f-4ae59551dfe2.png index 4fd2d24a..7b4174ae 100644 Binary files a/modules/EcmProducts/QRcodes/ef739093-e3b0-8685-2c6f-4ae59551dfe2.png and b/modules/EcmProducts/QRcodes/ef739093-e3b0-8685-2c6f-4ae59551dfe2.png differ diff --git a/modules/EcmProducts/QRcodes/f1b31bef-7de4-9bfc-14cc-65cd4f862ab4.png b/modules/EcmProducts/QRcodes/f1b31bef-7de4-9bfc-14cc-65cd4f862ab4.png index 9c9f7f7a..23e50cff 100644 Binary files a/modules/EcmProducts/QRcodes/f1b31bef-7de4-9bfc-14cc-65cd4f862ab4.png and b/modules/EcmProducts/QRcodes/f1b31bef-7de4-9bfc-14cc-65cd4f862ab4.png differ diff --git a/modules/EcmProducts/QRcodes/f2664458-b316-05c9-b63d-62452abfdaf8.png b/modules/EcmProducts/QRcodes/f2664458-b316-05c9-b63d-62452abfdaf8.png index 765b505d..94c9ffcd 100644 Binary files a/modules/EcmProducts/QRcodes/f2664458-b316-05c9-b63d-62452abfdaf8.png and b/modules/EcmProducts/QRcodes/f2664458-b316-05c9-b63d-62452abfdaf8.png differ diff --git a/modules/EcmProducts/QRcodes/f331a8f6-5823-9ca8-d6f2-6851061937f0.png b/modules/EcmProducts/QRcodes/f331a8f6-5823-9ca8-d6f2-6851061937f0.png index d804eab6..05b81b1d 100644 Binary files a/modules/EcmProducts/QRcodes/f331a8f6-5823-9ca8-d6f2-6851061937f0.png and b/modules/EcmProducts/QRcodes/f331a8f6-5823-9ca8-d6f2-6851061937f0.png differ diff --git a/modules/EcmProducts/QRcodes/f3e30a6b-acce-6918-c6f2-6846b7c75d37.png b/modules/EcmProducts/QRcodes/f3e30a6b-acce-6918-c6f2-6846b7c75d37.png index 30d4ba6c..bfe9eaa9 100644 Binary files a/modules/EcmProducts/QRcodes/f3e30a6b-acce-6918-c6f2-6846b7c75d37.png and b/modules/EcmProducts/QRcodes/f3e30a6b-acce-6918-c6f2-6846b7c75d37.png differ diff --git a/modules/EcmProducts/QRcodes/f3ec45ac-5426-95b1-abbd-66faa4158cb0.png b/modules/EcmProducts/QRcodes/f3ec45ac-5426-95b1-abbd-66faa4158cb0.png index 344fb501..6a24fce6 100644 Binary files a/modules/EcmProducts/QRcodes/f3ec45ac-5426-95b1-abbd-66faa4158cb0.png and b/modules/EcmProducts/QRcodes/f3ec45ac-5426-95b1-abbd-66faa4158cb0.png differ diff --git a/modules/EcmProducts/QRcodes/fad00a29-c7bc-8c4c-61cc-59f6cceb4a81.png b/modules/EcmProducts/QRcodes/fad00a29-c7bc-8c4c-61cc-59f6cceb4a81.png index 1082c71d..d188cdef 100644 Binary files a/modules/EcmProducts/QRcodes/fad00a29-c7bc-8c4c-61cc-59f6cceb4a81.png and b/modules/EcmProducts/QRcodes/fad00a29-c7bc-8c4c-61cc-59f6cceb4a81.png differ diff --git a/modules/EcmProducts/QRcodes/ffa10031-ab39-d910-6503-59c364acbc76.png b/modules/EcmProducts/QRcodes/ffa10031-ab39-d910-6503-59c364acbc76.png index 068a03e8..72bbc1c4 100644 Binary files a/modules/EcmProducts/QRcodes/ffa10031-ab39-d910-6503-59c364acbc76.png and b/modules/EcmProducts/QRcodes/ffa10031-ab39-d910-6503-59c364acbc76.png differ diff --git a/modules/EcmReports/ListDailySales.inc b/modules/EcmReports/ListDailySales.inc new file mode 100644 index 00000000..9539b12f --- /dev/null +++ b/modules/EcmReports/ListDailySales.inc @@ -0,0 +1,512 @@ +format('Y-m-d')."' + AND '".$date_to_to_query->format('Y-m-d')."' + + "; + + + // vata = 0% + // vatb = 22% + // vatc = 23% + // If user want to see invoices from only one contractor + if($contractorName && $contractorId) + { + $query .= " AND e.parent_id = '".$contractorId."'"; + } + // If user want to see invoices by type + if($searchByType) + { + $query .= " AND e.type = '".$searchByType."'"; + } + // If user want to see invoices by pdfType + if($pdfTypeU || $pdfTypeK || $pdfTypeE) + { + // One selection + if($pdfTypeU && !$pdfTypeK && !$pdfTypeE) + $query .= " AND e.pdf_type = 'U'"; + if(!$pdfTypeU && $pdfTypeK && !$pdfTypeE) + $query .= " AND e.pdf_type = 'K'"; + if(!$pdfTypeU && !$pdfTypeK && $pdfTypeE) + $query .= " AND e.pdf_type = 'E'"; + + // Two selections + if($pdfTypeU && $pdfTypeK && !$pdfTypeE) + $query .= " AND (e.pdf_type = 'U' OR e.pdf_type = 'K')"; + if($pdfTypeU && !$pdfTypeK && $pdfTypeE) + $query .= " AND (e.pdf_type = 'U' OR e.pdf_type = 'E')"; + if(!$pdfTypeU && $pdfTypeK && $pdfTypeE) + $query .= " AND (e.pdf_type = 'K' OR e.pdf_type = 'E')"; + + // Three selections + if($pdfTypeU && $pdfTypeK && $pdfTypeE) + $query .= " AND (e.pdf_type = 'U' OR e.pdf_type = 'K' OR e.pdf_type = 'E')"; + } + + + + /*****************************************************/ + /*************** GET DATA FROM DB*********************/ + /*****************************************************/ + $normalInvoicesCount = 0; + $allInvoicesCount = 0; + $rows = $db->query ($query); + + // prepare data for Smarty + while( $r = $db->fetchByAssoc ( $rows )) + { + $row = array(); + // If invoice is canceled or dleted don't display + if(!$r["deleted"] && !$r["canceled"]) + { + $row["id"] = $r["parent_id"]; + $row["invoiceoutId"] = $r["id"]; + $row["purchase_price"] = $r["purchase_price"]; + $row["document_no"] = $r["document_no"]; + $row["type"] = $r["type"]; + $row["pdf_type"] = $r["pdf_type"]; + $row["invoiceout_id"] = $r["ecminvoiceout_id"]; + $row["register_date"] = $r["register_date"]; + $row["vata"] = $r["vata"]; // 0% + $row["vatb"] = $r["vatb"]; // 22% + $row["vatc"] = $r["vatc"]; // 23% + ///////////////////////////////////////////////////////// + $row["currency_value"] = $r["currency_value"] == 0 ? 1 : $r["currency_value"]; + $row["subtotal"] = $r["subtotal"]*$row["currency_value"]; + $row["total"] = $r["total"]*$row["currency_value"]; + + ///////////////////////////////////////////////////////// + $row["discount"] = $r["discount"] * $row["currency_value"]; + $row["contractorName"] = $r["contractorName"]; + /////////////////// MARGIN AND COST ///////////////////// + if( $r['type'] == 'correcttttt' ) + { + $row["margin"] = 0; + $allInvoicesCount++; + } + else + { + $normalInvoicesCount++; + $allInvoicesCount++; + $row["margin"] = ($row['subtotal'] - $row['purchase_price'])/($row['subtotal'])*100; + } + + $row["cost"] = $r['purchase_price']; + ////////////////// Price sum in GroupKS //////////////// + + $row["subPriceGroupKS1"] = $r["subPriceGroupKS1"]; + $row["subPriceGroupKS2"] = $r["subPriceGroupKS2"]; + $row["subPriceGroupKS3"] = $r["subPriceGroupKS3"]; + $row["subPriceGroupKS4"] = $r["subPriceGroupKS4"]; + $row["purchasePriceGroupKS1"] = $r["purchasePriceGroupKS1"]; + $row["purchasePriceGroupKS2"] = $r["purchasePriceGroupKS2"]; + $row["purchasePriceGroupKS3"] = $r["purchasePriceGroupKS3"]; + $row["purchasePriceGroupKS4"] = $r["purchasePriceGroupKS4"]; + + + $data [] = $row; + } + } + + ////////////////// SUM ///////////////////////////////// + foreach( $data as &$element ) + { + + $sum["subtotalSum"] += $element["subtotal"]; + $sum["subPriceGroupKS1Sum"] += $element["subPriceGroupKS1"]; + $sum["subPriceGroupKS2Sum"] += $element["subPriceGroupKS2"]; + $sum["subPriceGroupKS3Sum"] += $element["subPriceGroupKS3"]; + $sum["subPriceGroupKS4Sum"] += $element["subPriceGroupKS4"]; + $sum["totalSum"] += $element["total"]; + $sum["costSum"] += $element["cost"]; + $sum["purchasePriceGroupKS1Sum"] += $element["purchasePriceGroupKS1"]; + $sum["purchasePriceGroupKS2Sum"] += $element["purchasePriceGroupKS2"]; + $sum["purchasePriceGroupKS3Sum"] += $element["purchasePriceGroupKS3"]; + $sum["purchasePriceGroupKS4Sum"] += $element["purchasePriceGroupKS4"]; + $sum["marginSum"] += $element["margin"]; + $sum["vataSum"] += $element["vata"]; + $sum["vatbSum"] += $element["vatb"]; + $sum["vatcSum"] += $element["vatc"]; + } + + $sum["marginSum"] = ($sum["subtotalSum"] - $sum["costSum"]) / ($sum['subtotalSum']) * 100; +?> \ No newline at end of file diff --git a/modules/EcmReports/ReportBuyesByVat.inc b/modules/EcmReports/ReportBuyesByVat.inc new file mode 100644 index 00000000..6c86f705 --- /dev/null +++ b/modules/EcmReports/ReportBuyesByVat.inc @@ -0,0 +1,92 @@ + "; +print_r($data); +echo ""; + +?> \ No newline at end of file diff --git a/modules/EcmReports/ReportSalesByContractor.inc b/modules/EcmReports/ReportSalesByContractor.inc new file mode 100644 index 00000000..d991b902 --- /dev/null +++ b/modules/EcmReports/ReportSalesByContractor.inc @@ -0,0 +1,547 @@ +query ($queryUsers); +while($rowUser = $db->fetchByAssoc ( $rowsUsers )) +{ + $users["first"] = $rowUser["first"]; + $users["last"] = $rowUser["last"]; + $users["id"] = $rowUser["id"]; + $datausers [] = $users; +} + +$query = "SELECT + faktura.parent_name as 'parent', + acco.parent_id as 'parent_id', + faktura.parent_id as 'cotructor_id', + pozycja.name as 'name', + pozycja.ecmproduct_id as 'id', + pozycja.code, + faktura.type as 'type', + sum( + CASE WHEN faktura.type!='correct' + THEN + CASE WHEN faktura.currency_value is null or faktura.currency_value='' or faktura.currency_value=0 + THEN + pozycja.total_netto + ELSE + pozycja.total_netto*faktura.currency_value + END + ELSE + + CASE WHEN faktura.currency_value is null or faktura.currency_value='' or faktura.currency_value=0 + THEN + pozycja.total_netto_corrected + ELSE + pozycja.total_netto_corrected*faktura.currency_value + END + + END + ) as netto, + sum( + CASE WHEN faktura.type!='correct' + THEN + pozycja.quantity + ELSE + pozycja.quantity_corrected + END + ) as ilosc, + sum( + CASE WHEN faktura.type!='correct' + THEN + pozycja.price_purchase*pozycja.quantity + ELSE + pozycja.price_purchase*pozycja.quantity_corrected + END + ) as koszt + FROM + ecminvoiceoutitems pozycja + JOIN + ecminvoiceouts faktura ON pozycja.ecminvoiceout_id = faktura.id + JOIN + accounts acco ON acco.id = faktura.parent_id + WHERE + faktura.register_date BETWEEN + '".$date_from_to_query->format('Y-m-d')."' AND + '".$date_to_to_query->format('Y-m-d')."' + and faktura.type like '".$searchByType."' + and faktura.canceled = 0 + and faktura.deleted= 0"; + if ($selectPdfType!="") + $query.= " and faktura.pdf_type='$selectPdfType'"; + $query .= " and pozycja.deleted= 0 + GROUP BY pozycja.id + ORDER BY faktura.parent_name + COLLATE utf8_polish_ci;"; +/*****************************************************/ +/*************** GET DATA FROM DB*********************/ +/*****************************************************/ +$rows = $db->query ($query); + +// prepare data for Smarty +while($r = $db->fetchByAssoc ( $rows )) +{ + $row = array(); + $row["id"] = $r["id"]; + $row["name"] = $r["name"]; + $row["code"] = $r["code"]; + $row["type"] = $r["type"]; + + $userBool=1; + if($selectUser!="") + { + $userBool=0; + $querySelectUsers="SELECT user.id, + first_name as 'first', + last_name as 'last' + FROM + accounts acc + JOIN + users user ON acc.assigned_user_id=user.id + WHERE acc.id='".$r["cotructor_id"]."';"; + $rowsSelectUsers = $db->query ($querySelectUsers); + while($rowSelectUser = $db->fetchByAssoc ( $rowsSelectUsers )) + { + if($rowSelectUser["id"]==$selectUser) + { + $userBool=1; + }else{ + $userBool=0; + } + } + } + + if($userBool==1) + { + + if($r["parent_id"]==1249 && $group_media_saturn_holding == "enabled") + { + $row["parent"] = "Media Saturn Holding"; + }else{ + $row["parent"] = $r["parent"]; + } + + $querySubCategory="SELECT category.name as 'podkategoria' + FROM + ecmproductcategories_bean bean + JOIN + ecmproductcategories category ON bean.ecmproductcategory_id = category.id + WHERE bean.bean_id='".$row["id"]."' + and category.deleted=0 + and bean.deleted = '0' + and bean.position = 1;"; + $rowsSubCategory = $db->query ($querySubCategory); + while($rowSubCategory = $db->fetchByAssoc ( $rowsSubCategory )) + { + $row["podkategoria"] = $rowSubCategory["podkategoria"]; + } + + $queryCategory="SELECT category.name as 'kategoria' + FROM + ecmproductcategories_bean bean + JOIN + ecmproductcategories category ON bean.ecmproductcategory_id = category.id + WHERE bean.bean_id='".$row["id"]."' + and category.deleted=0 + and bean.deleted = '0' + and bean.position = 0;"; + + $rowscategory = $db->query ($queryCategory); + while($rowcategory = $db->fetchByAssoc ( $rowscategory )) + { + //echo "assadad"; + $row["kategoria"] = $rowcategory["kategoria"]; + } + + $row["ilosc"] = $r["ilosc"]; + $row["netto"] = $r["netto"]; + $row["srednia"] = $row["netto"]/$row["ilosc"]; + + $row["srednia"] = 5; + + $row["koszt"] = $r["koszt"]; + + //if($row["netto"]>$row["koszt"]) + //{ + $row["marza"] = ($row["netto"]-$row["koszt"])/($row["netto"])*100; + //}else{ + // $row["marza"] = 5; + //$row["marza"] = ($row["netto"]-$row["koszt"])/($row["netto"])*100; + //} + $data [] = $row; + } +} + +if($searchByType!="") +{ + + ////////////////// SUM ///////////////////////////////// + foreach( $data as $key=>&$element ) + { + if($element["netto"]!=0) + { + $categoryArray[$element["parent"] == "" ? "Nieznany" : $element["parent"]][$element["kategoria"] == "" ? "Inne" : $element["kategoria"]][$element["podkategoria"] == "" ? "Reszta" : $element["podkategoria"]][$key] = $element; + } + } + + foreach( $categoryArray as $parent=>&$elementParent ) + { + foreach( $elementParent as $category=>&$elementCategory ) + { + foreach( $elementCategory as $subcategory=>&$elementSubCategory ) + { + foreach( $elementSubCategory as $product=>&$elementProduct ) + { + $sumContracor["IloscSum"][$parent] += $elementProduct["ilosc"]; + $sumContracor["SoldSum"][$parent] += $elementProduct["netto"]; + //if($elementProduct["type"]=="normal") + //{ + $sumContracor["SoldSumNormal"][$parent] += $elementProduct["netto"]; + $sumContracor["IloscNormal"][$parent] += $elementProduct["ilosc"]; + // }else{ + // $sumContracor["SoldSumNormal"][$parent] += 0; + // $sumContracor["IloscNormal"][$parent] += 0; + //} + $sumContracor["KosztSum"][$parent] += $elementProduct["koszt"]; + + $sumCategory["IloscSum"][$parent][$category] += $elementProduct["ilosc"]; + $sumCategory["SoldSum"][$parent][$category] += $elementProduct["netto"]; + //if($elementProduct["type"]=="normal") + //{ + $sumCategory["SoldSumNormal"][$parent][$category] += $elementProduct["netto"]; + $sumCategory["IloscNormal"][$parent][$category] += $elementProduct["ilosc"]; + //}else{ + // $sumCategory["SoldSumNormal"][$parent][$category] += 0; + // $sumCategory["IloscNormal"][$parent][$category] += 0; + //} + $sumCategory["KosztSum"][$parent][$category] += $elementProduct["koszt"]; + + $sumSubCategory["IloscSum"][$parent][$category][$subcategory] += $elementProduct["ilosc"]; + $sumSubCategory["SoldSum"][$parent][$category][$subcategory] += $elementProduct["netto"]; + //if($elementProduct["type"]=="normal") + //{ + $sumSubCategory["SoldSumNormal"][$parent][$category][$subcategory] += $elementProduct["netto"]; + $sumSubCategory["IloscNormal"][$parent][$category][$subcategory] += $elementProduct["ilosc"]; + //}else{ + // $sumSubCategory["SoldSumNormal"][$parent][$category][$subcategory] += 0; + // $sumSubCategory["IloscNormal"][$parent][$category][$subcategory] += 0; + //} + $sumSubCategory["KosztSum"][$parent][$category][$subcategory] += $elementProduct["koszt"]; + } + $sumSubCategory["MarzaSum"][$parent][$category][$subcategory] = ($sumSubCategory["SoldSumNormal"][$parent][$category][$subcategory]-$sumSubCategory["KosztSum"][$parent][$category][$subcategory])/$sumSubCategory["SoldSumNormal"][$parent][$category][$subcategory]*100; + $sumSubCategory["SredniaSum"][$parent][$category][$subcategory] = $sumSubCategory["SoldSumNormal"][$parent][$category][$subcategory]/$sumSubCategory["IloscNormal"][$parent][$category][$subcategory]; + + $categoryArray[$parent][$category][$subcategory]["IloscSum"] = $sumSubCategory["IloscSum"][$parent][$category][$subcategory]; + $categoryArray[$parent][$category][$subcategory]["SoldSum"] = $sumSubCategory["SoldSum"][$parent][$category][$subcategory]; + $categoryArray[$parent][$category][$subcategory]["SoldSumNormal"] = $sumSubCategory["SoldSumNormal"][$parent][$category][$subcategory]; + $categoryArray[$parent][$category][$subcategory]["IloscNormal"] = $sumSubCategory["IloscNormal"][$parent][$category][$subcategory]; + $categoryArray[$parent][$category][$subcategory]["SredniaSum"] = $sumSubCategory["SredniaSum"][$parent][$category][$subcategory]; + $categoryArray[$parent][$category][$subcategory]["KosztSum"] = $sumSubCategory["KosztSum"][$parent][$category][$subcategory]; + $categoryArray[$parent][$category][$subcategory]["MarzaSum"] = $sumSubCategory["MarzaSum"][$parent][$category][$subcategory]; + } + $sumCategory["MarzaSum"][$parent][$category] = ($sumCategory["SoldSumNormal"][$parent][$category]-$sumCategory["KosztSum"][$parent][$category])/$sumCategory["SoldSumNormal"][$parent][$category]*100; + $sumCategory["SredniaSum"][$parent][$category] = $sumCategory["SoldSumNormal"][$parent][$category]/$sumCategory["IloscNormal"][$parent][$category]; + + $categoryArray[$parent][$category]["IloscSum"] = $sumCategory["IloscSum"][$parent][$category]; + $categoryArray[$parent][$category]["SoldSum"] = $sumCategory["SoldSum"][$parent][$category]; + $categoryArray[$parent][$category]["SoldSumNormal"] = $sumCategory["SoldSumNormal"][$parent][$category]; + $categoryArray[$parent][$category]["IloscNormal"] = $sumCategory["IloscNormal"][$parent][$category]; + $categoryArray[$parent][$category]["SredniaSum"] = $sumCategory["SredniaSum"][$parent][$category]; + $categoryArray[$parent][$category]["KosztSum"] = $sumCategory["KosztSum"][$parent][$category]; + $categoryArray[$parent][$category]["MarzaSum"] = $sumCategory["MarzaSum"][$parent][$category]; + } + $sumContracor["MarzaSum"][$parent] = ($sumContracor["SoldSumNormal"][$parent]-$sumContracor["KosztSum"][$parent])/$sumContracor["SoldSumNormal"][$parent]*100; + $sumContracor["SredniaSum"][$parent] = $sumContracor["SoldSumNormal"][$parent]/$sumContracor["IloscNormal"][$parent]; + + $categoryArray[$parent]["IloscSum"] = $sumContracor["IloscSum"][$parent]; + $categoryArray[$parent]["SoldSum"] = $sumContracor["SoldSum"][$parent]; + $categoryArray[$parent]["SoldSumNormal"] = $sumContracor["SoldSumNormal"][$parent]; + $categoryArray[$parent]["IloscNormal"] = $sumContracor["IloscNormal"][$parent]; + $categoryArray[$parent]["SredniaSum"] = $sumContracor["SredniaSum"][$parent]; + $categoryArray[$parent]["KosztSum"] = $sumContracor["KosztSum"][$parent]; + $categoryArray[$parent]["MarzaSum"] = $sumContracor["MarzaSum"][$parent]; + + } + foreach( $categoryArray as $parent=>&$elementParent ) + { + $sum["IloscSumSum"] += $sumContracor["IloscSum"][$parent]; + $sum["SoldSumSum"] += $sumContracor["SoldSum"][$parent]; + $sum["SoldSumNormal"] += $sumContracor["SoldSumNormal"][$parent]; + $sum["IloscNormal"] += $sumContracor["IloscNormal"][$parent]; + $sum["KosztSumSum"] += $sumContracor["KosztSum"][$parent]; + } + $sum["MarzaSumSum"] = ($sum["SoldSumNormal"]-$sum["KosztSumSum"])/$sum["SoldSumNormal"]*100; + $sum["SredniaSumSum"] = $sum["SoldSumNormal"]/$sum["IloscNormal"]; + + //mz: dotąd jest OK + + function cmp($a, $b) + { + if ($a["id"] == $b["id"]) { + return 0; + } + return ($a["id"] < $b["id"]) ? -1 : 1; + } + + // grupowanie po kontrahentach + foreach($categoryArray as $parent=>&$elementParent ) + { + $tmp2[$parent]["IloscSum"] = $categoryArray[$parent]["IloscSum"]; + $tmp2[$parent]["SoldSum"] = $categoryArray[$parent]["SoldSum"]; + $tmp2[$parent]["SoldSumNormal"] = $categoryArray[$parent]["SoldSumNormal"]; + $tmp2[$parent]["IloscNormal"] = $categoryArray[$parent]["IloscNormal"]; + $tmp2[$parent]["KosztSum"] = $categoryArray[$parent]["KosztSum"]; + $tmp2[$parent]["SredniaSum"] = 0; + $tmp2[$parent]["SredniaSum"] = $categoryArray[$parent]["SredniaSum"]; + $tmp2[$parent]["MarzaSum"] = $categoryArray[$parent]["MarzaSum"]; + foreach($elementParent as $category=>&$elementCategory) + { + $tmp2[$parent][$category]["IloscSum"] = $categoryArray[$parent][$category]["IloscSum"]; + $tmp2[$parent][$category]["SoldSum"] = $categoryArray[$parent][$category]["SoldSum"]; + $tmp2[$parent][$category]["SoldSumNormal"] = $categoryArray[$parent][$category]["SoldSumNormal"]; + $tmp2[$parent][$category]["IloscNormal"] = $categoryArray[$parent][$category]["IloscNormal"]; + $tmp2[$parent][$category]["KosztSum"] = $categoryArray[$parent][$category]["KosztSum"]; + $tmp2[$parent][$category]["SredniaSum"] = $categoryArray[$parent][$category]["SredniaSum"]; + $tmp2[$parent][$category]["MarzaSum"] = $categoryArray[$parent][$category]["MarzaSum"]; + foreach( $elementCategory as $subcategory=>&$elementSubCategory ) + { + + $tmp2[$parent][$category][$subcategory]["IloscSum"] = $categoryArray[$parent][$category][$subcategory]["IloscSum"]; + $tmp2[$parent][$category][$subcategory]["SoldSum"] = $categoryArray[$parent][$category][$subcategory]["SoldSum"]; + $tmp2[$parent][$category][$subcategory]["SoldSumNormal"] = $categoryArray[$parent][$category][$subcategory]["SoldSumNormal"]; + $tmp2[$parent][$category][$subcategory]["IloscNormal"] = $categoryArray[$parent][$category][$subcategory]["IloscNormal"]; + $tmp2[$parent][$category][$subcategory]["KosztSum"] = $categoryArray[$parent][$category][$subcategory]["KosztSum"]; + $tmp2[$parent][$category][$subcategory]["SredniaSum"] = $categoryArray[$parent][$category][$subcategory]["SredniaSum"]; + $tmp2[$parent][$category][$subcategory]["MarzaSum"] = $categoryArray[$parent][$category][$subcategory]["MarzaSum"]; + + + usort($elementSubCategory, "cmp"); + $i=0; + $tmp2[$parent][$category][$subcategory][0]= array ('is' => null); + foreach($elementSubCategory as $count=>&$element3) + { + if($element3["id"]!=$tmp2[$parent][$category][$subcategory][$i]["id"]) + { + if($tmp2[$parent][$category][$subcategory][$i]["id"]!=null) + { + $i++; + } + } + $tmp2[$parent][$category][$subcategory][$i]["id"]=$element3["id"]; + $tmp2[$parent][$category][$subcategory][$i]["name"]=$element3["name"]; + $tmp2[$parent][$category][$subcategory][$i]["code"]=$element3["code"]; + $tmp2[$parent][$category][$subcategory][$i]["parent_id"]=$element3["parent_id"]; + $tmp2[$parent][$category][$subcategory][$i]["stan"] = $element3["stan"]; + $tmp2[$parent][$category][$subcategory][$i]["wartosc"] = $element3["wartosc"]; + + $tmp2[$parent]["StanSum"] += $element3["stan"]; + $tmp2[$parent]["WartoscSum"] += $element3["wartosc"]; + + $tmp2[$parent][$category]["StanSum"] += $element3["stan"]; + $tmp2[$parent][$category]["WartoscSum"] += $element3["wartosc"]; + + $tmp2[$parent][$category][$subcategory]["StanSum"] += $element3["stan"]; + $tmp2[$parent][$category][$subcategory]["WartoscSum"] += $element3["wartosc"]; + + $tmp2[$parent][$category][$subcategory][$i]["nettoNormal"] += $element3["netto"]; + $tmp2[$parent][$category][$subcategory][$i]["IloscNormal"] += $element3["ilosc"]; + + $tmp2[$parent][$category][$subcategory][$i]["ilosc"] += $element3["ilosc"]; + $tmp2[$parent][$category][$subcategory][$i]["netto"] += $element3["netto"]; + $tmp2[$parent][$category][$subcategory][$i]["koszt"] += $element3["koszt"]; + + } + if(is_array($tmp2[$parent][$category][$subcategory]["SredniaSum"]) || $tmp2[$parent][$category][$subcategory]["SredniaSum"]=="") + { + $tmp2[$parent][$category][$subcategory]["SredniaSum"] = 0; + } + } + if(is_array($tmp2[$parent][$category]["SredniaSum"])) + { + $tmp2[$parent][$category]["SredniaSum"] = 0; + } + } + + if(is_array($tmp2[$parent]["SredniaSum"])) + { + $tmp2[$parent]["SredniaSum"] = 0; + } + + $categoryArray1=$tmp2; + } + ////////////////// SORT sumSubCategory ///////////////////////////////// + foreach( $categoryArray1 as $parent=>&$elementParent ) + { + foreach( $elementParent as $category=>&$elementCategory ) + { + foreach( $elementCategory as $SubCategory1=>&$elementSubCategory1) + { + foreach( $elementCategory as $SubCategory2=>&$elementSubCategory2 ) + { + if($sumSubCategory["SoldSum"][$parent][$category][$SubCategory1]>$sumSubCategory["SoldSum"][$parent][$category][$SubCategory2]) + { + $tmp=$sumSubCategory["SoldSum"][$parent][$category][$SubCategory1]; + $sumSubCategory["SoldSum"][$parent][$category][$SubCategory1]=$sumSubCategory["SoldSum"][$parent][$category][$SubCategory2]; + $sumSubCategory["SoldSum"][$parent][$category][$SubCategory2]=$tmp; + } + } + } + } + } + ////////////////// SORT sumCategory ///////////////////////////////// + foreach( $categoryArray1 as $parent=>&$elementParent ) + { + foreach( $elementParent as $category1=>&$elementCategory1 ) + { + foreach( $elementParent as $category2=>&$elementCategory2 ) + { + if($sumCategory["SoldSum"][$parent][$category1]>$sumCategory["SoldSum"][$parent][$category2]) + { + $tmp=$sumCategory["SoldSum"][$parent][$category1]; + $sumCategory["SoldSum"][$parent][$category1]=$sumCategory["SoldSum"][$parent][$category2]; + $sumCategory["SoldSum"][$parent][$category2]=$tmp; + } + } + } + } + + ////////////////// SORT $sumContracor ///////////////////////////////// + foreach( $categoryArray1 as $parent1=>&$elementParent1 ) + { + foreach( $categoryArray1 as $parent2=>&$elementParent2 ) + { + if($sumContracor["SoldSum"][$parent1]>$sumContracor["SoldSum"][$parent2]) + { + $tmp=$sumContracor["SoldSum"][$parent1]; + $sumContracor["SoldSum"][$parent1]=$sumContracor["SoldSum"][$parent2]; + $sumContracor["SoldSum"][$parent2]=$tmp; + } + + } + + } + ////////////////// SORT array at sumContracor///////////////////////////////// + $newArray2; + foreach( $categoryArray1 as $parent1=>&$elementParent1 ) + { + foreach( $categoryArray1 as $parent2=>&$elementParent2 ) + { + if($sumContracor["SoldSum"][$parent1]==$categoryArray1[$parent2]["SoldSum"]) + { + $newArray2[$parent2]=$categoryArray1[$parent2]; + } + } + } + + ////////////////// SORT array at sumCategory///////////////////////////////// + $newArray1; + foreach( $newArray2 as $parent=>&$elementParent ) + { + foreach( $elementParent as $category1=>&$elementCategory1 ) + { + foreach( $elementParent as $category2=>&$elementCategory2 ) + { + if($sumCategory["SoldSum"][$parent][$category1]==$newArray2[$parent][$category2]["SoldSum"]) + { + $newArray1[$parent][$category2]=$newArray2[$parent][$category2]; + } + } + } + } + + ////////////////// SORT array at sumSubCategory///////////////////////////////// + $newArray; + foreach( $newArray1 as $parent=>&$elementParent ) + { + foreach( $elementParent as $category=>&$elementCategory ) + { + foreach( $elementCategory as $subcategory1=>&$elementSubCategory ) + { + foreach( $elementCategory as $subcategory2=>&$elementSubCategory ) + { + if($sumSubCategory["SoldSum"][$parent][$category][$subcategory1]==$newArray1[$parent][$category][$subcategory2]["SoldSum2"]) + { + $newArray[$parent][$category][$subcategory2]=$newArray1[$parent][$category][$subcategory2]; + } + } + } + } + $newArray[$parent]["IloscSum"]=$newArray1[$parent]["IloscSum"]; + $newArray[$parent]["SoldSum"]=$newArray1[$parent]["SoldSum"]; + $newArray[$parent]["SredniaSum"]=$newArray1[$parent]["SredniaSum"]; + $newArray[$parent]["KosztSum"]=$newArray1[$parent]["KosztSum"]; + $newArray[$parent]["MarzaSum"]=$newArray1[$parent]["MarzaSum"]; + } + + //wyliczanie dokładne marży i średniej dla produktów + foreach( $newArray as $parent=>&$elementParent ) + { + foreach( $elementParent as $category=>&$elementCategory ) + { + foreach( $elementCategory as $subcategory=>&$elementSubCategory ) + { + foreach( $elementSubCategory as $key=>&$element ) + { + $newArray[$parent][$category][$subcategory][$key]["marza"] = ($newArray[$parent][$category][$subcategory][$key]["nettoNormal"]-$newArray[$parent][$category][$subcategory][$key]["koszt"])/$newArray[$parent][$category][$subcategory][$key]["nettoNormal"]*100; + $newArray[$parent][$category][$subcategory][$key]["srednia"] = $newArray[$parent][$category][$subcategory][$key]["nettoNormal"]/$newArray[$parent][$category][$subcategory][$key]["IloscNormal"]; + } + } + } + } +} +?> \ No newline at end of file diff --git a/modules/EcmStockStates/EcmStockState.php b/modules/EcmStockStates/EcmStockState.php index 939dc380..46ea8ddb 100755 --- a/modules/EcmStockStates/EcmStockState.php +++ b/modules/EcmStockStates/EcmStockState.php @@ -1,33 +1,33 @@ setupCustomFields('EcmStockStates'); - foreach($this->field_defs as $field){ - $this->field_name_map[$field['name']] = $field; + var $new_schema = true; + + var $additional_column_fields = array('assigned_user_name', 'assigned_user_id'); + + function EcmStockState() + { + parent::SugarBean(); + $this->setupCustomFields('EcmStockStates'); + foreach ($this->field_defs as $field) { + $this->field_name_map[$field['name']] = $field; } - } - function get_summary_text(){ - return $this->name; - } - function create_list_query($order_by, $where, $show_deleted = 0){ - $custom_join = $this->custom_fields->getJOIN(); - $query ="SELECT "; - $query.="ecmstockstates.*,users.user_name as assigned_user_name"; - if($custom_join)$query.=$custom_join['select']; - $query.=" FROM ecmstockstates "; - $query.="LEFT JOIN users ON ecmstockstates.assigned_user_id=users.id"; - $query.=" "; - if($custom_join)$query.=$custom_join['join']; - $where_auto='1=1'; - if($show_deleted==0)$where_auto=" $this->table_name.deleted=0 "; - elseif($show_deleted==1)$where_auto=" $this->table_name.deleted=1 "; - if($where!="")$query.="where $where AND ".$where_auto; - else $query.="where ".$where_auto; - if(substr_count($order_by,'.')>0)$query .= " ORDER BY $order_by"; - elseif($order_by != "")$query .= " ORDER BY $order_by"; - else $query .= " ORDER BY ecmstockstates.name"; - - - return $query; - - } - function create_export_query($order_by,$where){ - $custom_join = $this->custom_fields->getJOIN(); - $query ="SELECT "; - $query.="ecmstockstates.*,users.user_name as assigned_user_name"; - if($custom_join)$query.=$custom_join['select']; - $query.=" FROM ecmstockstates "; - $query.="LEFT JOIN users ON ecmstockstates.assigned_user_id=users.id"; - $query.=" "; - if($custom_join)$query.=$custom_join['join']; - $where_auto='1=1'; - if($show_deleted==0)$where_auto=" $this->table_name.deleted=0 "; - elseif($show_deleted==1)$where_auto=" $this->table_name.deleted=1 "; - if($where!="")$query.="where $where AND ".$where_auto; - else $query.="where ".$where_auto; - if(substr_count($order_by,'.')>0)$query .= " ORDER BY $order_by"; - elseif($order_by != "")$query .= " ORDER BY $order_by"; - else $query .= " ORDER BY ecmstockstates.name"; - return $query; } - function fill_in_additional_list_fields(){ - } - function fill_in_additional_detail_fields(){ + function get_summary_text() + { + return $this->name; + } + + function create_list_query($order_by, $where, $show_deleted = 0) + { + $custom_join = $this->custom_fields->getJOIN(); + $query = "SELECT "; + $query .= "ecmstockstates.*,users.user_name as assigned_user_name"; + if ($custom_join) $query .= $custom_join['select']; + $query .= " FROM ecmstockstates "; + $query .= "LEFT JOIN users ON ecmstockstates.assigned_user_id=users.id"; + $query .= " "; + if ($custom_join) $query .= $custom_join['join']; + $where_auto = '1=1'; + if ($show_deleted == 0) $where_auto = " $this->table_name.deleted=0 "; + elseif ($show_deleted == 1) $where_auto = " $this->table_name.deleted=1 "; + if ($where != "") $query .= "where $where AND " . $where_auto; + else $query .= "where " . $where_auto; + if (substr_count($order_by, '.') > 0) $query .= " ORDER BY $order_by"; + elseif ($order_by != "") $query .= " ORDER BY $order_by"; + else $query .= " ORDER BY ecmstockstates.name"; + + + return $query; + + } + + function create_export_query($order_by, $where) + { + $custom_join = $this->custom_fields->getJOIN(); + $query = "SELECT "; + $query .= "ecmstockstates.*,users.user_name as assigned_user_name"; + if ($custom_join) $query .= $custom_join['select']; + $query .= " FROM ecmstockstates "; + $query .= "LEFT JOIN users ON ecmstockstates.assigned_user_id=users.id"; + $query .= " "; + if ($custom_join) $query .= $custom_join['join']; + $where_auto = '1=1'; + if ($show_deleted == 0) $where_auto = " $this->table_name.deleted=0 "; + elseif ($show_deleted == 1) $where_auto = " $this->table_name.deleted=1 "; + if ($where != "") $query .= "where $where AND " . $where_auto; + else $query .= "where " . $where_auto; + if (substr_count($order_by, '.') > 0) $query .= " ORDER BY $order_by"; + elseif ($order_by != "") $query .= " ORDER BY $order_by"; + else $query .= " ORDER BY ecmstockstates.name"; + return $query; + } + + function fill_in_additional_list_fields() + { + } + + function fill_in_additional_detail_fields() + { parent::fill_in_additional_detail_fields(); - } - function UpdateStockState($stock_id,$product_id){ + } - $q=0; - $p=0; - $i=0; - $pp=0; - $qq=0; + function UpdateStockState($stock_id, $product_id) + { + $q = 0; + $p = 0; + $i = 0; + $pp = 0; + $qq = 0; - $w=$GLOBALS['db']->query("select quantity as qty,id,price from ecmstockoperations where deleted='0' and type='0' and used=0 and in_id IS NULL and stock_id='".$stock_id."' and product_id='".$product_id."'"); - while($rrr=$GLOBALS['db']->fetchByAssoc($w)){ - $rrp=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(quantity) as s from ecmstockoperations where in_id='".$rrr['id']."' and type='1' and in_id IS NOT NULL and stock_id='".$stock_id."' and product_id='".$product_id."' and deleted='0'")); - $rqty=$rrp['s']; - /*$ww=mysql_query("select quantity from ecmstockoperations where in_id='".$rrr['id']."' and type='1' and in_id IS NOT NULL and stock_id='".$stock_id."' and product_id='".$product_id."' and deleted='0'"); - $rqty=0; - while($rrp=mysql_fetch_array($ww)){ - $rqty+=$rrp['quantity']; - }*/ - $qty=$rrr['qty']-$rqty; - if($qty>0){ - $arr[]=array("qty"=>$qty,"id"=>$rrr['id'],"price"=>$rrr['price']); - } - else if ($qty==0) { - //set used = 1 - $GLOBALS['db']->query("UPDATE ecmstockoperations SET used='1' WHERE id='".$rrr['id']."'"); - } - } + $w = $GLOBALS['db']->query("select quantity as qty, id, price, parent_id, parent_type, parent_name from ecmstockoperations where deleted='0' and type='0' and used=0 and in_id IS NULL and stock_id='" . $stock_id . "' and product_id='" . $product_id . "'"); + while ($rrr = $GLOBALS['db']->fetchByAssoc($w)) { + $rrp = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(quantity) as s from ecmstockoperations where in_id='" . $rrr['id'] . "' and type='1' and in_id IS NOT NULL and stock_id='" . $stock_id . "' and product_id='" . $product_id . "' and deleted='0'")); + $rqty = $rrp['s']; + $qty = $rrr['qty'] - $rqty; + if ($qty > 0) { + $arr[] = array("qty" => $qty, "id" => $rrr['id'], "price" => $rrr['price'], + "parent_id"=>$rrr['parent_id'], "parent_type"=>$rrr['parent_type'], "parent_name"=>$rrr['parent_name']); + } else if ($qty == 0) { + //set used = 1 + $GLOBALS['db']->query("UPDATE ecmstockoperations SET used='1' WHERE id='" . $rrr['id'] . "'"); + } + } - if(count($arr)>0){ - foreach($arr as $v){ - $q1+=$v['qty']; - $pp1+=$v['qty']*$v['price']; - } - } + if (count($arr) > 0) { + foreach ($arr as $v) { + $q1 += $v['qty']; + $pp1 += $v['qty'] * $v['price']; + } + } - /* - if($_REQUEST['type']=="test"){ - $w=$GLOBALS['db']->query("select quantity,price,type from ecmstockoperations where stock_id='".$stock_id."' and product_id='".$product_id."' and deleted='0'"); - while($r=$GLOBALS['db']->fetchByAssoc($w)){ - if($r['type']==0){ - $q+=$r['quantity']; - $pp+=$r['quantity']*$r['price']; - $i++; - } - else{ - $q-=$r['quantity']; - $pp-=$r['quantity']*$r['price']; - } - } - if($q1!=$q){ - $rprod=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select code,name from ecmproducts where id='".$product_id."'")); - echo $q1." == ".$q." ".$rprod['code']." ".$rprod['name']."
"; - } - } - */ + if ($_REQUEST['type'] != "test") { + $GLOBALS['db']->query("delete from ecmstockstates where stock_id='" . $stock_id . "' and product_id='" . $product_id . "' and deleted='0'"); - if($_REQUEST['type']!="test"){ - $GLOBALS['db']->query("delete from ecmstockstates where stock_id='".$stock_id."' and product_id='".$product_id."' and deleted='0'"); - - require_once("modules/EcmStockOperations/EcmStockOperation.php"); - $o=new EcmStockState(); - $o->unformat_all_fields(); - - require_once("modules/EcmProducts/EcmProduct.php"); - $o->product_id=$product_id; - $p=new EcmProduct(); - $p->retrieve($product_id); - $o->product_name=$p->name; - $o->product_code=$p->code; - $o->product_id=$p->id; - - require_once("modules/EcmStocks/EcmStock.php"); - $o->stock_id=$stock_id; - $s=new EcmStock(); - $s->retrieve($stock_id); - $o->stock_name=$s->name; - $o->quantity=$q1; - if($q1>0)$o->price=$pp1/$q1; - if($p->id)$oid=$o->save(); - //if($q1>0)if($p->code=="RE00867")echo ($pp1/$q1)."
"; - if($q1>0)$GLOBALS['db']->query("update ecmstockstates set price='".($pp1/$q1)."' where id='".$oid."'"); - } - - //add mz - //update ems_price - $GLOBALS['db']->query( - "UPDATE ecmproducts as p + require_once("modules/EcmStockOperations/EcmStockOperation.php"); + $o = new EcmStockState(); + $o->unformat_all_fields(); + + require_once("modules/EcmProducts/EcmProduct.php"); + $o->product_id = $product_id; + $p = new EcmProduct(); + $p->retrieve($product_id); + $o->product_name = $p->name; + $o->product_code = $p->code; + $o->product_id = $p->id; + + require_once("modules/EcmStocks/EcmStock.php"); + $o->stock_id = $stock_id; + $s = new EcmStock(); + $s->retrieve($stock_id); + $o->stock_name = $s->name; + $o->quantity = $q1; + if ($q1 > 0) $o->price = $pp1 / $q1; + if ($p->id) $oid = $o->save(); + //if($q1>0)if($p->code=="RE00867")echo ($pp1/$q1)."
"; + if ($q1 > 0) $GLOBALS['db']->query("update ecmstockstates set price='" . ($pp1 / $q1) . "' where id='" . $oid . "'"); + } + + //add mz + //update ems_price + $GLOBALS['db']->query( + "UPDATE ecmproducts as p INNER JOIN ( SELECT round(sum(quantity*price)/sum(quantity),2) as avg_price, product_id, SUM(quantity) as stock_state FROM ecmstockstates GROUP BY product_id ) s ON p.id=s.product_id SET p.ems_price = s.avg_price, p.ems_qty_in_stock = s.stock_state WHERE p.id='$product_id'" - ); - } - function get_list_view_data(){ - global $current_language,$current_user; - $the_array=parent::get_list_view_data(); - $app_list_strings=return_app_list_strings_language($current_language); - $mod_strings=return_module_language($current_language,'EcmStockStates'); + ); + } - $the_array['NAME']=(($this->name == "") ? "blank" : $this->name); - $the_array['NEW_FIELD'] ='1'; - /* - $r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select ecmproducts.name from ecmstockstates inner join ecmproducts on ecmproducts.id=ecmstockstates.product_id")); - $the_array['PRODUCT_NAME']=$r['name']; - - $r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select ecmstocks.name from ecmstockstates inner join ecmstocks on ecmstocks.id=ecmstockstates.stock_id")); - $the_array['STOCK_NAME']=$r['name']; - - $this->retrieve($this->id); - $dd=substr($this->parent_type,0,strlen($this->parent_type)-1); - require_once("modules/".$this->parent_type."/".$dd.".php"); - $d=new $dd(); - $d->retrieve($this->parent_id); - $the_array['PARENT_NAME']=$d->number; - */ - + function save($check_notify = FALSE) + { + return parent::save($check_notify); + } - $the_array['ENCODED_NAME']=$this->name; - return $the_array; - } - function build_generic_where_clause($the_query_string){ - $where_clauses=array(); - $the_query_string=PearDatabase::quote(from_html($the_query_string)); - array_push($where_clauses,"ecmstockstates.name like '$the_query_string%'"); + function get_list_view_data() + { + global $current_language, $current_user; + $the_array = parent::get_list_view_data(); + $app_list_strings = return_app_list_strings_language($current_language); + $mod_strings = return_module_language($current_language, 'EcmStockStates'); - $the_where=""; - foreach($where_clauses as $clause){ - if($the_where!="")$the_where.=" or "; - $the_where.=$clause; - } - return $the_where; - } - function set_notification_body($xtpl,$ecmstockstate) - { - global $mod_strings,$app_list_strings; - $xtpl->assign("ECMSTOCKSTATE_SUBJECT",$ecmstockstate->name); - return $xtpl; - } - - function bean_implements($interface){ - switch($interface){ - case 'ACL':return true; - } - return false; - } - - function save($check_notify=FALSE){ - return parent::save($check_notify); - } + $the_array['NAME'] = (($this->name == "") ? "blank" : $this->name); + $the_array['NEW_FIELD'] = '1'; + /* + $r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select ecmproducts.name from ecmstockstates inner join ecmproducts on ecmproducts.id=ecmstockstates.product_id")); + $the_array['PRODUCT_NAME']=$r['name']; + + $r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select ecmstocks.name from ecmstockstates inner join ecmstocks on ecmstocks.id=ecmstockstates.stock_id")); + $the_array['STOCK_NAME']=$r['name']; + + $this->retrieve($this->id); + $dd=substr($this->parent_type,0,strlen($this->parent_type)-1); + require_once("modules/".$this->parent_type."/".$dd.".php"); + $d=new $dd(); + $d->retrieve($this->parent_id); + $the_array['PARENT_NAME']=$d->number; + */ + + + $the_array['ENCODED_NAME'] = $this->name; + return $the_array; + } + + function build_generic_where_clause($the_query_string) + { + $where_clauses = array(); + $the_query_string = PearDatabase::quote(from_html($the_query_string)); + array_push($where_clauses, "ecmstockstates.name like '$the_query_string%'"); + + $the_where = ""; + foreach ($where_clauses as $clause) { + if ($the_where != "") $the_where .= " or "; + $the_where .= $clause; + } + return $the_where; + } + + function set_notification_body($xtpl, $ecmstockstate) + { + global $mod_strings, $app_list_strings; + $xtpl->assign("ECMSTOCKSTATE_SUBJECT", $ecmstockstate->name); + return $xtpl; + } + + function bean_implements($interface) + { + switch ($interface) { + case 'ACL': + return true; + } + return false; + } } + ?> diff --git a/modules/EcmStockStates/rebuildState.php b/modules/EcmStockStates/rebuildState.php index 9966b130..61471f23 100755 --- a/modules/EcmStockStates/rebuildState.php +++ b/modules/EcmStockStates/rebuildState.php @@ -1,35 +1,27 @@ query("update ecmstockoperations set used=0 where product_id in ( +foreach ($codes as $code) { + if ($code == "") continue; + $z2 = $db->query("select id from ecmproducts where code='$code' and deleted=0"); -'554','322','360','586')"); -$z2=$db->query("select id from ecmproducts where id in ( + while ($p = $db->fetchByAssoc($z2)) { -'554','322','360','586' - ) and deleted=0"); - -while($p=$db->fetchByAssoc($z2)){ - - $w=$db->query("select id from ecmstocks where deleted='0'"); - while($r=$db->fetchByAssoc($w)){ - $ss->UpdateStockState($r['id'],$p['id']); - echo "updated"; - } - $w=$db->query("select quantity,stock_name,price,product_code from ecmstockstates where product_id='".$p['id']."' and deleted='0'"); - while($s=$db->fetchByAssoc($w)){ - echo $s['product_code']." ".$s['stock_name']." ".$s['quantity']." ".$s['price']."
"; - } - } + $w = $db->query("select id from ecmstocks where deleted='0'"); + while ($r = $db->fetchByAssoc($w)) { + $ss->UpdateStockState($r['id'], $p['id']); + } + $w = $db->query("select quantity,stock_name,price,product_code from ecmstockstates where product_id='" . $p['id'] . "' and deleted='0'"); + while ($s = $db->fetchByAssoc($w)) { + echo $s['product_code'] . " " . $s['stock_name'] . " " . $s['quantity'] . " " . $s['price'] . "
"; + } + } } - -?>