diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index 6d8ad2af7..c930424fb 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -722,9 +722,35 @@ class Sales extends Secure_area if($customer_id != -1) { $cust_info = $this->Customer->get_info($customer_id); - $data['customer'] = $cust_info->first_name . ' ' . $cust_info->last_name; + if (isset($cust_info->company_name)) + { + $data['customer'] = $cust_info->company_name; + } + else + { + $data['customer'] = $cust_info->first_name . ' ' . $cust_info->last_name; + } + $data['first_name'] = $cust_info->first_name; + $data['last_name'] = $cust_info->last_name; + $data['customer_address'] = $cust_info->address_1; + if (!empty($cust_info->zip) or !empty($cust_info->city)) + { + $data['customer_location'] = $cust_info->zip . ' ' . $cust_info->city; + } + else + { + $data['customer_location'] = ''; + } $data['customer_email'] = $cust_info->email; + $data['account_number'] = $cust_info->account_number; + $data['customer_info'] = implode("\n", array( + $data['customer'], + $data['customer_address'], + $data['customer_location'], + $data['account_number'] + )); } + $data['invoice_number'] = $this->_substitute_invoice_number($cust_info); $data['invoice_number_enabled'] = $this->sale_lib->is_invoice_number_enabled(); $data['print_after_sale'] = $this->sale_lib->is_print_after_sale(); diff --git a/application/language/de-CH/index.html b/application/language/de-CH/index.html new file mode 100644 index 000000000..b702fbc39 --- /dev/null +++ b/application/language/de-CH/index.html @@ -0,0 +1,11 @@ + + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + diff --git a/application/language/de-CH/sales_lang.php b/application/language/de-CH/sales_lang.php index a3d92a4f4..f2d1ea422 100644 --- a/application/language/de-CH/sales_lang.php +++ b/application/language/de-CH/sales_lang.php @@ -18,6 +18,9 @@ $lang["sales_confirm_finish_sale"] = "Wollen Sie diesen Auftrag verarbeiten? Rü $lang["sales_confirm_suspend_sale"] = "Wollen Sie diesen Auftrag pendent halten?"; $lang["sales_credit"] = "Kreditkarte"; $lang["sales_customer"] = "Kunde"; +$lang["sales_customer_email"] = "Customer Email"; +$lang["sales_customer_address"] = "Customer Address"; +$lang["sales_customer_location"] = "Customer Location"; $lang["sales_date"] = "Datum"; $lang["sales_date_required"] = "Ein korrektas Datum ist erforderlich"; $lang["sales_date_type"] = "Datum ist erforderlich"; diff --git a/application/language/en/sales_lang.php b/application/language/en/sales_lang.php index 00742ba77..30db8f80e 100644 --- a/application/language/en/sales_lang.php +++ b/application/language/en/sales_lang.php @@ -17,7 +17,10 @@ $lang["sales_confirm_delete"] = "Are you sure you want to delete the selected sa $lang["sales_confirm_finish_sale"] = "Are you sure you want to submit this sale? This cannot be undone."; $lang["sales_confirm_suspend_sale"] = "Are you sure you want to suspend this sale?"; $lang["sales_credit"] = "Credit Card"; -$lang["sales_customer"] = "Customer"; +$lang["sales_customer"] = "Name"; +$lang["sales_customer_email"] = "Email"; +$lang["sales_customer_address"] = "Address"; +$lang["sales_customer_location"] = "Location"; $lang["sales_date"] = "Sale Date"; $lang["sales_date_required"] = "A correct date needs to be filled in"; $lang["sales_date_type"] = "Date field is required"; @@ -34,7 +37,7 @@ $lang["sales_discount_short"] = "%"; $lang["sales_edit"] = "Edit"; $lang["sales_edit_item"] = "Edit Item"; $lang["sales_edit_sale"] = "Edit Sale"; -$lang["sales_email_receipt"] = "E-Mail Receipt"; +$lang["sales_email_receipt"] = "Email Receipt"; $lang["sales_employee"] = "Employee"; $lang["sales_error_editing_item"] = "Error editing item"; $lang["sales_find_or_scan_item"] = "Find/Scan Item"; diff --git a/application/language/es/sales_lang.php b/application/language/es/sales_lang.php index c9a522236..f88262a08 100644 --- a/application/language/es/sales_lang.php +++ b/application/language/es/sales_lang.php @@ -18,6 +18,9 @@ $lang["sales_confirm_finish_sale"] = "¿Seguro(a) de querer procesar esta venta? $lang["sales_confirm_suspend_sale"] = "¿Seguro(a) de querer suspender esta venta?"; $lang["sales_credit"] = "Tarjeta de Crédito"; $lang["sales_customer"] = "cliente"; +$lang["sales_customer_email"] = "Customer Email"; +$lang["sales_customer_address"] = "Customer Address"; +$lang["sales_customer_location"] = "Customer Location"; $lang["sales_date"] = "Fecha"; $lang["sales_date_required"] = "Una fecha correcta de ser ingresada"; $lang["sales_date_type"] = "Campo de Fecha es requerido"; diff --git a/application/language/fr/sales_lang.php b/application/language/fr/sales_lang.php index 653cbed2e..b9325c339 100644 --- a/application/language/fr/sales_lang.php +++ b/application/language/fr/sales_lang.php @@ -18,6 +18,9 @@ $lang["sales_confirm_finish_sale"] = "Etes vous sûr(e) de vouloir enregistrer c $lang["sales_confirm_suspend_sale"] = "Etes vous sûr(e) de vouloir suspendre cette vente?"; $lang["sales_credit"] = "Carte de Crédit"; $lang["sales_customer"] = "Client"; +$lang["sales_customer_email"] = "Customer Email"; +$lang["sales_customer_address"] = "Customer Address"; +$lang["sales_customer_location"] = "Customer Location"; $lang["sales_date"] = "Date de Vente"; $lang["sales_date_required"] = "A correct date needs to be filled in"; $lang["sales_date_type"] = "Date field is required"; diff --git a/application/language/id/sales_lang.php b/application/language/id/sales_lang.php index 79a140bad..a18d5542d 100644 --- a/application/language/id/sales_lang.php +++ b/application/language/id/sales_lang.php @@ -18,6 +18,9 @@ $lang["sales_confirm_finish_sale"] = "Anda yakin ingin melakukan transaksi penju $lang["sales_confirm_suspend_sale"] = "Apakah anda yakin akan menangguhkan penjualan ini?"; $lang["sales_credit"] = "Kartu Credit"; $lang["sales_customer"] = "Pelanggan"; +$lang["sales_customer_email"] = "Customer Email"; +$lang["sales_customer_address"] = "Customer Address"; +$lang["sales_customer_location"] = "Customer Location"; $lang["sales_date"] = "Tanggal"; $lang["sales_date_required"] = "Permintaan Data"; $lang["sales_date_type"] = "Jenis Data"; diff --git a/application/language/nl-BE/sales_lang.php b/application/language/nl-BE/sales_lang.php index 330699a39..673dc0faf 100755 --- a/application/language/nl-BE/sales_lang.php +++ b/application/language/nl-BE/sales_lang.php @@ -18,6 +18,9 @@ $lang["sales_confirm_finish_sale"] = "Bent u zeker dat u deze aankoop wil invoer $lang["sales_confirm_suspend_sale"] = "Bent u zeker dat u deze aankoop wil bewaren?"; $lang["sales_credit"] = "Kredietkaart"; $lang["sales_customer"] = "Klant"; +$lang["sales_customer_email"] = "Customer Email"; +$lang["sales_customer_address"] = "Customer Address"; +$lang["sales_customer_location"] = "Customer Location"; $lang["sales_date"] = "Datum"; $lang["sales_date_required"] = "Gelieve een correcte datum in te vullen"; $lang["sales_date_type"] = "Er moet een correcte datum ingevuld worden"; diff --git a/application/language/ru/sales_lang.php b/application/language/ru/sales_lang.php index 4bc0344e4..a03e3adbc 100644 --- a/application/language/ru/sales_lang.php +++ b/application/language/ru/sales_lang.php @@ -18,6 +18,9 @@ $lang["sales_confirm_finish_sale"] = "Вы уверены, что хотите $lang["sales_confirm_suspend_sale"] = "Вы уверены, что хотите приостановить эту продажу?"; $lang["sales_credit"] = "кредитная карта"; $lang["sales_customer"] = "клиент"; +$lang["sales_customer_email"] = "Customer Email"; +$lang["sales_customer_address"] = "Customer Address"; +$lang["sales_customer_location"] = "Customer Location"; $lang["sales_date"] = "Число"; $lang["sales_date_required"] = "A correct date needs to be filled in"; $lang["sales_date_type"] = "Date field is required"; diff --git a/application/language/th/sales_lang.php b/application/language/th/sales_lang.php index 2dcd28534..5d6e5d254 100644 --- a/application/language/th/sales_lang.php +++ b/application/language/th/sales_lang.php @@ -18,6 +18,9 @@ $lang["sales_confirm_finish_sale"] = "แน่ใจหรือไม่ที $lang["sales_confirm_suspend_sale"] = "แน่ใจหรือไม่ที่จะระงับการขาย?"; $lang["sales_credit"] = "เครดิตการ์ด"; $lang["sales_customer"] = "ลูกค้า"; +$lang["sales_customer_email"] = "Customer Email"; +$lang["sales_customer_address"] = "Customer Address"; +$lang["sales_customer_location"] = "Customer Location"; $lang["sales_date"] = "วันที่ขาย"; $lang["sales_date_required"] = "A correct date needs to be filled in"; $lang["sales_date_type"] = "Date field is required"; diff --git a/application/language/tr/sales_lang.php b/application/language/tr/sales_lang.php index a84cf1441..11d6b35a5 100644 --- a/application/language/tr/sales_lang.php +++ b/application/language/tr/sales_lang.php @@ -18,6 +18,9 @@ $lang["sales_confirm_finish_sale"] = "Satışı tamamlamak istediğinize emin mi $lang["sales_confirm_suspend_sale"] = "Bu satışı askıya almak istiyor musunuz?"; $lang["sales_credit"] = "Kredi Kartı"; $lang["sales_customer"] = "Müşteri"; +$lang["sales_customer_email"] = "Customer Email"; +$lang["sales_customer_address"] = "Customer Address"; +$lang["sales_customer_location"] = "Customer Location"; $lang["sales_date"] = "Satış Tarihi"; $lang["sales_date_required"] = "A correct date needs to be filled in"; $lang["sales_date_type"] = "Date field is required"; diff --git a/application/language/zh/sales_lang.php b/application/language/zh/sales_lang.php index 5326e110c..498ebe009 100755 --- a/application/language/zh/sales_lang.php +++ b/application/language/zh/sales_lang.php @@ -18,6 +18,9 @@ $lang["sales_confirm_finish_sale"] = "你確定要提交銷售單?此動作不 $lang["sales_confirm_suspend_sale"] = "你確定要暫停銷售?"; $lang["sales_credit"] = "信用卡"; $lang["sales_customer"] = "客戶"; +$lang["sales_customer_email"] = "Customer Email"; +$lang["sales_customer_address"] = "Customer Address"; +$lang["sales_customer_location"] = "Customer Location"; $lang["sales_date"] = "日期"; $lang["sales_date_required"] = "A correct date needs to be filled in"; $lang["sales_date_type"] = "Date field is required"; diff --git a/application/views/partial/header.php b/application/views/partial/header.php index e62f1154d..88352d907 100644 --- a/application/views/partial/header.php +++ b/application/views/partial/header.php @@ -65,7 +65,7 @@ - + diff --git a/application/views/sales/register.php b/application/views/sales/register.php index eab784e18..c995452aa 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -23,7 +23,7 @@ if (isset($success)) 'mode_form', 'class'=>'form-horizontal panel panel-default')); ?>