credit payment view
This commit is contained in:
@@ -167,20 +167,42 @@
|
||||
<div class="col-md-8"><strong>Amount Due</strong></div>
|
||||
<div class="col-md-4">
|
||||
<strong>
|
||||
<span id="grand_total" class="hidden"><%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i)%></span>
|
||||
<span id="amount_due"><%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></span></strong>
|
||||
<span id="grand_total" class="hidden">
|
||||
<% if @sale_payment.nil? %>
|
||||
<%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i)%>
|
||||
<% else %>
|
||||
<%= number_with_precision(@sale_payment.payment_amount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i)%>
|
||||
<% end %>
|
||||
</span>
|
||||
<span id="amount_due">
|
||||
<% if @sale_payment.nil? %>
|
||||
<%= number_with_precision(@sale_data.grand_total, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
|
||||
<% else %>
|
||||
<%= number_with_precision(@sale_payment.payment_amount, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i)%>
|
||||
<% end %>
|
||||
</span>
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row payment cash-color p-l-5 p-r-5">
|
||||
<div class="col-md-8">Cash</div>
|
||||
<div class="col-md-4" id="cash" ><%= number_with_precision(@cash, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
</div>
|
||||
|
||||
<div class="row payment credit-color p-l-5 p-r-5" id="credit_payment" >
|
||||
<div class="col-md-8">Credit</div>
|
||||
<div class="col-md-4" id="credit"><%= number_with_precision(@credit, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
<div class="col-md-4" id="cash" >
|
||||
<% if @sale_payment.nil? %>
|
||||
<%= number_with_precision(@cash, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
|
||||
<% else %>
|
||||
<%= number_with_precision(0, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% if @sale_payment.nil? %>
|
||||
<div class="row payment credit-color p-l-5 p-r-5" id="credit_payment" >
|
||||
<div class="col-md-8">Credit</div>
|
||||
<div class="col-md-4" id="credit"><%= number_with_precision(@credit, precision: precision.to_i ) rescue number_with_precision(0, precision: precision.to_i ) %></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="col-md-4 hidden" id="credit">0</div>
|
||||
<% end %>
|
||||
<% if @other == 0.0 && @ppamount == 0.0 && @visacount == 0.0 && @jcbcount == 0.0 && @mastercount == 0.0 && @unionpaycount == 0.0 && @alipaycount == 0.0 && @paymalcount == 0.0 && @junctionpaycount == 0.0 && @dingacount == 0.0 && @giftvouchercount == 0.0 %>
|
||||
<div class="row payment other-payment-color" id="card_payment" >
|
||||
<div class="col-md-8">Other Payments</div>
|
||||
|
||||
Reference in New Issue
Block a user