stockor 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/.dir-locals.el +8 -0
  3. data/Gemfile +0 -3
  4. data/Gemfile.lock +35 -47
  5. data/LICENSE-AGPL3.txt +661 -0
  6. data/client/images/skr/logo-sm.png +0 -0
  7. data/client/skr/Extension.coffee +0 -7
  8. data/client/skr/components/address/Address.coffee +0 -1
  9. data/client/skr/index.js +1 -0
  10. data/client/skr/models/Address.coffee +0 -1
  11. data/client/skr/models/Customer.coffee +0 -1
  12. data/client/skr/models/GlAccount.coffee +0 -1
  13. data/client/skr/models/GlManualEntry.coffee +0 -1
  14. data/client/skr/models/GlPeriod.coffee +0 -1
  15. data/client/skr/models/GlPosting.coffee +0 -1
  16. data/client/skr/models/GlTransaction.coffee +0 -1
  17. data/client/skr/models/IaLine.coffee +0 -1
  18. data/client/skr/models/IaReason.coffee +0 -1
  19. data/client/skr/models/InvLine.coffee +0 -1
  20. data/client/skr/models/InventoryAdjustment.coffee +0 -1
  21. data/client/skr/models/Invoice.coffee +0 -1
  22. data/client/skr/models/Location.coffee +0 -1
  23. data/client/skr/models/PaymentTerm.coffee +0 -1
  24. data/client/skr/models/PickTicket.coffee +0 -1
  25. data/client/skr/models/PoLine.coffee +0 -1
  26. data/client/skr/models/PoReceipt.coffee +0 -1
  27. data/client/skr/models/PorLine.coffee +0 -1
  28. data/client/skr/models/PtLine.coffee +0 -1
  29. data/client/skr/models/PurchaseOrder.coffee +0 -1
  30. data/client/skr/models/SalesOrder.coffee +0 -1
  31. data/client/skr/models/Sku.coffee +0 -1
  32. data/client/skr/models/SkuLoc.coffee +0 -1
  33. data/client/skr/models/SkuTran.coffee +0 -1
  34. data/client/skr/models/SkuVendor.coffee +0 -1
  35. data/client/skr/models/SoLine.coffee +0 -1
  36. data/client/skr/models/Uom.coffee +0 -1
  37. data/client/skr/models/Vendor.coffee +0 -1
  38. data/client/skr/models/VoLine.coffee +0 -1
  39. data/client/skr/models/Voucher.coffee +0 -1
  40. data/client/skr/screens/customer-maint/CustomerMaint.coffee +3 -24
  41. data/client/skr/screens/customer-maint/layout.html +1 -1
  42. data/client/skr/screens/mixins/Editing.coffee +32 -0
  43. data/client/skr/screens/mixins/index.js +1 -0
  44. data/client/skr/screens/sku-maint/SkuMaint.coffee +13 -0
  45. data/client/skr/screens/sku-maint/index.js +5 -0
  46. data/client/skr/screens/sku-maint/index.scss +8 -0
  47. data/client/skr/screens/sku-maint/layout.html +12 -0
  48. data/client/skr/screens/vendor-maint/VendorMaint.coffee +28 -0
  49. data/client/skr/screens/vendor-maint/index.js +5 -0
  50. data/client/skr/screens/vendor-maint/index.scss +8 -0
  51. data/client/skr/screens/vendor-maint/layout.html +32 -0
  52. data/client/skr/styles.scss +9 -0
  53. data/config/routes.rb +2 -0
  54. data/config/screens.rb +21 -2
  55. data/db/migrate/20140224034759_create_skr_skus.rb +1 -1
  56. data/db/seed.rb +5 -3
  57. data/lib/skr/concerns/sku_extensions.rb +52 -0
  58. data/lib/skr/configuration.rb +1 -1
  59. data/lib/skr/db/migration_helpers.rb +1 -1
  60. data/lib/skr/extension.rb +0 -8
  61. data/lib/skr/models/business_entity.rb +4 -2
  62. data/lib/skr/models/sku.rb +1 -1
  63. data/lib/skr/version.rb +1 -1
  64. data/spec/{skr → server/models}/address.rb +0 -0
  65. data/spec/{skr → server/models}/customer.rb +0 -0
  66. data/spec/{skr → server/models}/gl_account.rb +0 -0
  67. data/spec/{skr → server/models}/gl_manual_entry.rb +0 -0
  68. data/spec/{skr → server/models}/gl_period.rb +0 -0
  69. data/spec/{skr → server/models}/gl_posting.rb +0 -0
  70. data/spec/{skr → server/models}/gl_transaction.rb +0 -0
  71. data/spec/{skr → server/models}/ia_line.rb +0 -0
  72. data/spec/{skr → server/models}/ia_reason.rb +0 -0
  73. data/spec/{skr → server/models}/inv_line.rb +0 -0
  74. data/spec/{skr → server/models}/inventory_adjustment.rb +0 -0
  75. data/spec/{skr → server/models}/invoice.rb +0 -0
  76. data/spec/{skr → server/models}/location.rb +0 -0
  77. data/spec/{skr → server/models}/payment_term.rb +0 -0
  78. data/spec/{skr → server/models}/pick_ticket.rb +0 -0
  79. data/spec/{skr → server/models}/po_line.rb +0 -0
  80. data/spec/{skr → server/models}/po_receipt.rb +0 -0
  81. data/spec/{skr → server/models}/por_line.rb +0 -0
  82. data/spec/{skr → server/models}/pt_line.rb +0 -0
  83. data/spec/{skr → server/models}/purchase_order.rb +0 -0
  84. data/spec/{skr → server/models}/sales_order.rb +0 -0
  85. data/spec/{skr → server/models}/sku.rb +0 -0
  86. data/spec/{skr → server/models}/sku_loc.rb +0 -0
  87. data/spec/{skr → server/models}/sku_tran.rb +0 -0
  88. data/spec/{skr → server/models}/sku_vendor.rb +0 -0
  89. data/spec/{skr → server/models}/so_line.rb +0 -0
  90. data/spec/{skr → server/models}/spec_helper.rb +0 -0
  91. data/spec/{skr → server/models}/uom.rb +0 -0
  92. data/spec/{skr → server/models}/vendor.rb +0 -0
  93. data/spec/{skr → server/models}/vo_line.rb +0 -0
  94. data/spec/{skr → server/models}/voucher.rb +0 -0
  95. data/spec/skr/models/CustomerSpec.coffee +20 -0
  96. data/spec/skr/screens/sku-maint/SkuMaintSpec.coffee +5 -0
  97. data/stockor.gemspec +3 -3
  98. metadata +53 -40
  99. data/lib/tasks/debug-activity.rake +0 -58
  100. data/spec/skr/views/AddressSpec.coffee +0 -5
Binary file
@@ -3,10 +3,3 @@
3
3
  class Skr.Extension extends Lanes.Extensions.Base
4
4
 
5
5
  identifier: "skr"
6
-
7
- setBootstrapData: (data)->
8
-
9
-
10
- onAvailable: ->
11
- _.delay ->
12
- Lanes.Screens.display_id("customer-maint")
@@ -1,6 +1,5 @@
1
1
  class Skr.Components.Address extends Lanes.Components.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  writeTemplateName: -> 'address'
6
5
 
data/client/skr/index.js CHANGED
@@ -5,6 +5,7 @@
5
5
  //=require_tree ./views
6
6
  //=require_tree ./components
7
7
  //=require ./screens/Base
8
+ //=require ./screens/mixins
8
9
  //=require ./Extension
9
10
 
10
11
  /*
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.Address extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.Customer extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.GlAccount extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.GlManualEntry extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.GlPeriod extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.GlPosting extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.GlTransaction extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.IaLine extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.IaReason extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.InvLine extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.InventoryAdjustment extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.Invoice extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.Location extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.PaymentTerm extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.PickTicket extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.PoLine extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.PoReceipt extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.PorLine extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.PtLine extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.PurchaseOrder extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.SalesOrder extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.Sku extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.SkuLoc extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.SkuTran extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.SkuVendor extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.SoLine extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.Uom extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.Vendor extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.VoLine extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,6 +1,5 @@
1
1
  class Skr.Models.Voucher extends Skr.Models.Base
2
2
 
3
- FILE: FILE
4
3
 
5
4
  props:
6
5
  id: {"type":"integer","required":true}
@@ -1,23 +1,12 @@
1
1
  class Skr.Screens.CustomerMaint extends Skr.Screens.Base
2
2
 
3
- FILE: FILE
4
-
5
- constructor: ->
6
- super
7
- this.reset()
3
+ mixins:[
4
+ Skr.Screens.Mixins.Editing
5
+ ]
8
6
 
9
7
  useFormBindings: true
10
8
 
11
- domEvents:
12
- 'click .btn.save': 'save'
13
- 'click .btn.reset': 'reset'
14
- 'display-record': 'onRecordTrigger'
15
-
16
9
  subviews:
17
- finder:
18
- component: 'RecordFinder'
19
- options: 'finderOptions'
20
- model: 'model'
21
10
  terms:
22
11
  component: 'SelectField'
23
12
  model: 'model'
@@ -37,13 +26,3 @@ class Skr.Screens.CustomerMaint extends Skr.Screens.Base
37
26
  invalid_chars: Skr.Models.Mixins.CodeField.invalidChars
38
27
  withAssociations: ['billing_address', 'shipping_address', 'terms']
39
28
  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
@@ -1,4 +1,4 @@
1
- <div class="customer">
1
+ <div class="customer-maint">
2
2
  <%= h.toolbar buttons: ['save','reset'] %>
3
3
 
4
4
  <div class="header">
@@ -0,0 +1,32 @@
1
+ Skr.Screens.Mixins.Editing = {
2
+
3
+ included: (klass)->
4
+ klass::domEvents ||= {}
5
+ _.extend(klass::domEvents,{
6
+ 'click .btn.save': 'saveRecord'
7
+ 'click .btn.reset': 'resetRecord'
8
+ 'display-record': 'onRecordTrigger'
9
+ })
10
+
11
+ klass::subviews ||= {}
12
+ _.extend(klass::subviews,{
13
+ finder: {
14
+ component: 'RecordFinder'
15
+ options: 'finderOptions'
16
+ model: 'model'
17
+ }
18
+ })
19
+
20
+ onRecordTrigger: (ev, model)->
21
+ this.model = model
22
+
23
+ resetRecord: ->
24
+ options = _.result(this,'finderOptions')
25
+ this.model = new options.modelClass
26
+
27
+ saveRecord: ->
28
+ Lanes.Views.SaveNotify(this, include:['billing_address','shipping_address','terms'])
29
+
30
+ initialize: ->
31
+ this.resetRecord()
32
+ }
@@ -0,0 +1 @@
1
+ //=require ./Editing
@@ -0,0 +1,13 @@
1
+ class Skr.Screens.SkuMaint extends Skr.Screens.Base
2
+
3
+ mixins:[
4
+ Skr.Screens.Mixins.Editing
5
+ ]
6
+ useFormBindings: true
7
+
8
+ finderOptions: ->
9
+ modelClass: Skr.Models.Sku
10
+ title: 'Find SKU',
11
+ invalid_chars: Skr.Models.Mixins.CodeField.invalidChars
12
+ withAssociations: []
13
+ fields: ['code', 'description']
@@ -0,0 +1,5 @@
1
+ //= require_tree .
2
+
3
+ /*
4
+ Add additional requirement statements for other files that the screen uses
5
+ */
@@ -0,0 +1,8 @@
1
+ /*
2
+ If your screen does not use any custom styles
3
+
4
+ You should remove this file and it's reference from config/screens.rb
5
+
6
+ Otherwise Lanes will continue to fetch an empty file whenever
7
+ the screen is displayed
8
+ */
@@ -0,0 +1,12 @@
1
+ <div class="sku-maint">
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 'description', widths: [12,8,8,9] %>
8
+ </div>
9
+
10
+ </div>
11
+
12
+ </div>
@@ -0,0 +1,28 @@
1
+ class Skr.Screens.VendorMaint extends Skr.Screens.Base
2
+
3
+ mixins:[
4
+ Skr.Screens.Mixins.Editing
5
+ ]
6
+
7
+ useFormBindings: true
8
+
9
+ subviews:
10
+ terms:
11
+ component: 'SelectField'
12
+ model: 'model'
13
+ options: { association: 'terms', mappings: { title: 'code' } }
14
+ billaddr:
15
+ component: 'Address'
16
+ model: 'model.billing_address'
17
+ options: { field_name: 'billing_address_id' }
18
+ shipaddr:
19
+ component: 'Address'
20
+ model: 'model.shipping_address'
21
+ options: ->{ copyFrom: this.billaddr, field_name: 'shipping_address_id' }
22
+
23
+ finderOptions: ->
24
+ modelClass: Skr.Models.Vendor
25
+ title: 'Find Vendor',
26
+ invalid_chars: Skr.Models.Mixins.CodeField.invalidChars
27
+ withAssociations: ['billing_address', 'shipping_address', 'terms']
28
+ fields: [ 'code', 'name', 'notes' ]
@@ -0,0 +1,5 @@
1
+ //= require_tree .
2
+
3
+ /*
4
+ Add additional requirement statements for other files that the screen uses
5
+ */