There are no record for your search
+ + Back + +
-
| Name | -Contact no | -Company | -Date Of Birth | -Membership Account | -Balance | -Type | -|
|---|---|---|---|---|---|---|---|
| <%= @crm_customer.name %> | -<%= @crm_customer.email %> | -<%= @crm_customer.contact_no %> | -<%= @crm_customer.company %> | -<%= @crm_customer.date_of_birth %> | -<%= @balance %> | -<%= @type %> | - <% -puts "hhhhhhhhhhhhhhhhhhhhh" - puts @member_data.to_json %> -
-
Order Items
+| Name | +<%= @crm_customer.name %> | +
|---|---|
| <%= @crm_customer.email %> | +|
| Contact no | +<%= @crm_customer.contact_no %> | +
| Company | +<%= @crm_customer.company %> | +
| Date Of Birth | +<%= @crm_customer.date_of_birth %> | +
| Created at | -Menu Item | -QTY | -Unit Price | -Option | -Status | -Waiter | -
|---|
| Order ID | +Menu Item | +QTY | +Unit Price | +Option | +Status | +Waiter | +Created at | +
|---|---|---|---|---|---|---|---|
| <%= order_item.created_at %> | -<%= order_item.item_name %> | -<%= order_item.qty %> | -<%= order_item.price %> | -<%= order_item.options %> | -<%= order_item.order_item_status %> | -<%= order_item.item_order_by %> | -
Sale Items
+Sale Details
+| Sale ID | +Menu Item | +QTY | +Unit Price | +Tax Price | +Created At | +
|---|
| Sale ID | -Menu Item | -QTY | -Unit Price | -Tax Price | -Created At | -
|---|---|---|---|---|---|
| <%= sale_item.sale_id %> | +<%= sale_item.product_name %> | +<%= sale_item.qty %> | +<%= sale_item.unit_price %> | + +<%= sale_item.taxable_price %> | +<%= sale_item.created_at %> | +
+
| Name | +Contact no | +Company | +Date Of Birth | +Membership Account | +|
|---|---|---|---|---|---|
| <%= @crm_customer.name %> | +<%= @crm_customer.email %> | +<%= @crm_customer.contact_no %> | +<%= @crm_customer.company %> | +<%= @crm_customer.date_of_birth %> | +
+ + +
Sale Items
+ +| Sale ID | +Menu Item | +QTY | +Unit Price | +Tax Price | +Created At | +
|---|---|---|---|---|---|
| <%= sale_item.sale_id %> | +<%= sale_item.product_name %> | +<%= sale_item.qty %> | +<%= sale_item.unit_price %> | + +<%= sale_item.taxable_price %> | +<%= sale_item.created_at %> | +
There are no record for your search
|
- <%= form_tag settings_sales_path, :method => :get do %>
-
-
-
-
-
-
- <% end %>
- |
- |||||||
| Sale Id | -Receipt no | -Grand total | -Tax amount | -Cashier | -Sales status | -Receipt Date | -Action | -
|---|---|---|---|---|---|---|---|
| <%= sale.sale_id %> | -<%= sale.receipt_no %> | -<%= sale.grand_total rescue '-' %> | -<%= sale.total_tax %> | -<%= sale.cashier_name rescue '-' %> | -<%= sale.sale_status %> | -<%= sale.receipt_date.strftime("%d-%m-%Y") %> | -<%= link_to 'Show', settings_sale_path(sale) %> | -
- -
- -
| Receipt Date | -Receipt no | -Cashier | -OSales status | -Receipt generated at | -
|---|---|---|---|---|
| <%= @sale.receipt_date.strftime("%d-%M-%Y") %> | -<%= @sale.receipt_no %> | -<%= @sale.cashier rescue '-' %> | -<%= @sale.sale_status %> | -<%= @sale.requested_at.strftime("%d-%m-%Y") %> | -
| Sale item name | -Qty | -Unit price | -Total pirce | -Created at | -
| <%=s.product_name rescue ' '%> | -<%=s.qty rescue ' '%> | -<%= number_with_precision(s.price, :precision => 2, :delimiter => ',') rescue ' '%> | -<%= number_with_precision(s.qty * s.price, :precision => 2, :delimiter => ',') rescue ' '%> | -<%=l s.created_at.utc.getlocal , :format => :short rescue ' ' %> | -
| - | Total | -<%= number_with_precision(@sale.total_amount, :precision => 2, :delimiter => ',') rescue ' '%> | -||
| - | Tax | -<%= number_with_precision(@sale.total_tax, :precision => 2, :delimiter => ',') rescue ' '%> | -||
| - | Discount | -<%= number_with_precision(@sale.total_discount, :precision => 2, :delimiter => ',') rescue ' '%> | -||
| - | Grand Total | -<%= number_with_precision(@sale.grand_total, :precision => 2, :delimiter => ',') rescue ' '%> | -||
| - | Pay Amount | -<%= number_with_precision(@sale.amount_received, :precision => 2, :delimiter => ',') rescue ' '%> | -||
| - | Change | -<%= number_with_precision(@sale.amount_changed, :precision => 2, :delimiter => ',') rescue ' '%> | -||
<%= notice %>
+Transactions Sales
+|
+ <%= form_tag transactions_sales_path, :method => :get do %>
+
+
+
+
+
+
+ <% end %>
+ |
+ |||||||||||||||||||
| Sale Id | +Receipt no | +Grand total | +Tax amount | +Cashier | +Sales status | +Receipt Date | +Action | +||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Cashier | -Cashier name | -Requested by | -Requested at | -Receipt no | -Receipt date | -Customer | -Payment status | -Sale status | -Total amount | -Total discount | -Total tax | -Tax type | -Grand total | -Rounding adjustment | -Amount received | -Amount changed | -- | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= transactions_sale.cashier %> | -<%= transactions_sale.cashier_name %> | -<%= transactions_sale.requested_by %> | -<%= transactions_sale.requested_at %> | -<%= transactions_sale.receipt_no %> | -<%= transactions_sale.receipt_date %> | -<%= transactions_sale.customer %> | -<%= transactions_sale.payment_status %> | -<%= transactions_sale.sale_status %> | -<%= transactions_sale.total_amount %> | -<%= transactions_sale.total_discount %> | -<%= transactions_sale.total_tax %> | -<%= transactions_sale.tax_type %> | -<%= transactions_sale.grand_total %> | -<%= transactions_sale.rounding_adjustment %> | -<%= transactions_sale.amount_received %> | -<%= transactions_sale.amount_changed %> | -<%= link_to 'Show', transactions_sale %> | -<%= link_to 'Edit', edit_transactions_sale_path(transactions_sale) %> | -<%= link_to 'Destroy', transactions_sale, method: :delete, data: { confirm: 'Are you sure?' } %> | -
+ +
+
<%= notice %>
+ +Transactions Sales
+ +| Cashier | +Cashier name | +Requested by | +Requested at | +Receipt no | +Receipt date | +Customer | +Payment status | +Sale status | +Total amount | +Total discount | +Total tax | +Tax type | +Grand total | +Rounding adjustment | +Amount received | +Amount changed | ++ | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <%= transactions_sale.cashier %> | +<%= transactions_sale.cashier_name %> | +<%= transactions_sale.requested_by %> | +<%= transactions_sale.requested_at %> | +<%= transactions_sale.receipt_no %> | +<%= transactions_sale.receipt_date %> | +<%= transactions_sale.customer %> | +<%= transactions_sale.payment_status %> | +<%= transactions_sale.sale_status %> | +<%= transactions_sale.total_amount %> | +<%= transactions_sale.total_discount %> | +<%= transactions_sale.total_tax %> | +<%= transactions_sale.tax_type %> | +<%= transactions_sale.grand_total %> | +<%= transactions_sale.rounding_adjustment %> | +<%= transactions_sale.amount_received %> | +<%= transactions_sale.amount_changed %> | +<%= link_to 'Show', transactions_sale %> | +<%= link_to 'Edit', edit_transactions_sale_path(transactions_sale) %> | +<%= link_to 'Destroy', transactions_sale, method: :delete, data: { confirm: 'Are you sure?' } %> | +
+ +<%= link_to 'New Transactions Sale', new_transactions_sale_path %> diff --git a/app/views/transactions/sales/show.html.erb b/app/views/transactions/sales/show.html.erb index c82c2c5e..484de762 100644 --- a/app/views/transactions/sales/show.html.erb +++ b/app/views/transactions/sales/show.html.erb @@ -1,89 +1,103 @@ -
<%= notice %>
+-
- Cashier: - <%= @transactions_sale.cashier %> -
+| Receipt Date | +Receipt no | +Cashier | +OSales status | +Receipt generated at | +
|---|---|---|---|---|
| <%= @sale.receipt_date.strftime("%d-%M-%Y") %> | +<%= @sale.receipt_no %> | +<%= @sale.cashier rescue '-' %> | +<%= @sale.sale_status %> | +<%= @sale.requested_at.strftime("%d-%m-%Y") %> | +
| Sale item name | +Qty | +Unit price | +Total pirce | +Created at | +
| <%=s.product_name rescue ' '%> | +<%=s.qty rescue ' '%> | +<%= number_with_precision(s.price, :precision => 2, :delimiter => ',') rescue ' '%> | +<%= number_with_precision(s.qty * s.price, :precision => 2, :delimiter => ',') rescue ' '%> | +<%=l s.created_at.utc.getlocal , :format => :short rescue ' ' %> | +
| + | Total | +<%= number_with_precision(@sale.total_amount, :precision => 2, :delimiter => ',') rescue ' '%> | +||
| + | Tax | +<%= number_with_precision(@sale.total_tax, :precision => 2, :delimiter => ',') rescue ' '%> | +||
| + | Discount | +<%= number_with_precision(@sale.total_discount, :precision => 2, :delimiter => ',') rescue ' '%> | +||
| + | Grand Total | +<%= number_with_precision(@sale.grand_total, :precision => 2, :delimiter => ',') rescue ' '%> | +||
| + | Pay Amount | +<%= number_with_precision(@sale.amount_received, :precision => 2, :delimiter => ',') rescue ' '%> | +||
| + | Change | +<%= number_with_precision(@sale.amount_changed, :precision => 2, :delimiter => ',') rescue ' '%> | +||
- Receipt no: - <%= @transactions_sale.receipt_no %> -
+- Receipt date: - <%= @transactions_sale.receipt_date %> -
-- Customer: - <%= @transactions_sale.customer %> -
-- Payment status: - <%= @transactions_sale.payment_status %> -
+ -- Sale status: - <%= @transactions_sale.sale_status %> -
- -- Total amount: - <%= @transactions_sale.total_amount %> -
- -- Total discount: - <%= @transactions_sale.total_discount %> -
- -- Total tax: - <%= @transactions_sale.total_tax %> -
- -- Tax type: - <%= @transactions_sale.tax_type %> -
- -- Grand total: - <%= @transactions_sale.grand_total %> -
- -- Rounding adjustment: - <%= @transactions_sale.rounding_adjustment %> -
- -- Amount received: - <%= @transactions_sale.amount_received %> -
- -- Amount changed: - <%= @transactions_sale.amount_changed %> -
- -<%= link_to 'Edit', edit_transactions_sale_path(@transactions_sale) %> | -<%= link_to 'Back', transactions_sales_path %> diff --git a/app/views/transactions/sales/showback.html.erb b/app/views/transactions/sales/showback.html.erb new file mode 100644 index 00000000..c82c2c5e --- /dev/null +++ b/app/views/transactions/sales/showback.html.erb @@ -0,0 +1,89 @@ +<%= notice %>
+ ++ Cashier: + <%= @transactions_sale.cashier %> +
+ ++ Cashier name: + <%= @transactions_sale.cashier_name %> +
+ ++ Requested by: + <%= @transactions_sale.requested_by %> +
+ ++ Requested at: + <%= @transactions_sale.requested_at %> +
+ ++ Receipt no: + <%= @transactions_sale.receipt_no %> +
+ ++ Receipt date: + <%= @transactions_sale.receipt_date %> +
+ ++ Customer: + <%= @transactions_sale.customer %> +
+ ++ Payment status: + <%= @transactions_sale.payment_status %> +
+ ++ Sale status: + <%= @transactions_sale.sale_status %> +
+ ++ Total amount: + <%= @transactions_sale.total_amount %> +
+ ++ Total discount: + <%= @transactions_sale.total_discount %> +
+ ++ Total tax: + <%= @transactions_sale.total_tax %> +
+ ++ Tax type: + <%= @transactions_sale.tax_type %> +
+ ++ Grand total: + <%= @transactions_sale.grand_total %> +
+ ++ Rounding adjustment: + <%= @transactions_sale.rounding_adjustment %> +
+ ++ Amount received: + <%= @transactions_sale.amount_received %> +
+ ++ Amount changed: + <%= @transactions_sale.amount_changed %> +
+ +<%= link_to 'Edit', edit_transactions_sale_path(@transactions_sale) %> | +<%= link_to 'Back', transactions_sales_path %> diff --git a/config/routes.rb b/config/routes.rb index 2199ad67..a0da05ae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -173,10 +173,6 @@ Rails.application.routes.draw do resources :tax_profiles #lookups resources :lookups - #orders - resources :orders - #sales - resources :sales #cashier_terminals resources :cashier_terminals #order_job_stations @@ -201,6 +197,7 @@ Rails.application.routes.draw do #--------- Transactions Sections ------------# namespace :transactions do resources :sales + resources :orders end #--------- Reports Controller Sections ------------# diff --git a/db/seeds.rb b/db/seeds.rb index 9db92184..a7fdc416 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -145,13 +145,13 @@ crm_order_printer=PrintSetting.create({name: "CRM Order", unique_code: "CrmOrder member_setting = MembershipSetting.create({membership_type:"paypar_url",gateway_url: "http://192.168.1.47:3006",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}) -member_actions= MembershipAction.create([{membership_type:"get_account_balance",gateway_url:"/api/membership_campaigns/get_correspond_account_data",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"redeem",gateway_url:"/api/membership_campaigns/redeem",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"create_membership_customer",gateway_url:"/api/generic_customer/create_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"update_membership_customer",gateway_url:"/api/generic_customer/update_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"get_all_member_group",gateway_url:"/api/member_group/get_all_member_group",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"rebate",gateway_url:"/api/membership_campaigns/rebate",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS"}, - {membership_type:"get_all_member_account",gateway_url:"/api/generic_customer/get_membership_data",merchant_account_id:"vWSsseoZCzxd6xcNf_uS"} +member_actions= MembershipAction.create([{membership_type:"get_account_balance",gateway_url:"/api/membership_campaigns/get_correspond_account_data",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"redeem",gateway_url:"/api/membership_campaigns/redeem",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"create_membership_customer",gateway_url:"/api/generic_customer/create_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"update_membership_customer",gateway_url:"/api/generic_customer/update_membership_customer",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"get_all_member_group",gateway_url:"/api/member_group/get_all_member_group",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"rebate",gateway_url:"/api/membership_campaigns/rebate",additional_parameter:{campaign_type_id:1},merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"}, + {membership_type:"get_all_member_account",gateway_url:"/api/generic_customer/get_membership_data",merchant_account_id:"vWSsseoZCzxd6xcNf_uS",auth_token:"code2lab"} ]) payment_methods = PaymentMethodSetting.create({payment_method:"MPU",gateway_url: "http//192.168.1.47:3006"}) diff --git a/dump.rdb b/dump.rdb index 9ce916ed..4f89d45d 100644 Binary files a/dump.rdb and b/dump.rdb differ