update edit qty and price and cash and credit div in payment details
This commit is contained in:
@@ -26,11 +26,12 @@
|
||||
<table class="table " id="order-items-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th class="item-name">Items</th>
|
||||
<th style="item-attr-edit">QTY</td>
|
||||
<th class="item-attr-edit">Price</td>
|
||||
<th class='item-attr'> Action </th>
|
||||
<th width="4%">#</th>
|
||||
<th class="" width="30%">Items</th>
|
||||
<th style="" width="13%">QTY</td>
|
||||
<th class="" width="13%">Price</td>
|
||||
<!-- <th class='' width="17%"> Total </th> -->
|
||||
<th class='' width="17%"> Action </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -47,39 +48,45 @@
|
||||
unless sale_item.price == 0
|
||||
%>
|
||||
<tr>
|
||||
<td><%= count %></td>
|
||||
<td class='item-name'>
|
||||
<td width="4%"><%= count %></td>
|
||||
<td class='' width="30%">
|
||||
<%= sale_item.product_name %>
|
||||
</td>
|
||||
<% if sale_item.remark != 'void' && sale_item.remark != 'edit' %>
|
||||
<td class='item-attr-edit'>
|
||||
<input id="<%= sale_item.id%>_qty" data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.qty %>" />
|
||||
<td class='' width="13%">
|
||||
<input id="<%= sale_item.id%>_qty" data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.qty %>" class="form-control "/>
|
||||
</td>
|
||||
<td class='item-attr-edit'>
|
||||
<input id="<%= sale_item.id%>_price" data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.price %>" />
|
||||
<td class='' width="13%">
|
||||
<input id="<%= sale_item.id%>_price" data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.unit_price %>" class="form-control"/>
|
||||
</td>
|
||||
<td class='item-attr'>
|
||||
<button data-id ="<%= sale_item.id %>" class='btn btn-primary btn-sm update'>Update
|
||||
</button>
|
||||
<button data-id ="<%= sale_item.id %>" class='btn btn-danger btn-sm void'>Void</button>
|
||||
</td>
|
||||
<!-- <td class='' width="17%">
|
||||
<input id="<%= sale_item.id%>_price" data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.price %>" class="form-control"/>
|
||||
</td> -->
|
||||
<td class='' width="17%">
|
||||
<button data-id ="<%= sale_item.id %>" class='btn btn-primary btn-md update'>Update
|
||||
</button>
|
||||
<button data-id ="<%= sale_item.id %>" class='btn btn-danger btn-md void'>Void</button>
|
||||
</td>
|
||||
|
||||
<% elsif sale_item.qty.to_i < 0 || sale_item.remark == 'edit' %>
|
||||
<td class='item-attr-edit'>
|
||||
<input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.qty %>" disabled/>
|
||||
<td class='' width="13%">
|
||||
<input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.qty %>" class="form-control" disabled/>
|
||||
</td>
|
||||
<td class='item-attr-edit'>
|
||||
<input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.price %>" disabled/>
|
||||
<td class='' width="13%">
|
||||
<input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.unit_price %>" class="form-control" disabled/>
|
||||
</td>
|
||||
<td class='item-attr'>
|
||||
<button data-id ="<%= sale_item.id %>" class='btn btn-primary btn-sm cancel'>Cancel Void/Update</button>
|
||||
<!-- <td class='' width="17%">
|
||||
<input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.price %>" class="form-control" disabled/>
|
||||
</td> -->
|
||||
<td class='' width="17%">
|
||||
<button data-id ="<%= sale_item.id %>" class='btn btn-primary btn-md cancel'>Cancel Void/Update</button>
|
||||
</td>
|
||||
<% else %>
|
||||
<td class='item-attr-edit'>
|
||||
<input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.qty %>" disabled/>
|
||||
<td class='' width="13%">
|
||||
<input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.qty %>" class="form-control" disabled/>
|
||||
</td>
|
||||
<td class='item-attr-edit'>
|
||||
<input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.price %>" disabled/>
|
||||
<td class='' width="13%">
|
||||
<input data-id ="<%= sale_item.id %>" type="text" value="<%= sale_item.price %>" class="form-control" disabled/>
|
||||
</td>
|
||||
<td></td>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user