invoice and bill item price issue solved
This commit is contained in:
parent
4e2c42825f
commit
e1b5f59b72
@ -38,6 +38,10 @@ class Money
|
|||||||
if (isset($bill_number) || isset($invoice_number) || !empty($items)) {
|
if (isset($bill_number) || isset($invoice_number) || !empty($items)) {
|
||||||
if (!empty($items)) {
|
if (!empty($items)) {
|
||||||
foreach ($items as $key => $item) {
|
foreach ($items as $key => $item) {
|
||||||
|
if (!isset($item['price'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($item['currency']) && $item['currency'] != $currency_code) {
|
if (isset($item['currency']) && $item['currency'] != $currency_code) {
|
||||||
$items[$key]['price'] = money($item['price'], $item['currency'])->getAmount();
|
$items[$key]['price'] = money($item['price'], $item['currency'])->getAmount();
|
||||||
} else {
|
} else {
|
||||||
|
@ -352,8 +352,24 @@
|
|||||||
totalItem();
|
totalItem();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
var focus = false;
|
||||||
|
|
||||||
|
$(document).on('focusin', '#items .input-price', function(){
|
||||||
|
focus = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('blur', '#items .input-price', function(){
|
||||||
|
if (focus) {
|
||||||
totalItem();
|
totalItem();
|
||||||
|
|
||||||
|
focus = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||||
|
if (!$(this).hasClass('input-price')) {
|
||||||
|
totalItem();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('change', '#vendor_id', function (e) {
|
$(document).on('change', '#vendor_id', function (e) {
|
||||||
|
@ -360,8 +360,24 @@
|
|||||||
totalItem();
|
totalItem();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
var focus = false;
|
||||||
|
|
||||||
|
$(document).on('focusin', '#items .input-price', function(){
|
||||||
|
focus = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('blur', '#items .input-price', function(){
|
||||||
|
if (focus) {
|
||||||
totalItem();
|
totalItem();
|
||||||
|
|
||||||
|
focus = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||||
|
if (!$(this).hasClass('input-price')) {
|
||||||
|
totalItem();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('change', '#vendor_id', function (e) {
|
$(document).on('change', '#vendor_id', function (e) {
|
||||||
|
@ -352,8 +352,24 @@
|
|||||||
totalItem();
|
totalItem();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
var focus = false;
|
||||||
|
|
||||||
|
$(document).on('focusin', '#items .input-price', function(){
|
||||||
|
focus = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('blur', '#items .input-price', function(){
|
||||||
|
if (focus) {
|
||||||
totalItem();
|
totalItem();
|
||||||
|
|
||||||
|
focus = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||||
|
if (!$(this).hasClass('input-price')) {
|
||||||
|
totalItem();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('change', '#customer_id', function (e) {
|
$(document).on('change', '#customer_id', function (e) {
|
||||||
|
@ -360,8 +360,24 @@
|
|||||||
totalItem();
|
totalItem();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('keyup', '#items tbody .form-control', function(){
|
var focus = false;
|
||||||
|
|
||||||
|
$(document).on('focusin', '#items .input-price', function(){
|
||||||
|
focus = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('blur', '#items .input-price', function(){
|
||||||
|
if (focus) {
|
||||||
totalItem();
|
totalItem();
|
||||||
|
|
||||||
|
focus = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('keyup', '#items tbody .form-control', function(){
|
||||||
|
if (!$(this).hasClass('input-price')) {
|
||||||
|
totalItem();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('change', '#customer_id', function (e) {
|
$(document).on('change', '#customer_id', function (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user