diff --git a/application/controllers/Reports.php b/application/controllers/Reports.php index 3e5cb5529..777e71f4c 100644 --- a/application/controllers/Reports.php +++ b/application/controllers/Reports.php @@ -780,22 +780,41 @@ class Reports extends Secure_Controller public function specific_customer_input() { $data = array(); - $data['specific_input_name'] = $this->lang->line('reports_customer'); - + $data['specific_input_name'] = $this->lang->line('reports_customer'); $customers = array(); foreach($this->Customer->get_all()->result() as $customer) { - $customers[$customer->person_id] = $this->xss_clean($customer->first_name . ' ' . $customer->last_name); + if(isset($customer->company_name)) + { + $customers[$customer->person_id] = $this->xss_clean($customer->first_name . ' ' . $customer->last_name. ' ' . ' [ '.$customer->company_name.' ] '); + } + else + { + $customers[$customer->person_id] = $this->xss_clean($customer->first_name . ' ' . $customer->last_name); + } } $data['specific_input_data'] = $customers; $data['sale_type_options'] = $this->get_sale_type_options(); - $this->load->view('reports/specific_input', $data); + $data['payment_type'] = $this->get_payment_type(); + $this->load->view('reports/specific_customer_input', $data); } + + public function get_payment_type() + { + $payment_type = array( 'all' => $this->lang->line('common_none_selected_text'), + 'cash' => $this->lang->line('sales_cash'), + 'due' => $this->lang->line('sales_due'), + 'check' => $this->lang->line('sales_check'), + 'credit' => $this->lang->line('sales_credit'), + 'debit' => $this->lang->line('sales_debit'), + 'invoices' => $this->lang->line('sales_invoice')); + return $payment_type; + } - public function specific_customer($start_date, $end_date, $customer_id, $sale_type) + public function specific_customer($start_date, $end_date, $customer_id, $sale_type, $payment_type) { - $inputs = array('start_date' => $start_date, 'end_date' => $end_date, 'customer_id' => $customer_id, 'sale_type' => $sale_type); + $inputs = array('start_date' => $start_date, 'end_date' => $end_date, 'customer_id' => $customer_id, 'sale_type' => $sale_type, 'payment_type' => $payment_type); $this->load->model('reports/Specific_customer'); $model = $this->Specific_customer; @@ -823,7 +842,7 @@ class Reports extends Secure_Controller } $summary_data[] = $this->xss_clean(array( - 'id' => anchor('sales/receipt/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target'=>'_blank')), + 'id' => $row['sale_id'], 'type_code' => $row['type_code'], 'sale_date' => $row['sale_date'], 'quantity' => to_quantity_decimals($row['items_purchased']), @@ -865,10 +884,20 @@ class Reports extends Secure_Controller } $customer_info = $this->Customer->get_info($customer_id); + if(!empty($customer_info->company_name)) + { + $customer_name ='[ '.$customer_info->company_name.' ]'; + } + else + { + $customer_name = $customer_info->company_name; + } + $data = array( 'title' => $this->xss_clean($customer_info->first_name . ' ' . $customer_info->last_name . ' ' . $this->lang->line('reports_report')), 'subtitle' => $this->_get_subtitle_report(array('start_date' => $start_date, 'end_date' => $end_date)), 'headers' => $headers, + 'editable' => 'sales', 'summary_data' => $summary_data, 'details_data' => $details_data, 'details_data_rewards' => $details_data_rewards, @@ -924,7 +953,7 @@ class Reports extends Secure_Controller } $summary_data[] = $this->xss_clean(array( - 'id' => anchor('sales/receipt/'.$row['sale_id'], 'POS '.$row['sale_id'], array('target'=>'_blank')), + 'id' => $row['sale_id'], 'type_code' => $row['type_code'], 'sale_date' => $row['sale_date'], 'quantity' => to_quantity_decimals($row['items_purchased']), @@ -970,6 +999,7 @@ class Reports extends Secure_Controller 'title' => $this->xss_clean($employee_info->first_name . ' ' . $employee_info->last_name . ' ' . $this->lang->line('reports_report')), 'subtitle' => $this->_get_subtitle_report(array('start_date' => $start_date, 'end_date' => $end_date)), 'headers' => $headers, + 'editable' => 'sales', 'summary_data' => $summary_data, 'details_data' => $details_data, 'details_data_rewards' => $details_data_rewards, diff --git a/application/language/ar-EG/common_lang.php b/application/language/ar-EG/common_lang.php index 4bd1d2fb3..b96994e39 100644 --- a/application/language/ar-EG/common_lang.php +++ b/application/language/ar-EG/common_lang.php @@ -51,6 +51,7 @@ $lang["common_price"] = "السعر"; $lang["common_print"] = "طباعة"; $lang["common_remove"] = "إزالة"; $lang["common_required"] = "مطلوب"; +$lang["common_restore"] = ""; $lang["common_return_policy"] = "سياسة الاسترجاع"; $lang["common_search"] = "بحث"; $lang["common_search_options"] = "خيارات البحث"; diff --git a/application/language/ar-EG/config_lang.php b/application/language/ar-EG/config_lang.php index bbecc8ecb..5afee3d00 100644 --- a/application/language/ar-EG/config_lang.php +++ b/application/language/ar-EG/config_lang.php @@ -2,6 +2,7 @@ $lang["config_address"] = "عنوان الشركة"; $lang["config_address_required"] = "عنوان الشركة مطلوب"; +$lang["config_allow_duplicate_barcodes"] = ""; $lang["config_apostrophe"] = "الفاصلة"; $lang["config_backup_button"] = "نسخ إحتياطى"; $lang["config_backup_database"] = "نسخ إحتياطى لقاعدة البيانات"; @@ -25,6 +26,7 @@ $lang["config_barcode_page_width"] = "عرض الصفحة"; $lang["config_barcode_price"] = "السعر"; $lang["config_barcode_second_row"] = "الصف 2"; $lang["config_barcode_third_row"] = "الصف 3"; +$lang["config_barcode_tooltip"] = ""; $lang["config_barcode_type"] = "نوعية الباركود"; $lang["config_barcode_width"] = "العرض (px)"; $lang["config_bottom"] = "الأسفل"; @@ -86,6 +88,8 @@ $lang["config_default_tax_rate_1"] = "معدل الضريبة 1"; $lang["config_default_tax_rate_2"] = "معدل الضريبة 2"; $lang["config_default_tax_rate_number"] = "معدل الضريبة الافتراضي يجب أن يكون رقم"; $lang["config_default_tax_rate_required"] = "معدل الضريبة الافتراضي مطلوب"; +$lang["config_derive_sale_quantity"] = ""; +$lang["config_derive_sale_quantity_tooltip"] = ""; $lang["config_dinner_table"] = ""; $lang["config_dinner_table_duplicate"] = ""; $lang["config_dinner_table_enable"] = ""; @@ -139,6 +143,7 @@ $lang["config_jsprintsetup_required"] = "تحذير! هذه الخاصية غي $lang["config_language"] = "اللغة"; $lang["config_last_used_invoice_number"] = "اخر رقم مستخدم للفاتورة"; $lang["config_last_used_quote_number"] = "اخر رقم مستخدم لعرض الاسعار"; +$lang["config_last_used_work_order_number"] = ""; $lang["config_left"] = "يسار"; $lang["config_license"] = "الرخصة"; $lang["config_license_configuration"] = "نص الرخصة"; @@ -222,17 +227,25 @@ $lang["config_sales_invoice_format"] = "شكل فاتورة البيع"; $lang["config_sales_quote_format"] = "شكل فاتورة عرض الاسعار"; $lang["config_saved_successfully"] = "تم حفظ التهيئة بنجاح"; $lang["config_saved_unsuccessfully"] = "لم يتم حفظ التهيئة بنجاح"; +$lang["config_show_office_group"] = ""; $lang["config_statistics"] = "إرسال اﻹحصائيات"; $lang["config_statistics_tooltip"] = "إرسال اﻹحصائيات ﻷغراض التطوير و التحسين"; $lang["config_stock_location"] = "مكان المخزون"; $lang["config_stock_location_duplicate"] = "من فضلك إستخدم اسم مكان غير مكرر"; $lang["config_stock_location_invalid_chars"] = "مكان المخزون لايمكن أن يحتوى على '_'"; $lang["config_stock_location_required"] = "مكان المخزون مطلوب"; +$lang["config_suggestions_first_column"] = ""; +$lang["config_suggestions_layout"] = ""; +$lang["config_suggestions_second_column"] = ""; +$lang["config_suggestions_third_column"] = ""; $lang["config_table"] = "جدول"; $lang["config_table_configuration"] = "اعدادات الجدول"; $lang["config_takings_printer"] = "طابعة الإيراد"; $lang["config_tax"] = "الضريبة"; $lang["config_tax_category"] = "تصنيف الضريبة"; +$lang["config_tax_category_duplicate"] = ""; +$lang["config_tax_category_invalid_chars"] = ""; +$lang["config_tax_category_required"] = ""; $lang["config_tax_category_used"] = ""; $lang["config_tax_configuration"] = "إعدادات الضريبة"; $lang["config_tax_decimals"] = "العلامة العشرية للضريبة"; @@ -242,3 +255,5 @@ $lang["config_thousands_separator"] = "فاصل الاف"; $lang["config_timezone"] = "المنطقة الزمنية"; $lang["config_top"] = "علوى"; $lang["config_website"] = "موقع الشركة"; +$lang["config_work_order_enable"] = ""; +$lang["config_work_order_format"] = ""; diff --git a/application/language/ar-EG/customers_lang.php b/application/language/ar-EG/customers_lang.php index fcb3a9e1d..909aa6452 100644 --- a/application/language/ar-EG/customers_lang.php +++ b/application/language/ar-EG/customers_lang.php @@ -9,6 +9,7 @@ $lang["customers_basic_information"] = ""; $lang["customers_cannot_be_deleted"] = "لايمكن حذف هؤلاء العملاء، أحدهم/كلهم مرتبط/مرتبطين بمبيعات"; $lang["customers_company_name"] = "اسم الشركة"; $lang["customers_confirm_delete"] = "هل تريد حذف هؤلاء العملاء حقاً؟"; +$lang["customers_confirm_restore"] = ""; $lang["customers_customer"] = "العميل"; $lang["customers_discount"] = "نسبة الخصم"; $lang["customers_email_duplicate"] = ""; diff --git a/application/language/ar-EG/employees_lang.php b/application/language/ar-EG/employees_lang.php index b923551c4..5a91c15e7 100644 --- a/application/language/ar-EG/employees_lang.php +++ b/application/language/ar-EG/employees_lang.php @@ -4,12 +4,14 @@ $lang["employees_basic_information"] = "المعلومات الأساسية لل $lang["employees_cannot_be_deleted"] = "لايمكن حذف الموظفين ، واحد أو أكثر من المظفين قام بإجراء مبيعات :)"; $lang["employees_change_password"] = ""; $lang["employees_confirm_delete"] = "هل أنت متأكد أنك تريد حذف الموظفين المختارين؟"; +$lang["employees_confirm_restore"] = ""; $lang["employees_current_password"] = ""; $lang["employees_current_password_invalid"] = ""; $lang["employees_employee"] = "موظف"; $lang["employees_error_adding_updating"] = "خطاء فى إضافة/تعديل موظف"; $lang["employees_error_deleting_demo_admin"] = "لايمكن حذف المستخدم admin الخاص بنسخة العرض"; $lang["employees_error_updating_demo_admin"] = "لايمكن تغيير بيانات المستخدم admin الخاص بنسخة العرض"; +$lang["employees_language"] = ""; $lang["employees_login_info"] = "معلومات دخول الموظف"; $lang["employees_new"] = "موظف جديد"; $lang["employees_none_selected"] = "لم تختار أى من الموظفين للحذف"; @@ -27,6 +29,7 @@ $lang["employees_successful_adding"] = "لقد تم إضافة الموظف بن $lang["employees_successful_change_password"] = ""; $lang["employees_successful_deleted"] = "لقد تم حذف الموظف بنجاح"; $lang["employees_successful_updating"] = "لقد تم تحديث بيانات الموظف بنجاح"; +$lang["employees_system_language"] = ""; $lang["employees_unsuccessful_change_password"] = ""; $lang["employees_update"] = "تحديث بيانات موظف"; $lang["employees_username"] = "اسم المستخدم"; diff --git a/application/language/ar-EG/expenses_categories_lang.php b/application/language/ar-EG/expenses_categories_lang.php index b3d9bbc7f..54b71323c 100644 --- a/application/language/ar-EG/expenses_categories_lang.php +++ b/application/language/ar-EG/expenses_categories_lang.php @@ -1 +1,20 @@ -Pendent"; +$lang["sales_suspended_doc_id"] = ""; $lang["sales_suspended_sale_id"] = "ID"; $lang["sales_suspended_sales"] = "Pendente Aufträge"; $lang["sales_table"] = ""; @@ -136,8 +149,14 @@ $lang["sales_total_tax_exclusive"] = "Total exkl. MWSt."; $lang["sales_transaction_failed"] = "Verarbeitung fehlerhaft"; $lang["sales_unable_to_add_item"] = "Kann Artikel nicht zum Auftrag hinzufügen"; $lang["sales_unsuccessfully_deleted"] = "Löschung nicht erfolgreich"; +$lang["sales_unsuccessfully_restored"] = ""; $lang["sales_unsuccessfully_suspended_sale"] = "Auftrag wurde erfolgreich pendent gehalten"; $lang["sales_unsuccessfully_updated"] = "Änderung nicht erfolgreich"; $lang["sales_unsuspend"] = "Aktivieren"; $lang["sales_unsuspend_and_delete"] = "Aktivieren und löschen"; $lang["sales_update"] = "Ändern"; +$lang["sales_work_order"] = ""; +$lang["sales_work_order_number"] = ""; +$lang["sales_work_order_number_duplicate"] = ""; +$lang["sales_work_order_sent"] = ""; +$lang["sales_work_order_unsent"] = ""; diff --git a/application/language/de-CH/suppliers_lang.php b/application/language/de-CH/suppliers_lang.php index f5afc0705..a6ae22cd2 100644 --- a/application/language/de-CH/suppliers_lang.php +++ b/application/language/de-CH/suppliers_lang.php @@ -6,6 +6,7 @@ $lang["suppliers_cannot_be_deleted"] = "Kann gewählte Lieferanten nicht lösche $lang["suppliers_company_name"] = "Firmenname"; $lang["suppliers_company_name_required"] = "Firmenname ist erforderlich"; $lang["suppliers_confirm_delete"] = "Wollen Sie die gewählten Lieferanten löschen?"; +$lang["suppliers_confirm_restore"] = ""; $lang["suppliers_error_adding_updating"] = "Fehler beim Hinzufügen/Ändern"; $lang["suppliers_new"] = "Neuer Lieferant"; $lang["suppliers_none_selected"] = "Sie haben keinen Lieferanten zum Löschen ausgewählt"; diff --git a/application/language/de-CH/taxes_lang.php b/application/language/de-CH/taxes_lang.php index feb59c695..d242b9c97 100644 --- a/application/language/de-CH/taxes_lang.php +++ b/application/language/de-CH/taxes_lang.php @@ -2,6 +2,7 @@ $lang["taxes_add_exception"] = ""; $lang["taxes_confirm_delete"] = ""; +$lang["taxes_confirm_restore"] = ""; $lang["taxes_default_tax_category"] = ""; $lang["taxes_error_adding_updating"] = ""; $lang["taxes_new"] = ""; diff --git a/application/language/de/common_lang.php b/application/language/de/common_lang.php index 7f2f05ef8..3d525c5f7 100644 --- a/application/language/de/common_lang.php +++ b/application/language/de/common_lang.php @@ -51,6 +51,7 @@ $lang["common_price"] = "Preis"; $lang["common_print"] = "Drucken"; $lang["common_remove"] = "Annulieren"; $lang["common_required"] = "Erforderlich"; +$lang["common_restore"] = ""; $lang["common_return_policy"] = "Rücknahmeerklärung"; $lang["common_search"] = "Suche"; $lang["common_search_options"] = "Suchkriterien"; diff --git a/application/language/de/config_lang.php b/application/language/de/config_lang.php index aecf612aa..09966445c 100644 --- a/application/language/de/config_lang.php +++ b/application/language/de/config_lang.php @@ -55,10 +55,10 @@ $lang["config_custom7"] = "Zusatzfeld 7"; $lang["config_custom8"] = "Zusatzfeld 8"; $lang["config_custom9"] = "Zusatzfeld 9"; $lang["config_customer_reward"] = "Prämie"; -$lang["config_customer_reward_duplicate"] = ""; -$lang["config_customer_reward_enable"] = ""; -$lang["config_customer_reward_invalid_chars"] = ""; -$lang["config_customer_reward_required"] = ""; +$lang["config_customer_reward_duplicate"] = "Die Prämie muss eindeutig sein."; +$lang["config_customer_reward_enable"] = "Kundenprämien aktivieren"; +$lang["config_customer_reward_invalid_chars"] = "Eine Prämie darf kein '_' enthalten"; +$lang["config_customer_reward_required"] = "Prämie ist erforderlich"; $lang["config_customer_sales_tax_support"] = ""; $lang["config_date_or_time_format"] = "Datum und Uhrzeit Filter"; $lang["config_datetimeformat"] = "Datum und Zeit Format"; @@ -117,9 +117,9 @@ $lang["config_financial_year_nov"] = "1. November"; $lang["config_financial_year_oct"] = "1. Oktober"; $lang["config_financial_year_sep"] = "1. September"; $lang["config_gcaptcha_enable"] = "Login reCAPTCHA"; -$lang["config_gcaptcha_secret_key"] = "reCAPTCHA Secret Key"; +$lang["config_gcaptcha_secret_key"] = "reCAPTCHA: Geheimer Schlüssel"; $lang["config_gcaptcha_secret_key_required"] = "reCAPTCHA Secret Key wird benötigt"; -$lang["config_gcaptcha_site_key"] = "reCAPTCHA Site Key"; +$lang["config_gcaptcha_site_key"] = "reCAPTCHA: Seitenschlüssel"; $lang["config_gcaptcha_site_key_required"] = "reCAPTCHA Site Key wird benötigt"; $lang["config_gcaptcha_tooltip"] = "Login mit Google reCAPTCHA schützen, das Icon anklicken um ein Schlüsselpaar zu erhalten."; $lang["config_general"] = "Einstellungen"; @@ -233,8 +233,8 @@ $lang["config_table_configuration"] = "Tabelle konfigurieren"; $lang["config_takings_printer"] = "Einnahmendrucker"; $lang["config_tax"] = "Steuer"; $lang["config_tax_category"] = "Steuerkategorie"; -$lang["config_tax_category_used"] = ""; -$lang["config_tax_configuration"] = ""; +$lang["config_tax_category_used"] = "Die Steuerkategorie kann nicht gelöscht werden, da sie in Benutzung ist."; +$lang["config_tax_configuration"] = "Steuer-Konfiguration"; $lang["config_tax_decimals"] = "Steuer Dezimalstellen"; $lang["config_tax_included"] = "MWSt inbegriffen"; $lang["config_theme"] = "Design"; diff --git a/application/language/de/customers_lang.php b/application/language/de/customers_lang.php index cedc2edf0..6688df010 100644 --- a/application/language/de/customers_lang.php +++ b/application/language/de/customers_lang.php @@ -9,6 +9,7 @@ $lang["customers_basic_information"] = "Grundlegende Informationen"; $lang["customers_cannot_be_deleted"] = "Kunde kann nicht gelöscht werden, ein oder mehrere Kunden weisen Verkäufe auf."; $lang["customers_company_name"] = "Firmenname"; $lang["customers_confirm_delete"] = "Wollen Sie die gewählten Kunden wirklich löschen?"; +$lang["customers_confirm_restore"] = ""; $lang["customers_customer"] = "Kunde"; $lang["customers_discount"] = "Rabatt"; $lang["customers_email_duplicate"] = "E-Mail Adresse ist bereits in der Datenbank vorhanden."; diff --git a/application/language/de/employees_lang.php b/application/language/de/employees_lang.php index 473fed531..ac8b6e1f3 100644 --- a/application/language/de/employees_lang.php +++ b/application/language/de/employees_lang.php @@ -4,12 +4,14 @@ $lang["employees_basic_information"] = "Mitarbeiter-Information"; $lang["employees_cannot_be_deleted"] = "Konnte gewählten Mitarbeiter nicht löschen, einer oder mehrere weisen Verkäufe aus."; $lang["employees_change_password"] = "Passwort Ändern"; $lang["employees_confirm_delete"] = "Wollen Sie diesen Mitarbeiter wirklich löschen?"; +$lang["employees_confirm_restore"] = ""; $lang["employees_current_password"] = "Aktuelles Passwort"; $lang["employees_current_password_invalid"] = "Aktuelles Passwort ist ungültig."; $lang["employees_employee"] = "Mitarbeiter"; $lang["employees_error_adding_updating"] = "Fehler beim Hinzufügen/Ändern."; $lang["employees_error_deleting_demo_admin"] = "Sie können den Demo-Administrator nicht löschen."; $lang["employees_error_updating_demo_admin"] = "Sie können den Demo-Administrator nicht verändern."; +$lang["employees_language"] = ""; $lang["employees_login_info"] = "Mitarbeiter Login"; $lang["employees_new"] = "Neuer Mitarbeiter"; $lang["employees_none_selected"] = "Sie haben keine Mitarbeiter zum Löschen gewählt."; @@ -27,6 +29,7 @@ $lang["employees_successful_adding"] = "Hinzufügen erfolgreich."; $lang["employees_successful_change_password"] = "Passwort erfolgreich geändert."; $lang["employees_successful_deleted"] = "Löschung erfolgreich"; $lang["employees_successful_updating"] = "Änderung erfolgreich"; +$lang["employees_system_language"] = ""; $lang["employees_unsuccessful_change_password"] = "Passwort ändern fehlgeschlagen."; $lang["employees_update"] = "Mitarbeiter ändern"; $lang["employees_username"] = "Benutzername"; diff --git a/application/language/de/expenses_categories_lang.php b/application/language/de/expenses_categories_lang.php new file mode 100644 index 000000000..54b71323c --- /dev/null +++ b/application/language/de/expenses_categories_lang.php @@ -0,0 +1,20 @@ + Aussetzen"; +$lang["sales_suspended_doc_id"] = ""; $lang["sales_suspended_sale_id"] = "ID"; $lang["sales_suspended_sales"] = "Ausgesetzte Aufträge"; $lang["sales_table"] = "Tisch"; @@ -136,8 +149,14 @@ $lang["sales_total_tax_exclusive"] = "Total exkl. MWSt."; $lang["sales_transaction_failed"] = "Verarbeitung fehlerhaft"; $lang["sales_unable_to_add_item"] = "Kann Artikel nicht zum Auftrag hinzufügen"; $lang["sales_unsuccessfully_deleted"] = "Löschung nicht erfolgreich"; +$lang["sales_unsuccessfully_restored"] = ""; $lang["sales_unsuccessfully_suspended_sale"] = "Auftrag wurde erfolgreich pendent gehalten"; $lang["sales_unsuccessfully_updated"] = "Änderung nicht erfolgreich"; $lang["sales_unsuspend"] = "Aktivieren"; $lang["sales_unsuspend_and_delete"] = "Aktivieren und löschen"; $lang["sales_update"] = "Ändern"; +$lang["sales_work_order"] = ""; +$lang["sales_work_order_number"] = ""; +$lang["sales_work_order_number_duplicate"] = ""; +$lang["sales_work_order_sent"] = ""; +$lang["sales_work_order_unsent"] = ""; diff --git a/application/language/de/suppliers_lang.php b/application/language/de/suppliers_lang.php index 50f4823e0..a9ebd001b 100644 --- a/application/language/de/suppliers_lang.php +++ b/application/language/de/suppliers_lang.php @@ -6,6 +6,7 @@ $lang["suppliers_cannot_be_deleted"] = "Kann gewählte Lieferanten nicht lösche $lang["suppliers_company_name"] = "Firmenname"; $lang["suppliers_company_name_required"] = "Firmenname ist erforderlich."; $lang["suppliers_confirm_delete"] = "Wollen Sie die gewählten Lieferanten löschen?"; +$lang["suppliers_confirm_restore"] = ""; $lang["suppliers_error_adding_updating"] = "Fehler beim Hinzufügen/Ändern."; $lang["suppliers_new"] = "Neuer Lieferant"; $lang["suppliers_none_selected"] = "Sie haben keinen Lieferanten zum Löschen ausgewählt."; diff --git a/application/language/de/taxes_lang.php b/application/language/de/taxes_lang.php index c4bbd86b4..23baf93f7 100644 --- a/application/language/de/taxes_lang.php +++ b/application/language/de/taxes_lang.php @@ -2,6 +2,7 @@ $lang["taxes_add_exception"] = "Ausnahme hinzufügen"; $lang["taxes_confirm_delete"] = ""; +$lang["taxes_confirm_restore"] = ""; $lang["taxes_default_tax_category"] = ""; $lang["taxes_error_adding_updating"] = ""; $lang["taxes_new"] = ""; diff --git a/application/language/en-GB/config_lang.php b/application/language/en-GB/config_lang.php index 1c7187b27..d525508cb 100644 --- a/application/language/en-GB/config_lang.php +++ b/application/language/en-GB/config_lang.php @@ -149,8 +149,8 @@ $lang["config_license"] = "License"; $lang["config_license_configuration"] = "License Statement"; $lang["config_line_sequence"] = "Line Sequence"; $lang["config_lines_per_page"] = "Lines Per Page"; -$lang["config_lines_per_page_required"] = "Lines Per Page is a required field"; $lang["config_lines_per_page_number"] = "Lines Per Page must be a number"; +$lang["config_lines_per_page_required"] = "Lines Per Page is a required field"; $lang["config_locale"] = "Localisation"; $lang["config_locale_configuration"] = "Localisation Configuration"; $lang["config_locale_info"] = "Localisation Configuration Information"; diff --git a/application/language/en-GB/expenses_categories_lang.php b/application/language/en-GB/expenses_categories_lang.php index 95139f3a3..ec6ad7ad0 100644 --- a/application/language/en-GB/expenses_categories_lang.php +++ b/application/language/en-GB/expenses_categories_lang.php @@ -1,12 +1,13 @@ db->select('sale_id, MAX(CASE + WHEN sale_type = ' . SALE_TYPE_POS . ' && sale_status = ' . COMPLETED . ' THEN \'' . $this->lang->line('reports_code_pos') . '\' WHEN sale_type = ' . SALE_TYPE_INVOICE . ' && sale_status = ' . COMPLETED . ' THEN \'' . $this->lang->line('reports_code_invoice') . '\' WHEN sale_type = ' . SALE_TYPE_WORK_ORDER . ' && sale_status = ' . SUSPENDED . ' THEN \'' . $this->lang->line('reports_code_work_order') . '\' WHEN sale_type = ' . SALE_TYPE_QUOTE . ' && sale_status = ' . SUSPENDED . ' THEN \'' . $this->lang->line('reports_code_quote') . '\' diff --git a/application/models/reports/Specific_customer.php b/application/models/reports/Specific_customer.php index 7ec5ab0df..57aff5ea8 100644 --- a/application/models/reports/Specific_customer.php +++ b/application/models/reports/Specific_customer.php @@ -67,15 +67,25 @@ class Specific_customer extends Report MAX(payment_type) AS payment_type, MAX(comment) AS comment'); $this->db->from('sales_items_temp'); - $this->db->where('customer_id', $inputs['customer_id']); + $this->db->where('customer_id', $inputs['customer_id']); + + if ($inputs['payment_type'] != 'all') + { + $this->db->like('payment_type', $this->lang->line('sales_'.$inputs['payment_type'])); + } + elseif($inputs['payment_type'] == 'invoices') + { + $this->db->where('sale_type', SALE_TYPE_INVOICE); + } + if($inputs['sale_type'] == 'complete') { $this->db->where('sale_status', COMPLETED); $this->db->group_start(); $this->db->where('sale_type', SALE_TYPE_POS); $this->db->or_where('sale_type', SALE_TYPE_INVOICE); - $this->db->or_where('sale_type', SALE_TYPE_RETURN); + $this->db->or_where('sale_type', SALE_TYPE_RETURN); $this->db->group_end(); } elseif($inputs['sale_type'] == 'sales') @@ -84,6 +94,7 @@ class Specific_customer extends Report $this->db->group_start(); $this->db->where('sale_type', SALE_TYPE_POS); $this->db->or_where('sale_type', SALE_TYPE_INVOICE); + $this->db->group_end(); } elseif($inputs['sale_type'] == 'quotes') @@ -134,7 +145,16 @@ class Specific_customer extends Report $this->db->select('SUM(subtotal) AS subtotal, SUM(tax) AS tax, SUM(total) AS total, SUM(cost) AS cost, SUM(profit) AS profit'); $this->db->from('sales_items_temp'); $this->db->where('customer_id', $inputs['customer_id']); - + + if ($inputs['payment_type'] != 'all') + { + $this->db->like('payment_type', $this->lang->line('sales_'.$inputs['payment_type'])); + } + elseif($inputs['payment_type'] == 'invoices') + { + $this->db->where('sale_type', SALE_TYPE_INVOICE); + } + if($inputs['sale_type'] == 'complete') { $this->db->where('sale_status', COMPLETED); @@ -170,7 +190,7 @@ class Specific_customer extends Report { $this->db->where('sale_status', COMPLETED); $this->db->where('sale_type', SALE_TYPE_RETURN); - } + } return $this->db->get()->row_array(); } diff --git a/application/models/reports/Specific_discount.php b/application/models/reports/Specific_discount.php index 797a9485f..922702238 100755 --- a/application/models/reports/Specific_discount.php +++ b/application/models/reports/Specific_discount.php @@ -49,6 +49,7 @@ class Specific_discount extends Report { $this->db->select('sale_id, MAX(CASE + WHEN sale_type = ' . SALE_TYPE_POS . ' && sale_status = ' . COMPLETED . ' THEN \'' . $this->lang->line('reports_code_pos') . '\' WHEN sale_type = ' . SALE_TYPE_INVOICE . ' && sale_status = ' . COMPLETED . ' THEN \'' . $this->lang->line('reports_code_invoice') . '\' WHEN sale_type = ' . SALE_TYPE_WORK_ORDER . ' && sale_status = ' . SUSPENDED . ' THEN \'' . $this->lang->line('reports_code_work_order') . '\' WHEN sale_type = ' . SALE_TYPE_QUOTE . ' && sale_status = ' . SUSPENDED . ' THEN \'' . $this->lang->line('reports_code_quote') . '\' diff --git a/application/models/reports/Specific_employee.php b/application/models/reports/Specific_employee.php index 4d8f0a3ce..91a651b7f 100644 --- a/application/models/reports/Specific_employee.php +++ b/application/models/reports/Specific_employee.php @@ -48,6 +48,7 @@ class Specific_employee extends Report { $this->db->select('sale_id, MAX(CASE + WHEN sale_type = ' . SALE_TYPE_POS . ' && sale_status = ' . COMPLETED . ' THEN \'' . $this->lang->line('reports_code_pos') . '\' WHEN sale_type = ' . SALE_TYPE_INVOICE . ' && sale_status = ' . COMPLETED . ' THEN \'' . $this->lang->line('reports_code_invoice') . '\' WHEN sale_type = ' . SALE_TYPE_WORK_ORDER . ' && sale_status = ' . SUSPENDED . ' THEN \'' . $this->lang->line('reports_code_work_order') . '\' WHEN sale_type = ' . SALE_TYPE_QUOTE . ' && sale_status = ' . SUSPENDED . ' THEN \'' . $this->lang->line('reports_code_quote') . '\' diff --git a/application/views/reports/specific_customer_input.php b/application/views/reports/specific_customer_input.php new file mode 100644 index 000000000..a55b65aa1 --- /dev/null +++ b/application/views/reports/specific_customer_input.php @@ -0,0 +1,69 @@ +load->view("partial/header"); ?> + + + + +