refs #451 Invoice edit,
This commit is contained in:
		| @@ -161,6 +161,19 @@ | ||||
|                             } | ||||
|                         }); | ||||
|  | ||||
|                         var currency = json['data']['currency']; | ||||
|  | ||||
|                         $("#item-price-" + item_row).maskMoney({ | ||||
|                             thousands : currency.thousands_separator, | ||||
|                             decimal : currency.decimal_mark, | ||||
|                             precision : currency.precision, | ||||
|                             allowZero : true, | ||||
|                             prefix : (currency.symbol_first) ? currency.symbol : '', | ||||
|                             suffix : (currency.symbol_first) ? '' : currency.symbol | ||||
|                         }); | ||||
|  | ||||
|                         $("#item-price-" + item_row).trigger('focusout'); | ||||
|  | ||||
|                         item_row++; | ||||
|                     } | ||||
|                 } | ||||
| @@ -168,6 +181,20 @@ | ||||
|         }); | ||||
|  | ||||
|         $(document).ready(function(){ | ||||
|             $(".input-price").maskMoney({ | ||||
|                 thousands : '{{ $currency->thousands_separator }}', | ||||
|                 decimal : '{{ $currency->decimal_mark }}', | ||||
|                 precision : {{ $currency->precision }}, | ||||
|                 allowZero : true, | ||||
|                 @if($currency->symbol_first) | ||||
|                 prefix : '{{ $currency->symbol }}' | ||||
|                 @else | ||||
|                 suffix : '{{ $currency->symbol }}' | ||||
|                 @endif | ||||
|             }); | ||||
|  | ||||
|             $('.input-price').trigger('focusout'); | ||||
|  | ||||
|             totalItem(); | ||||
|  | ||||
|             //Date picker | ||||
| @@ -346,9 +373,27 @@ | ||||
|                         $('#customer_tax_number').val(data.tax_number); | ||||
|                         $('#customer_phone').val(data.phone); | ||||
|                         $('#customer_address').val(data.address); | ||||
|  | ||||
|                         $('#currency_code').val(data.currency_code); | ||||
|                         $('#currency_rate').val(data.currency_rate); | ||||
|  | ||||
|                         $('.input-price').each(function(){ | ||||
|                             amount = $(this).maskMoney('unmasked')[0]; | ||||
|  | ||||
|                             $(this).maskMoney({ | ||||
|                                 thousands : data.thousands_separator, | ||||
|                                 decimal : data.decimal_mark, | ||||
|                                 precision : data.precision, | ||||
|                                 allowZero : true, | ||||
|                                 prefix : (data.symbol_first) ? data.symbol : '', | ||||
|                                 suffix : (data.symbol_first) ? '' : data.symbol | ||||
|                             }); | ||||
|  | ||||
|                             $(this).val(amount); | ||||
|  | ||||
|                             $(this).trigger('focusout'); | ||||
|                         }); | ||||
|  | ||||
|                         // This event Select2 Stylesheet | ||||
|                         $('#currency_code').trigger('change'); | ||||
|                     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user