vyapari 0.1.5dev9 → 0.1.5dev10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/vyapari/store_manager/base_controller.rb +3 -0
- data/app/controllers/vyapari/store_manager/dashboard_controller.rb +1 -0
- data/app/controllers/vyapari/store_manager/reports/invoices_controller.rb +206 -101
- data/app/controllers/vyapari/store_manager/reports/sales_controller.rb +299 -0
- data/app/controllers/vyapari/store_manager/reports/stock_controller.rb +1 -1
- data/app/controllers/vyapari/terminal_staff/dashboard_controller.rb +2 -1
- data/app/models/bank_account.rb +44 -0
- data/app/models/brand.rb +8 -13
- data/app/models/category.rb +3 -3
- data/app/models/contact.rb +72 -0
- data/app/models/country.rb +6 -4
- data/app/models/exchange_rate.rb +2 -2
- data/app/models/invoice.rb +12 -8
- data/app/models/line_item.rb +3 -3
- data/app/models/product.rb +3 -3
- data/app/models/region.rb +11 -17
- data/app/models/stock_bundle.rb +4 -4
- data/app/models/stock_entry.rb +8 -7
- data/app/models/store.rb +52 -21
- data/app/models/supplier.rb +19 -25
- data/app/models/terminal.rb +3 -3
- data/app/models/vyapari/application_record.rb +1 -2
- data/app/views/layouts/vyapari/_store_manager_menu.html.erb +24 -5
- data/app/views/layouts/vyapari/_terminal_staff_menu.html.erb +6 -3
- data/app/views/layouts/vyapari/store_manager.html.erb +4 -4
- data/app/views/vyapari/store_manager/dashboard/_sales_counts.html.erb +90 -0
- data/app/views/vyapari/store_manager/dashboard/_stock_counts.html.erb +63 -0
- data/app/views/vyapari/store_manager/dashboard/_terminals.html.erb +23 -0
- data/app/views/vyapari/store_manager/dashboard/index.html.erb +51 -79
- data/app/views/vyapari/store_manager/reports/invoices/_index.html.erb +65 -0
- data/app/views/vyapari/store_manager/reports/invoices/index.html.erb +105 -0
- data/app/views/vyapari/store_manager/reports/sales/_index.html.erb +64 -0
- data/app/views/vyapari/store_manager/reports/sales/index.html.erb +105 -0
- data/app/views/vyapari/terminal_staff/dashboard/_counts.html.erb +61 -18
- data/config/routes.rb +2 -0
- data/db/migrate/20170000000203_create_contacts.rb +1 -1
- data/db/migrate/20170000000206_create_stores.rb +1 -1
- data/lib/vyapari/version.rb +1 -1
- metadata +16 -6
@@ -0,0 +1,105 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<!-- Action Buttons -->
|
4
|
+
<div class="col-md-12">
|
5
|
+
<a href="#" class="btn btn-primary pull-right mr-10" onclick="$('#div_report_filter_list').toggle();"><i class='fa-filter mr-10'></i></a>
|
6
|
+
|
7
|
+
<a href="#" class="btn btn-primary pull-right mr-10" onclick="$('#div_report_column_select').toggle();"><i class='fa-barcode mr-10'></i></a>
|
8
|
+
|
9
|
+
<%
|
10
|
+
csv_hash = {store_id: @store.id, format: :csv}
|
11
|
+
csv_hash.merge!(request.query_parameters.reject{ |x| x == 'locale' })
|
12
|
+
export_url = store_manager_invoices_report_path(csv_hash)
|
13
|
+
|
14
|
+
form_hash = {store_id: @store.id}
|
15
|
+
form_hash.merge!(request.query_parameters.reject{ |x| x == 'locale' })
|
16
|
+
form_url = store_manager_invoices_report_path(form_hash)
|
17
|
+
%>
|
18
|
+
|
19
|
+
<%= link_to raw("<i class='fa-excel-o'></i> Export"), export_url, class: "btn btn-primary pull-left mr-10" %>
|
20
|
+
|
21
|
+
<%= clear_tag %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<!-- Filters -->
|
25
|
+
<div class="col-md-12">
|
26
|
+
<div id="div_report_column_select" style="padding:10px; border: 2px solid #fff; margin-bottom: 10px; display: none;">
|
27
|
+
|
28
|
+
<%= form_tag(form_url, :method => :get ) do %>
|
29
|
+
|
30
|
+
<div class="mb-20 pull-left" style="font-size:16px; color: darkred; text-align: left;">Selected Columns</div>
|
31
|
+
|
32
|
+
<%= submit_tag "Apply", class: "btn btn-primary pull-right mr-10" %>
|
33
|
+
|
34
|
+
<%= clear_tag %>
|
35
|
+
|
36
|
+
<div class="mb-20 pull-left" style="font-size:12px; color: #4b4b4b; text-align: left;">Click items on the left box to select. Selected items will appear on the right box.</div>
|
37
|
+
|
38
|
+
<select class="form-control" multiple="multiple" id="select-columns" name="cols[]">
|
39
|
+
<% @columns.each do |item| %>
|
40
|
+
<option value="<%= item[:column_name] %>" <%= @selected_columns.include?(item[:column_name]) ? 'selected="selected"' : '' %> ><%= item[:display_name] %></option>
|
41
|
+
<% end %>
|
42
|
+
</select>
|
43
|
+
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div class="col-md-12">
|
50
|
+
<div id="div_report_filter_list" style="padding:10px; border: 2px solid #fff; margin-bottom: 10px; display: none;">
|
51
|
+
<%= render :partial=>"kuppayam/filters/display_filters" %>
|
52
|
+
<hr style="border-top:1px solid #fff;">
|
53
|
+
<%= render :partial=>"kuppayam/filters/display_dropdown_filters" %>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="row">
|
59
|
+
<div class="col-md-12">
|
60
|
+
<div class="panel panel-default" style="width:100%">
|
61
|
+
<div class="panel-body">
|
62
|
+
|
63
|
+
<%= clear_tag(10) %>
|
64
|
+
|
65
|
+
<div id="div_report_index">
|
66
|
+
<%#= render :partial=>"/reports/company_jpr/chart" %>
|
67
|
+
<%#= clear_tag(100) %>
|
68
|
+
<%= render :partial=>"vyapari/store_manager/reports/invoices/index" %>
|
69
|
+
</div>
|
70
|
+
<%= clear_tag(10) %>
|
71
|
+
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<script type="text/javascript">
|
78
|
+
|
79
|
+
function applySelectedColumns(){
|
80
|
+
var selectedColumns = "";
|
81
|
+
|
82
|
+
$.each($("#select-columns option:selected"), function(){
|
83
|
+
selectedColumns = selectedColumns + "cols[]=" + $(this).val() + "&";
|
84
|
+
});
|
85
|
+
|
86
|
+
var uri = window.location.href.split("#")[0];
|
87
|
+
window.location.href = uri + selectedColumns;
|
88
|
+
}
|
89
|
+
|
90
|
+
jQuery(document).ready(function($)
|
91
|
+
{
|
92
|
+
$("#select-columns").multiSelect({
|
93
|
+
afterInit: function()
|
94
|
+
{
|
95
|
+
// Add alternative scrollbar to list
|
96
|
+
this.$selectableContainer.add(this.$selectionContainer).find('.ms-list').perfectScrollbar();
|
97
|
+
},
|
98
|
+
afterSelect: function()
|
99
|
+
{
|
100
|
+
// Update scrollbar size
|
101
|
+
this.$selectableContainer.add(this.$selectionContainer).find('.ms-list').perfectScrollbar('update');
|
102
|
+
}
|
103
|
+
});
|
104
|
+
});
|
105
|
+
</script>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<div class="table-responsive table-scrollable">
|
2
|
+
<table class="table table-striped table-condensed table-bordered">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<% @columns.each do |col_item| %>
|
6
|
+
<% next unless @selected_columns.include?(col_item[:column_name]) %>
|
7
|
+
<th style="text-align: center;"><%= col_item[:display_name] %></th>
|
8
|
+
<% end %>
|
9
|
+
</tr>
|
10
|
+
</thead>
|
11
|
+
<tbody>
|
12
|
+
|
13
|
+
<% cols_except_id = @columns.reject{|item| item[:column_name] == :id}.select{|item| @selected_columns.include?(item[:column_name]) } %>
|
14
|
+
|
15
|
+
<% @results.each_with_index do |result, i| %>
|
16
|
+
<tr>
|
17
|
+
<th scope="row" style="text-align: center;"><%= i + 1 %></th>
|
18
|
+
|
19
|
+
<% cols_except_id.each do |col_item| %>
|
20
|
+
|
21
|
+
<% case col_item[:column_type] %>
|
22
|
+
<% when :string, :integer %>
|
23
|
+
<td style="text-align: <%= col_item[:align] %>;">
|
24
|
+
<%= result.send(col_item[:column_name]) %>
|
25
|
+
</td>
|
26
|
+
<% when :status %>
|
27
|
+
<td style="text-align: <%= col_item[:align] %>;">
|
28
|
+
<%= result.send(col_item[:column_name]).titleize %>
|
29
|
+
</td>
|
30
|
+
<% when :currency %>
|
31
|
+
<td style="text-align: <%= col_item[:align] %>;">
|
32
|
+
<%= number_to_currency(result.send(col_item[:column_name]), unit: "") %>
|
33
|
+
</td>
|
34
|
+
<% when :date %>
|
35
|
+
<td style="text-align: <%= col_item[:align] %>;"><%= result.send(col_item[:column_name]).strftime("%d-%m-%Y") %>
|
36
|
+
</td>
|
37
|
+
<% else %>
|
38
|
+
<td style="text-align: <%= col_item[:align] %>;"><%= result.send(col_item[:column_name]) %>
|
39
|
+
</td>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
</tr>
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
</tbody>
|
48
|
+
|
49
|
+
<tfoot>
|
50
|
+
<% if @total && @total.first && @total.first.retail_price %>
|
51
|
+
<tr>
|
52
|
+
<td></td>
|
53
|
+
<% cols_except_id.each do |col_item| %>
|
54
|
+
<% if col_item[:column_name] == :retail_price %>
|
55
|
+
<td style="font-weight: bold;text-align: <%= col_item[:align] %>;"><%= number_to_currency @total.first.retail_price.to_s, unit: "AED " %></td>
|
56
|
+
<% else %>
|
57
|
+
<td></td>
|
58
|
+
<% end %>
|
59
|
+
<% end %>
|
60
|
+
</tr>
|
61
|
+
<% end %>
|
62
|
+
</tfoot>
|
63
|
+
</table>
|
64
|
+
</div>
|
@@ -0,0 +1,105 @@
|
|
1
|
+
<div class="row">
|
2
|
+
|
3
|
+
<!-- Action Buttons -->
|
4
|
+
<div class="col-md-12">
|
5
|
+
<a href="#" class="btn btn-primary pull-right mr-10" onclick="$('#div_report_filter_list').toggle();"><i class='fa-filter mr-10'></i></a>
|
6
|
+
|
7
|
+
<a href="#" class="btn btn-primary pull-right mr-10" onclick="$('#div_report_column_select').toggle();"><i class='fa-barcode mr-10'></i></a>
|
8
|
+
|
9
|
+
<%
|
10
|
+
csv_hash = {store_id: @store.id, format: :csv}
|
11
|
+
csv_hash.merge!(request.query_parameters.reject{ |x| x == 'locale' })
|
12
|
+
export_url = store_manager_sales_report_path(csv_hash)
|
13
|
+
|
14
|
+
form_hash = {store_id: @store.id}
|
15
|
+
form_hash.merge!(request.query_parameters.reject{ |x| x == 'locale' })
|
16
|
+
form_url = store_manager_sales_report_path(form_hash)
|
17
|
+
%>
|
18
|
+
|
19
|
+
<%= link_to raw("<i class='fa-excel-o'></i> Export"), export_url, class: "btn btn-primary pull-left mr-10" %>
|
20
|
+
|
21
|
+
<%= clear_tag %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<!-- Filters -->
|
25
|
+
<div class="col-md-12">
|
26
|
+
<div id="div_report_column_select" style="padding:10px; border: 2px solid #fff; margin-bottom: 10px; display: none;">
|
27
|
+
|
28
|
+
<%= form_tag(form_url, :method => :get ) do %>
|
29
|
+
|
30
|
+
<div class="mb-20 pull-left" style="font-size:16px; color: darkred; text-align: left;">Selected Columns</div>
|
31
|
+
|
32
|
+
<%= submit_tag "Apply", class: "btn btn-primary pull-right mr-10" %>
|
33
|
+
|
34
|
+
<%= clear_tag %>
|
35
|
+
|
36
|
+
<div class="mb-20 pull-left" style="font-size:12px; color: #4b4b4b; text-align: left;">Click items on the left box to select. Selected items will appear on the right box.</div>
|
37
|
+
|
38
|
+
<select class="form-control" multiple="multiple" id="select-columns" name="cols[]">
|
39
|
+
<% @columns.each do |item| %>
|
40
|
+
<option value="<%= item[:column_name] %>" <%= @selected_columns.include?(item[:column_name]) ? 'selected="selected"' : '' %> ><%= item[:display_name] %></option>
|
41
|
+
<% end %>
|
42
|
+
</select>
|
43
|
+
|
44
|
+
<% end %>
|
45
|
+
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div class="col-md-12">
|
50
|
+
<div id="div_report_filter_list" style="padding:10px; border: 2px solid #fff; margin-bottom: 10px; display: none;">
|
51
|
+
<%= render :partial=>"kuppayam/filters/display_filters" %>
|
52
|
+
<hr style="border-top:1px solid #fff;">
|
53
|
+
<%= render :partial=>"kuppayam/filters/display_dropdown_filters" %>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div class="row">
|
59
|
+
<div class="col-md-12">
|
60
|
+
<div class="panel panel-default" style="width:100%">
|
61
|
+
<div class="panel-body">
|
62
|
+
|
63
|
+
<%= clear_tag(10) %>
|
64
|
+
|
65
|
+
<div id="div_report_index">
|
66
|
+
<%#= render :partial=>"/reports/company_jpr/chart" %>
|
67
|
+
<%#= clear_tag(100) %>
|
68
|
+
<%= render :partial=>"vyapari/store_manager/reports/sales/index" %>
|
69
|
+
</div>
|
70
|
+
<%= clear_tag(10) %>
|
71
|
+
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<script type="text/javascript">
|
78
|
+
|
79
|
+
function applySelectedColumns(){
|
80
|
+
var selectedColumns = "";
|
81
|
+
|
82
|
+
$.each($("#select-columns option:selected"), function(){
|
83
|
+
selectedColumns = selectedColumns + "cols[]=" + $(this).val() + "&";
|
84
|
+
});
|
85
|
+
|
86
|
+
var uri = window.location.href.split("#")[0];
|
87
|
+
window.location.href = uri + selectedColumns;
|
88
|
+
}
|
89
|
+
|
90
|
+
jQuery(document).ready(function($)
|
91
|
+
{
|
92
|
+
$("#select-columns").multiSelect({
|
93
|
+
afterInit: function()
|
94
|
+
{
|
95
|
+
// Add alternative scrollbar to list
|
96
|
+
this.$selectableContainer.add(this.$selectionContainer).find('.ms-list').perfectScrollbar();
|
97
|
+
},
|
98
|
+
afterSelect: function()
|
99
|
+
{
|
100
|
+
// Update scrollbar size
|
101
|
+
this.$selectableContainer.add(this.$selectionContainer).find('.ms-list').perfectScrollbar('update');
|
102
|
+
}
|
103
|
+
});
|
104
|
+
});
|
105
|
+
</script>
|
@@ -1,26 +1,45 @@
|
|
1
1
|
<%
|
2
2
|
|
3
|
-
|
3
|
+
# [d1, d2, d3].each_with_index do |d, i|
|
4
|
+
# [t1, t2].each_with_index do |t, j|
|
4
5
|
|
5
|
-
|
6
|
+
# cash_sales = t.invoices.where('DATE(created_at) = ?', d).active.cash_invoices.sum(:net_total_amount)
|
7
|
+
# credit_card_sales = t.invoices.where('DATE(created_at) = ?', d).active.credit_card_invoices.sum(:net_total_amount)
|
8
|
+
|
9
|
+
# puts "Day #{i+1}, Terminal #{j+1} - Cash Sales - #{cash_sales}"
|
10
|
+
# puts "Day #{i+1}, Terminal #{j+1} - Credit Card Sales - #{credit_card_sales}"
|
11
|
+
# end
|
12
|
+
# end
|
13
|
+
|
14
|
+
total_invoice_amount = @terminal.invoices.dated(@date).active.sum(:net_total_amount)
|
15
|
+
|
16
|
+
total_invoices = @terminal.invoices.dated(@date).active.count
|
6
17
|
|
7
|
-
total_cash = @terminal.invoices.
|
18
|
+
total_cash = @terminal.invoices.dated(@date).active.cash_invoices.sum(:net_total_amount)
|
8
19
|
|
9
|
-
total_cash_invoices = @terminal.invoices.
|
20
|
+
total_cash_invoices = @terminal.invoices.dated(@date).active.where(payment_method: :cash).count
|
10
21
|
|
11
|
-
total_credit = @terminal.invoices.
|
22
|
+
total_credit = @terminal.invoices.dated(@date).active.credit_card_invoices.sum(:net_total_amount)
|
12
23
|
|
13
|
-
total_credit_card_invoices = @terminal.invoices.
|
24
|
+
total_credit_card_invoices = @terminal.invoices.dated(@date).active.where(payment_method: :credit_card).count
|
14
25
|
|
15
26
|
%>
|
16
27
|
|
17
|
-
<div class="row">
|
18
|
-
<div class="col-
|
19
|
-
|
20
|
-
|
21
|
-
|
28
|
+
<div class="row calendar-env">
|
29
|
+
<div class="col-md-12 text-center">
|
30
|
+
<div class="btn-group" style="margin:auto;">
|
31
|
+
|
32
|
+
<%= link_to raw("<i class=\"fa fa-arrow-left\"></i>"), terminal_staff_dashboard_path(@terminal, date: (@date - 1.day)), class: "btn btn-white", style: "font-size: 20px;" %>
|
33
|
+
|
34
|
+
<input type="text" name="reportdate" value="<%= @date.strftime("%m-%d-%Y") %>" class="btn btn-white" style="height:42px;" />
|
35
|
+
|
36
|
+
<%= link_to raw("<i class=\"fa fa-arrow-right\"></i>"), terminal_staff_dashboard_path(@terminal, date: (@date + 1.day)), class: "btn btn-white", style: "font-size: 20px;" %>
|
37
|
+
</div>
|
22
38
|
</div>
|
39
|
+
</div>
|
23
40
|
|
41
|
+
<div class="row">
|
42
|
+
|
24
43
|
<div class="col-sm-3">
|
25
44
|
|
26
45
|
<div class="xe-widget xe-counter-block xe-counter-block-green" data-suffix="k" data-count=".num" data-from="0" data-to="310" data-duration="4" data-easing="false">
|
@@ -31,14 +50,14 @@
|
|
31
50
|
</div>
|
32
51
|
<div class="xe-label">
|
33
52
|
<strong class="num"><%= number_to_currency total_invoice_amount, unit: "AED " %></strong>
|
34
|
-
<span>Total
|
53
|
+
<span>Total Sales Today</span>
|
35
54
|
</div>
|
36
55
|
|
37
56
|
</div>
|
38
57
|
<div class="xe-lower">
|
39
58
|
<div class="border"></div>
|
40
59
|
|
41
|
-
<span>Total Invoices: <b><%= total_invoices %></b></span>
|
60
|
+
<span>Total Invoices Today: <b><%= total_invoices %></b></span>
|
42
61
|
</div>
|
43
62
|
</div>
|
44
63
|
</div>
|
@@ -53,14 +72,14 @@
|
|
53
72
|
</div>
|
54
73
|
<div class="xe-label">
|
55
74
|
<strong class="num"><%= number_to_currency total_cash, unit: "AED " %></strong>
|
56
|
-
<span>Total Cash</span>
|
75
|
+
<span>Total Cash Sales Today</span>
|
57
76
|
</div>
|
58
77
|
|
59
78
|
</div>
|
60
79
|
<div class="xe-lower">
|
61
80
|
<div class="border"></div>
|
62
81
|
|
63
|
-
<span>Total Cash Invoices: <b><%= total_cash_invoices %></b></span>
|
82
|
+
<span>Total Cash Invoices Today: <b><%= total_cash_invoices %></b></span>
|
64
83
|
|
65
84
|
</div>
|
66
85
|
</div>
|
@@ -76,13 +95,37 @@
|
|
76
95
|
</div>
|
77
96
|
<div class="xe-label">
|
78
97
|
<strong class="num"><%= number_to_currency total_credit, unit: "AED " %></strong>
|
79
|
-
<span>Total
|
98
|
+
<span>Total Credit Card Sales Today</span>
|
80
99
|
</div>
|
81
100
|
</div>
|
82
101
|
<div class="xe-lower">
|
83
102
|
<div class="border"></div>
|
84
|
-
<span>Total Credit Card Invoices: <b><%= total_credit_card_invoices %></b></span>
|
103
|
+
<span>Total Credit Card Invoices Today: <b><%= total_credit_card_invoices %></b></span>
|
85
104
|
</div>
|
86
105
|
</div>
|
87
106
|
</div>
|
88
|
-
|
107
|
+
|
108
|
+
<div class="col-sm-3">
|
109
|
+
<%= link_to raw("<i class=\"fa-book mr-10\"></i> Create Invoice"), new_terminal_staff_invoice_path(@terminal), remote: true, class: "btn btn-success btn-lg btn-block hidden-xs", style: "height:50px" %>
|
110
|
+
|
111
|
+
<%= link_to raw("<i class=\"fa-book mr-10\"></i> Manage Invoices"), terminal_staff_invoices_path(@terminal), class: "btn btn-primary btn-only-hover btn-lg btn-block", style: "height:50px", target: "_blank" %>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
<script type="text/javascript">
|
117
|
+
$(function() {
|
118
|
+
|
119
|
+
$('input[name="reportdate"]').daterangepicker({
|
120
|
+
singleDatePicker: true,
|
121
|
+
showDropdowns: true
|
122
|
+
},
|
123
|
+
|
124
|
+
function(start, end, label) {
|
125
|
+
var urlWithoutParams = location.protocol + '//' + location.host + location.pathname;
|
126
|
+
var params = { locale:'en', date:start.format('DD-MM-YYYY') };
|
127
|
+
var dateParam = jQuery.param(params);
|
128
|
+
window.location.href = urlWithoutParams + "?" + dateParam;
|
129
|
+
});
|
130
|
+
});
|
131
|
+
</script>
|
data/config/routes.rb
CHANGED
@@ -57,6 +57,8 @@ Vyapari::Engine.routes.draw do
|
|
57
57
|
|
58
58
|
scope '/:store_id' do
|
59
59
|
get '/dashboard', to: "dashboard#index", as: :dashboard
|
60
|
+
get '/reports/sales', to: "reports/sales#index", as: :sales_report
|
61
|
+
get '/reports/invoices', to: "reports/invoices#index", as: :invoices_report
|
60
62
|
get '/reports/stock', to: "reports/stock#index", as: :stock_report
|
61
63
|
resources :terminals
|
62
64
|
resources :stock_entries
|
@@ -4,7 +4,7 @@ class CreateContacts < ActiveRecord::Migration
|
|
4
4
|
|
5
5
|
t.string :name
|
6
6
|
t.string :designation, :null => true, :limit=>56
|
7
|
-
t.string :email, :null => false
|
7
|
+
t.string :email, :null => false, :limit=>128
|
8
8
|
t.string :phone, :null => true, :limit=>24
|
9
9
|
t.string :landline, :null => true, :limit=>24
|
10
10
|
t.string :fax, :null => true, :limit=>24
|
@@ -4,7 +4,7 @@ class CreateStores < ActiveRecord::Migration
|
|
4
4
|
|
5
5
|
t.string :name
|
6
6
|
t.string :code, limit: 24
|
7
|
-
t.string :store_type, :null => false, :default=>"
|
7
|
+
t.string :store_type, :null => false, :default=>"pos_store", :limit=>24
|
8
8
|
|
9
9
|
t.string :status, :null => false, :default=>"active", :limit=>16
|
10
10
|
|
data/lib/vyapari/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vyapari
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5dev10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -104,28 +104,28 @@ dependencies:
|
|
104
104
|
requirements:
|
105
105
|
- - "~>"
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: 0.1.
|
107
|
+
version: 0.1.5dev4
|
108
108
|
type: :runtime
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
112
|
- - "~>"
|
113
113
|
- !ruby/object:Gem::Version
|
114
|
-
version: 0.1.
|
114
|
+
version: 0.1.5dev4
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: usman
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
119
|
- - "~>"
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version: 0.1.
|
121
|
+
version: 0.1.5dev4
|
122
122
|
type: :runtime
|
123
123
|
prerelease: false
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
126
|
- - "~>"
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version: 0.1.
|
128
|
+
version: 0.1.5dev4
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: bcrypt
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -351,6 +351,7 @@ files:
|
|
351
351
|
- app/controllers/vyapari/store_manager/base_controller.rb
|
352
352
|
- app/controllers/vyapari/store_manager/dashboard_controller.rb
|
353
353
|
- app/controllers/vyapari/store_manager/reports/invoices_controller.rb
|
354
|
+
- app/controllers/vyapari/store_manager/reports/sales_controller.rb
|
354
355
|
- app/controllers/vyapari/store_manager/reports/stock_controller.rb
|
355
356
|
- app/controllers/vyapari/store_manager/resource_controller.rb
|
356
357
|
- app/controllers/vyapari/store_manager/stock_bundles_controller.rb
|
@@ -364,8 +365,10 @@ files:
|
|
364
365
|
- app/helpers/vyapari/application_helper.rb
|
365
366
|
- app/jobs/vyapari/application_job.rb
|
366
367
|
- app/mailers/vyapari/application_mailer.rb
|
368
|
+
- app/models/bank_account.rb
|
367
369
|
- app/models/brand.rb
|
368
370
|
- app/models/category.rb
|
371
|
+
- app/models/contact.rb
|
369
372
|
- app/models/country.rb
|
370
373
|
- app/models/exchange_rate.rb
|
371
374
|
- app/models/image/brand_image.rb
|
@@ -438,7 +441,14 @@ files:
|
|
438
441
|
- app/views/vyapari/admin/terminals/_index.html.erb
|
439
442
|
- app/views/vyapari/admin/terminals/_row.html.erb
|
440
443
|
- app/views/vyapari/admin/terminals/_show.html.erb
|
444
|
+
- app/views/vyapari/store_manager/dashboard/_sales_counts.html.erb
|
445
|
+
- app/views/vyapari/store_manager/dashboard/_stock_counts.html.erb
|
446
|
+
- app/views/vyapari/store_manager/dashboard/_terminals.html.erb
|
441
447
|
- app/views/vyapari/store_manager/dashboard/index.html.erb
|
448
|
+
- app/views/vyapari/store_manager/reports/invoices/_index.html.erb
|
449
|
+
- app/views/vyapari/store_manager/reports/invoices/index.html.erb
|
450
|
+
- app/views/vyapari/store_manager/reports/sales/_index.html.erb
|
451
|
+
- app/views/vyapari/store_manager/reports/sales/index.html.erb
|
442
452
|
- app/views/vyapari/store_manager/reports/stock/_index.html.erb
|
443
453
|
- app/views/vyapari/store_manager/reports/stock/index.html.erb
|
444
454
|
- app/views/vyapari/store_manager/stock_bundles/_form.html.erb
|