credit payment function

This commit is contained in:
phyusin
2018-07-10 18:12:25 +06:30
parent d0118d2cfc
commit bf0f76ebc7
29 changed files with 879 additions and 462 deletions

View File

@@ -290,7 +290,7 @@
</tr>
<tr class="bg-red">
<td class="charges-name"><strong>Credit Amount:</strong></td>
<td class="item-attr"><strong id="credit_amount"><%= @sale_payment.payment_amount rescue 0%></strong></td>
<td class="item-attr"><strong id="credit_amount"><%= @sale_payment[0].payment_amount rescue 0%></strong></td>
</tr>
<tr class="rebate_amount"></tr>
</table>
@@ -309,7 +309,7 @@
<!-- script data for credit lists -->
<script type="text/html" id="html_credit_items">
<tr class="row_{key} credit_detail" data-id="{sale_payment_id}">
<tr class="row_{key} credit_detail" data-id="{sale_id}">
<td>{receipt_date}</td>
<td>{receipt_no}</td>
<td>{cashier_name}</td>
@@ -348,8 +348,7 @@
$('#pay').on('click',function() {
var sale_id = '<%= @sale.sale_id %>';
var sale_payment_id = '<%= @sale_payment.sale_payment_id %>';
window.location.href = '/origami/sale/'+ sale_payment_id + "/"+cashier_type+"/credit_sales";
window.location.href = '/origami/sale/'+ sale_id + "/"+cashier_type+"/credit_payment";
});
$('#back').on('click',function(){