stockor 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dir-locals.el +8 -0
- data/Gemfile +0 -3
- data/Gemfile.lock +35 -47
- data/LICENSE-AGPL3.txt +661 -0
- data/client/images/skr/logo-sm.png +0 -0
- data/client/skr/Extension.coffee +0 -7
- data/client/skr/components/address/Address.coffee +0 -1
- data/client/skr/index.js +1 -0
- data/client/skr/models/Address.coffee +0 -1
- data/client/skr/models/Customer.coffee +0 -1
- data/client/skr/models/GlAccount.coffee +0 -1
- data/client/skr/models/GlManualEntry.coffee +0 -1
- data/client/skr/models/GlPeriod.coffee +0 -1
- data/client/skr/models/GlPosting.coffee +0 -1
- data/client/skr/models/GlTransaction.coffee +0 -1
- data/client/skr/models/IaLine.coffee +0 -1
- data/client/skr/models/IaReason.coffee +0 -1
- data/client/skr/models/InvLine.coffee +0 -1
- data/client/skr/models/InventoryAdjustment.coffee +0 -1
- data/client/skr/models/Invoice.coffee +0 -1
- data/client/skr/models/Location.coffee +0 -1
- data/client/skr/models/PaymentTerm.coffee +0 -1
- data/client/skr/models/PickTicket.coffee +0 -1
- data/client/skr/models/PoLine.coffee +0 -1
- data/client/skr/models/PoReceipt.coffee +0 -1
- data/client/skr/models/PorLine.coffee +0 -1
- data/client/skr/models/PtLine.coffee +0 -1
- data/client/skr/models/PurchaseOrder.coffee +0 -1
- data/client/skr/models/SalesOrder.coffee +0 -1
- data/client/skr/models/Sku.coffee +0 -1
- data/client/skr/models/SkuLoc.coffee +0 -1
- data/client/skr/models/SkuTran.coffee +0 -1
- data/client/skr/models/SkuVendor.coffee +0 -1
- data/client/skr/models/SoLine.coffee +0 -1
- data/client/skr/models/Uom.coffee +0 -1
- data/client/skr/models/Vendor.coffee +0 -1
- data/client/skr/models/VoLine.coffee +0 -1
- data/client/skr/models/Voucher.coffee +0 -1
- data/client/skr/screens/customer-maint/CustomerMaint.coffee +3 -24
- data/client/skr/screens/customer-maint/layout.html +1 -1
- data/client/skr/screens/mixins/Editing.coffee +32 -0
- data/client/skr/screens/mixins/index.js +1 -0
- data/client/skr/screens/sku-maint/SkuMaint.coffee +13 -0
- data/client/skr/screens/sku-maint/index.js +5 -0
- data/client/skr/screens/sku-maint/index.scss +8 -0
- data/client/skr/screens/sku-maint/layout.html +12 -0
- data/client/skr/screens/vendor-maint/VendorMaint.coffee +28 -0
- data/client/skr/screens/vendor-maint/index.js +5 -0
- data/client/skr/screens/vendor-maint/index.scss +8 -0
- data/client/skr/screens/vendor-maint/layout.html +32 -0
- data/client/skr/styles.scss +9 -0
- data/config/routes.rb +2 -0
- data/config/screens.rb +21 -2
- data/db/migrate/20140224034759_create_skr_skus.rb +1 -1
- data/db/seed.rb +5 -3
- data/lib/skr/concerns/sku_extensions.rb +52 -0
- data/lib/skr/configuration.rb +1 -1
- data/lib/skr/db/migration_helpers.rb +1 -1
- data/lib/skr/extension.rb +0 -8
- data/lib/skr/models/business_entity.rb +4 -2
- data/lib/skr/models/sku.rb +1 -1
- data/lib/skr/version.rb +1 -1
- data/spec/{skr → server/models}/address.rb +0 -0
- data/spec/{skr → server/models}/customer.rb +0 -0
- data/spec/{skr → server/models}/gl_account.rb +0 -0
- data/spec/{skr → server/models}/gl_manual_entry.rb +0 -0
- data/spec/{skr → server/models}/gl_period.rb +0 -0
- data/spec/{skr → server/models}/gl_posting.rb +0 -0
- data/spec/{skr → server/models}/gl_transaction.rb +0 -0
- data/spec/{skr → server/models}/ia_line.rb +0 -0
- data/spec/{skr → server/models}/ia_reason.rb +0 -0
- data/spec/{skr → server/models}/inv_line.rb +0 -0
- data/spec/{skr → server/models}/inventory_adjustment.rb +0 -0
- data/spec/{skr → server/models}/invoice.rb +0 -0
- data/spec/{skr → server/models}/location.rb +0 -0
- data/spec/{skr → server/models}/payment_term.rb +0 -0
- data/spec/{skr → server/models}/pick_ticket.rb +0 -0
- data/spec/{skr → server/models}/po_line.rb +0 -0
- data/spec/{skr → server/models}/po_receipt.rb +0 -0
- data/spec/{skr → server/models}/por_line.rb +0 -0
- data/spec/{skr → server/models}/pt_line.rb +0 -0
- data/spec/{skr → server/models}/purchase_order.rb +0 -0
- data/spec/{skr → server/models}/sales_order.rb +0 -0
- data/spec/{skr → server/models}/sku.rb +0 -0
- data/spec/{skr → server/models}/sku_loc.rb +0 -0
- data/spec/{skr → server/models}/sku_tran.rb +0 -0
- data/spec/{skr → server/models}/sku_vendor.rb +0 -0
- data/spec/{skr → server/models}/so_line.rb +0 -0
- data/spec/{skr → server/models}/spec_helper.rb +0 -0
- data/spec/{skr → server/models}/uom.rb +0 -0
- data/spec/{skr → server/models}/vendor.rb +0 -0
- data/spec/{skr → server/models}/vo_line.rb +0 -0
- data/spec/{skr → server/models}/voucher.rb +0 -0
- data/spec/skr/models/CustomerSpec.coffee +20 -0
- data/spec/skr/screens/sku-maint/SkuMaintSpec.coffee +5 -0
- data/stockor.gemspec +3 -3
- metadata +53 -40
- data/lib/tasks/debug-activity.rake +0 -58
- data/spec/skr/views/AddressSpec.coffee +0 -5
Binary file
|
data/client/skr/Extension.coffee
CHANGED
data/client/skr/index.js
CHANGED
@@ -1,23 +1,12 @@
|
|
1
1
|
class Skr.Screens.CustomerMaint extends Skr.Screens.Base
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
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
|
@@ -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,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' ]
|