Skip to content

Commit

Permalink
refs #451 Add payment on Invoice and Bill, Account create and edit sa…
Browse files Browse the repository at this point in the history
…ve issue solved.
  • Loading branch information
cuneytsenturk committed Aug 16, 2018
1 parent 89e1293 commit 022b203
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions app/Http/Controllers/Banking/Accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ public function currency()
// Get currency object
$currency = Currency::where('code', $currency_code)->first();

$account->currency_name = $currency->name;
$account->currency_code = $currency_code;
$account->currency_rate = $currency->rate;

Expand Down
6 changes: 3 additions & 3 deletions resources/views/banking/accounts/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
dataType: 'JSON',
data: 'code=' + $(this).val(),
success: function(data) {
$('#currency').val(data.currency_code);
$('#currency').val(data.code);
$('#currency_code').val(data.currency_code);
$('#currency_rate').val(data.currency_rate);
$('#currency_code').val(data.code);
$('#currency_rate').val(data.rate);
opening_balance = $('#opening_balance').maskMoney('unmasked')[0];
Expand Down
6 changes: 3 additions & 3 deletions resources/views/banking/accounts/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
dataType: 'JSON',
data: 'code=' + $(this).val(),
success: function(data) {
$('#currency').val(data.currency_code);
$('#currency').val(data.code);
$('#currency_code').val(data.currency_code);
$('#currency_rate').val(data.currency_rate);
$('#currency_code').val(data.code);
$('#currency_rate').val(data.rate);
opening_balance = $('#opening_balance').maskMoney('unmasked')[0];
Expand Down

0 comments on commit 022b203

Please sign in to comment.