From dbddb34ed4222a674f1ece2c28ddb30e68dfcaea Mon Sep 17 00:00:00 2001 From: jekkos-t520 Date: Tue, 24 Feb 2015 16:13:44 +0100 Subject: [PATCH] Receipt total is recalculatd after edit now Some css improvements for receipt printing Adaptation of one or more labels --- application/language/nl-BE/sales_lang.php | 2 +- application/libraries/Receiving_lib.php | 12 ++++--- application/libraries/Sale_lib.php | 15 +++++---- css/ospos_print.css | 39 ++++++++++++++++++----- css/popupbox.css | 1 + css/receipt.css | 5 +++ translations/sales_lang.csv | 2 +- 7 files changed, 55 insertions(+), 21 deletions(-) diff --git a/application/language/nl-BE/sales_lang.php b/application/language/nl-BE/sales_lang.php index 29412d24f..87bbd240e 100755 --- a/application/language/nl-BE/sales_lang.php +++ b/application/language/nl-BE/sales_lang.php @@ -73,7 +73,7 @@ $lang["sales_serial"] = "Nummer"; $lang["sales_start_typing_customer_name"] = "Typ naam klant..."; $lang["sales_start_typing_item_name"] = "Typ naam product of barcode..."; $lang["sales_stock_location"] = "Stock locatie"; -$lang["sales_sub_total"] = "Subtotaal excl. VAT"; +$lang["sales_sub_total"] = "Subtotaal"; $lang["sales_successfully_deleted"] = "Uw aankoop werd verwijded"; $lang["sales_successfully_suspended_sale"] = "Uw aankoop werd met sucess bewaard"; $lang["sales_successfully_updated"] = "Wijzigingen bewaard voor ticket"; diff --git a/application/libraries/Receiving_lib.php b/application/libraries/Receiving_lib.php index 3239d44f0..a408b8fd7 100644 --- a/application/libraries/Receiving_lib.php +++ b/application/libraries/Receiving_lib.php @@ -229,11 +229,13 @@ class Receiving_lib $items = $this->get_cart(); if(isset($items[$line])) { - $items[$line]['description'] = $description; - $items[$line]['serialnumber'] = $serialnumber; - $items[$line]['quantity'] = $quantity; - $items[$line]['discount'] = $discount; - $items[$line]['price'] = $price; + $line = &$items[$line]; + $line['description'] = $description; + $line['serialnumber'] = $serialnumber; + $line['quantity'] = $quantity; + $line['discount'] = $discount; + $line['price'] = $price; + $line['total'] = $this->get_item_total($quantity, $price, $discount); $this->set_cart($items); } diff --git a/application/libraries/Sale_lib.php b/application/libraries/Sale_lib.php index db34b36ab..7f500a4b3 100644 --- a/application/libraries/Sale_lib.php +++ b/application/libraries/Sale_lib.php @@ -175,7 +175,7 @@ class Sale_lib $amount_due=0; $payment_total = $this->get_payments_total(); $sales_total=$this->get_total(); - $amount_due=to_currency_no_money($sales_total - $payment_total); + $amount_due=to_currency_no_money(bcsub($sales_total, $payment_total, PRECISION)); return $amount_due; } @@ -377,11 +377,14 @@ class Sale_lib $items = $this->get_cart(); if(isset($items[$line])) { - $items[$line]['description'] = $description; - $items[$line]['serialnumber'] = $serialnumber; - $items[$line]['quantity'] = $quantity; - $items[$line]['discount'] = $discount; - $items[$line]['price'] = $price; + $line = &$items[$line]; + $line['description'] = $description; + $line['serialnumber'] = $serialnumber; + $line['quantity'] = $quantity; + $line['discount'] = $discount; + $line['price'] = $price; + $line['total'] = $this->get_item_total($quantity, $price, $discount); + $line['total_tax_exclusive'] = $this->get_item_total_tax_exclusive($line['item_id'], $quantity, $price, $discount); $this->set_cart($items); } diff --git a/css/ospos_print.css b/css/ospos_print.css index 9e29b4149..7136b74e7 100644 --- a/css/ospos_print.css +++ b/css/ospos_print.css @@ -1,7 +1,7 @@ -body +#receipt_wrapper { - background-color:#FFFFFF; - font-size:75%; + /*background-color:#FFFFFF;*/ + font-size:75%; } #menubar,#footer @@ -25,11 +25,6 @@ body text-align:center; } -.long_name -{ - display:none; -} - .short_name { display:inline; @@ -39,3 +34,31 @@ body { white-space:nowrap; } + +/* Hide links in table for printing */ +table.innertable +{ + display: table; +} + +table.innertable a +{ + color: #000000; + text-decoration: none; +} + +table.report a.expand +{ + visibility: hidden; +} + +table.report a +{ + color: #000000; + text-decoration: none; +} + +table.innertable thead +{ + /*display:none;*/ +} diff --git a/css/popupbox.css b/css/popupbox.css index c0ceebc30..98be4f99f 100644 --- a/css/popupbox.css +++ b/css/popupbox.css @@ -84,6 +84,7 @@ margin-bottom:7px; margin-left:20px; color:red; + font-weight:bold; } #item_kit_items_title { diff --git a/css/receipt.css b/css/receipt.css index f2d6f5245..fbc5e4277 100644 --- a/css/receipt.css +++ b/css/receipt.css @@ -45,6 +45,11 @@ position:relative; padding:3px; margin-bottom:5px; + +} + +#receipt_items tr { + margin-bottom:5px; } .short_name diff --git a/translations/sales_lang.csv b/translations/sales_lang.csv index bc6ec0f4d..640e3df5c 100644 --- a/translations/sales_lang.csv +++ b/translations/sales_lang.csv @@ -72,7 +72,7 @@ sales_serial,Nummer,Serial,Serial,Serie,序號,серийный номер,Seria sales_start_typing_customer_name,Typ naam klant...,Empieza a escribir el cliente...,Start Typing customer's name...,Commencez à saisir le nom du client...,開始輸入客戶的名字,Начните печатать название клиента...,เริ่มต้นพิมพ์ชื่อลูกค้า...,Müşteri Adı...,Ketik Nama Pelanggan... sales_start_typing_item_name,Typ naam product of barcode...,Empieza a escribir o escanea el código de barras...,Start Typing item's name or scan barcode...,Commencez à saisir le nom de l\'item ou scannez le code-barre...,開始輸入產品名或掃描條碼...,Начните печатать название товара или сканировайте штрих-кода...,เริ่มต้นพิมพ์ชื่อสินค้า หรือ สแกนบาร์โค๊ด...,Ürün adı yazın yada barkod okutun...,Ketik Nama Barang atau Scan Barcode... sales_stock_location,Stock locatie,,Stock location,,,,,Stok yeri,Lokasi Stock -sales_sub_total,Subtotaal excl. VAT,Subtotal,Sub Total,Sous-Total,小計,промежуточный итог,ยอดรวมหักภาษี ,Ara Toplam,Sub Total +sales_sub_total,Subtotaal,Subtotal,Sub Total,Sous-Total,小計,промежуточный итог,ยอดรวมหักภาษี ,Ara Toplam,Sub Total sales_successfully_deleted,Uw aankoop werd verwijded,La Venta ha sido borrada satisfactoriamente,You have successfully deleted,Vente supprimée,銷售資料成功刪除,продажи успешно удален,ลบการขายสมยูรณ์,Satış silindi,Transaksi Penjualan berhasil dihapus sales_successfully_suspended_sale,Uw aankoop werd met sucess bewaard,La venta ha sido suspendida satisfactoriamente,Your sale has been successfully suspended,Vente suspendue,本銷售資料已經成功暫停,Ваши продажи успешно приостановлена,การขายของคุณถูกระงับเรียบร้อย,Satış askıya alındı,Penjualan anda telah berhasil ditangguhkan sales_successfully_updated,Wijzigingen bewaard voor ticket,La venta ha sido actualizada satisfactoriamente,Sale successfully updated,Vente éditée,銷售資料成功更新,Продажа успешно обновлен,อัพเดทการขายสมบูรณ์,Satış düzenlendi,Penjualan berhasil diperbarui