close cashier pdf and receipt bill pdf changes for credit payment

This commit is contained in:
phyusin
2018-07-12 15:50:58 +06:30
parent ebd3918cfa
commit 03abeabb4e
12 changed files with 116 additions and 52 deletions

View File

@@ -3,14 +3,15 @@ class CreateSaleAudits < ActiveRecord::Migration[5.1]
create_table :sale_audits, :id => false do |t|
t.string :sale_audit_id, :limit => 16, :primary_key => true #custom primary key - to ensure consistence for cloud syncing
t.string :sale_id, foreign_key: true, :limit => 16
t.string :action, :null => false
t.datetime :action_at, :null => false
t.string :sale_id, foreign_key: true, :index => true, :limit => 16
t.string :action, :null => false, :index => true
t.datetime :action_at, :null => false, :index => true
t.string :action_by, :null => false
t.string :approved_by, :null => true
t.datetime :approved_at, :null => true
t.text :remark
t.text :remark, :index => true
t.timestamps
end
add_index :sale_audits, [:sale_id, :action, :action_at, :remark]
end
end

View File

@@ -2,7 +2,7 @@ class CreateCustomers < ActiveRecord::Migration[5.1]
def change
create_table :customers, :id => false do |t|
t.string :customer_id, :limit => 16, :primary_key => true #custom foreign_key to prevent conflict during sync
t.string :name, :null => false
t.string :name, :null => false, :index => true
t.string :company
t.string :email
t.string :contact_no, :unique => true
@@ -20,6 +20,6 @@ class CreateCustomers < ActiveRecord::Migration[5.1]
t.json :tax_profiles
t.string :image_path
end
add_index :customers, [:membership_id, :customer_type]
add_index :customers, [:name, :membership_id, :customer_type]
end
end