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 @@ + + +
+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 ef1c5d1c4..c75907493 100644 --- a/application/views/partial/header.php +++ b/application/views/partial/header.php @@ -65,11 +65,11 @@ - + - + diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index eb6c2fdd8..a4bcec8bd 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -1,6 +1,6 @@ load->view("partial/header"); ?> -| lang->line('common_delete'); ?> | -lang->line('recvs_item_name'); ?> | -lang->line('recvs_cost'); ?> | -lang->line('recvs_quantity'); ?> | -- | lang->line('recvs_discount'); ?> | -lang->line('recvs_total'); ?> | -lang->line('recvs_edit'); ?> | +lang->line('common_delete'); ?> | +lang->line('recvs_item_name'); ?> | +lang->line('recvs_cost'); ?> | +lang->line('recvs_quantity'); ?> | ++ | lang->line('recvs_discount'); ?> | +lang->line('recvs_total'); ?> | +lang->line('recvs_edit'); ?> | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
- lang->line('sales_no_items_in_cart'); ?>
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
lang->line('sales_no_items_in_cart'); ?> |
+ |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lang->line('common_delete').']');?> | +');?> | [ in ] |
-
- 'price','value'=>$item['price'],'size'=>'6'));?> | - -- - - - | - 'quantity','value'=>$item['quantity'],'size'=>'2')); - if ($item['receiving_quantity'] > 1) + - | -x | - +'price', 'class'=>'form-control input-sm', 'value'=>$item['price']));?> | + -- + | + + + ?> + + | + 'quantity', 'class'=>'form-control input-sm', 'value'=>$item['quantity'])); + if ($item['receiving_quantity'] > 1) + { + ?> + | +x | + + ++ - - | 'discount','value'=>$item['discount'],'size'=>'3'));?> | - -- - - | - | 'edit_item', 'value'=>$this->lang->line('sales_edit_item'), 'class'=>'btn btn-default btn-sm pull-right'));?> | + +'discount', 'class'=>'form-control input-sm', 'value'=>$item['discount']));?> | + ++ + + | + | 'edit_item', 'value'=>$this->lang->line('sales_edit_item'), 'class'=>'btn btn-default btn-xs'));?> | |||||||||||||||||||||||||||||||||||||||||||||||
| lang->line('common_delete'); ?> | -lang->line('sales_item_number'); ?> | -lang->line('sales_item_name'); ?> | -lang->line('sales_price'); ?> | -lang->line('sales_quantity'); ?> | -lang->line('sales_discount'); ?> | -lang->line('sales_total'); ?> | -lang->line('sales_edit'); ?> | +lang->line('common_delete'); ?> | +lang->line('sales_item_number'); ?> | +lang->line('sales_item_name'); ?> | +lang->line('sales_price'); ?> | +lang->line('sales_quantity'); ?> | +lang->line('sales_discount'); ?> | +lang->line('sales_total'); ?> | +lang->line('sales_edit'); ?> |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| lang->line('common_delete').']');?> | +');?> | [ in ] @@ -114,7 +131,7 @@ if (isset($success)) - | 'price','value'=>$item['price'],'size'=>'6'));?> | +'price', 'class'=>'form-control input-sm', 'value'=>$item['price']));?> | - 'quantity','value'=>$item['quantity'],'size'=>'2','tabindex'=>$tabindex)); + echo form_input(array('name'=>'quantity', 'class'=>'form-control input-sm', 'value'=>$item['quantity'], 'tabindex'=>$tabindex)); } - ?> + ?> | -'discount','value'=>$item['discount'],'size'=>'3'));?> | +'discount', 'class'=>'form-control input-sm', 'value'=>$item['discount']));?> | - | 'edit_item', 'value'=>$this->lang->line('sales_edit_item'), 'class'=>'btn btn-default btn-sm pull-right'));?> | +'edit_item', 'value'=>$this->lang->line('sales_edit_item'), 'class'=>'btn btn-default btn-xs'));?> | |||||
| lang->line('sales_description_abbrv').':';?> | +lang->line('sales_description_abbrv');?> | @@ -158,14 +175,14 @@ if (isset($success)) 'description','value'=>base64_decode($item['description']),'size'=>'20')); + echo form_input(array('name'=>'description', 'class'=>'form-control input-sm', 'value'=>base64_decode($item['description']))); } else { if (base64_decode($item['description'])!='') { echo base64_decode($item['description']); - echo form_hidden('description',base64_decode($item['description'])); + echo form_hidden('description', base64_decode($item['description'])); } else { @@ -180,7 +197,7 @@ if (isset($success)) lang->line('sales_serial').':'; + echo $this->lang->line('sales_serial'); } ?> @@ -188,7 +205,7 @@ if (isset($success)) 'serialnumber','value'=>$item['serialnumber'],'size'=>'20')); + echo form_input(array('name'=>'serialnumber', 'class'=>'form-control input-sm', 'value'=>$item['serialnumber'])); } else { @@ -209,232 +226,266 @@ if (isset($success)) -||||||||||||||
| lang->line("sales_customer"); ?> | ++ | ||||||||||||||
| lang->line("sales_customer_email"); ?> | ++ | ||||||||||||||
| lang->line("sales_customer_address"); ?> | ++ | ||||||||||||||
| lang->line("sales_customer_location"); ?> | ++ |
lang->line('sales_payments_total').':';?> |
- + | lang->line('sales_sub_total'); ?> | +config->item('tax_included') ? $tax_exclusive_subtotal : $subtotal); ?> |
|---|---|---|---|
| + | + | ||
lang->line('sales_amount_due').':';?> |
- + | lang->line('sales_total'); ?> | +
| - lang->line('sales_print_after_sale'); ?> - | -- 'sales_print_after_sale','id'=>'sales_print_after_sale','checked'=>'checked')); - } - else - { - echo form_checkbox(array('name'=>'sales_print_after_sale','id'=>'sales_print_after_sale')); - } - ?> - | -
| - lang->line('sales_invoice_enable'); ?> - | -- 'sales_invoice_enable','id'=>'sales_invoice_enable','checked'=>'checked')); - } - else - { - echo form_checkbox(array('name'=>'sales_invoice_enable','id'=>'sales_invoice_enable')); - } - ?> - | -
| - lang->line('sales_invoice_number').': ';?> - | -- 'sales_invoice_number','id'=>'sales_invoice_number','value'=>$invoice_number,'size'=>10));?> - | -
| - lang->line('sales_payment').': ';?> - | -- - | -
| - lang->line( 'sales_amount_tendered' ).': '; ?> - | -- 'amount_tendered', 'id'=>'amount_tendered', 'value'=>to_currency_no_money($amount_due), 'size'=>'10','tabindex'=>4 ) ); ?> - | -
| lang->line('common_delete'); ?> | -lang->line('sales_payment_type'); ?> | -lang->line('sales_payment_amount'); ?> | -
|---|---|---|
| lang->line('common_delete').']' ); ?> | -- | - |
| lang->line('sales_payments_total');?> | ++ |
|---|---|
| lang->line('sales_amount_due');?> | ++ |