stockor 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +4 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +220 -0
- data/Guardfile +13 -0
- data/README.md +7 -0
- data/Rakefile +7 -0
- data/client/skr/Extension.coffee +12 -0
- data/client/skr/components/.gitkeep +0 -0
- data/client/skr/components/address/Address.coffee +21 -0
- data/client/skr/components/address/address.html +20 -0
- data/client/skr/index.js +21 -0
- data/client/skr/models/Address.coffee +17 -0
- data/client/skr/models/Base.coffee +8 -0
- data/client/skr/models/Customer.coffee +26 -0
- data/client/skr/models/GlAccount.coffee +10 -0
- data/client/skr/models/GlManualEntry.coffee +11 -0
- data/client/skr/models/GlPeriod.coffee +10 -0
- data/client/skr/models/GlPosting.coffee +15 -0
- data/client/skr/models/GlTransaction.coffee +16 -0
- data/client/skr/models/IaLine.coffee +19 -0
- data/client/skr/models/IaReason.coffee +12 -0
- data/client/skr/models/InvLine.coffee +27 -0
- data/client/skr/models/InventoryAdjustment.coffee +17 -0
- data/client/skr/models/Invoice.coffee +31 -0
- data/client/skr/models/Location.coffee +15 -0
- data/client/skr/models/PaymentTerm.coffee +11 -0
- data/client/skr/models/PickTicket.coffee +19 -0
- data/client/skr/models/PoLine.coffee +27 -0
- data/client/skr/models/PoReceipt.coffee +20 -0
- data/client/skr/models/PorLine.coffee +26 -0
- data/client/skr/models/PtLine.coffee +27 -0
- data/client/skr/models/PurchaseOrder.coffee +23 -0
- data/client/skr/models/SalesOrder.coffee +32 -0
- data/client/skr/models/Sku.coffee +21 -0
- data/client/skr/models/SkuLoc.coffee +21 -0
- data/client/skr/models/SkuTran.coffee +23 -0
- data/client/skr/models/SkuVendor.coffee +19 -0
- data/client/skr/models/SoLine.coffee +27 -0
- data/client/skr/models/Uom.coffee +17 -0
- data/client/skr/models/Vendor.coffee +28 -0
- data/client/skr/models/VoLine.coffee +23 -0
- data/client/skr/models/Voucher.coffee +22 -0
- data/client/skr/models/mixins/CodeField.coffee +5 -0
- data/client/skr/screens/.gitkeep +0 -0
- data/client/skr/screens/Base.coffee +3 -0
- data/client/skr/screens/base/index.js +5 -0
- data/client/skr/screens/base/index.scss +9 -0
- data/client/skr/screens/base/layout.html +3 -0
- data/client/skr/screens/customer-maint/CustomerMaint.coffee +49 -0
- data/client/skr/screens/customer-maint/index.js +5 -0
- data/client/skr/screens/customer-maint/index.scss +9 -0
- data/client/skr/screens/customer-maint/layout.html +32 -0
- data/client/skr/styles.scss +1 -0
- data/client/skr/views/.gitkeep +0 -0
- data/client/skr/views/Base.coffee +5 -0
- data/config/database.yml +9 -0
- data/config/lanes.rb +7 -0
- data/config/routes.rb +39 -0
- data/config/screens.rb +17 -0
- data/config.ru +5 -0
- data/db/.gitkeep +0 -0
- data/db/migrate/20120110142845_create_skr_sequential_ids.rb +35 -0
- data/db/migrate/20140202185309_create_skr_gl_accounts.rb +15 -0
- data/db/migrate/20140202193316_create_skr_gl_periods.rb +16 -0
- data/db/migrate/20140202193318_create_skr_gl_transactions.rb +14 -0
- data/db/migrate/20140202193319_create_skr_gl_postings.rb +16 -0
- data/db/migrate/20140202193700_create_skr_gl_manual_entries.rb +13 -0
- data/db/migrate/20140213040608_create_skr_payment_terms.rb +16 -0
- data/db/migrate/20140220031700_create_skr_addresses.rb +19 -0
- data/db/migrate/20140220031800_create_skr_locations.rb +19 -0
- data/db/migrate/20140220190836_create_skr_vendors.rb +22 -0
- data/db/migrate/20140220203029_create_skr_customers.rb +22 -0
- data/db/migrate/20140224034759_create_skr_skus.rb +22 -0
- data/db/migrate/20140225032853_create_skr_sku_locs.rb +21 -0
- data/db/migrate/20140320030501_create_skr_uoms.rb +19 -0
- data/db/migrate/20140321031604_create_skr_sku_vendors.rb +18 -0
- data/db/migrate/20140322012143_create_skr_ia_reasons.rb +14 -0
- data/db/migrate/20140322014401_create_skr_inventory_adjustments.rb +16 -0
- data/db/migrate/20140322023453_create_skr_ia_lines.rb +18 -0
- data/db/migrate/20140322035024_create_skr_sku_trans.rb +21 -0
- data/db/migrate/20140322223912_create_skr_sales_orders.rb +27 -0
- data/db/migrate/20140322223920_create_skr_so_lines.rb +25 -0
- data/db/migrate/20140323001446_create_so_details_view.rb +81 -0
- data/db/migrate/20140327202102_create_skr_purchase_orders.rb +20 -0
- data/db/migrate/20140327202107_create_skr_po_lines.rb +25 -0
- data/db/migrate/20140327202207_create_skr_pick_tickets.rb +16 -0
- data/db/migrate/20140327202209_create_skr_pt_lines.rb +23 -0
- data/db/migrate/20140327224000_create_skr_invoices.rb +25 -0
- data/db/migrate/20140327224002_create_skr_inv_lines.rb +23 -0
- data/db/migrate/20140330232808_create_skr_sku_loc_details_view.rb +31 -0
- data/db/migrate/20140330232810_create_skr_sku_qty_details_view.rb +48 -0
- data/db/migrate/20140400164729_create_skr_vouchers.rb +22 -0
- data/db/migrate/20140400164733_create_skr_vo_lines.rb +21 -0
- data/db/migrate/20140401164729_create_skr_po_receipt.rb +16 -0
- data/db/migrate/20140401164740_create_skr_por_line.rb +21 -0
- data/db/migrate/20140422024010_create_skr_inv_details_view.rb +42 -0
- data/db/schema.sql +2662 -0
- data/db/seed/chart_of_accounts.yml +168 -0
- data/db/seed/payment_terms.yml +60 -0
- data/db/seed.rb +29 -0
- data/lib/skr/access_roles.rb +28 -0
- data/lib/skr/concerns/acts_as_uom.rb +47 -0
- data/lib/skr/concerns/code_identifier.rb +43 -0
- data/lib/skr/concerns/gl_tran_extensions.rb +18 -0
- data/lib/skr/concerns/has_gl_transaction.rb +67 -0
- data/lib/skr/concerns/has_sku_loc_lines.rb +47 -0
- data/lib/skr/concerns/immutable_model.rb +32 -0
- data/lib/skr/concerns/inv_extensions.rb +24 -0
- data/lib/skr/concerns/is_order_like.rb +47 -0
- data/lib/skr/concerns/is_sku_loc_line.rb +65 -0
- data/lib/skr/concerns/locked_fields.rb +84 -0
- data/lib/skr/concerns/pt_extensions.rb +22 -0
- data/lib/skr/concerns/random_hash_code.rb +40 -0
- data/lib/skr/concerns/so_extensions.rb +30 -0
- data/lib/skr/concerns/state_machine.rb +61 -0
- data/lib/skr/concerns/visible_id_identifier.rb +53 -0
- data/lib/skr/configuration.rb +68 -0
- data/lib/skr/db/migration_helpers.rb +178 -0
- data/lib/skr/extension.rb +23 -0
- data/lib/skr/model.rb +19 -0
- data/lib/skr/models/address.rb +97 -0
- data/lib/skr/models/business_entity.rb +29 -0
- data/lib/skr/models/customer.rb +35 -0
- data/lib/skr/models/gl_account.rb +56 -0
- data/lib/skr/models/gl_manual_entry.rb +31 -0
- data/lib/skr/models/gl_period.rb +13 -0
- data/lib/skr/models/gl_posting.rb +54 -0
- data/lib/skr/models/gl_transaction.rb +175 -0
- data/lib/skr/models/ia_line.rb +129 -0
- data/lib/skr/models/ia_reason.rb +16 -0
- data/lib/skr/models/inv_line.rb +90 -0
- data/lib/skr/models/inventory_adjustment.rb +60 -0
- data/lib/skr/models/invoice.rb +159 -0
- data/lib/skr/models/location.rb +31 -0
- data/lib/skr/models/payment_term.rb +30 -0
- data/lib/skr/models/pick_ticket.rb +71 -0
- data/lib/skr/models/po_line.rb +69 -0
- data/lib/skr/models/po_receipt.rb +51 -0
- data/lib/skr/models/por_line.rb +80 -0
- data/lib/skr/models/pt_line.rb +74 -0
- data/lib/skr/models/purchase_order.rb +112 -0
- data/lib/skr/models/sales_order.rb +159 -0
- data/lib/skr/models/sequential_id.rb +23 -0
- data/lib/skr/models/sku.rb +99 -0
- data/lib/skr/models/sku_loc.rb +94 -0
- data/lib/skr/models/sku_tran.rb +111 -0
- data/lib/skr/models/sku_vendor.rb +26 -0
- data/lib/skr/models/so_line.rb +159 -0
- data/lib/skr/models/uom.rb +63 -0
- data/lib/skr/models/user_proxy.rb +60 -0
- data/lib/skr/models/vendor.rb +33 -0
- data/lib/skr/models/vo_line.rb +35 -0
- data/lib/skr/models/voucher.rb +119 -0
- data/lib/skr/standard_pricing_provider.rb +14 -0
- data/lib/skr/version.rb +3 -0
- data/lib/skr.rb +18 -0
- data/lib/stockor.rb +4 -0
- data/lib/tasks/debug-activity.rake +58 -0
- data/log/test.log +0 -0
- data/spec/fixtures/skr/address.yml +2 -0
- data/spec/fixtures/skr/customer.yml +2 -0
- data/spec/fixtures/skr/gl_account.yml +2 -0
- data/spec/fixtures/skr/gl_manual_entry.yml +2 -0
- data/spec/fixtures/skr/gl_period.yml +2 -0
- data/spec/fixtures/skr/gl_posting.yml +2 -0
- data/spec/fixtures/skr/gl_transaction.yml +2 -0
- data/spec/fixtures/skr/ia_line.yml +2 -0
- data/spec/fixtures/skr/ia_reason.yml +2 -0
- data/spec/fixtures/skr/inv_line.yml +2 -0
- data/spec/fixtures/skr/inventory_adjustment.yml +2 -0
- data/spec/fixtures/skr/invoice.yml +2 -0
- data/spec/fixtures/skr/location.yml +2 -0
- data/spec/fixtures/skr/payment_term.yml +2 -0
- data/spec/fixtures/skr/pick_ticket.yml +2 -0
- data/spec/fixtures/skr/po_line.yml +2 -0
- data/spec/fixtures/skr/po_receipt.yml +2 -0
- data/spec/fixtures/skr/por_line.yml +2 -0
- data/spec/fixtures/skr/pt_line.yml +2 -0
- data/spec/fixtures/skr/purchase_order.yml +2 -0
- data/spec/fixtures/skr/sales_order.yml +2 -0
- data/spec/fixtures/skr/sku.yml +2 -0
- data/spec/fixtures/skr/sku_loc.yml +2 -0
- data/spec/fixtures/skr/sku_tran.yml +2 -0
- data/spec/fixtures/skr/sku_vendor.yml +2 -0
- data/spec/fixtures/skr/so_line.yml +2 -0
- data/spec/fixtures/skr/uom.yml +2 -0
- data/spec/fixtures/skr/vendor.yml +2 -0
- data/spec/fixtures/skr/vo_line.yml +2 -0
- data/spec/fixtures/skr/voucher.yml +2 -0
- data/spec/skr/address.rb +10 -0
- data/spec/skr/concerns/code_identifier_spec.rb +45 -0
- data/spec/skr/customer.rb +10 -0
- data/spec/skr/gl_account.rb +10 -0
- data/spec/skr/gl_manual_entry.rb +10 -0
- data/spec/skr/gl_period.rb +10 -0
- data/spec/skr/gl_posting.rb +10 -0
- data/spec/skr/gl_transaction.rb +10 -0
- data/spec/skr/ia_line.rb +10 -0
- data/spec/skr/ia_reason.rb +10 -0
- data/spec/skr/inv_line.rb +10 -0
- data/spec/skr/inventory_adjustment.rb +10 -0
- data/spec/skr/invoice.rb +10 -0
- data/spec/skr/location.rb +10 -0
- data/spec/skr/models/AddressSpec.coffee +5 -0
- data/spec/skr/models/CustomerSpec.coffee +5 -0
- data/spec/skr/models/GlAccountSpec.coffee +5 -0
- data/spec/skr/models/GlManualEntrySpec.coffee +5 -0
- data/spec/skr/models/GlPeriodSpec.coffee +5 -0
- data/spec/skr/models/GlPostingSpec.coffee +5 -0
- data/spec/skr/models/GlTransactionSpec.coffee +5 -0
- data/spec/skr/models/IaLineSpec.coffee +5 -0
- data/spec/skr/models/IaReasonSpec.coffee +5 -0
- data/spec/skr/models/InvLineSpec.coffee +5 -0
- data/spec/skr/models/InventoryAdjustmentSpec.coffee +5 -0
- data/spec/skr/models/InvoiceSpec.coffee +5 -0
- data/spec/skr/models/LocationSpec.coffee +5 -0
- data/spec/skr/models/PaymentTermSpec.coffee +5 -0
- data/spec/skr/models/PickTicketSpec.coffee +5 -0
- data/spec/skr/models/PoLineSpec.coffee +5 -0
- data/spec/skr/models/PoReceiptSpec.coffee +5 -0
- data/spec/skr/models/PorLineSpec.coffee +5 -0
- data/spec/skr/models/PtLineSpec.coffee +5 -0
- data/spec/skr/models/PurchaseOrderSpec.coffee +5 -0
- data/spec/skr/models/SalesOrderSpec.coffee +5 -0
- data/spec/skr/models/SkuLocSpec.coffee +5 -0
- data/spec/skr/models/SkuSpec.coffee +5 -0
- data/spec/skr/models/SkuTranSpec.coffee +5 -0
- data/spec/skr/models/SkuVendorSpec.coffee +5 -0
- data/spec/skr/models/SoLineSpec.coffee +5 -0
- data/spec/skr/models/UomSpec.coffee +5 -0
- data/spec/skr/models/VendorSpec.coffee +5 -0
- data/spec/skr/models/VoLineSpec.coffee +5 -0
- data/spec/skr/models/VoucherSpec.coffee +5 -0
- data/spec/skr/payment_term.rb +10 -0
- data/spec/skr/pick_ticket.rb +10 -0
- data/spec/skr/po_line.rb +10 -0
- data/spec/skr/po_receipt.rb +10 -0
- data/spec/skr/por_line.rb +10 -0
- data/spec/skr/pt_line.rb +10 -0
- data/spec/skr/purchase_order.rb +10 -0
- data/spec/skr/sales_order.rb +10 -0
- data/spec/skr/screens/Base.coffee +7 -0
- data/spec/skr/screens/CustomerMaint.coffee +7 -0
- data/spec/skr/screens/vendor-maint/VendorMaintSpec.coffee +5 -0
- data/spec/skr/sku.rb +10 -0
- data/spec/skr/sku_loc.rb +10 -0
- data/spec/skr/sku_tran.rb +10 -0
- data/spec/skr/sku_vendor.rb +10 -0
- data/spec/skr/so_line.rb +10 -0
- data/spec/skr/spec_helper.rb +26 -0
- data/spec/skr/uom.rb +10 -0
- data/spec/skr/vendor.rb +10 -0
- data/spec/skr/views/AddressSpec.coffee +5 -0
- data/spec/skr/vo_line.rb +10 -0
- data/spec/skr/voucher.rb +10 -0
- data/stockor.gemspec +38 -0
- data/tmp/.gitkeep +0 -0
- metadata +414 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
class Skr.Models.PoLine extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
purchase_order_id:{"type":"integer","required":true}
|
8
|
+
sku_loc_id: {"type":"integer","required":true}
|
9
|
+
sku_vendor_id: {"type":"integer","required":true}
|
10
|
+
part_code: {"type":"string","required":true}
|
11
|
+
sku_code: {"type":"string","required":true}
|
12
|
+
description: {"type":"string","required":true}
|
13
|
+
uom_code: {"type":"string","required":true}
|
14
|
+
uom_size: {"type":"integer","required":true}
|
15
|
+
position: {"type":"integer","required":true}
|
16
|
+
qty: {"type":"integer","required":true,"default":"0"}
|
17
|
+
qty_received: {"type":"integer","required":true,"default":"0"}
|
18
|
+
qty_canceled: {"type":"integer","required":true,"default":"0"}
|
19
|
+
price: {"type":"bigdec","required":true}
|
20
|
+
is_revised: {"type":"boolean","required":true,"default":"false"}
|
21
|
+
|
22
|
+
associations:
|
23
|
+
purchase_order: { model: "PurchaseOrder" }
|
24
|
+
sku_loc: { model: "SkuLoc" }
|
25
|
+
sku_vendor: { model: "SkuVendor" }
|
26
|
+
sku: { model: "Sku" }
|
27
|
+
receipts: { collection: "PorLine" }
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class Skr.Models.PoReceipt extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
visible_id: {"type":"integer","required":true}
|
8
|
+
location_id: {"type":"integer","required":true}
|
9
|
+
freight: {"type":"bigdec","required":true,"default":"0.0"}
|
10
|
+
purchase_order_id:{"type":"integer","required":true}
|
11
|
+
vendor_id: {"type":"integer","required":true}
|
12
|
+
voucher_id: "integer"
|
13
|
+
refno: "string"
|
14
|
+
|
15
|
+
associations:
|
16
|
+
purchase_order: { model: "PurchaseOrder" }
|
17
|
+
vendor: { model: "Vendor" }
|
18
|
+
location: { model: "Location" }
|
19
|
+
gl_transaction: { model: "GlTransaction" }
|
20
|
+
lines: { collection: "PorLine" }
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class Skr.Models.PorLine extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
po_receipt_id:{"type":"integer","required":true}
|
8
|
+
po_line_id: "integer"
|
9
|
+
sku_loc_id: {"type":"integer","required":true}
|
10
|
+
sku_vendor_id:"integer"
|
11
|
+
sku_code: {"type":"string","required":true}
|
12
|
+
part_code: {"type":"string","required":true}
|
13
|
+
description: {"type":"string","required":true}
|
14
|
+
uom_code: {"type":"string","required":true}
|
15
|
+
uom_size: {"type":"integer","required":true}
|
16
|
+
position: {"type":"integer","required":true}
|
17
|
+
qty: {"type":"integer","required":true,"default":"0"}
|
18
|
+
price: {"type":"bigdec","required":true}
|
19
|
+
|
20
|
+
associations:
|
21
|
+
po_receipt: { model: "PoReceipt" }
|
22
|
+
sku_loc: { model: "SkuLoc" }
|
23
|
+
po_line: { model: "PoLine" }
|
24
|
+
sku_vendor: { model: "SkuVendor" }
|
25
|
+
sku: { model: "Sku" }
|
26
|
+
sku_trans: { collection: "SkuTran" }
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class Skr.Models.PtLine extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
pick_ticket_id:{"type":"integer","required":true}
|
8
|
+
so_line_id: {"type":"integer","required":true}
|
9
|
+
sku_loc_id: {"type":"integer","required":true}
|
10
|
+
price: {"type":"bigdec","required":true}
|
11
|
+
sku_code: {"type":"string","required":true}
|
12
|
+
description: {"type":"string","required":true}
|
13
|
+
uom_code: {"type":"string","required":true}
|
14
|
+
bin: "string"
|
15
|
+
uom_size: {"type":"integer","required":true}
|
16
|
+
position: {"type":"integer","required":true}
|
17
|
+
qty: {"type":"integer","required":true,"default":"0"}
|
18
|
+
qty_invoiced: {"type":"integer","required":true,"default":"0"}
|
19
|
+
is_complete: {"type":"boolean","required":true,"default":"false"}
|
20
|
+
|
21
|
+
associations:
|
22
|
+
pick_ticket: { model: "PickTicket" }
|
23
|
+
sku_loc: { model: "SkuLoc" }
|
24
|
+
so_line: { model: "SoLine" }
|
25
|
+
inv_line: { model: "InvLine" }
|
26
|
+
sales_order: { model: "SalesOrder" }
|
27
|
+
sku: { model: "Sku" }
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Skr.Models.PurchaseOrder extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
visible_id: {"type":"integer","required":true}
|
8
|
+
vendor_id: {"type":"integer","required":true}
|
9
|
+
location_id: {"type":"integer","required":true}
|
10
|
+
ship_addr_id: {"type":"integer","required":true}
|
11
|
+
terms_id: {"type":"integer","required":true}
|
12
|
+
state: {"type":"string","required":true}
|
13
|
+
is_revised: {"type":"boolean","required":true,"default":"false"}
|
14
|
+
order_date: {"type":"any","required":true}
|
15
|
+
receiving_completed_at:"date"
|
16
|
+
|
17
|
+
associations:
|
18
|
+
terms: { model: "PaymentTerm" }
|
19
|
+
vendor: { model: "Vendor" }
|
20
|
+
location: { model: "Location" }
|
21
|
+
ship_addr: { model: "Address" }
|
22
|
+
lines: { collection: "PoLine" }
|
23
|
+
receipts: { collection: "PoReceipt" }
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class Skr.Models.SalesOrder extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
visible_id: {"type":"integer","required":true}
|
8
|
+
customer_id: {"type":"integer","required":true}
|
9
|
+
location_id: {"type":"integer","required":true}
|
10
|
+
shipping_address_id:{"type":"integer","required":true}
|
11
|
+
billing_address_id: {"type":"integer","required":true}
|
12
|
+
terms_id: {"type":"integer","required":true}
|
13
|
+
order_date: {"type":"any","required":true}
|
14
|
+
state: {"type":"string","required":true}
|
15
|
+
is_revised: {"type":"boolean","required":true,"default":"false"}
|
16
|
+
hash_code: {"type":"string","required":true}
|
17
|
+
ship_partial: {"type":"boolean","required":true,"default":"false"}
|
18
|
+
is_complete: {"type":"boolean","required":true,"default":"false"}
|
19
|
+
po_num: "string"
|
20
|
+
notes: "string"
|
21
|
+
options: "any"
|
22
|
+
|
23
|
+
associations:
|
24
|
+
customer: { model: "Customer" }
|
25
|
+
location: { model: "Location" }
|
26
|
+
terms: { model: "PaymentTerm" }
|
27
|
+
billing_address: { model: "Address" }
|
28
|
+
shipping_address: { model: "Address" }
|
29
|
+
lines: { collection: "SoLine" }
|
30
|
+
skus: { collection: "Sku" }
|
31
|
+
pick_tickets: { collection: "PickTicket" }
|
32
|
+
invoices: { collection: "Invoice" }
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class Skr.Models.Sku extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
default_vendor_id: {"type":"integer","required":true}
|
8
|
+
gl_asset_account_id: {"type":"integer","required":true}
|
9
|
+
default_uom_code: {"type":"string","required":true}
|
10
|
+
code: {"type":"string","required":true}
|
11
|
+
description: {"type":"string","required":true}
|
12
|
+
is_other_charge: {"type":"boolean","required":true,"default":"false"}
|
13
|
+
does_track_inventory:{"type":"boolean","required":true,"default":"false"}
|
14
|
+
can_backorder: {"type":"boolean","required":true,"default":"false"}
|
15
|
+
|
16
|
+
associations:
|
17
|
+
default_vendor: { model: "Vendor" }
|
18
|
+
gl_asset_account: { model: "GlAccount" }
|
19
|
+
sku_locs: { collection: "SkuLoc" }
|
20
|
+
sku_vendors: { collection: "SkuVendor" }
|
21
|
+
uoms: { collection: "Uom" }
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class Skr.Models.SkuLoc extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
sku_id: {"type":"integer","required":true}
|
8
|
+
location_id: {"type":"integer","required":true}
|
9
|
+
mac: {"type":"bigdec","required":true,"default":"0.0"}
|
10
|
+
qty: {"type":"integer","required":true,"default":"0"}
|
11
|
+
qty_allocated:{"type":"integer","required":true,"default":"0"}
|
12
|
+
qty_picking: {"type":"integer","required":true,"default":"0"}
|
13
|
+
qty_reserved: {"type":"integer","required":true,"default":"0"}
|
14
|
+
bin: "string"
|
15
|
+
|
16
|
+
associations:
|
17
|
+
sku: { model: "Sku" }
|
18
|
+
location: { model: "Location" }
|
19
|
+
so_lines: { collection: "SoLine" }
|
20
|
+
pt_lines: { collection: "PtLine" }
|
21
|
+
sku_vendors: { collection: "SkuVendor" }
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Skr.Models.SkuTran extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
origin_id: "integer"
|
8
|
+
origin_type: "string"
|
9
|
+
sku_loc_id: {"type":"integer","required":true}
|
10
|
+
cost: {"type":"bigdec","required":true}
|
11
|
+
origin_description:{"type":"string","required":true}
|
12
|
+
prior_qty: {"type":"integer","required":true}
|
13
|
+
mac: {"type":"bigdec","required":true}
|
14
|
+
prior_mac: {"type":"bigdec","required":true}
|
15
|
+
qty: {"type":"integer","required":true,"default":"0"}
|
16
|
+
uom_code: {"type":"string","required":true,"default":"EA"}
|
17
|
+
uom_size: {"type":"integer","required":true,"default":"1"}
|
18
|
+
|
19
|
+
associations:
|
20
|
+
sku_loc: { model: "SkuLoc" }
|
21
|
+
location: { model: "Location" }
|
22
|
+
origin: { model: "Origin" }
|
23
|
+
gl_transaction: { model: "GlTransaction" }
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class Skr.Models.SkuVendor extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
sku_id: {"type":"integer","required":true}
|
8
|
+
vendor_id: {"type":"integer","required":true}
|
9
|
+
list_price:{"type":"bigdec","required":true}
|
10
|
+
part_code: {"type":"string","required":true}
|
11
|
+
is_active: {"type":"boolean","required":true,"default":"true"}
|
12
|
+
uom_size: {"type":"integer","required":true,"default":"1"}
|
13
|
+
uom_code: {"type":"string","required":true,"default":"EA"}
|
14
|
+
cost: {"type":"bigdec","required":true}
|
15
|
+
|
16
|
+
associations:
|
17
|
+
sku: { model: "Sku" }
|
18
|
+
vendor: { model: "Vendor" }
|
19
|
+
sku_locs: { collection: "SkuLoc" }
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class Skr.Models.SoLine extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
sales_order_id:{"type":"integer","required":true}
|
8
|
+
sku_loc_id: {"type":"integer","required":true}
|
9
|
+
price: {"type":"bigdec","required":true}
|
10
|
+
sku_code: {"type":"string","required":true}
|
11
|
+
description: {"type":"string","required":true}
|
12
|
+
uom_code: {"type":"string","required":true}
|
13
|
+
uom_size: {"type":"integer","required":true}
|
14
|
+
position: {"type":"integer","required":true}
|
15
|
+
qty: {"type":"integer","required":true,"default":"0"}
|
16
|
+
qty_allocated: {"type":"integer","required":true,"default":"0"}
|
17
|
+
qty_picking: {"type":"integer","required":true,"default":"0"}
|
18
|
+
qty_invoiced: {"type":"integer","required":true,"default":"0"}
|
19
|
+
qty_canceled: {"type":"integer","required":true,"default":"0"}
|
20
|
+
is_revised: {"type":"boolean","required":true,"default":"false"}
|
21
|
+
|
22
|
+
associations:
|
23
|
+
sales_order: { model: "SalesOrder" }
|
24
|
+
sku_loc: { model: "SkuLoc" }
|
25
|
+
sku: { model: "Sku" }
|
26
|
+
location: { model: "Location" }
|
27
|
+
pt_lines: { collection: "PtLine" }
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class Skr.Models.Uom extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
sku_id:{"type":"integer","required":true}
|
8
|
+
price: {"type":"bigdec","required":true}
|
9
|
+
size: {"type":"integer","required":true,"default":"1"}
|
10
|
+
code: {"type":"string","required":true,"default":"EA"}
|
11
|
+
weight:"bigdec"
|
12
|
+
height:"bigdec"
|
13
|
+
width: "bigdec"
|
14
|
+
depth: "bigdec"
|
15
|
+
|
16
|
+
associations:
|
17
|
+
sku: { model: "Sku" }
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class Skr.Models.Vendor extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
billing_address_id: {"type":"integer","required":true}
|
8
|
+
shipping_address_id: {"type":"integer","required":true}
|
9
|
+
terms_id: {"type":"integer","required":true}
|
10
|
+
gl_payables_account_id:{"type":"integer","required":true}
|
11
|
+
gl_freight_account_id: {"type":"integer","required":true}
|
12
|
+
code: {"type":"string","required":true}
|
13
|
+
hash_code: {"type":"string","required":true}
|
14
|
+
name: {"type":"string","required":true}
|
15
|
+
notes: "string"
|
16
|
+
account_code: "string"
|
17
|
+
website: "string"
|
18
|
+
|
19
|
+
associations:
|
20
|
+
billing_address: { model: "Address" }
|
21
|
+
shipping_address: { model: "Address" }
|
22
|
+
terms: { model: "PaymentTerm" }
|
23
|
+
gl_payables_account: { model: "GlAccount" }
|
24
|
+
gl_freight_account: { model: "GlAccount" }
|
25
|
+
purchase_orders: { collection: "PurchaseOrder" }
|
26
|
+
vouchers: { collection: "Voucher" }
|
27
|
+
vendor_skus: { collection: "SkuVendor" }
|
28
|
+
sku_vendors: { collection: "SkuVendor" }
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Skr.Models.VoLine extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
voucher_id: {"type":"integer","required":true}
|
8
|
+
sku_vendor_id:{"type":"integer","required":true}
|
9
|
+
po_line_id: "integer"
|
10
|
+
sku_code: {"type":"string","required":true}
|
11
|
+
part_code: {"type":"string","required":true}
|
12
|
+
description: {"type":"string","required":true}
|
13
|
+
uom_code: {"type":"string","required":true}
|
14
|
+
uom_size: {"type":"integer","required":true}
|
15
|
+
position: {"type":"integer","required":true}
|
16
|
+
qty: {"type":"integer","required":true,"default":"0"}
|
17
|
+
price: {"type":"bigdec","required":true}
|
18
|
+
|
19
|
+
associations:
|
20
|
+
voucher: { model: "Voucher" }
|
21
|
+
sku_vendor: { model: "SkuVendor" }
|
22
|
+
po_line: { model: "PoLine" }
|
23
|
+
sku: { model: "Sku" }
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class Skr.Models.Voucher extends Skr.Models.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
props:
|
6
|
+
id: {"type":"integer","required":true}
|
7
|
+
visible_id: {"type":"integer","required":true}
|
8
|
+
vendor_id: {"type":"integer","required":true}
|
9
|
+
purchase_order_id:"integer"
|
10
|
+
terms_id: {"type":"integer","required":true}
|
11
|
+
state: {"type":"string","required":true}
|
12
|
+
refno: "string"
|
13
|
+
confirmation_date:"any"
|
14
|
+
|
15
|
+
associations:
|
16
|
+
vendor: { model: "Vendor" }
|
17
|
+
customer: { model: "Customer" }
|
18
|
+
purchase_order: { model: "PurchaseOrder" }
|
19
|
+
terms: { model: "PaymentTerm" }
|
20
|
+
location: { model: "Location" }
|
21
|
+
gl_transactions: { collection: "GlTransaction" }
|
22
|
+
lines: { collection: "VoLine" }
|
File without changes
|
@@ -0,0 +1,49 @@
|
|
1
|
+
class Skr.Screens.CustomerMaint extends Skr.Screens.Base
|
2
|
+
|
3
|
+
FILE: FILE
|
4
|
+
|
5
|
+
constructor: ->
|
6
|
+
super
|
7
|
+
this.reset()
|
8
|
+
|
9
|
+
useFormBindings: true
|
10
|
+
|
11
|
+
domEvents:
|
12
|
+
'click .btn.save': 'save'
|
13
|
+
'click .btn.reset': 'reset'
|
14
|
+
'display-record': 'onRecordTrigger'
|
15
|
+
|
16
|
+
subviews:
|
17
|
+
finder:
|
18
|
+
component: 'RecordFinder'
|
19
|
+
options: 'finderOptions'
|
20
|
+
model: 'model'
|
21
|
+
terms:
|
22
|
+
component: 'SelectField'
|
23
|
+
model: 'model'
|
24
|
+
options: { association: 'terms', mappings: { title: 'code' } }
|
25
|
+
billaddr:
|
26
|
+
component: 'Address'
|
27
|
+
model: 'model.billing_address'
|
28
|
+
options: { field_name: 'billing_address_id' }
|
29
|
+
shipaddr:
|
30
|
+
component: 'Address'
|
31
|
+
model: 'model.shipping_address'
|
32
|
+
options: ->{ copyFrom: this.billaddr, field_name: 'shipping_address_id' }
|
33
|
+
|
34
|
+
finderOptions: ->
|
35
|
+
modelClass: Skr.Models.Customer
|
36
|
+
title: 'Find Customer',
|
37
|
+
invalid_chars: Skr.Models.Mixins.CodeField.invalidChars
|
38
|
+
withAssociations: ['billing_address', 'shipping_address', 'terms']
|
39
|
+
fields: [ 'code', 'name', 'notes', 'credit_limit' ]
|
40
|
+
|
41
|
+
reset: ->
|
42
|
+
this.model = new Skr.Models.Customer
|
43
|
+
|
44
|
+
save: ->
|
45
|
+
Lanes.Views.SaveNotify(this, include:['billing_address','shipping_address','terms'])
|
46
|
+
|
47
|
+
onRecordTrigger: (ev, model)->
|
48
|
+
this.model = model
|
49
|
+
window.c = model
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<div class="customer">
|
2
|
+
<%= h.toolbar buttons: ['save','reset'] %>
|
3
|
+
|
4
|
+
<div class="header">
|
5
|
+
<div class="row">
|
6
|
+
<%= h.subview 'finder', widths: [12,4,4,3], label: 'Code' %>
|
7
|
+
<%= h.text_field 'name', widths: [12,8,8,9] %>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="row">
|
11
|
+
<%= h.text_field 'notes', widths: [12,9] %>
|
12
|
+
<%= h.subview 'terms', widths: [12,3] %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="row">
|
17
|
+
<div class="<%= h.grid_widths 12,6 %>">
|
18
|
+
<fieldset class="addresses bordered">
|
19
|
+
<legend>Billing Address</legend>
|
20
|
+
<%= h.subview 'billaddr', unwrapped: true %>
|
21
|
+
|
22
|
+
</fieldset>
|
23
|
+
</div>
|
24
|
+
<div class="<%= h.grid_widths 12,6 %>">
|
25
|
+
<fieldset class="addresses bordered">
|
26
|
+
<legend>Shiping Address</legend>
|
27
|
+
<%= h.subview 'shipaddr', unwrapped: true %>
|
28
|
+
</fieldset>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
|
32
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
/* Enter styles for your application in scss format here */
|
File without changes
|
data/config/database.yml
ADDED
data/config/lanes.rb
ADDED
data/config/routes.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
Lanes::API.routes.draw do
|
2
|
+
resources Skr::Customer
|
3
|
+
resources Skr::Address
|
4
|
+
resources Skr::GlAccount
|
5
|
+
resources Skr::GlManualEntry
|
6
|
+
resources Skr::GlPeriod
|
7
|
+
resources Skr::GlPosting
|
8
|
+
resources Skr::GlTransaction
|
9
|
+
resources Skr::IaLine
|
10
|
+
resources Skr::IaReason
|
11
|
+
resources Skr::InvLine
|
12
|
+
resources Skr::InventoryAdjustment
|
13
|
+
resources Skr::Invoice
|
14
|
+
resources Skr::Location
|
15
|
+
resources Skr::PaymentTerm
|
16
|
+
resources Skr::Sku
|
17
|
+
resources Skr::SkuLoc
|
18
|
+
resources Skr::SkuTran
|
19
|
+
resources Skr::Uom
|
20
|
+
resources Skr::Vendor
|
21
|
+
|
22
|
+
|
23
|
+
resources Skr::PickTicket
|
24
|
+
resources Skr::PtLine
|
25
|
+
|
26
|
+
resources Skr::PoReceipt
|
27
|
+
resources Skr::PorLine
|
28
|
+
|
29
|
+
resources Skr::PurchaseOrder
|
30
|
+
resources Skr::PoLine
|
31
|
+
|
32
|
+
resources Skr::Voucher
|
33
|
+
resources Skr::VoLine
|
34
|
+
|
35
|
+
resources Skr::SalesOrder
|
36
|
+
resources Skr::SoLine
|
37
|
+
|
38
|
+
|
39
|
+
end
|
data/config/screens.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
Lanes::Screen.define_group 'customer' do | group |
|
2
|
+
group.title = "Customers"
|
3
|
+
group.description = "Maintain records related to Customers"
|
4
|
+
group.icon = "icon-users"
|
5
|
+
end
|
6
|
+
|
7
|
+
|
8
|
+
Lanes::Screen.define "customer-maint" do | screen |
|
9
|
+
screen.title = "Customer Maintenance"
|
10
|
+
screen.icon = "icon-wrench2"
|
11
|
+
screen.group_id = "customer"
|
12
|
+
screen.model_class = "Customer"
|
13
|
+
screen.view_class = "Skr.Screens.CustomerMaint"
|
14
|
+
screen.js = 'skr/screens/customer-maint.js'
|
15
|
+
screen.css = 'skr/screens/customer-maint.css'
|
16
|
+
end
|
17
|
+
|
data/config.ru
ADDED
data/db/.gitkeep
ADDED
File without changes
|