vyapari 0.1.5dev → 0.1.5dev1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56fe1df91f52bb3ed89982d4cb830559e644e533
4
- data.tar.gz: aab510fe1843cdbc11a1f11ef3484fbb6a0aa1e3
3
+ metadata.gz: 73bb587bba890a79649d9d35566eff3802b531ea
4
+ data.tar.gz: 59d85c9e78a2697b447048dbc7752ecc11b87443
5
5
  SHA512:
6
- metadata.gz: 88d2f8f5a3f5cafa70451be2803b671f66d8c6329eb3496d1391b349c831bc22367fb7c0d34bef82b0aa99013283a63513ac03b3d1e1d8aa4000cbc60be08f67
7
- data.tar.gz: 599c9c17dd2ede4b63ba96e7cc567be98d11f3d6643403800f534adad16e913dde080c65158100b43e0eed6e91e98d22db81d11ad776b2afb909ee5712b465b9
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
- @r_object = @line_item = @invoice.line_items.build(quantity: 0.0)
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
@@ -127,7 +127,7 @@ class Store < Vyapari::ApplicationRecord
127
127
  end
128
128
 
129
129
  def in_stock?(product)
130
- false
130
+ true
131
131
  end
132
132
 
133
133
  # * Return true if the brand is active, else false.
@@ -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 Dashboard</span>"), vyapari.store_manager_stores_url %>
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, limit: 256
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, limit: 256
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, limit: 256
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, limit: 256
5
+ t.string :name
6
6
  t.string :code, limit: 24
7
- t.string :address, limit: 1024
7
+ t.text :address
8
8
  t.string :city, limit: 56
9
9
  t.references :country, index: true
10
10
 
@@ -2,7 +2,7 @@ class CreateStores < ActiveRecord::Migration
2
2
  def change
3
3
  create_table(:stores) do |t|
4
4
 
5
- t.string :name, limit: 256
5
+ t.string :name
6
6
  t.string :code, limit: 24
7
7
  t.string :store_type, :null => false, :default=>"POS", :limit=>24
8
8
 
@@ -2,7 +2,7 @@ class CreateTerminals < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
  create_table :terminals do |t|
4
4
 
5
- t.string :name, limit: 256
5
+ t.string :name
6
6
  t.string :code, limit: 24
7
7
 
8
8
  t.string :status, :null => false, :default=>"active", :limit=>16
@@ -2,7 +2,7 @@ class CreateInvoices < ActiveRecord::Migration[5.0]
2
2
  def change
3
3
  create_table :invoices do |t|
4
4
 
5
- t.string :invoice_number, limit: 256
5
+ t.string :invoice_number
6
6
  t.datetime :invoice_date
7
7
 
8
8
  t.string :customer_name
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module Vyapari
2
- VERSION = '0.1.5dev'
2
+ VERSION = '0.1.5dev1'
3
3
  end
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.5dev
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.5dev
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.5dev
128
+ version: 0.1.5dev1
129
129
  - !ruby/object:Gem::Dependency
130
130
  name: bcrypt
131
131
  requirement: !ruby/object:Gem::Requirement