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) {
|
||||
$('.add_to_order').attr('data-instance-code',instances[field].code);
|
||||
$('.add_to_order').attr('data-instance',instances[field].name);
|
||||
|
||||
@@ -45,7 +45,7 @@ class ReceiptBillPdf < Prawn::Document
|
||||
delimiter = ""
|
||||
end
|
||||
|
||||
header( shop_details)
|
||||
header(shop_details)
|
||||
|
||||
stroke_horizontal_rule
|
||||
|
||||
@@ -60,12 +60,14 @@ class ReceiptBillPdf < Prawn::Document
|
||||
|
||||
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)
|
||||
end
|
||||
|
||||
items_account(item_price_by_accounts,printer_settings.precision,delimiter)
|
||||
|
||||
if shop_details.show_account_info
|
||||
items_account(item_price_by_accounts,printer_settings.precision,delimiter)
|
||||
end
|
||||
|
||||
sign(sale_data)
|
||||
|
||||
footer(printed_status)
|
||||
@@ -389,6 +391,8 @@ class ReceiptBillPdf < Prawn::Document
|
||||
text "#{ customer_name }" , :size => self.item_font_size,:align => :right
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def discount_account(discount_price_by_accounts,precision,delimiter)
|
||||
move_down 5
|
||||
stroke_horizontal_rule
|
||||
|
||||
@@ -15,12 +15,13 @@
|
||||
<%= f.input :license_data %>
|
||||
<%= f.input :base_currency %>
|
||||
<%= f.input :cloud_token %>
|
||||
<%= f.input :cloud_url %>
|
||||
<%= f.input :cloud_url %>
|
||||
<%= f.input :owner_token %>
|
||||
<%= f.input :id_prefix %>
|
||||
<%= f.input :is_rounding_adj %>
|
||||
<%= f.input :quick_sale_summary %>
|
||||
<%= f.input :calc_tax_order %>
|
||||
<%= f.input :show_account_info %>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<th>Rouding Adj</th>
|
||||
<th>View Sale Summary</th>
|
||||
<th>Calculate Tax</th>
|
||||
<th>Show Account Info</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -36,7 +37,7 @@
|
||||
<td><%= shop.is_rounding_adj %></td>
|
||||
<td><%= shop.quick_sale_summary %></td>
|
||||
<td><%= shop.calc_tax_order %></td>
|
||||
|
||||
<td><%= shop.show_account_info %></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.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 :quick_sale_summary, :default => false
|
||||
t.boolean :calc_tax_order, :default => false
|
||||
t.boolean :show_account_info, :default => true
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user