update addorder and show_account_info add shops
This commit is contained in:
@@ -575,7 +575,6 @@ $(function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.stringify(attribute_arr) === JSON.stringify(instances[field].values) || result) {
|
if (JSON.stringify(attribute_arr) === JSON.stringify(instances[field].values) || result) {
|
||||||
$('.add_to_order').attr('data-instance-code',instances[field].code);
|
$('.add_to_order').attr('data-instance-code',instances[field].code);
|
||||||
$('.add_to_order').attr('data-instance',instances[field].name);
|
$('.add_to_order').attr('data-instance',instances[field].name);
|
||||||
|
|||||||
@@ -60,11 +60,13 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
|
|
||||||
customer(customer_name)
|
customer(customer_name)
|
||||||
|
|
||||||
if discount_price_by_accounts.length > 0
|
if discount_price_by_accounts.length > 0 && shop_details.show_account_info
|
||||||
discount_account(discount_price_by_accounts,printer_settings.precision,delimiter)
|
discount_account(discount_price_by_accounts,printer_settings.precision,delimiter)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if shop_details.show_account_info
|
||||||
items_account(item_price_by_accounts,printer_settings.precision,delimiter)
|
items_account(item_price_by_accounts,printer_settings.precision,delimiter)
|
||||||
|
end
|
||||||
|
|
||||||
sign(sale_data)
|
sign(sale_data)
|
||||||
|
|
||||||
@@ -389,6 +391,8 @@ class ReceiptBillPdf < Prawn::Document
|
|||||||
text "#{ customer_name }" , :size => self.item_font_size,:align => :right
|
text "#{ customer_name }" , :size => self.item_font_size,:align => :right
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
def discount_account(discount_price_by_accounts,precision,delimiter)
|
def discount_account(discount_price_by_accounts,precision,delimiter)
|
||||||
move_down 5
|
move_down 5
|
||||||
stroke_horizontal_rule
|
stroke_horizontal_rule
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
<%= f.input :is_rounding_adj %>
|
<%= f.input :is_rounding_adj %>
|
||||||
<%= f.input :quick_sale_summary %>
|
<%= f.input :quick_sale_summary %>
|
||||||
<%= f.input :calc_tax_order %>
|
<%= f.input :calc_tax_order %>
|
||||||
|
<%= f.input :show_account_info %>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<th>Rouding Adj</th>
|
<th>Rouding Adj</th>
|
||||||
<th>View Sale Summary</th>
|
<th>View Sale Summary</th>
|
||||||
<th>Calculate Tax</th>
|
<th>Calculate Tax</th>
|
||||||
|
<th>Show Account Info</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -36,7 +37,7 @@
|
|||||||
<td><%= shop.is_rounding_adj %></td>
|
<td><%= shop.is_rounding_adj %></td>
|
||||||
<td><%= shop.quick_sale_summary %></td>
|
<td><%= shop.quick_sale_summary %></td>
|
||||||
<td><%= shop.calc_tax_order %></td>
|
<td><%= shop.calc_tax_order %></td>
|
||||||
|
<td><%= shop.show_account_info %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to t("views.btn.show"), settings_shop_path(shop),:class => 'btn btn-info btn-sm waves-effect' %>
|
<%= link_to t("views.btn.show"), settings_shop_path(shop),:class => 'btn btn-info btn-sm waves-effect' %>
|
||||||
<%= link_to t("views.btn.edit"), edit_settings_shop_path(shop),:class => 'btn btn-primary btn-sm waves-effect' %>
|
<%= link_to t("views.btn.edit"), edit_settings_shop_path(shop),:class => 'btn btn-primary btn-sm waves-effect' %>
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class CreateShops < ActiveRecord::Migration[5.1]
|
|||||||
t.boolean :is_rounding_adj, :default => false
|
t.boolean :is_rounding_adj, :default => false
|
||||||
t.boolean :quick_sale_summary, :default => false
|
t.boolean :quick_sale_summary, :default => false
|
||||||
t.boolean :calc_tax_order, :default => false
|
t.boolean :calc_tax_order, :default => false
|
||||||
|
t.boolean :show_account_info, :default => true
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user