vyapari 0.1.5dev → 0.1.5dev1
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/terminal_staff/line_items_controller.rb +5 -1
- data/app/models/store.rb +1 -1
- data/app/views/layouts/kuppayam/_sidebar.html.erb +1 -1
- data/db/migrate/20170000000203_create_contacts.rb +1 -1
- data/db/migrate/20170000000204_create_bank_accounts.rb +2 -2
- data/db/migrate/20170000000205_create_suppliers.rb +2 -2
- data/db/migrate/20170000000206_create_stores.rb +1 -1
- data/db/migrate/20170000000207_create_terminals.rb +1 -1
- data/db/migrate/20170000000213_create_invoices.rb +1 -1
- data/db/migrate/20170000000215_create_stock_bundles.rb +1 -1
- data/db/migrate/20170000000216_create_stock_entries.rb +5 -5
- data/lib/vyapari/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73bb587bba890a79649d9d35566eff3802b531ea
|
4
|
+
data.tar.gz: 59d85c9e78a2697b447048dbc7752ecc11b87443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eac782695ed124c384b61de704a564da787ea85b0150a2f5aad45000c7ec7c179cc471e32e1ce246d2c1bfc1ff3c57babde90339275efa4cbbbe57d2f910384
|
7
|
+
data.tar.gz: 319b211cacaafad288b43b34239a1177d69e46e71c87c363cf684ea7f1f823a7ba0bd364aa5a21db6d49d11adc6ef9246cb72fc1b2a470da9c1c68fcbab47f5d
|
@@ -12,7 +12,7 @@ module Vyapari
|
|
12
12
|
product_in_stock = false
|
13
13
|
|
14
14
|
# Initialize the line item with quantity 0.0
|
15
|
-
@
|
15
|
+
@line_item = @invoice.line_items.build(quantity: 0.0)
|
16
16
|
|
17
17
|
# Check if there exists a line item with the invoice.
|
18
18
|
@line_item = @invoice.line_items.where("product_id = ?", product.id).first if product
|
@@ -33,6 +33,10 @@ module Vyapari
|
|
33
33
|
product_in_stock = @store.in_stock?(product) if product
|
34
34
|
@line_item.errors.add(:product_id, "This Product is Out of Stock") unless product_in_stock
|
35
35
|
|
36
|
+
@r_object = @line_item
|
37
|
+
|
38
|
+
binding.pry
|
39
|
+
|
36
40
|
if @line_item.errors.blank?
|
37
41
|
@line_item.save
|
38
42
|
# recalculate the total amount
|
data/app/models/store.rb
CHANGED
@@ -41,7 +41,7 @@
|
|
41
41
|
|
42
42
|
<!-- Manage Store -->
|
43
43
|
<li class="<%= nav_active?('store_manager/stores') ? 'active' : '' %>">
|
44
|
-
<%= link_to raw("<i class=\"linecons-shop\"></i> <span class='title'>Store
|
44
|
+
<%= link_to raw("<i class=\"linecons-shop\"></i> <span class='title'>Manage Store / POS</span>"), vyapari.user_dashboard_url %>
|
45
45
|
</li>
|
46
46
|
|
47
47
|
<!-- Configurations -->
|
@@ -2,7 +2,7 @@ class CreateContacts < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table(:contacts) do |t|
|
4
4
|
|
5
|
-
t.string :name
|
5
|
+
t.string :name
|
6
6
|
t.string :designation, :null => true, :limit=>56
|
7
7
|
t.string :email, :null => false
|
8
8
|
t.string :phone, :null => true, :limit=>24
|
@@ -2,10 +2,10 @@ class CreateBankAccounts < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table(:bank_accounts) do |t|
|
4
4
|
|
5
|
-
t.string :account_number
|
5
|
+
t.string :account_number
|
6
6
|
t.string :iban, limit: 56
|
7
7
|
t.string :ifsc_swiftcode, limit: 56
|
8
|
-
t.string :bank_name
|
8
|
+
t.string :bank_name
|
9
9
|
t.string :branch_name, limit: 56
|
10
10
|
t.string :city, limit: 56
|
11
11
|
t.references :country
|
@@ -2,9 +2,9 @@ class CreateSuppliers < ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table(:suppliers) do |t|
|
4
4
|
|
5
|
-
t.string :name
|
5
|
+
t.string :name
|
6
6
|
t.string :code, limit: 24
|
7
|
-
t.
|
7
|
+
t.text :address
|
8
8
|
t.string :city, limit: 56
|
9
9
|
t.references :country, index: true
|
10
10
|
|
@@ -4,7 +4,7 @@ class CreateStockBundles < ActiveRecord::Migration
|
|
4
4
|
t.datetime :uploaded_date
|
5
5
|
t.references :store, index: true
|
6
6
|
t.references :supplier, index: true
|
7
|
-
t.references :uploader, references: :users
|
7
|
+
t.references :uploader, references: :users, index: true
|
8
8
|
t.string :name
|
9
9
|
t.string :file
|
10
10
|
t.string :error_summary
|
@@ -2,11 +2,11 @@ class CreateStockEntries < ActiveRecord::Migration[5.0]
|
|
2
2
|
def change
|
3
3
|
create_table :stock_entries do |t|
|
4
4
|
|
5
|
-
t.references :store
|
6
|
-
t.references :product
|
7
|
-
t.references :supplier
|
8
|
-
t.references :stock_bundle
|
9
|
-
t.references :invoice
|
5
|
+
t.references :store, index: true
|
6
|
+
t.references :product, index: true
|
7
|
+
t.references :supplier, index: true
|
8
|
+
t.references :stock_bundle, index: true
|
9
|
+
t.references :invoice, index: true
|
10
10
|
|
11
11
|
t.integer :quantity
|
12
12
|
|
data/lib/vyapari/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.5dev1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kpvarma
|
@@ -118,14 +118,14 @@ dependencies:
|
|
118
118
|
requirements:
|
119
119
|
- - "~>"
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version: 0.1.
|
121
|
+
version: 0.1.5dev1
|
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.5dev1
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: bcrypt
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|