vyapari 0.1.5dev10 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/vyapari/admin/base_controller.rb +0 -9
- data/app/controllers/vyapari/admin/countries_controller.rb +2 -2
- data/app/controllers/vyapari/admin/dashboard_controller.rb +1 -3
- data/app/controllers/vyapari/admin/exchange_rates_controller.rb +2 -2
- data/app/controllers/vyapari/admin/regions_controller.rb +1 -1
- data/app/controllers/vyapari/admin/resource_controller.rb +0 -1
- data/app/controllers/vyapari/admin/users_controller.rb +130 -0
- data/app/controllers/vyapari/application_controller.rb +0 -11
- data/app/models/brand.rb +19 -67
- data/app/models/category.rb +19 -63
- data/app/models/country.rb +7 -31
- data/app/models/exchange_rate.rb +7 -32
- data/app/models/product.rb +20 -75
- data/app/models/region.rb +20 -37
- data/app/models/vyapari/application_record.rb +0 -3
- data/app/views/layouts/kuppayam/_footer.html.erb +1 -1
- data/app/views/layouts/kuppayam/_sidebar.html.erb +44 -45
- data/app/views/vyapari/admin/countries/_index.html.erb +1 -1
- data/app/views/vyapari/admin/countries/index.html.erb +3 -19
- data/app/views/vyapari/admin/exchange_rates/_form.html.erb +4 -3
- data/app/views/vyapari/admin/exchange_rates/_index.html.erb +7 -7
- data/app/views/vyapari/admin/exchange_rates/_row.html.erb +3 -3
- data/app/views/vyapari/admin/exchange_rates/_show.html.erb +0 -1
- data/app/views/vyapari/admin/exchange_rates/index.html.erb +3 -19
- data/app/views/vyapari/admin/regions/_index.html.erb +1 -1
- data/app/views/vyapari/admin/regions/index.html.erb +3 -19
- data/app/views/vyapari/admin/users/_form.html.erb +39 -0
- data/app/views/vyapari/admin/users/_index.html.erb +101 -0
- data/app/views/vyapari/admin/users/_row.html.erb +72 -0
- data/app/views/vyapari/admin/users/_show.html.erb +199 -0
- data/app/views/vyapari/admin/{categories → users}/index.html.erb +24 -8
- data/config/routes.rb +5 -66
- data/db/migrate/20170000000200_create_exchange_rates.rb +2 -3
- data/lib/tasks/vyapari_tasks.rake +4 -0
- data/lib/vyapari/version.rb +1 -1
- metadata +15 -167
- data/app/assets/images/vyapari/sample_stock_bundle.csv +0 -1
- data/app/controllers/vyapari/admin/brands_controller.rb +0 -99
- data/app/controllers/vyapari/admin/categories_controller.rb +0 -115
- data/app/controllers/vyapari/admin/products_controller.rb +0 -79
- data/app/controllers/vyapari/admin/stores_controller.rb +0 -67
- data/app/controllers/vyapari/admin/suppliers_controller.rb +0 -67
- data/app/controllers/vyapari/admin/terminals_controller.rb +0 -150
- data/app/controllers/vyapari/store_manager/base_controller.rb +0 -33
- data/app/controllers/vyapari/store_manager/dashboard_controller.rb +0 -31
- data/app/controllers/vyapari/store_manager/reports/invoices_controller.rb +0 -249
- data/app/controllers/vyapari/store_manager/reports/sales_controller.rb +0 -299
- data/app/controllers/vyapari/store_manager/reports/stock_controller.rb +0 -132
- data/app/controllers/vyapari/store_manager/resource_controller.rb +0 -17
- data/app/controllers/vyapari/store_manager/stock_bundles_controller.rb +0 -206
- data/app/controllers/vyapari/store_manager/stock_entries_controller.rb +0 -161
- data/app/controllers/vyapari/terminal_staff/base_controller.rb +0 -38
- data/app/controllers/vyapari/terminal_staff/dashboard_controller.rb +0 -35
- data/app/controllers/vyapari/terminal_staff/invoices_controller.rb +0 -147
- data/app/controllers/vyapari/terminal_staff/line_items_controller.rb +0 -139
- data/app/controllers/vyapari/terminal_staff/resource_controller.rb +0 -17
- data/app/controllers/vyapari/user_dashboard_controller.rb +0 -31
- data/app/models/bank_account.rb +0 -44
- data/app/models/contact.rb +0 -72
- data/app/models/image/brand_image.rb +0 -3
- data/app/models/image/category_image.rb +0 -3
- data/app/models/image/product_image.rb +0 -3
- data/app/models/invoice.rb +0 -256
- data/app/models/line_item.rb +0 -207
- data/app/models/stock_bundle.rb +0 -249
- data/app/models/stock_entry.rb +0 -275
- data/app/models/store.rb +0 -302
- data/app/models/supplier.rb +0 -79
- data/app/models/terminal.rb +0 -158
- data/app/uploaders/brand_image_uploader.rb +0 -14
- data/app/uploaders/category_image_uploader.rb +0 -14
- data/app/uploaders/product_image_uploader.rb +0 -14
- data/app/uploaders/stock_bundle_uploader.rb +0 -10
- data/app/views/layouts/vyapari/_store_manager_menu.html.erb +0 -126
- data/app/views/layouts/vyapari/_terminal_staff_menu.html.erb +0 -106
- data/app/views/layouts/vyapari/store_manager.html.erb +0 -112
- data/app/views/layouts/vyapari/terminal_staff.html.erb +0 -116
- data/app/views/vyapari/admin/brands/_form.html.erb +0 -23
- data/app/views/vyapari/admin/brands/_index.html.erb +0 -89
- data/app/views/vyapari/admin/brands/_row.html.erb +0 -63
- data/app/views/vyapari/admin/brands/_show.html.erb +0 -104
- data/app/views/vyapari/admin/brands/index.html.erb +0 -48
- data/app/views/vyapari/admin/categories/_form.html.erb +0 -28
- data/app/views/vyapari/admin/categories/_index.html.erb +0 -101
- data/app/views/vyapari/admin/categories/_row.html.erb +0 -69
- data/app/views/vyapari/admin/categories/_show.html.erb +0 -115
- data/app/views/vyapari/admin/products/_form.html.erb +0 -32
- data/app/views/vyapari/admin/products/_index.html.erb +0 -58
- data/app/views/vyapari/admin/products/_row.html.erb +0 -30
- data/app/views/vyapari/admin/products/_show.html.erb +0 -81
- data/app/views/vyapari/admin/products/index.html.erb +0 -48
- data/app/views/vyapari/admin/stores/_form.html.erb +0 -37
- data/app/views/vyapari/admin/stores/_index.html.erb +0 -84
- data/app/views/vyapari/admin/stores/_row.html.erb +0 -55
- data/app/views/vyapari/admin/stores/_show.html.erb +0 -110
- data/app/views/vyapari/admin/stores/index.html.erb +0 -48
- data/app/views/vyapari/admin/suppliers/_form.html.erb +0 -32
- data/app/views/vyapari/admin/suppliers/_index.html.erb +0 -58
- data/app/views/vyapari/admin/suppliers/_row.html.erb +0 -30
- data/app/views/vyapari/admin/suppliers/_show.html.erb +0 -81
- data/app/views/vyapari/admin/suppliers/index.html.erb +0 -48
- data/app/views/vyapari/admin/terminals/_form.html.erb +0 -24
- data/app/views/vyapari/admin/terminals/_index.html.erb +0 -75
- data/app/views/vyapari/admin/terminals/_row.html.erb +0 -49
- data/app/views/vyapari/admin/terminals/_show.html.erb +0 -74
- data/app/views/vyapari/store_manager/dashboard/_sales_counts.html.erb +0 -90
- data/app/views/vyapari/store_manager/dashboard/_stock_counts.html.erb +0 -63
- data/app/views/vyapari/store_manager/dashboard/_terminals.html.erb +0 -23
- data/app/views/vyapari/store_manager/dashboard/index.html.erb +0 -64
- data/app/views/vyapari/store_manager/reports/invoices/_index.html.erb +0 -65
- data/app/views/vyapari/store_manager/reports/invoices/index.html.erb +0 -105
- data/app/views/vyapari/store_manager/reports/sales/_index.html.erb +0 -64
- data/app/views/vyapari/store_manager/reports/sales/index.html.erb +0 -105
- data/app/views/vyapari/store_manager/reports/stock/_index.html.erb +0 -72
- data/app/views/vyapari/store_manager/reports/stock/index.html.erb +0 -32
- data/app/views/vyapari/store_manager/stock_bundles/_form.html.erb +0 -99
- data/app/views/vyapari/store_manager/stock_bundles/_index.html.erb +0 -74
- data/app/views/vyapari/store_manager/stock_bundles/_row.html.erb +0 -44
- data/app/views/vyapari/store_manager/stock_bundles/_show.html.erb +0 -110
- data/app/views/vyapari/store_manager/stock_bundles/create.html.erb +0 -57
- data/app/views/vyapari/store_manager/stock_bundles/index.html.erb +0 -36
- data/app/views/vyapari/store_manager/stock_bundles/update.html.erb +0 -57
- data/app/views/vyapari/store_manager/stock_entries/_form.html.erb +0 -50
- data/app/views/vyapari/store_manager/stock_entries/_index.html.erb +0 -80
- data/app/views/vyapari/store_manager/stock_entries/_row.html.erb +0 -33
- data/app/views/vyapari/store_manager/stock_entries/_show.html.erb +0 -110
- data/app/views/vyapari/store_manager/stock_entries/_stock_bundle.html.erb +0 -61
- data/app/views/vyapari/store_manager/stock_entries/index.html.erb +0 -45
- data/app/views/vyapari/terminal_staff/dashboard/_counts.html.erb +0 -131
- data/app/views/vyapari/terminal_staff/dashboard/_invoices.html.erb +0 -44
- data/app/views/vyapari/terminal_staff/dashboard/_search_form.html.erb +0 -6
- data/app/views/vyapari/terminal_staff/dashboard/_search_results.html.erb +0 -24
- data/app/views/vyapari/terminal_staff/dashboard/index.html.erb +0 -56
- data/app/views/vyapari/terminal_staff/dashboard/search.js.erb +0 -12
- data/app/views/vyapari/terminal_staff/invoices/_draft.html.erb +0 -62
- data/app/views/vyapari/terminal_staff/invoices/_form.html.erb +0 -134
- data/app/views/vyapari/terminal_staff/invoices/_index.html.erb +0 -70
- data/app/views/vyapari/terminal_staff/invoices/_row.html.erb +0 -33
- data/app/views/vyapari/terminal_staff/invoices/_show.html.erb +0 -204
- data/app/views/vyapari/terminal_staff/invoices/index.html.erb +0 -35
- data/app/views/vyapari/terminal_staff/invoices/new.js.erb +0 -18
- data/app/views/vyapari/terminal_staff/invoices/show.html.erb +0 -1
- data/app/views/vyapari/terminal_staff/invoices/show.js.erb +0 -13
- data/app/views/vyapari/terminal_staff/line_items/_form.html.erb +0 -40
- data/app/views/vyapari/terminal_staff/line_items/_index.html.erb +0 -96
- data/app/views/vyapari/terminal_staff/line_items/create.js.erb +0 -34
- data/app/views/vyapari/terminal_staff/line_items/destroy.js.erb +0 -25
- data/app/views/vyapari/user_dashboard/index.html.erb +0 -51
- data/db/import_data/brands.csv +0 -7
- data/db/import_data/categories.csv +0 -12
- data/db/import_data/countries.csv +0 -1
- data/db/import_data/dummy/brands.csv +0 -7
- data/db/import_data/dummy/categories.csv +0 -12
- data/db/import_data/dummy/countries.csv +0 -1
- data/db/import_data/dummy/exchange_rates.csv +0 -5
- data/db/import_data/dummy/products-copy.csv +0 -1
- data/db/import_data/dummy/products.csv +0 -1
- data/db/import_data/dummy/products.xlsx +0 -0
- data/db/import_data/dummy/regions.csv +0 -13
- data/db/import_data/dummy/stores.csv +0 -10
- data/db/import_data/dummy/suppliers.csv +0 -14
- data/db/import_data/dummy/terminals.csv +0 -11
- data/db/import_data/exchange_rates.csv +0 -5
- data/db/import_data/regions.csv +0 -13
- data/db/import_data/stores.csv +0 -3
- data/db/import_data/suppliers.csv +0 -14
- data/db/import_data/terminals.csv +0 -3
- data/db/migrate/20170000000203_create_contacts.rb +0 -22
- data/db/migrate/20170000000204_create_bank_accounts.rb +0 -21
- data/db/migrate/20170000000205_create_suppliers.rb +0 -18
- data/db/migrate/20170000000206_create_stores.rb +0 -21
- data/db/migrate/20170000000207_create_terminals.rb +0 -18
- data/db/migrate/20170000000210_create_brands.rb +0 -14
- data/db/migrate/20170000000211_create_categories.rb +0 -22
- data/db/migrate/20170000000212_create_products.rb +0 -29
- data/db/migrate/20170000000213_create_invoices.rb +0 -61
- data/db/migrate/20170000000215_create_stock_bundles.rb +0 -17
- data/db/migrate/20170000000216_create_stock_entries.rb +0 -20
- data/db/sample_reports/products.xlsx +0 -0
- data/lib/tasks/vyapari/all.rake +0 -73
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
<style type="text/css">
|
|
2
|
-
@media print {
|
|
3
|
-
.body { font-size: 16px; }
|
|
4
|
-
.invoice-header { font-size: 18px; }
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
</style>
|
|
8
|
-
|
|
9
|
-
<div class="panel panel-default" style="width:100%;">
|
|
10
|
-
<div class="panel-heading hidden-print">
|
|
11
|
-
<strong>#<%= @invoice.invoice_number %></strong>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="panel-body">
|
|
14
|
-
|
|
15
|
-
<section class="invoice-env">
|
|
16
|
-
|
|
17
|
-
<!-- Invoice header -->
|
|
18
|
-
<div class="invoice-header" style="font-size:16px;">
|
|
19
|
-
|
|
20
|
-
<!-- Invoice Options Buttons -->
|
|
21
|
-
<div class="invoice-options hidden-print">
|
|
22
|
-
|
|
23
|
-
<% if request.xhr? %>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<%= link_to edit_terminal_staff_invoice_path(@terminal, @invoice), remote: true, class: "btn btn-block btn-secondary btn-icon btn-icon-standalone btn-icon-standalone-right text-left" do %>
|
|
27
|
-
<i class="fa-envelope-o"></i>
|
|
28
|
-
<span>Edit</span>
|
|
29
|
-
<% end %>
|
|
30
|
-
|
|
31
|
-
<%= link_to terminal_staff_invoice_path(@terminal, @invoice), class: "btn btn-block btn-gray btn-icon btn-icon-standalone btn-icon-standalone-right btn-single text-left", target: "_blank" do %>
|
|
32
|
-
<i class="fa-print"></i>
|
|
33
|
-
<span>Preview</span>
|
|
34
|
-
<% end %>
|
|
35
|
-
|
|
36
|
-
<% else %>
|
|
37
|
-
|
|
38
|
-
<%= link_to "#", class: "btn btn-block btn-secondary btn-icon btn-icon-standalone btn-icon-standalone-right btn-single text-left", onclick: "window.print();" do %>
|
|
39
|
-
<i class="fa-print"></i>
|
|
40
|
-
<span>Print</span>
|
|
41
|
-
<% end %>
|
|
42
|
-
|
|
43
|
-
<% end %>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<!-- Invoice Data Header -->
|
|
47
|
-
<div class="invoice-logo">
|
|
48
|
-
|
|
49
|
-
<a href="#" class="logo">
|
|
50
|
-
<img src="/assets/kuppayam/logo.png" class="img-responsive" width="200" />
|
|
51
|
-
</a>
|
|
52
|
-
|
|
53
|
-
<ul class="list-unstyled mt-30">
|
|
54
|
-
<li class="upper fs-20">Invoice No: <strong>#<%= @invoice.invoice_number%></strong></li>
|
|
55
|
-
<li class="mt-10">Invoice Date: <%= @invoice.invoice_date.strftime("%m/%d/%Y") %></li>
|
|
56
|
-
<!-- <li>Dubai</li> -->
|
|
57
|
-
</ul>
|
|
58
|
-
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<!-- Client and Payment Details -->
|
|
65
|
-
<div class="invoice-details">
|
|
66
|
-
|
|
67
|
-
<div class="invoice-client-info">
|
|
68
|
-
|
|
69
|
-
<% if @invoice.customer_name %>
|
|
70
|
-
|
|
71
|
-
<strong>Customer Info</strong>
|
|
72
|
-
<ul class="list-unstyled">
|
|
73
|
-
<li><%= @invoice.customer_name %></li>
|
|
74
|
-
<li><%= @invoice.customer_phone %></li>
|
|
75
|
-
</ul>
|
|
76
|
-
<% end %>
|
|
77
|
-
|
|
78
|
-
<ul class="list-unstyled">
|
|
79
|
-
<li><%= @invoice.customer_email %></li>
|
|
80
|
-
<li><%= @invoice.customer_address %></li>
|
|
81
|
-
</ul>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<div class="invoice-payment-info" style="text-align: left">
|
|
85
|
-
<strong>Payment Details</strong>
|
|
86
|
-
|
|
87
|
-
<ul class="list-unstyled">
|
|
88
|
-
<li>Payment Method: <strong><%= @invoice.display_payment_method %></strong></li>
|
|
89
|
-
<% if @invoice.credit_card? %>
|
|
90
|
-
<li>Credit Card Number: <strong><%= @invoice.credit_card_number %></strong> </li>
|
|
91
|
-
<% end %>
|
|
92
|
-
</ul>
|
|
93
|
-
</div>
|
|
94
|
-
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<!-- Invoice Entries -->
|
|
99
|
-
<table class="table table-bordered mt-60">
|
|
100
|
-
<thead class="hidden-xs">
|
|
101
|
-
<tr style="">
|
|
102
|
-
<th width="10%" class="text-center">No</th>
|
|
103
|
-
<th width="40%" class="text-center">Item</th>
|
|
104
|
-
<th width="15%" class="text-center">Unit Price</th>
|
|
105
|
-
<th width="15%" class="text-center">Quantity</th>
|
|
106
|
-
<th width="20%" class="text-center">Price</th>
|
|
107
|
-
</tr>
|
|
108
|
-
</thead>
|
|
109
|
-
|
|
110
|
-
<tbody>
|
|
111
|
-
<% @invoice.line_items.each_with_index do |line_item, i| %>
|
|
112
|
-
<tr>
|
|
113
|
-
<td class="text-center">
|
|
114
|
-
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
|
115
|
-
</td>
|
|
116
|
-
<td><%= line_item.product.display_name %></td>
|
|
117
|
-
<td class="text-center">
|
|
118
|
-
<%= number_to_currency line_item.product.retail_price, unit: "AED " %>
|
|
119
|
-
<td class="text-center"><%= line_item.quantity %></td>
|
|
120
|
-
<td class="text-right text-primary text-bold"><%= number_to_currency line_item.total_amount, unit: "AED " %></td>
|
|
121
|
-
</tr>
|
|
122
|
-
<% end %>
|
|
123
|
-
|
|
124
|
-
</tbody>
|
|
125
|
-
</table>
|
|
126
|
-
|
|
127
|
-
<!-- Invoice Subtotals and Totals -->
|
|
128
|
-
<div class="invoice-totals mt-40">
|
|
129
|
-
|
|
130
|
-
<div class="invoice-subtotals-totals">
|
|
131
|
-
<span class="mt-10 fs-20">
|
|
132
|
-
Total Amount:
|
|
133
|
-
<strong><%= number_to_currency @invoice.gross_total_amount, unit: "AED " %></strong>
|
|
134
|
-
</span>
|
|
135
|
-
|
|
136
|
-
<% if @invoice.tax > 0.00 %>
|
|
137
|
-
<span class="mt-10 fs-20">
|
|
138
|
-
Tax:
|
|
139
|
-
<strong><%= number_to_currency @invoice.tax, unit: "" %></strong>
|
|
140
|
-
</span>
|
|
141
|
-
<% end %>
|
|
142
|
-
|
|
143
|
-
<% if @invoice.discount %>
|
|
144
|
-
<span class="mt-10 fs-20">
|
|
145
|
-
Discount (<%= @invoice.discount %>) %:
|
|
146
|
-
<strong><%= number_to_currency @invoice.discount_amount, unit: "AED " %></strong>
|
|
147
|
-
</span>
|
|
148
|
-
<% end %>
|
|
149
|
-
|
|
150
|
-
<hr />
|
|
151
|
-
|
|
152
|
-
<span class="mt-10 fs-20">
|
|
153
|
-
Net Total:
|
|
154
|
-
<strong><%= number_to_currency @invoice.net_total_amount, unit: "AED " %></strong>
|
|
155
|
-
</span>
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
<div class="invoice-bill-info">
|
|
159
|
-
<address>
|
|
160
|
-
<strong>SELAYIA INVESTMENT</strong><br />
|
|
161
|
-
P O BOX: 63995, Dubai, U.A.E<br />
|
|
162
|
-
<!-- Office #505, Sama Tower<br />
|
|
163
|
-
Sheikh Zayed Road<br /> -->
|
|
164
|
-
P: +971 4 355 9333 <br />
|
|
165
|
-
F: +971 4 355 0365 <br />
|
|
166
|
-
<br />
|
|
167
|
-
</address>
|
|
168
|
-
</div>
|
|
169
|
-
|
|
170
|
-
</div>
|
|
171
|
-
|
|
172
|
-
<hr />
|
|
173
|
-
|
|
174
|
-
<!-- Invoice header -->
|
|
175
|
-
<div class="invoice-footer fs-12 lh-20 mt-40">
|
|
176
|
-
|
|
177
|
-
<!-- Invoice Data Header -->
|
|
178
|
-
<div class="terminal_info" style="float:left;width:40%">
|
|
179
|
-
|
|
180
|
-
<ul class="list-unstyled">
|
|
181
|
-
<li class="upper">Terminal: <%= @terminal.display_name %></li>
|
|
182
|
-
<li class="upper">Store: <%= @store.display_name %></li>
|
|
183
|
-
<li>Timestamp: <%= @invoice.invoice_date.strftime("%m/%d/%Y - %H:%M:%S") %></li>
|
|
184
|
-
<li>Sales Staff: <%= @invoice.user.display_name %></li>
|
|
185
|
-
</ul>
|
|
186
|
-
|
|
187
|
-
</div>
|
|
188
|
-
|
|
189
|
-
<div class="terms_and_conditions" style="float:right;width:60%">
|
|
190
|
-
|
|
191
|
-
<strong>Terms & Conditions</strong> <br>
|
|
192
|
-
|
|
193
|
-
There is no refund for items sold. <br>
|
|
194
|
-
The items sold may be exchanged until end of the event upon producing the original invoice.
|
|
195
|
-
|
|
196
|
-
</div>
|
|
197
|
-
|
|
198
|
-
<div class="clearfix"></div>
|
|
199
|
-
</div>
|
|
200
|
-
|
|
201
|
-
</section>
|
|
202
|
-
|
|
203
|
-
</div>
|
|
204
|
-
</div>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<div class="row">
|
|
2
|
-
|
|
3
|
-
<div class="col-md-12">
|
|
4
|
-
|
|
5
|
-
<ul class="nav nav-tabs">
|
|
6
|
-
</ul>
|
|
7
|
-
|
|
8
|
-
<div class="tab-content">
|
|
9
|
-
<div class="tab-pane active">
|
|
10
|
-
|
|
11
|
-
<div id="div_invoice_action_buttons">
|
|
12
|
-
<div class="row">
|
|
13
|
-
<div class="col-md-6">
|
|
14
|
-
|
|
15
|
-
<%= theme_button('Refresh', 'refresh', terminal_staff_invoices_path(@terminal), classes: "pull-left ml-10", btn_type: "white") %>
|
|
16
|
-
|
|
17
|
-
</div>
|
|
18
|
-
<div class="col-md-6">
|
|
19
|
-
<%= search_form_kuppayam(Invoice, terminal_staff_invoices_path(@terminal), text: @filters[:query]) %>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<%= clear_tag(10) %>
|
|
24
|
-
|
|
25
|
-
<div id="div_invoice_index">
|
|
26
|
-
<%= render :partial=>"vyapari/terminal_staff/invoices/index" %>
|
|
27
|
-
</div>
|
|
28
|
-
<%= clear_tag(10) %>
|
|
29
|
-
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
</div>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
<% if @invoice %>
|
|
2
|
-
|
|
3
|
-
// Show the details in the large modal
|
|
4
|
-
var heading = "Create Invoice";
|
|
5
|
-
var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/draft")) %>";
|
|
6
|
-
showLargeModal(heading, bodyContent, false);
|
|
7
|
-
|
|
8
|
-
$('#div_terminal_dashboard_counts').html("<%= escape_javascript(render(:partial=>"vyapari/terminal_staff/dashboard/counts")) %>");
|
|
9
|
-
|
|
10
|
-
<% else %>
|
|
11
|
-
|
|
12
|
-
// Showing Growl Like Message
|
|
13
|
-
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>");
|
|
14
|
-
|
|
15
|
-
<% end %>
|
|
16
|
-
|
|
17
|
-
// Set the mouse focus on the EAN input field
|
|
18
|
-
$( "#div_line_item_form .li-item-name input").focus().select();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= render :partial=>"vyapari/terminal_staff/invoices/show" %>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<% if @invoice %>
|
|
2
|
-
|
|
3
|
-
// Show the details in the large modal
|
|
4
|
-
var heading = "<%= raw @invoice.try(:invoice_number) %>";
|
|
5
|
-
var bodyContent = "<%= escape_javascript(render(:partial=>"#{@resource_options[:view_path]}/show")) %>";
|
|
6
|
-
showLargeModal(heading, bodyContent, false);
|
|
7
|
-
|
|
8
|
-
<% else %>
|
|
9
|
-
|
|
10
|
-
// Showing Growl Like Message
|
|
11
|
-
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>");
|
|
12
|
-
|
|
13
|
-
<% end %>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<%
|
|
2
|
-
|
|
3
|
-
url = url_for([:terminal_staff, @invoice, line_item, { terminal_id: @invoice.terminal_id}])
|
|
4
|
-
|
|
5
|
-
if line_item.new_record?
|
|
6
|
-
http_method = :post
|
|
7
|
-
else
|
|
8
|
-
http_method = :put
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
%>
|
|
12
|
-
|
|
13
|
-
<%= form_for(line_item, :url => url, :method => http_method, :html => {:id=>"form_line_item", :class=>"mb-0 form-horizontal", :role => "form", :method => (line_item.new_record? ? :post : :put), :remote=>true}) do |f| %>
|
|
14
|
-
|
|
15
|
-
<div class="row ili">
|
|
16
|
-
|
|
17
|
-
<div class="col-md-1 li-form li-sl li-center" style="height:52px;"> </div>
|
|
18
|
-
|
|
19
|
-
<div class="col-md-4 li-form li-item-name li-center"><%= f.text_field(:product_id, style: "text-align: left") %></div>
|
|
20
|
-
|
|
21
|
-
<div class="col-md-2 li-form li-quantity li-center"><%= f.text_field(:quantity, style: "text-align: center") %></div>
|
|
22
|
-
|
|
23
|
-
<div class="col-md-2 li-action li-form"><%= submit_tag("Save", :class=>"btn btn-primary btn-xs btn-block", style: "margin:0px;") %></div>
|
|
24
|
-
|
|
25
|
-
<div class="col-md-3"></div>
|
|
26
|
-
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<% end %>
|
|
30
|
-
|
|
31
|
-
<script type="text/javascript">
|
|
32
|
-
$( "#div_line_item_form .li-item-name input").focus();
|
|
33
|
-
|
|
34
|
-
$('#div_line_item_form input').keydown(function (e) {
|
|
35
|
-
if (e.which === 13) {
|
|
36
|
-
var index = $('#div_line_item_form input').index(this) + 1;
|
|
37
|
-
$('#div_line_item_form input').eq(index).focus();
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
</script>
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<style type="text/css">
|
|
2
|
-
.ili .li-heading {
|
|
3
|
-
background-color: #4b4b4b;
|
|
4
|
-
color: #fff;
|
|
5
|
-
border: 1px solid #FFF;
|
|
6
|
-
padding: 10px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.ili .li-display {
|
|
10
|
-
background-color: #f1f1f1;
|
|
11
|
-
color: #4b4b4b;
|
|
12
|
-
border: 1px solid #FFF;
|
|
13
|
-
padding: 10px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.ili .li-form {
|
|
17
|
-
background-color: #f1f1f1;
|
|
18
|
-
color: #4b4b4b;
|
|
19
|
-
border: 1px solid #FFF;
|
|
20
|
-
padding: 10px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.ili .li-form input {
|
|
24
|
-
width:95%;
|
|
25
|
-
height: 30px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.ili .li-center {text-align: center;}
|
|
29
|
-
.ili .li-left {text-align: left;}
|
|
30
|
-
.ili .li-right {text-align: right;}
|
|
31
|
-
|
|
32
|
-
/*.ili .li-sl {width: 10%;}
|
|
33
|
-
.ili .li-item-name {}
|
|
34
|
-
.ili .li-quantity {width: 10%;}
|
|
35
|
-
.ili .li-rate {width: 10%;}
|
|
36
|
-
.ili .li-action {width: 10%;}*/
|
|
37
|
-
|
|
38
|
-
</style>
|
|
39
|
-
|
|
40
|
-
<div class="row ili hidden-xs" id="div_line_item_header">
|
|
41
|
-
<div class="col-md-1 li-heading li-sl li-center">#</div>
|
|
42
|
-
<div class="col-md-4 li-heading li-item-name li-left">Item</div>
|
|
43
|
-
<div class="col-md-2 li-heading li-quantity li-center">Quantity</div>
|
|
44
|
-
<div class="col-md-2 li-rate li-heading li-right">Rate</div>
|
|
45
|
-
<div class="col-md-2 li-rate li-heading li-right">Total</div>
|
|
46
|
-
<div class="col-md-1 li-action li-heading li-center"> </div>
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
<% @invoice.line_items.each_with_index do |line_item, i| %>
|
|
50
|
-
|
|
51
|
-
<% next unless line_item.persisted? %>
|
|
52
|
-
|
|
53
|
-
<div class="row ili" id="div_line_item_<%= line_item.id %>">
|
|
54
|
-
|
|
55
|
-
<%# edit_link = edit_terminal_staff_invoice_line_item_path(@invoice, line_item, terminal_id: @terminal.id) %>
|
|
56
|
-
|
|
57
|
-
<% delete_link = terminal_staff_invoice_line_item_path(@invoice, line_item, terminal_id: @terminal.id) %>
|
|
58
|
-
|
|
59
|
-
<div class="col-md-1 li-sl li-display">
|
|
60
|
-
<% if i < 0 %>
|
|
61
|
-
<i class="fa fa-check text-success"></i>
|
|
62
|
-
<% else %>
|
|
63
|
-
<%= i + 1 + (@per_page.to_i * (@current_page.to_i - 1)) %>
|
|
64
|
-
<% end %>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div class="col-md-4 li-item-name li-display li-left"><%= line_item.display_name %></div>
|
|
68
|
-
|
|
69
|
-
<div class="col-md-2 li-quantity li-display li-center"><%= line_item.quantity %></div>
|
|
70
|
-
|
|
71
|
-
<div class="col-md-2 li-rate li-display li-right"><%= number_to_currency line_item.rate, unit: "" %></div>
|
|
72
|
-
|
|
73
|
-
<div class="col-md-2 li-rate li-display li-right"><%= number_to_currency (line_item.total_amount) , unit: "" %></div>
|
|
74
|
-
|
|
75
|
-
<div class="col-md-1 li-action li-display">
|
|
76
|
-
<%#= link_to raw("<i class=\"linecons-pencil\"></i>"), edit_link, :remote=>true, class: "edit" %>
|
|
77
|
-
|
|
78
|
-
<%= link_to raw("<i class=\"linecons-trash\"></i>"), delete_link, method: :delete, line_item: "menuitem", tabindex: "-1", data: { confirm: 'Are you sure?' }, :remote=>true, class: "delete" %>
|
|
79
|
-
</div>
|
|
80
|
-
|
|
81
|
-
</div>
|
|
82
|
-
|
|
83
|
-
<% end %>
|
|
84
|
-
|
|
85
|
-
<div id="div_line_item_form">
|
|
86
|
-
<%= render :partial=>"vyapari/terminal_staff/line_items/form", locals: {line_item: LineItem.new(quantity: 1) } %>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
<div class="row mt-10 mb-10" style="font-weight: bold;">
|
|
90
|
-
<div class="col-md-2 col-md-offset-7">Gross Total:</div>
|
|
91
|
-
<div class="col-md-2" style="text-align: right">
|
|
92
|
-
<%= number_to_currency @invoice.gross_total_amount, unit: "AED " %>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<% if @line_item.errors.blank? %>
|
|
2
|
-
|
|
3
|
-
// Refreshing the line items and invoice form
|
|
4
|
-
$("#div_line_item_index").html("<%= escape_javascript(render(:partial=>"/vyapari/terminal_staff/line_items/index")) %>");
|
|
5
|
-
$("#div_invoice_form").html("<%= escape_javascript(render(:partial=>"/vyapari/terminal_staff/invoices/form")) %>");
|
|
6
|
-
|
|
7
|
-
// Highlighting the newly saved line item
|
|
8
|
-
$("#div_line_item_<%= @line_item.id %>").css("background-color", "#fffddd");
|
|
9
|
-
|
|
10
|
-
// Hide errors
|
|
11
|
-
$("#invoice_form_error").hide();
|
|
12
|
-
|
|
13
|
-
// Showing Growl Like Message
|
|
14
|
-
notifySuccess("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(@notification[:message]) %>");
|
|
15
|
-
|
|
16
|
-
<% else %>
|
|
17
|
-
|
|
18
|
-
// Highlighting the line item in the table in red color
|
|
19
|
-
$("#div_line_item_<%= @line_item.id %>").css("background-color", "red");
|
|
20
|
-
|
|
21
|
-
// Show Main Error Message on the form
|
|
22
|
-
<% error_message = content_tag(:div, raw(@notification[:message]), class: "alert alert-danger mt-20") %>
|
|
23
|
-
$("#invoice_form_error").html("<%= escape_javascript(error_message) %>");
|
|
24
|
-
$("#invoice_form_error").show();
|
|
25
|
-
|
|
26
|
-
// Showing Growl Like Message
|
|
27
|
-
notifyError("<%= escape_javascript(@notification[:title]) %>", "<%= escape_javascript(raw(@notification[:message])) %>");
|
|
28
|
-
|
|
29
|
-
<% end %>
|
|
30
|
-
|
|
31
|
-
// Set the mouse focus on the EAN input field
|
|
32
|
-
$( "#div_line_item_form .li-item-name input").focus().select();
|
|
33
|
-
|
|
34
|
-
|