diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index e0e0418e5..1f1313a47 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -36,20 +36,11 @@ class Sales extends Secure_Controller { $data['table_headers'] = get_sales_manage_table_headers(); - // filters that will be loaded in the multiselect dropdown - if($this->config->item('invoice_enable') == TRUE) - { - $data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'), - 'only_due' => $this->lang->line('sales_due_filter'), - 'only_check' => $this->lang->line('sales_check_filter'), - 'only_invoices' => $this->lang->line('sales_invoice_filter')); - } - else - { - $data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'), - 'only_due' => $this->lang->line('sales_due_filter'), - 'only_check' => $this->lang->line('sales_check_filter')); - } + $data['filters'] = array('only_cash' => $this->lang->line('sales_cash_filter'), + 'only_due' => $this->lang->line('sales_due_filter'), + 'only_check' => $this->lang->line('sales_check_filter'), + 'only_creditcard' => $this->lang->line('sales_credit_filter'), + 'only_invoices' => $this->lang->line('sales_invoice_filter')); $this->load->view('sales/manage', $data); } @@ -78,6 +69,7 @@ class Sales extends Secure_Controller 'only_cash' => FALSE, 'only_due' => FALSE, 'only_check' => FALSE, + 'only_creditcard' => FALSE, 'only_invoices' => $this->config->item('invoice_enable') && $this->input->get('only_invoices'), 'is_valid_receipt' => $this->Sale->is_valid_receipt($search)); diff --git a/application/language/ar-EG/sales_lang.php b/application/language/ar-EG/sales_lang.php index 707def1eb..db37013fb 100644 --- a/application/language/ar-EG/sales_lang.php +++ b/application/language/ar-EG/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "هل تريد حذف عمليات البيع ا $lang["sales_confirm_restore"] = "هل انت متاكد من استعادة عملية البيع؟"; $lang["sales_credit"] = "بطاقة إئتمانية"; $lang["sales_credit_deposit"] = "ايداع ببطاقة ائتمان"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "العميل"; $lang["sales_customer_address"] = "العنوان"; $lang["sales_customer_discount"] = "الخصم"; diff --git a/application/language/ar-LB/sales_lang.php b/application/language/ar-LB/sales_lang.php index 707def1eb..db37013fb 100644 --- a/application/language/ar-LB/sales_lang.php +++ b/application/language/ar-LB/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "هل تريد حذف عمليات البيع ا $lang["sales_confirm_restore"] = "هل انت متاكد من استعادة عملية البيع؟"; $lang["sales_credit"] = "بطاقة إئتمانية"; $lang["sales_credit_deposit"] = "ايداع ببطاقة ائتمان"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "العميل"; $lang["sales_customer_address"] = "العنوان"; $lang["sales_customer_discount"] = "الخصم"; diff --git a/application/language/az-AZ/sales_lang.php b/application/language/az-AZ/sales_lang.php index 51852a954..e0981eccf 100644 --- a/application/language/az-AZ/sales_lang.php +++ b/application/language/az-AZ/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Siz əminsiniz ki seçilmiş satışı (lar) si $lang["sales_confirm_restore"] = "Seçilmiş Satışları bərpa etmək istədiyinizə əminsinizmi?"; $lang["sales_credit"] = "Kredit kartı"; $lang["sales_credit_deposit"] = "Kredit Depoziti"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Ad"; $lang["sales_customer_address"] = "Ünvan"; $lang["sales_customer_discount"] = "Endirim"; diff --git a/application/language/bg/sales_lang.php b/application/language/bg/sales_lang.php index 12399c668..1e780141c 100644 --- a/application/language/bg/sales_lang.php +++ b/application/language/bg/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Наистина ли искате да изт $lang["sales_confirm_restore"] = "Наистина ли искате да възстановите избраната Продажба (и)?"; $lang["sales_credit"] = "Кредитна карта"; $lang["sales_credit_deposit"] = "Кредитен депозит"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Име"; $lang["sales_customer_address"] = "Адрес"; $lang["sales_customer_discount"] = "Намаление"; diff --git a/application/language/cs/sales_lang.php b/application/language/cs/sales_lang.php index 286417568..1cf73ec3f 100644 --- a/application/language/cs/sales_lang.php +++ b/application/language/cs/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Opravdu chcete smazat vybranou účtenku?"; $lang["sales_confirm_restore"] = "Opravdu chcete obnovit vybranou účtenku?"; $lang["sales_credit"] = "Kreditní karta"; $lang["sales_credit_deposit"] = ""; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Jméno"; $lang["sales_customer_address"] = "Adresa"; $lang["sales_customer_discount"] = "Sleva"; diff --git a/application/language/da/sales_lang.php b/application/language/da/sales_lang.php index f45b468d8..f18159e4d 100644 --- a/application/language/da/sales_lang.php +++ b/application/language/da/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = ""; $lang["sales_confirm_restore"] = ""; $lang["sales_credit"] = ""; $lang["sales_credit_deposit"] = ""; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = ""; $lang["sales_customer_address"] = ""; $lang["sales_customer_discount"] = ""; diff --git a/application/language/de-CH/sales_lang.php b/application/language/de-CH/sales_lang.php index e7f3f9d33..1bbafb8b7 100644 --- a/application/language/de-CH/sales_lang.php +++ b/application/language/de-CH/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Wollen Sie die gewählten Aufträge löschen?"; $lang["sales_confirm_restore"] = ""; $lang["sales_credit"] = "Kreditkarte"; $lang["sales_credit_deposit"] = ""; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Kunde"; $lang["sales_customer_address"] = "Customer Address"; $lang["sales_customer_discount"] = "Discount"; diff --git a/application/language/de/sales_lang.php b/application/language/de/sales_lang.php index 76efad697..3c19367aa 100644 --- a/application/language/de/sales_lang.php +++ b/application/language/de/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Wollen Sie die gewählten Aufträge löschen?"; $lang["sales_confirm_restore"] = "Sind Sie sicher, dass Sie die ausgewählten Verkäufe wiederherstellen möchten?"; $lang["sales_credit"] = "Kreditkarte"; $lang["sales_credit_deposit"] = "Krediteinlage"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Kunde"; $lang["sales_customer_address"] = "Kundenadresse"; $lang["sales_customer_discount"] = "Rabatt"; diff --git a/application/language/el/sales_lang.php b/application/language/el/sales_lang.php index 899c3c76b..bba8908a1 100644 --- a/application/language/el/sales_lang.php +++ b/application/language/el/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Είστε σίγουροι πως θέλετε $lang["sales_confirm_restore"] = "Είστε σίγουροι πως θέλετε να επαναφέρετε την/τις επιλεγμένες Πωλήσεις?"; $lang["sales_credit"] = "Πιστωτική Κάρτα"; $lang["sales_credit_deposit"] = "Ποσό Πίστωσης"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Όνομα"; $lang["sales_customer_address"] = "Διεύθυνση"; $lang["sales_customer_discount"] = "Έκπτωση"; diff --git a/application/language/en-GB/sales_lang.php b/application/language/en-GB/sales_lang.php index 90b2f076f..8ca1d374b 100644 --- a/application/language/en-GB/sales_lang.php +++ b/application/language/en-GB/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Are you sure you want to delete the selected Sa $lang["sales_confirm_restore"] = "Are you sure you want to restore the selected Sale(s)?"; $lang["sales_credit"] = "Credit Card"; $lang["sales_credit_deposit"] = "Credit Deposit"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Customer"; $lang["sales_customer_address"] = "Address"; $lang["sales_customer_discount"] = "Discount"; diff --git a/application/language/en-US/sales_lang.php b/application/language/en-US/sales_lang.php index d193f85d5..a3a293a4b 100644 --- a/application/language/en-US/sales_lang.php +++ b/application/language/en-US/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Are you sure you want to delete the selected Sa $lang["sales_confirm_restore"] = "Are you sure you want to restore the selected Sale(s)?"; $lang["sales_credit"] = "Credit Card"; $lang["sales_credit_deposit"] = "Credit Deposit"; +$lang["sales_credit_filter"] = "Credit Card"; $lang["sales_customer"] = "Customer"; $lang["sales_customer_address"] = "Address"; $lang["sales_customer_discount"] = "Discount"; diff --git a/application/language/es/sales_lang.php b/application/language/es/sales_lang.php index 265633e25..4e3ddc9f3 100644 --- a/application/language/es/sales_lang.php +++ b/application/language/es/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "¿Seguro(a) de querer borrar las ventas selecci $lang["sales_confirm_restore"] = "Esta seguro de querer restaurar la(s) venta(s) seleccionada(s)?"; $lang["sales_credit"] = "Tarjeta de Crédito"; $lang["sales_credit_deposit"] = "Deposito Credito"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "cliente"; $lang["sales_customer_address"] = "Direccion"; $lang["sales_customer_discount"] = "Descuento"; diff --git a/application/language/es_MX/sales_lang.php b/application/language/es_MX/sales_lang.php index 6e387498c..d9a0b1016 100644 --- a/application/language/es_MX/sales_lang.php +++ b/application/language/es_MX/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "¿Está seguro que desea borrar todas las venta $lang["sales_confirm_restore"] = "¿Está seguro de desear restaurar las ventas seleccionadas?"; $lang["sales_credit"] = "Tarjeta de Crédito"; $lang["sales_credit_deposit"] = "Deposito de crédito"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Cliente"; $lang["sales_customer_address"] = "Dirección"; $lang["sales_customer_discount"] = "Descuento"; diff --git a/application/language/fa-IR/sales_lang.php b/application/language/fa-IR/sales_lang.php index 1cdefaf84..821dafeb9 100644 --- a/application/language/fa-IR/sales_lang.php +++ b/application/language/fa-IR/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "آیا مطمئن هستید که می خواه $lang["sales_confirm_restore"] = "آیا مطمئن هستید که می خواهید فروش (های) انتخابی را بازیابی کنید؟"; $lang["sales_credit"] = "کارت اعتباری"; $lang["sales_credit_deposit"] = "سپرده اعتباری"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "مشتری"; $lang["sales_customer_address"] = "نشانی"; $lang["sales_customer_discount"] = "تخفیف"; diff --git a/application/language/fr/sales_lang.php b/application/language/fr/sales_lang.php index d537cfb2b..a78205ab3 100644 --- a/application/language/fr/sales_lang.php +++ b/application/language/fr/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Êtes-vous sûr(e) de vouloir supprimer ce(ces) $lang["sales_confirm_restore"] = "Êtes-vous sûr de vouloir restaurer les vente(s) sélectionnée(s) ?"; $lang["sales_credit"] = "Carte de Crédit"; $lang["sales_credit_deposit"] = "Dépôt de crédit"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Client"; $lang["sales_customer_address"] = "Adresse"; $lang["sales_customer_discount"] = "Rabais"; diff --git a/application/language/he/sales_lang.php b/application/language/he/sales_lang.php index 7e04c5dfc..1b40975b0 100644 --- a/application/language/he/sales_lang.php +++ b/application/language/he/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "האם אתה בטוח שברצונך למחו $lang["sales_confirm_restore"] = "האם אתה בטוח שברצונך לשחזר את המכירות שנבחרו?"; $lang["sales_credit"] = "כרטיס אשראי"; $lang["sales_credit_deposit"] = "הפקדת אשראי"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "שם"; $lang["sales_customer_address"] = "כתובת"; $lang["sales_customer_discount"] = "הנחה"; diff --git a/application/language/hr-HR/sales_lang.php b/application/language/hr-HR/sales_lang.php index edd6f3ac5..7c948fff5 100644 --- a/application/language/hr-HR/sales_lang.php +++ b/application/language/hr-HR/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Želite li obrisati odabranu prodaju?"; $lang["sales_confirm_restore"] = ""; $lang["sales_credit"] = "Kreditna kartica"; $lang["sales_credit_deposit"] = ""; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Kupac"; $lang["sales_customer_address"] = "Adresa kupca"; $lang["sales_customer_discount"] = "Discount"; diff --git a/application/language/hu-HU/sales_lang.php b/application/language/hu-HU/sales_lang.php index 6d28197bb..b19ce6a88 100644 --- a/application/language/hu-HU/sales_lang.php +++ b/application/language/hu-HU/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Biztos, hogy törli a kijelölt értékesitése $lang["sales_confirm_restore"] = ""; $lang["sales_credit"] = "Hitelkártya"; $lang["sales_credit_deposit"] = ""; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Vevő"; $lang["sales_customer_address"] = "Vevő cím"; $lang["sales_customer_discount"] = "Discount"; diff --git a/application/language/hy/sales_lang.php b/application/language/hy/sales_lang.php index f45b468d8..f18159e4d 100644 --- a/application/language/hy/sales_lang.php +++ b/application/language/hy/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = ""; $lang["sales_confirm_restore"] = ""; $lang["sales_credit"] = ""; $lang["sales_credit_deposit"] = ""; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = ""; $lang["sales_customer_address"] = ""; $lang["sales_customer_discount"] = ""; diff --git a/application/language/id/sales_lang.php b/application/language/id/sales_lang.php index 50af3c0fe..22e6c8cb2 100644 --- a/application/language/id/sales_lang.php +++ b/application/language/id/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Anda yakin akan menghapus penjualan terpilih?"; $lang["sales_confirm_restore"] = "Anda yakin akan mengembalikan penjualan terpilih?"; $lang["sales_credit"] = "Kartu Credit"; $lang["sales_credit_deposit"] = "Deposit Kredit"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Pelanggan"; $lang["sales_customer_address"] = "Alamat"; $lang["sales_customer_discount"] = "Diskon"; diff --git a/application/language/it/sales_lang.php b/application/language/it/sales_lang.php index 70b22e290..b0cda06aa 100644 --- a/application/language/it/sales_lang.php +++ b/application/language/it/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Sei sicuro di voler eliminare la vendita selezi $lang["sales_confirm_restore"] = "Sei sicuro di voler ripristinare la vendita selezionata?"; $lang["sales_credit"] = "Carta di Credito"; $lang["sales_credit_deposit"] = "Deposito Credito"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Nome"; $lang["sales_customer_address"] = "Indirizzo"; $lang["sales_customer_discount"] = "Sconto"; diff --git a/application/language/km/sales_lang.php b/application/language/km/sales_lang.php index f45b468d8..f18159e4d 100644 --- a/application/language/km/sales_lang.php +++ b/application/language/km/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = ""; $lang["sales_confirm_restore"] = ""; $lang["sales_credit"] = ""; $lang["sales_credit_deposit"] = ""; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = ""; $lang["sales_customer_address"] = ""; $lang["sales_customer_discount"] = ""; diff --git a/application/language/lo/sales_lang.php b/application/language/lo/sales_lang.php index 477900ff6..0b3460d34 100644 --- a/application/language/lo/sales_lang.php +++ b/application/language/lo/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = "Are you sure you want to delete the selected Sa $lang["sales_confirm_restore"] = "Are you sure you want to restore the selected Sale(s)?"; $lang["sales_credit"] = "Credit Card"; $lang["sales_credit_deposit"] = "Credit Deposit"; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = "Name"; $lang["sales_customer_address"] = "Address"; $lang["sales_customer_discount"] = "Discount"; diff --git a/application/language/ml/sales_lang.php b/application/language/ml/sales_lang.php index f45b468d8..f18159e4d 100644 --- a/application/language/ml/sales_lang.php +++ b/application/language/ml/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = ""; $lang["sales_confirm_restore"] = ""; $lang["sales_credit"] = ""; $lang["sales_credit_deposit"] = ""; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = ""; $lang["sales_customer_address"] = ""; $lang["sales_customer_discount"] = ""; diff --git a/application/language/nb_NO/sales_lang.php b/application/language/nb_NO/sales_lang.php index f45b468d8..f18159e4d 100644 --- a/application/language/nb_NO/sales_lang.php +++ b/application/language/nb_NO/sales_lang.php @@ -25,6 +25,7 @@ $lang["sales_confirm_delete"] = ""; $lang["sales_confirm_restore"] = ""; $lang["sales_credit"] = ""; $lang["sales_credit_deposit"] = ""; +$lang["sales_credit_filter"] = ""; $lang["sales_customer"] = ""; $lang["sales_customer_address"] = ""; $lang["sales_customer_discount"] = ""; diff --git a/application/language/nl-BE/bootstrap_tables_lang.php b/application/language/nl-BE/bootstrap_tables_lang.php index 784932856..3a20ae28d 100644 --- a/application/language/nl-BE/bootstrap_tables_lang.php +++ b/application/language/nl-BE/bootstrap_tables_lang.php @@ -1,4 +1,5 @@ -db->group_end(); } + if($filters['only_creditcard'] != FALSE) + { + $this->db->like('payments.payment_type', $this->lang->line('sales_credit')); + } + if($filters['only_due'] != FALSE) { $this->db->like('payments.payment_type', $this->lang->line('sales_due'));