@happyvertical/smrt-commerce 0.55.7 → 0.55.8

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.
Files changed (47) hide show
  1. package/AGENTS.md +4 -0
  2. package/README.md +34 -0
  3. package/agents/customer-vendor-ui.md +31 -0
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +642 -240
  7. package/dist/index.js.map +1 -1
  8. package/dist/manifest.json +1449 -109
  9. package/dist/models/Contract.d.ts.map +1 -1
  10. package/dist/models/ContractLineItem.d.ts.map +1 -1
  11. package/dist/models/Customer.d.ts.map +1 -1
  12. package/dist/models/Fulfillment.d.ts.map +1 -1
  13. package/dist/models/FulfillmentLineItem.d.ts.map +1 -1
  14. package/dist/models/Invoice.d.ts.map +1 -1
  15. package/dist/models/InvoiceLineItem.d.ts.map +1 -1
  16. package/dist/models/Payment.d.ts.map +1 -1
  17. package/dist/models/PaymentAllocation.d.ts.map +1 -1
  18. package/dist/models/Vendor.d.ts.map +1 -1
  19. package/dist/playground.js +19 -0
  20. package/dist/playground.js.map +1 -1
  21. package/dist/recipes.d.ts +733 -19
  22. package/dist/recipes.d.ts.map +1 -1
  23. package/dist/smrt-knowledge.json +1147 -123
  24. package/dist/svelte/components/CustomerSelect.svelte +53 -0
  25. package/dist/svelte/components/CustomerSelect.svelte.d.ts +47 -0
  26. package/dist/svelte/components/CustomerSelect.svelte.d.ts.map +1 -0
  27. package/dist/svelte/components/PartySelect.svelte +138 -0
  28. package/dist/svelte/components/PartySelect.svelte.d.ts +70 -0
  29. package/dist/svelte/components/PartySelect.svelte.d.ts.map +1 -0
  30. package/dist/svelte/components/VendorSelect.svelte +53 -0
  31. package/dist/svelte/components/VendorSelect.svelte.d.ts +47 -0
  32. package/dist/svelte/components/VendorSelect.svelte.d.ts.map +1 -0
  33. package/dist/svelte/i18n.d.ts +8 -0
  34. package/dist/svelte/i18n.d.ts.map +1 -1
  35. package/dist/svelte/i18n.js +8 -0
  36. package/dist/svelte/index.d.ts +6 -0
  37. package/dist/svelte/index.d.ts.map +1 -1
  38. package/dist/svelte/index.js +6 -0
  39. package/dist/svelte/playground/PartySelectPreview.svelte +108 -0
  40. package/dist/svelte/playground/PartySelectPreview.svelte.d.ts +8 -0
  41. package/dist/svelte/playground/PartySelectPreview.svelte.d.ts.map +1 -0
  42. package/dist/svelte/playground.d.ts.map +1 -1
  43. package/dist/svelte/playground.js +19 -0
  44. package/dist/ui.d.ts.map +1 -1
  45. package/dist/ui.js +20 -0
  46. package/dist/ui.js.map +1 -1
  47. package/package.json +16 -12
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-commerce",
5
- "packageVersion": "0.55.7",
5
+ "packageVersion": "0.55.8",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-commerce:ContractCollection": {
8
8
  "name": "contractcollection",
@@ -3903,6 +3903,10 @@
3903
3903
  "contractType": {
3904
3904
  "type": "text",
3905
3905
  "required": false,
3906
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
3907
+ "_meta": {
3908
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
3909
+ },
3906
3910
  "enum": [
3907
3911
  "estimate",
3908
3912
  "order",
@@ -3980,7 +3984,10 @@
3980
3984
  "default": "USD",
3981
3985
  "description": "The currency of the amounts.",
3982
3986
  "_meta": {
3983
- "description": "The currency of the amounts."
3987
+ "description": "The currency of the amounts.",
3988
+ "ui": {
3989
+ "widget": "currency"
3990
+ }
3984
3991
  }
3985
3992
  },
3986
3993
  "issueDate": {
@@ -4022,7 +4029,10 @@
4022
4029
  "default": "",
4023
4030
  "description": "Anything worth remembering about this.",
4024
4031
  "_meta": {
4025
- "description": "Anything worth remembering about this."
4032
+ "description": "Anything worth remembering about this.",
4033
+ "ui": {
4034
+ "widget": "textarea"
4035
+ }
4026
4036
  }
4027
4037
  },
4028
4038
  "terms": {
@@ -4031,7 +4041,10 @@
4031
4041
  "default": "",
4032
4042
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4033
4043
  "_meta": {
4034
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
4044
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4045
+ "ui": {
4046
+ "widget": "textarea"
4047
+ }
4035
4048
  }
4036
4049
  },
4037
4050
  "channelId": {
@@ -4347,6 +4360,10 @@
4347
4360
  "contractType": {
4348
4361
  "type": "text",
4349
4362
  "required": false,
4363
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
4364
+ "_meta": {
4365
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
4366
+ },
4350
4367
  "enum": [
4351
4368
  "estimate",
4352
4369
  "order",
@@ -4424,7 +4441,10 @@
4424
4441
  "default": "USD",
4425
4442
  "description": "The currency of the amounts.",
4426
4443
  "_meta": {
4427
- "description": "The currency of the amounts."
4444
+ "description": "The currency of the amounts.",
4445
+ "ui": {
4446
+ "widget": "currency"
4447
+ }
4428
4448
  }
4429
4449
  },
4430
4450
  "issueDate": {
@@ -4466,7 +4486,10 @@
4466
4486
  "default": "",
4467
4487
  "description": "Anything worth remembering about this.",
4468
4488
  "_meta": {
4469
- "description": "Anything worth remembering about this."
4489
+ "description": "Anything worth remembering about this.",
4490
+ "ui": {
4491
+ "widget": "textarea"
4492
+ }
4470
4493
  }
4471
4494
  },
4472
4495
  "terms": {
@@ -4475,7 +4498,10 @@
4475
4498
  "default": "",
4476
4499
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4477
4500
  "_meta": {
4478
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
4501
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4502
+ "ui": {
4503
+ "widget": "textarea"
4504
+ }
4479
4505
  }
4480
4506
  },
4481
4507
  "channelId": {
@@ -4769,6 +4795,10 @@
4769
4795
  "contractType": {
4770
4796
  "type": "text",
4771
4797
  "required": false,
4798
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
4799
+ "_meta": {
4800
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
4801
+ },
4772
4802
  "enum": [
4773
4803
  "estimate",
4774
4804
  "order",
@@ -4846,7 +4876,10 @@
4846
4876
  "default": "USD",
4847
4877
  "description": "The currency of the amounts.",
4848
4878
  "_meta": {
4849
- "description": "The currency of the amounts."
4879
+ "description": "The currency of the amounts.",
4880
+ "ui": {
4881
+ "widget": "currency"
4882
+ }
4850
4883
  }
4851
4884
  },
4852
4885
  "issueDate": {
@@ -4888,7 +4921,10 @@
4888
4921
  "default": "",
4889
4922
  "description": "Anything worth remembering about this.",
4890
4923
  "_meta": {
4891
- "description": "Anything worth remembering about this."
4924
+ "description": "Anything worth remembering about this.",
4925
+ "ui": {
4926
+ "widget": "textarea"
4927
+ }
4892
4928
  }
4893
4929
  },
4894
4930
  "terms": {
@@ -4897,7 +4933,10 @@
4897
4933
  "default": "",
4898
4934
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4899
4935
  "_meta": {
4900
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
4936
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
4937
+ "ui": {
4938
+ "widget": "textarea"
4939
+ }
4901
4940
  }
4902
4941
  },
4903
4942
  "channelId": {
@@ -5191,6 +5230,10 @@
5191
5230
  "contractType": {
5192
5231
  "type": "text",
5193
5232
  "required": false,
5233
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
5234
+ "_meta": {
5235
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
5236
+ },
5194
5237
  "enum": [
5195
5238
  "estimate",
5196
5239
  "order",
@@ -5268,7 +5311,10 @@
5268
5311
  "default": "USD",
5269
5312
  "description": "The currency of the amounts.",
5270
5313
  "_meta": {
5271
- "description": "The currency of the amounts."
5314
+ "description": "The currency of the amounts.",
5315
+ "ui": {
5316
+ "widget": "currency"
5317
+ }
5272
5318
  }
5273
5319
  },
5274
5320
  "issueDate": {
@@ -5310,7 +5356,10 @@
5310
5356
  "default": "",
5311
5357
  "description": "Anything worth remembering about this.",
5312
5358
  "_meta": {
5313
- "description": "Anything worth remembering about this."
5359
+ "description": "Anything worth remembering about this.",
5360
+ "ui": {
5361
+ "widget": "textarea"
5362
+ }
5314
5363
  }
5315
5364
  },
5316
5365
  "terms": {
@@ -5319,7 +5368,10 @@
5319
5368
  "default": "",
5320
5369
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
5321
5370
  "_meta": {
5322
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
5371
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
5372
+ "ui": {
5373
+ "widget": "textarea"
5374
+ }
5323
5375
  }
5324
5376
  },
5325
5377
  "channelId": {
@@ -5613,6 +5665,10 @@
5613
5665
  "contractType": {
5614
5666
  "type": "text",
5615
5667
  "required": false,
5668
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
5669
+ "_meta": {
5670
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
5671
+ },
5616
5672
  "enum": [
5617
5673
  "estimate",
5618
5674
  "order",
@@ -5690,7 +5746,10 @@
5690
5746
  "default": "USD",
5691
5747
  "description": "The currency of the amounts.",
5692
5748
  "_meta": {
5693
- "description": "The currency of the amounts."
5749
+ "description": "The currency of the amounts.",
5750
+ "ui": {
5751
+ "widget": "currency"
5752
+ }
5694
5753
  }
5695
5754
  },
5696
5755
  "issueDate": {
@@ -5732,7 +5791,10 @@
5732
5791
  "default": "",
5733
5792
  "description": "Anything worth remembering about this.",
5734
5793
  "_meta": {
5735
- "description": "Anything worth remembering about this."
5794
+ "description": "Anything worth remembering about this.",
5795
+ "ui": {
5796
+ "widget": "textarea"
5797
+ }
5736
5798
  }
5737
5799
  },
5738
5800
  "terms": {
@@ -5741,7 +5803,10 @@
5741
5803
  "default": "",
5742
5804
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
5743
5805
  "_meta": {
5744
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
5806
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
5807
+ "ui": {
5808
+ "widget": "textarea"
5809
+ }
5745
5810
  }
5746
5811
  },
5747
5812
  "channelId": {
@@ -6035,6 +6100,10 @@
6035
6100
  "contractType": {
6036
6101
  "type": "text",
6037
6102
  "required": false,
6103
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
6104
+ "_meta": {
6105
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
6106
+ },
6038
6107
  "enum": [
6039
6108
  "estimate",
6040
6109
  "order",
@@ -6112,7 +6181,10 @@
6112
6181
  "default": "USD",
6113
6182
  "description": "The currency of the amounts.",
6114
6183
  "_meta": {
6115
- "description": "The currency of the amounts."
6184
+ "description": "The currency of the amounts.",
6185
+ "ui": {
6186
+ "widget": "currency"
6187
+ }
6116
6188
  }
6117
6189
  },
6118
6190
  "issueDate": {
@@ -6154,7 +6226,10 @@
6154
6226
  "default": "",
6155
6227
  "description": "Anything worth remembering about this.",
6156
6228
  "_meta": {
6157
- "description": "Anything worth remembering about this."
6229
+ "description": "Anything worth remembering about this.",
6230
+ "ui": {
6231
+ "widget": "textarea"
6232
+ }
6158
6233
  }
6159
6234
  },
6160
6235
  "terms": {
@@ -6163,7 +6238,10 @@
6163
6238
  "default": "",
6164
6239
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
6165
6240
  "_meta": {
6166
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
6241
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
6242
+ "ui": {
6243
+ "widget": "textarea"
6244
+ }
6167
6245
  }
6168
6246
  },
6169
6247
  "channelId": {
@@ -6457,6 +6535,10 @@
6457
6535
  "contractType": {
6458
6536
  "type": "text",
6459
6537
  "required": false,
6538
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
6539
+ "_meta": {
6540
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
6541
+ },
6460
6542
  "enum": [
6461
6543
  "estimate",
6462
6544
  "order",
@@ -6534,7 +6616,10 @@
6534
6616
  "default": "USD",
6535
6617
  "description": "The currency of the amounts.",
6536
6618
  "_meta": {
6537
- "description": "The currency of the amounts."
6619
+ "description": "The currency of the amounts.",
6620
+ "ui": {
6621
+ "widget": "currency"
6622
+ }
6538
6623
  }
6539
6624
  },
6540
6625
  "issueDate": {
@@ -6576,7 +6661,10 @@
6576
6661
  "default": "",
6577
6662
  "description": "Anything worth remembering about this.",
6578
6663
  "_meta": {
6579
- "description": "Anything worth remembering about this."
6664
+ "description": "Anything worth remembering about this.",
6665
+ "ui": {
6666
+ "widget": "textarea"
6667
+ }
6580
6668
  }
6581
6669
  },
6582
6670
  "terms": {
@@ -6585,7 +6673,10 @@
6585
6673
  "default": "",
6586
6674
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
6587
6675
  "_meta": {
6588
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
6676
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
6677
+ "ui": {
6678
+ "widget": "textarea"
6679
+ }
6589
6680
  }
6590
6681
  },
6591
6682
  "channelId": {
@@ -6879,6 +6970,10 @@
6879
6970
  "contractType": {
6880
6971
  "type": "text",
6881
6972
  "required": false,
6973
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
6974
+ "_meta": {
6975
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
6976
+ },
6882
6977
  "enum": [
6883
6978
  "estimate",
6884
6979
  "order",
@@ -6956,7 +7051,10 @@
6956
7051
  "default": "USD",
6957
7052
  "description": "The currency of the amounts.",
6958
7053
  "_meta": {
6959
- "description": "The currency of the amounts."
7054
+ "description": "The currency of the amounts.",
7055
+ "ui": {
7056
+ "widget": "currency"
7057
+ }
6960
7058
  }
6961
7059
  },
6962
7060
  "issueDate": {
@@ -6998,7 +7096,10 @@
6998
7096
  "default": "",
6999
7097
  "description": "Anything worth remembering about this.",
7000
7098
  "_meta": {
7001
- "description": "Anything worth remembering about this."
7099
+ "description": "Anything worth remembering about this.",
7100
+ "ui": {
7101
+ "widget": "textarea"
7102
+ }
7002
7103
  }
7003
7104
  },
7004
7105
  "terms": {
@@ -7007,7 +7108,10 @@
7007
7108
  "default": "",
7008
7109
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7009
7110
  "_meta": {
7010
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
7111
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7112
+ "ui": {
7113
+ "widget": "textarea"
7114
+ }
7011
7115
  }
7012
7116
  },
7013
7117
  "channelId": {
@@ -7317,6 +7421,10 @@
7317
7421
  "contractType": {
7318
7422
  "type": "text",
7319
7423
  "required": false,
7424
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
7425
+ "_meta": {
7426
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
7427
+ },
7320
7428
  "enum": [
7321
7429
  "estimate",
7322
7430
  "order",
@@ -7394,7 +7502,10 @@
7394
7502
  "default": "USD",
7395
7503
  "description": "The currency of the amounts.",
7396
7504
  "_meta": {
7397
- "description": "The currency of the amounts."
7505
+ "description": "The currency of the amounts.",
7506
+ "ui": {
7507
+ "widget": "currency"
7508
+ }
7398
7509
  }
7399
7510
  },
7400
7511
  "issueDate": {
@@ -7436,7 +7547,10 @@
7436
7547
  "default": "",
7437
7548
  "description": "Anything worth remembering about this.",
7438
7549
  "_meta": {
7439
- "description": "Anything worth remembering about this."
7550
+ "description": "Anything worth remembering about this.",
7551
+ "ui": {
7552
+ "widget": "textarea"
7553
+ }
7440
7554
  }
7441
7555
  },
7442
7556
  "terms": {
@@ -7445,7 +7559,10 @@
7445
7559
  "default": "",
7446
7560
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7447
7561
  "_meta": {
7448
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
7562
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7563
+ "ui": {
7564
+ "widget": "textarea"
7565
+ }
7449
7566
  }
7450
7567
  },
7451
7568
  "channelId": {
@@ -7739,6 +7856,10 @@
7739
7856
  "contractType": {
7740
7857
  "type": "text",
7741
7858
  "required": false,
7859
+ "description": "The kind of contract: order, estimate, lease, agreement and so on.",
7860
+ "_meta": {
7861
+ "description": "The kind of contract: order, estimate, lease, agreement and so on."
7862
+ },
7742
7863
  "enum": [
7743
7864
  "estimate",
7744
7865
  "order",
@@ -7816,7 +7937,10 @@
7816
7937
  "default": "USD",
7817
7938
  "description": "The currency of the amounts.",
7818
7939
  "_meta": {
7819
- "description": "The currency of the amounts."
7940
+ "description": "The currency of the amounts.",
7941
+ "ui": {
7942
+ "widget": "currency"
7943
+ }
7820
7944
  }
7821
7945
  },
7822
7946
  "issueDate": {
@@ -7858,7 +7982,10 @@
7858
7982
  "default": "",
7859
7983
  "description": "Anything worth remembering about this.",
7860
7984
  "_meta": {
7861
- "description": "Anything worth remembering about this."
7985
+ "description": "Anything worth remembering about this.",
7986
+ "ui": {
7987
+ "widget": "textarea"
7988
+ }
7862
7989
  }
7863
7990
  },
7864
7991
  "terms": {
@@ -7867,7 +7994,10 @@
7867
7994
  "default": "",
7868
7995
  "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7869
7996
  "_meta": {
7870
- "description": "The conditions agreed, such as deposits, payment or delivery conditions."
7997
+ "description": "The conditions agreed, such as deposits, payment or delivery conditions.",
7998
+ "ui": {
7999
+ "widget": "textarea"
8000
+ }
7871
8001
  }
7872
8002
  },
7873
8003
  "channelId": {
@@ -8297,22 +8427,38 @@
8297
8427
  "contractId": {
8298
8428
  "type": "foreignKey",
8299
8429
  "required": false,
8300
- "related": "Contract"
8430
+ "related": "Contract",
8431
+ "description": "The order, quote or agreement this line belongs to.",
8432
+ "_meta": {
8433
+ "description": "The order, quote or agreement this line belongs to."
8434
+ }
8301
8435
  },
8302
8436
  "description": {
8303
8437
  "type": "text",
8304
8438
  "required": false,
8305
- "default": ""
8439
+ "default": "",
8440
+ "description": "What is being sold or bought on this line.",
8441
+ "_meta": {
8442
+ "description": "What is being sold or bought on this line."
8443
+ }
8306
8444
  },
8307
8445
  "quantity": {
8308
8446
  "type": "decimal",
8309
8447
  "required": false,
8310
- "default": 1
8448
+ "default": 1,
8449
+ "description": "How many.",
8450
+ "_meta": {
8451
+ "description": "How many."
8452
+ }
8311
8453
  },
8312
8454
  "unitPrice": {
8313
8455
  "type": "integer",
8314
8456
  "required": false,
8315
- "default": 0
8457
+ "default": 0,
8458
+ "description": "The price of one, before tax.",
8459
+ "_meta": {
8460
+ "description": "The price of one, before tax."
8461
+ }
8316
8462
  },
8317
8463
  "discount": {
8318
8464
  "type": "integer",
@@ -8322,17 +8468,29 @@
8322
8468
  "taxRate": {
8323
8469
  "type": "decimal",
8324
8470
  "required": false,
8325
- "default": 0
8471
+ "default": 0,
8472
+ "description": "The tax rate for this line, as a percentage (5 means 5%).",
8473
+ "_meta": {
8474
+ "description": "The tax rate for this line, as a percentage (5 means 5%)."
8475
+ }
8326
8476
  },
8327
8477
  "amount": {
8328
8478
  "type": "integer",
8329
8479
  "required": false,
8330
- "default": 0
8480
+ "default": 0,
8481
+ "description": "The line total.",
8482
+ "_meta": {
8483
+ "description": "The line total."
8484
+ }
8331
8485
  },
8332
8486
  "productId": {
8333
8487
  "type": "crossPackageRef",
8334
8488
  "required": false,
8335
- "related": "@happyvertical/smrt-products:Product"
8489
+ "related": "@happyvertical/smrt-products:Product",
8490
+ "description": "The product this line is for, if it is one you list.",
8491
+ "_meta": {
8492
+ "description": "The product this line is for, if it is one you list."
8493
+ }
8336
8494
  },
8337
8495
  "sku": {
8338
8496
  "type": "text",
@@ -8692,7 +8850,10 @@
8692
8850
  "default": "",
8693
8851
  "description": "Anything worth remembering about this customer.",
8694
8852
  "_meta": {
8695
- "description": "Anything worth remembering about this customer."
8853
+ "description": "Anything worth remembering about this customer.",
8854
+ "ui": {
8855
+ "widget": "textarea"
8856
+ }
8696
8857
  }
8697
8858
  }
8698
8859
  },
@@ -8917,11 +9078,19 @@
8917
9078
  "contractId": {
8918
9079
  "type": "foreignKey",
8919
9080
  "required": false,
8920
- "related": "Contract"
9081
+ "related": "Contract",
9082
+ "description": "The order being fulfilled.",
9083
+ "_meta": {
9084
+ "description": "The order being fulfilled."
9085
+ }
8921
9086
  },
8922
9087
  "fulfillmentType": {
8923
9088
  "type": "text",
8924
9089
  "required": false,
9090
+ "description": "How it gets to the customer: shipment, delivery, pickup, digital or service.",
9091
+ "_meta": {
9092
+ "description": "How it gets to the customer: shipment, delivery, pickup, digital or service."
9093
+ },
8925
9094
  "enum": [
8926
9095
  "shipment",
8927
9096
  "delivery",
@@ -8933,6 +9102,10 @@
8933
9102
  "status": {
8934
9103
  "type": "text",
8935
9104
  "required": false,
9105
+ "description": "Where it stands: pending, processing, shipped, delivered or cancelled.",
9106
+ "_meta": {
9107
+ "description": "Where it stands: pending, processing, shipped, delivered or cancelled."
9108
+ },
8936
9109
  "enum": [
8937
9110
  "pending",
8938
9111
  "processing",
@@ -8944,12 +9117,20 @@
8944
9117
  "trackingNumber": {
8945
9118
  "type": "text",
8946
9119
  "required": false,
8947
- "default": ""
9120
+ "default": "",
9121
+ "description": "The carrier's tracking number.",
9122
+ "_meta": {
9123
+ "description": "The carrier's tracking number."
9124
+ }
8948
9125
  },
8949
9126
  "carrier": {
8950
9127
  "type": "text",
8951
9128
  "required": false,
8952
- "default": ""
9129
+ "default": "",
9130
+ "description": "The company carrying it.",
9131
+ "_meta": {
9132
+ "description": "The company carrying it."
9133
+ }
8953
9134
  },
8954
9135
  "shippingAddress": {
8955
9136
  "type": "json",
@@ -8957,11 +9138,19 @@
8957
9138
  },
8958
9139
  "shippedAt": {
8959
9140
  "type": "datetime",
8960
- "required": false
9141
+ "required": false,
9142
+ "description": "When it was dispatched.",
9143
+ "_meta": {
9144
+ "description": "When it was dispatched."
9145
+ }
8961
9146
  },
8962
9147
  "deliveredAt": {
8963
9148
  "type": "datetime",
8964
- "required": false
9149
+ "required": false,
9150
+ "description": "When it arrived.",
9151
+ "_meta": {
9152
+ "description": "When it arrived."
9153
+ }
8965
9154
  },
8966
9155
  "estimatedDelivery": {
8967
9156
  "type": "datetime",
@@ -8970,7 +9159,11 @@
8970
9159
  "notes": {
8971
9160
  "type": "text",
8972
9161
  "required": false,
8973
- "default": ""
9162
+ "default": "",
9163
+ "description": "Anything worth remembering about this shipment.",
9164
+ "_meta": {
9165
+ "description": "Anything worth remembering about this shipment."
9166
+ }
8974
9167
  }
8975
9168
  },
8976
9169
  "methods": {
@@ -9235,17 +9428,29 @@
9235
9428
  "fulfillmentId": {
9236
9429
  "type": "foreignKey",
9237
9430
  "required": false,
9238
- "related": "Fulfillment"
9431
+ "related": "Fulfillment",
9432
+ "description": "The shipment this line belongs to.",
9433
+ "_meta": {
9434
+ "description": "The shipment this line belongs to."
9435
+ }
9239
9436
  },
9240
9437
  "contractLineItemId": {
9241
9438
  "type": "foreignKey",
9242
9439
  "required": false,
9243
- "related": "ContractLineItem"
9440
+ "related": "ContractLineItem",
9441
+ "description": "The order line being sent.",
9442
+ "_meta": {
9443
+ "description": "The order line being sent."
9444
+ }
9244
9445
  },
9245
9446
  "quantityFulfilled": {
9246
9447
  "type": "decimal",
9247
9448
  "required": false,
9248
- "default": 1
9449
+ "default": 1,
9450
+ "description": "How many of that line are in this shipment.",
9451
+ "_meta": {
9452
+ "description": "How many of that line are in this shipment."
9453
+ }
9249
9454
  },
9250
9455
  "notes": {
9251
9456
  "type": "text",
@@ -9429,17 +9634,29 @@
9429
9634
  "customerId": {
9430
9635
  "type": "foreignKey",
9431
9636
  "required": false,
9432
- "related": "Customer"
9637
+ "related": "Customer",
9638
+ "description": "The customer being billed.",
9639
+ "_meta": {
9640
+ "description": "The customer being billed."
9641
+ }
9433
9642
  },
9434
9643
  "contractId": {
9435
9644
  "type": "foreignKey",
9436
9645
  "required": false,
9437
- "related": "Contract"
9646
+ "related": "Contract",
9647
+ "description": "The order or agreement this invoice bills for, if any.",
9648
+ "_meta": {
9649
+ "description": "The order or agreement this invoice bills for, if any."
9650
+ }
9438
9651
  },
9439
9652
  "invoiceNumber": {
9440
9653
  "type": "text",
9441
9654
  "required": false,
9442
- "default": ""
9655
+ "default": "",
9656
+ "description": "The number printed on the invoice.",
9657
+ "_meta": {
9658
+ "description": "The number printed on the invoice."
9659
+ }
9443
9660
  },
9444
9661
  "reference": {
9445
9662
  "type": "text",
@@ -9448,25 +9665,45 @@
9448
9665
  },
9449
9666
  "issueDate": {
9450
9667
  "type": "datetime",
9451
- "required": false
9668
+ "required": false,
9669
+ "description": "The date the invoice was issued.",
9670
+ "_meta": {
9671
+ "description": "The date the invoice was issued."
9672
+ }
9452
9673
  },
9453
9674
  "dueDate": {
9454
9675
  "type": "datetime",
9455
- "required": false
9676
+ "required": false,
9677
+ "description": "The date payment is expected.",
9678
+ "_meta": {
9679
+ "description": "The date payment is expected."
9680
+ }
9456
9681
  },
9457
9682
  "paidDate": {
9458
9683
  "type": "datetime",
9459
- "required": false
9684
+ "required": false,
9685
+ "description": "The date it was paid in full.",
9686
+ "_meta": {
9687
+ "description": "The date it was paid in full."
9688
+ }
9460
9689
  },
9461
9690
  "subtotal": {
9462
9691
  "type": "integer",
9463
9692
  "required": false,
9464
- "default": 0
9693
+ "default": 0,
9694
+ "description": "The amount before tax.",
9695
+ "_meta": {
9696
+ "description": "The amount before tax."
9697
+ }
9465
9698
  },
9466
9699
  "taxAmount": {
9467
9700
  "type": "integer",
9468
9701
  "required": false,
9469
- "default": 0
9702
+ "default": 0,
9703
+ "description": "The tax charged.",
9704
+ "_meta": {
9705
+ "description": "The tax charged."
9706
+ }
9470
9707
  },
9471
9708
  "providerTaxAmount": {
9472
9709
  "type": "integer",
@@ -9476,21 +9713,40 @@
9476
9713
  "totalAmount": {
9477
9714
  "type": "integer",
9478
9715
  "required": false,
9479
- "default": 0
9716
+ "default": 0,
9717
+ "description": "What the customer owes in all, tax included.",
9718
+ "_meta": {
9719
+ "description": "What the customer owes in all, tax included."
9720
+ }
9480
9721
  },
9481
9722
  "amountPaid": {
9482
9723
  "type": "integer",
9483
9724
  "required": false,
9484
- "default": 0
9725
+ "default": 0,
9726
+ "description": "How much of the total has been paid so far.",
9727
+ "_meta": {
9728
+ "description": "How much of the total has been paid so far."
9729
+ }
9485
9730
  },
9486
9731
  "currency": {
9487
9732
  "type": "text",
9488
9733
  "required": false,
9489
- "default": "CAD"
9734
+ "default": "CAD",
9735
+ "description": "The currency of the invoice.",
9736
+ "_meta": {
9737
+ "description": "The currency of the invoice.",
9738
+ "ui": {
9739
+ "widget": "currency"
9740
+ }
9741
+ }
9490
9742
  },
9491
9743
  "status": {
9492
9744
  "type": "text",
9493
9745
  "required": false,
9746
+ "description": "Where the invoice stands: draft, sent, viewed, paid, overdue or cancelled.",
9747
+ "_meta": {
9748
+ "description": "Where the invoice stands: draft, sent, viewed, paid, overdue or cancelled."
9749
+ },
9494
9750
  "enum": [
9495
9751
  "draft",
9496
9752
  "sent",
@@ -9561,17 +9817,38 @@
9561
9817
  "notes": {
9562
9818
  "type": "text",
9563
9819
  "required": false,
9564
- "default": ""
9820
+ "default": "",
9821
+ "description": "Private notes, not shown to the customer.",
9822
+ "_meta": {
9823
+ "description": "Private notes, not shown to the customer.",
9824
+ "ui": {
9825
+ "widget": "textarea"
9826
+ }
9827
+ }
9565
9828
  },
9566
9829
  "customerNotes": {
9567
9830
  "type": "text",
9568
9831
  "required": false,
9569
- "default": ""
9832
+ "default": "",
9833
+ "description": "A message shown to the customer on the invoice.",
9834
+ "_meta": {
9835
+ "description": "A message shown to the customer on the invoice.",
9836
+ "ui": {
9837
+ "widget": "textarea"
9838
+ }
9839
+ }
9570
9840
  },
9571
9841
  "terms": {
9572
9842
  "type": "text",
9573
9843
  "required": false,
9574
- "default": ""
9844
+ "default": "",
9845
+ "description": "The payment conditions, such as Net 30.",
9846
+ "_meta": {
9847
+ "description": "The payment conditions, such as Net 30.",
9848
+ "ui": {
9849
+ "widget": "textarea"
9850
+ }
9851
+ }
9575
9852
  }
9576
9853
  },
9577
9854
  "methods": {
@@ -10046,12 +10323,20 @@
10046
10323
  "invoiceId": {
10047
10324
  "type": "foreignKey",
10048
10325
  "required": false,
10049
- "related": "Invoice"
10326
+ "related": "Invoice",
10327
+ "description": "The invoice this line belongs to.",
10328
+ "_meta": {
10329
+ "description": "The invoice this line belongs to."
10330
+ }
10050
10331
  },
10051
10332
  "description": {
10052
10333
  "type": "text",
10053
10334
  "required": false,
10054
- "default": ""
10335
+ "default": "",
10336
+ "description": "What is being billed on this line.",
10337
+ "_meta": {
10338
+ "description": "What is being billed on this line."
10339
+ }
10055
10340
  },
10056
10341
  "sku": {
10057
10342
  "type": "text",
@@ -10061,7 +10346,11 @@
10061
10346
  "quantity": {
10062
10347
  "type": "decimal",
10063
10348
  "required": false,
10064
- "default": 1
10349
+ "default": 1,
10350
+ "description": "How many.",
10351
+ "_meta": {
10352
+ "description": "How many."
10353
+ }
10065
10354
  },
10066
10355
  "invoiceEditorStateJson": {
10067
10356
  "type": "text",
@@ -10071,7 +10360,11 @@
10071
10360
  "unitPrice": {
10072
10361
  "type": "integer",
10073
10362
  "required": false,
10074
- "default": 0
10363
+ "default": 0,
10364
+ "description": "The price of one, before tax.",
10365
+ "_meta": {
10366
+ "description": "The price of one, before tax."
10367
+ }
10075
10368
  },
10076
10369
  "discount": {
10077
10370
  "type": "integer",
@@ -10081,12 +10374,20 @@
10081
10374
  "taxRate": {
10082
10375
  "type": "decimal",
10083
10376
  "required": false,
10084
- "default": 0
10377
+ "default": 0,
10378
+ "description": "The tax rate for this line, as a percentage (5 means 5%).",
10379
+ "_meta": {
10380
+ "description": "The tax rate for this line, as a percentage (5 means 5%)."
10381
+ }
10085
10382
  },
10086
10383
  "amount": {
10087
10384
  "type": "integer",
10088
10385
  "required": false,
10089
- "default": 0
10386
+ "default": 0,
10387
+ "description": "The line total.",
10388
+ "_meta": {
10389
+ "description": "The line total."
10390
+ }
10090
10391
  },
10091
10392
  "sourceType": {
10092
10393
  "type": "text",
@@ -10440,26 +10741,49 @@
10440
10741
  "contractId": {
10441
10742
  "type": "foreignKey",
10442
10743
  "required": false,
10443
- "related": "Contract"
10744
+ "related": "Contract",
10745
+ "description": "The order or agreement this payment is for, if any.",
10746
+ "_meta": {
10747
+ "description": "The order or agreement this payment is for, if any."
10748
+ }
10444
10749
  },
10445
10750
  "customerId": {
10446
10751
  "type": "foreignKey",
10447
10752
  "required": false,
10448
- "related": "Customer"
10753
+ "related": "Customer",
10754
+ "description": "The customer who paid.",
10755
+ "_meta": {
10756
+ "description": "The customer who paid."
10757
+ }
10449
10758
  },
10450
10759
  "amount": {
10451
10760
  "type": "integer",
10452
10761
  "required": false,
10453
- "default": 0
10762
+ "default": 0,
10763
+ "description": "How much was paid.",
10764
+ "_meta": {
10765
+ "description": "How much was paid."
10766
+ }
10454
10767
  },
10455
10768
  "currency": {
10456
10769
  "type": "text",
10457
10770
  "required": false,
10458
- "default": "USD"
10771
+ "default": "USD",
10772
+ "description": "The currency of the payment.",
10773
+ "_meta": {
10774
+ "description": "The currency of the payment.",
10775
+ "ui": {
10776
+ "widget": "currency"
10777
+ }
10778
+ }
10459
10779
  },
10460
10780
  "method": {
10461
10781
  "type": "text",
10462
10782
  "required": false,
10783
+ "description": "How it was paid: cash, check, card, bank transfer or other.",
10784
+ "_meta": {
10785
+ "description": "How it was paid: cash, check, card, bank transfer or other."
10786
+ },
10463
10787
  "enum": [
10464
10788
  "cash",
10465
10789
  "check",
@@ -10472,6 +10796,10 @@
10472
10796
  "status": {
10473
10797
  "type": "text",
10474
10798
  "required": false,
10799
+ "description": "Whether the payment is pending, completed, failed or refunded.",
10800
+ "_meta": {
10801
+ "description": "Whether the payment is pending, completed, failed or refunded."
10802
+ },
10475
10803
  "enum": [
10476
10804
  "pending",
10477
10805
  "completed",
@@ -10488,7 +10816,11 @@
10488
10816
  "reference": {
10489
10817
  "type": "text",
10490
10818
  "required": false,
10491
- "default": ""
10819
+ "default": "",
10820
+ "description": "A reference note, such as a check number.",
10821
+ "_meta": {
10822
+ "description": "A reference note, such as a check number."
10823
+ }
10492
10824
  },
10493
10825
  "journalId": {
10494
10826
  "type": "crossPackageRef",
@@ -10497,12 +10829,23 @@
10497
10829
  },
10498
10830
  "paidAt": {
10499
10831
  "type": "datetime",
10500
- "required": false
10832
+ "required": false,
10833
+ "description": "When the money was received.",
10834
+ "_meta": {
10835
+ "description": "When the money was received."
10836
+ }
10501
10837
  },
10502
10838
  "notes": {
10503
10839
  "type": "text",
10504
10840
  "required": false,
10505
- "default": ""
10841
+ "default": "",
10842
+ "description": "Anything worth remembering about this payment.",
10843
+ "_meta": {
10844
+ "description": "Anything worth remembering about this payment.",
10845
+ "ui": {
10846
+ "widget": "textarea"
10847
+ }
10848
+ }
10506
10849
  },
10507
10850
  "externalId": {
10508
10851
  "type": "text",
@@ -10926,21 +11269,37 @@
10926
11269
  "paymentId": {
10927
11270
  "type": "foreignKey",
10928
11271
  "required": false,
10929
- "related": "Payment"
11272
+ "related": "Payment",
11273
+ "description": "The payment being applied.",
11274
+ "_meta": {
11275
+ "description": "The payment being applied."
11276
+ }
10930
11277
  },
10931
11278
  "invoiceId": {
10932
11279
  "type": "foreignKey",
10933
11280
  "required": false,
10934
- "related": "Invoice"
11281
+ "related": "Invoice",
11282
+ "description": "The invoice it settles.",
11283
+ "_meta": {
11284
+ "description": "The invoice it settles."
11285
+ }
10935
11286
  },
10936
11287
  "amount": {
10937
11288
  "type": "integer",
10938
11289
  "required": false,
10939
- "default": 0
11290
+ "default": 0,
11291
+ "description": "How much of the payment goes to this invoice.",
11292
+ "_meta": {
11293
+ "description": "How much of the payment goes to this invoice."
11294
+ }
10940
11295
  },
10941
11296
  "allocatedAt": {
10942
11297
  "type": "datetime",
10943
- "required": false
11298
+ "required": false,
11299
+ "description": "When it was applied.",
11300
+ "_meta": {
11301
+ "description": "When it was applied."
11302
+ }
10944
11303
  },
10945
11304
  "allocatedBy": {
10946
11305
  "type": "text",
@@ -10950,7 +11309,11 @@
10950
11309
  "notes": {
10951
11310
  "type": "text",
10952
11311
  "required": false,
10953
- "default": ""
11312
+ "default": "",
11313
+ "description": "Anything worth remembering about this allocation.",
11314
+ "_meta": {
11315
+ "description": "Anything worth remembering about this allocation."
11316
+ }
10954
11317
  }
10955
11318
  },
10956
11319
  "methods": {
@@ -12384,7 +12747,10 @@
12384
12747
  "default": "USD",
12385
12748
  "description": "The currency this vendor bills you in.",
12386
12749
  "_meta": {
12387
- "description": "The currency this vendor bills you in."
12750
+ "description": "The currency this vendor bills you in.",
12751
+ "ui": {
12752
+ "widget": "currency"
12753
+ }
12388
12754
  }
12389
12755
  },
12390
12756
  "defaultContactEmail": {
@@ -12393,7 +12759,10 @@
12393
12759
  "default": "",
12394
12760
  "description": "The email address you normally use to reach this vendor.",
12395
12761
  "_meta": {
12396
- "description": "The email address you normally use to reach this vendor."
12762
+ "description": "The email address you normally use to reach this vendor.",
12763
+ "ui": {
12764
+ "widget": "email"
12765
+ }
12397
12766
  }
12398
12767
  },
12399
12768
  "defaultContactPhone": {
@@ -12402,7 +12771,10 @@
12402
12771
  "default": "",
12403
12772
  "description": "The phone number you normally use to reach this vendor.",
12404
12773
  "_meta": {
12405
- "description": "The phone number you normally use to reach this vendor."
12774
+ "description": "The phone number you normally use to reach this vendor.",
12775
+ "ui": {
12776
+ "widget": "phone"
12777
+ }
12406
12778
  }
12407
12779
  },
12408
12780
  "status": {
@@ -12424,7 +12796,10 @@
12424
12796
  "default": "",
12425
12797
  "description": "Anything worth remembering about this vendor.",
12426
12798
  "_meta": {
12427
- "description": "Anything worth remembering about this vendor."
12799
+ "description": "Anything worth remembering about this vendor.",
12800
+ "ui": {
12801
+ "widget": "textarea"
12802
+ }
12428
12803
  }
12429
12804
  },
12430
12805
  "payoutAddresses": {
@@ -15005,29 +15380,167 @@
15005
15380
  "moduleType": "smrt",
15006
15381
  "recipes": [
15007
15382
  {
15008
- "id": "commerce.customers",
15009
- "className": "CustomersRecipe",
15010
- "label": "Customers",
15011
- "summary": "Keep a list of the customers you sell to.",
15383
+ "id": "commerce.agreements",
15384
+ "className": "AgreementsRecipe",
15385
+ "label": "General agreements",
15386
+ "summary": "Keep signed agreements with customers, and see every contract in one list.",
15012
15387
  "synonyms": [
15013
- "clients",
15014
- "buyers",
15015
- "accounts"
15388
+ "contracts",
15389
+ "terms",
15390
+ "deals"
15016
15391
  ],
15017
15392
  "models": [
15018
- "@happyvertical/smrt-commerce:Customer"
15393
+ "@happyvertical/smrt-commerce:Agreement",
15394
+ "@happyvertical/smrt-commerce:Contract",
15395
+ "@happyvertical/smrt-commerce:ContractLineItem"
15019
15396
  ],
15020
15397
  "nav": [
15021
15398
  {
15022
- "label": "Customers",
15023
- "model": "@happyvertical/smrt-commerce:Customer"
15399
+ "label": "Agreements",
15400
+ "model": "@happyvertical/smrt-commerce:Agreement",
15401
+ "icon": "fileText",
15402
+ "description": "Signed deals and terms with your customers, in one place."
15403
+ },
15404
+ {
15405
+ "label": "All contracts",
15406
+ "model": "@happyvertical/smrt-commerce:Contract",
15407
+ "icon": "fileText",
15408
+ "description": "Every contract you hold, whoever it is with."
15024
15409
  }
15025
15410
  ],
15026
- "requires": [],
15027
- "help": {
15028
- "markdown": "## Overview\n\nCustomers is your address book for the people and businesses you sell to. Keep\none record for each customer so you can see who they are, how they like to pay\nand what you have agreed with them, then refer back to them whenever you take an\norder.\n\n## Tasks\n\n### Add a new customer\n\n1. Choose the **New** button above the list.\n2. Describe the customer with **{field:customerType}**: a direct shopper, a\n wholesale buyer or a retail customer. Note in **{field:status}** whether you\n are still dealing with them.\n3. Fill in the **{field:defaultShippingAddress}** and\n **{field:defaultBillingAddress}** so you do not have to type them again on\n every order.\n4. Add **{field:paymentTerms}**, for example \"Net 30\", if you give this\n customer time to pay.\n5. Save. The customer is now on your list and ready to use on a sales order.\n\n### Keep track of what a customer can owe\n\n1. Open the customer from the list and choose Edit.\n2. Set **{field:creditLimit}** to the most you are comfortable letting them owe\n you at one time.\n3. If you do not charge them sales tax, turn on **{field:taxExempt}**, and keep\n their tax number on file.\n4. Use **{field:notes}** for anything the next person who deals with this\n customer should know.\n\n### Find a customer\n\nScan the list for the customer you want, or open a record to see everything you\nhave on file. To stop dealing with someone without losing their history, change\ntheir **{field:status}** to inactive instead of deleting them.\n",
15029
- "fieldRefs": [
15030
- "creditLimit",
15411
+ "requires": [
15412
+ "commerce.customers"
15413
+ ],
15414
+ "group": {
15415
+ "id": "agreements",
15416
+ "label": "Agreements",
15417
+ "summary": "Contracts with customers: general agreements, leases and licence sales."
15418
+ },
15419
+ "section": {
15420
+ "id": "agreements",
15421
+ "label": "Agreements",
15422
+ "icon": "fileText",
15423
+ "description": "Contracts, leases and licenses with customers."
15424
+ },
15425
+ "options": {
15426
+ "@happyvertical/smrt-commerce:Agreement": {
15427
+ "fields": {
15428
+ "contractType": {
15429
+ "default": "agreement",
15430
+ "visibility": "hidden",
15431
+ "locked": true
15432
+ },
15433
+ "customerId": {
15434
+ "label": "Customer",
15435
+ "order": 1,
15436
+ "required": true
15437
+ },
15438
+ "vendorId": {
15439
+ "visibility": "hidden"
15440
+ },
15441
+ "subtotal": {
15442
+ "visibility": "hidden"
15443
+ },
15444
+ "taxAmount": {
15445
+ "visibility": "hidden"
15446
+ },
15447
+ "channelId": {
15448
+ "visibility": "hidden"
15449
+ }
15450
+ }
15451
+ },
15452
+ "@happyvertical/smrt-commerce:ContractLineItem": {
15453
+ "fields": {
15454
+ "sku": {
15455
+ "visibility": "hidden"
15456
+ },
15457
+ "startDate": {
15458
+ "visibility": "hidden"
15459
+ },
15460
+ "endDate": {
15461
+ "visibility": "hidden"
15462
+ },
15463
+ "billingPeriod": {
15464
+ "visibility": "hidden"
15465
+ },
15466
+ "sortOrder": {
15467
+ "visibility": "hidden"
15468
+ },
15469
+ "discount": {
15470
+ "visibility": "hidden"
15471
+ },
15472
+ "taxRate": {
15473
+ "help": "Type a percentage: 5 means 5%."
15474
+ }
15475
+ }
15476
+ },
15477
+ "@happyvertical/smrt-commerce:Contract": {
15478
+ "fields": {
15479
+ "channelId": {
15480
+ "visibility": "hidden"
15481
+ }
15482
+ }
15483
+ }
15484
+ },
15485
+ "help": {
15486
+ "markdown": "## Overview\n\nAgreements are contracts you keep with customers. General agreements live here;\nleases and licence sales are separate recipes in the same group.\n**All contracts** lists every kind together, including orders and quotes.\n\n## Tasks\n\n### Record an agreement\n\n1. Create a new agreement.\n2. Pick the **{field:customerId}**.\n3. Set the **{field:issueDate}** and **{field:expiryDate}**.\n4. Put the conditions in **{field:terms}** and save.\n\n### Follow it\n\n1. Update **{field:status}** from draft to accepted to completed.\n2. Check **{field:expiryDate}** to spot agreements about to lapse.\n",
15487
+ "fieldRefs": [
15488
+ "customerId",
15489
+ "expiryDate",
15490
+ "issueDate",
15491
+ "status",
15492
+ "terms"
15493
+ ]
15494
+ },
15495
+ "demo": {
15496
+ "mode": "server",
15497
+ "reasons": [
15498
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15499
+ ]
15500
+ }
15501
+ },
15502
+ {
15503
+ "id": "commerce.customers",
15504
+ "className": "CustomersRecipe",
15505
+ "label": "Customers",
15506
+ "summary": "Keep a list of the people and companies you sell to.",
15507
+ "synonyms": [
15508
+ "clients",
15509
+ "buyers",
15510
+ "accounts"
15511
+ ],
15512
+ "models": [
15513
+ "@happyvertical/smrt-commerce:Customer"
15514
+ ],
15515
+ "nav": [
15516
+ {
15517
+ "label": "Customers",
15518
+ "model": "@happyvertical/smrt-commerce:Customer",
15519
+ "icon": "users",
15520
+ "description": "The people and companies you sell to, with how to reach them."
15521
+ }
15522
+ ],
15523
+ "requires": [],
15524
+ "section": {
15525
+ "id": "sales",
15526
+ "label": "Sales",
15527
+ "icon": "shoppingBag",
15528
+ "description": "Customers, orders and quotes: everything you sell."
15529
+ },
15530
+ "options": {
15531
+ "@happyvertical/smrt-commerce:Customer": {
15532
+ "fields": {
15533
+ "profileId": {
15534
+ "label": "Name",
15535
+ "order": -1
15536
+ }
15537
+ }
15538
+ }
15539
+ },
15540
+ "help": {
15541
+ "markdown": "## Overview\n\nCustomers is your address book for the people and businesses you sell to. Keep\none record for each customer so you can see who they are, how they like to pay\nand what you have agreed with them, then refer back to them whenever you take an\norder.\n\n## Tasks\n\n### Add a new customer\n\n1. Choose the **New** button above the list.\n2. Describe the customer with **{field:customerType}**: a direct shopper, a\n wholesale buyer or a retail customer. Note in **{field:status}** whether you\n are still dealing with them.\n3. Fill in the **{field:defaultShippingAddress}** and\n **{field:defaultBillingAddress}** so you do not have to type them again on\n every order.\n4. Add **{field:paymentTerms}**, for example \"Net 30\", if you give this\n customer time to pay.\n5. Save. The customer is now on your list and ready to use on a sales order.\n\n### Keep track of what a customer can owe\n\n1. Open the customer from the list and choose Edit.\n2. Set **{field:creditLimit}** to the most you are comfortable letting them owe\n you at one time.\n3. If you do not charge them sales tax, turn on **{field:taxExempt}**, and keep\n their tax number on file.\n4. Use **{field:notes}** for anything the next person who deals with this\n customer should know.\n\n### Find a customer\n\nScan the list for the customer you want, or open a record to see everything you\nhave on file. To stop dealing with someone without losing their history, change\ntheir **{field:status}** to inactive instead of deleting them.\n",
15542
+ "fieldRefs": [
15543
+ "creditLimit",
15031
15544
  "customerType",
15032
15545
  "defaultBillingAddress",
15033
15546
  "defaultShippingAddress",
@@ -15036,30 +15549,621 @@
15036
15549
  "status",
15037
15550
  "taxExempt"
15038
15551
  ]
15552
+ },
15553
+ "demo": {
15554
+ "mode": "server",
15555
+ "reasons": [
15556
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15557
+ ]
15558
+ }
15559
+ },
15560
+ {
15561
+ "id": "commerce.estimates",
15562
+ "className": "EstimatesRecipe",
15563
+ "label": "Estimates",
15564
+ "summary": "Send customers a price quote before they commit.",
15565
+ "synonyms": [
15566
+ "quotes",
15567
+ "quotations",
15568
+ "proposals",
15569
+ "bids"
15570
+ ],
15571
+ "models": [
15572
+ "@happyvertical/smrt-commerce:Estimate",
15573
+ "@happyvertical/smrt-commerce:ContractLineItem"
15574
+ ],
15575
+ "nav": [
15576
+ {
15577
+ "label": "Estimates",
15578
+ "model": "@happyvertical/smrt-commerce:Estimate",
15579
+ "icon": "fileText",
15580
+ "description": "Price quotes you have sent to customers."
15581
+ }
15582
+ ],
15583
+ "requires": [
15584
+ "commerce.customers"
15585
+ ],
15586
+ "section": {
15587
+ "id": "sales",
15588
+ "label": "Sales",
15589
+ "icon": "shoppingBag",
15590
+ "description": "Customers, orders and quotes: everything you sell."
15591
+ },
15592
+ "options": {
15593
+ "@happyvertical/smrt-commerce:Estimate": {
15594
+ "fields": {
15595
+ "contractType": {
15596
+ "default": "estimate",
15597
+ "visibility": "hidden",
15598
+ "locked": true
15599
+ },
15600
+ "vendorId": {
15601
+ "visibility": "hidden",
15602
+ "locked": true
15603
+ },
15604
+ "customerId": {
15605
+ "label": "Customer",
15606
+ "order": 1,
15607
+ "required": true
15608
+ },
15609
+ "channelId": {
15610
+ "visibility": "hidden"
15611
+ }
15612
+ }
15613
+ },
15614
+ "@happyvertical/smrt-commerce:ContractLineItem": {
15615
+ "fields": {
15616
+ "sku": {
15617
+ "visibility": "hidden"
15618
+ },
15619
+ "startDate": {
15620
+ "visibility": "hidden"
15621
+ },
15622
+ "endDate": {
15623
+ "visibility": "hidden"
15624
+ },
15625
+ "billingPeriod": {
15626
+ "visibility": "hidden"
15627
+ },
15628
+ "sortOrder": {
15629
+ "visibility": "hidden"
15630
+ },
15631
+ "discount": {
15632
+ "visibility": "hidden"
15633
+ },
15634
+ "taxRate": {
15635
+ "help": "Type a percentage: 5 means 5%."
15636
+ }
15637
+ }
15638
+ }
15639
+ },
15640
+ "help": {
15641
+ "markdown": "## Overview\n\nEstimates are price quotes you send before a customer commits. Each one belongs\nto a customer, lists its line items and shows how long the price is good for.\n\n## Tasks\n\n### Write an estimate\n\n1. Create a new estimate.\n2. Pick the **{field:customerId}** the quote is for.\n3. Add the line items, then check the **{field:totalAmount}**.\n4. Set **{field:expiryDate}** to the last day the price is good for.\n5. Put your conditions in **{field:terms}** and save.\n\n### Follow it up\n\n1. Set **{field:status}** to sent once it goes out.\n2. Move it to accepted or declined when the customer answers.\n",
15642
+ "fieldRefs": [
15643
+ "customerId",
15644
+ "expiryDate",
15645
+ "status",
15646
+ "terms",
15647
+ "totalAmount"
15648
+ ]
15649
+ },
15650
+ "demo": {
15651
+ "mode": "server",
15652
+ "reasons": [
15653
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15654
+ ]
15655
+ }
15656
+ },
15657
+ {
15658
+ "id": "commerce.fulfillment",
15659
+ "className": "FulfillmentRecipe",
15660
+ "label": "Shipping",
15661
+ "summary": "Pack, ship and deliver orders, with tracking.",
15662
+ "synonyms": [
15663
+ "fulfillment",
15664
+ "delivery",
15665
+ "shipments",
15666
+ "tracking"
15667
+ ],
15668
+ "models": [
15669
+ "@happyvertical/smrt-commerce:Fulfillment",
15670
+ "@happyvertical/smrt-commerce:FulfillmentLineItem"
15671
+ ],
15672
+ "nav": [
15673
+ {
15674
+ "label": "Shipments",
15675
+ "model": "@happyvertical/smrt-commerce:Fulfillment",
15676
+ "icon": "truck",
15677
+ "description": "What has gone out the door and where it is now."
15678
+ }
15679
+ ],
15680
+ "requires": [],
15681
+ "requiresAny": [
15682
+ [
15683
+ "commerce.sales",
15684
+ "commerce.wholesale"
15685
+ ]
15686
+ ],
15687
+ "group": {
15688
+ "id": "billing",
15689
+ "label": "Billing & shipping",
15690
+ "summary": "Invoice your customers, record what they pay and ship what they ordered."
15691
+ },
15692
+ "section": {
15693
+ "id": "operations",
15694
+ "label": "Operations",
15695
+ "icon": "wrench",
15696
+ "description": "Fulfillment and the day-to-day work behind an order."
15697
+ },
15698
+ "options": {
15699
+ "@happyvertical/smrt-commerce:Fulfillment": {
15700
+ "fields": {
15701
+ "estimatedDelivery": {
15702
+ "visibility": "hidden"
15703
+ },
15704
+ "shippingAddress": {
15705
+ "visibility": "hidden"
15706
+ }
15707
+ }
15708
+ },
15709
+ "@happyvertical/smrt-commerce:FulfillmentLineItem": {
15710
+ "fields": {
15711
+ "notes": {
15712
+ "visibility": "hidden"
15713
+ }
15714
+ }
15715
+ }
15716
+ },
15717
+ "help": {
15718
+ "markdown": "## Overview\n\nShipping tracks how an order gets to the customer. Each shipment belongs to an\norder and lists which line items are in it, so an order can go out in parts.\n\n## Tasks\n\n### Ship an order\n\n1. Create a new shipment.\n2. Pick the order in **{field:contractId}** and choose the\n **{field:fulfillmentType}**.\n3. Enter the **{field:carrier}** and **{field:trackingNumber}**.\n4. List the items and quantities in the shipment.\n5. Set **{field:status}** to shipped and record **{field:shippedAt}**.\n\n### Confirm delivery\n\n1. Open the shipment and set **{field:status}** to delivered.\n2. Record **{field:deliveredAt}**.\n",
15719
+ "fieldRefs": [
15720
+ "carrier",
15721
+ "contractId",
15722
+ "deliveredAt",
15723
+ "fulfillmentType",
15724
+ "shippedAt",
15725
+ "status",
15726
+ "trackingNumber"
15727
+ ]
15728
+ },
15729
+ "demo": {
15730
+ "mode": "server",
15731
+ "reasons": [
15732
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15733
+ ]
15734
+ }
15735
+ },
15736
+ {
15737
+ "id": "commerce.invoicing",
15738
+ "className": "InvoicingRecipe",
15739
+ "label": "Invoicing",
15740
+ "summary": "Bill customers and record the payments that come in.",
15741
+ "synonyms": [
15742
+ "invoices",
15743
+ "billing",
15744
+ "payments",
15745
+ "receivables"
15746
+ ],
15747
+ "models": [
15748
+ "@happyvertical/smrt-commerce:Invoice",
15749
+ "@happyvertical/smrt-commerce:InvoiceLineItem",
15750
+ "@happyvertical/smrt-commerce:Payment",
15751
+ "@happyvertical/smrt-commerce:PaymentAllocation"
15752
+ ],
15753
+ "nav": [
15754
+ {
15755
+ "label": "Invoices",
15756
+ "model": "@happyvertical/smrt-commerce:Invoice",
15757
+ "icon": "receipt",
15758
+ "description": "Bills you have sent and which ones are still waiting to be paid."
15759
+ },
15760
+ {
15761
+ "label": "Payments",
15762
+ "model": "@happyvertical/smrt-commerce:Payment",
15763
+ "icon": "creditCard",
15764
+ "description": "Money received, matched to the invoices it paid."
15765
+ }
15766
+ ],
15767
+ "requires": [
15768
+ "commerce.customers"
15769
+ ],
15770
+ "group": {
15771
+ "id": "billing",
15772
+ "label": "Billing & shipping",
15773
+ "summary": "Invoice your customers, record what they pay and ship what they ordered."
15774
+ },
15775
+ "section": {
15776
+ "id": "billing",
15777
+ "label": "Billing",
15778
+ "icon": "receipt",
15779
+ "description": "Invoices and the payments against them."
15780
+ },
15781
+ "options": {
15782
+ "@happyvertical/smrt-commerce:Invoice": {
15783
+ "fields": {
15784
+ "providerTaxAmount": {
15785
+ "visibility": "hidden"
15786
+ },
15787
+ "arJournalId": {
15788
+ "visibility": "hidden"
15789
+ },
15790
+ "revenueJournalId": {
15791
+ "visibility": "hidden"
15792
+ },
15793
+ "externalId": {
15794
+ "visibility": "hidden"
15795
+ },
15796
+ "customerExternalId": {
15797
+ "visibility": "hidden"
15798
+ },
15799
+ "externalProvider": {
15800
+ "visibility": "hidden"
15801
+ },
15802
+ "syncedAt": {
15803
+ "visibility": "hidden"
15804
+ },
15805
+ "collectionMethod": {
15806
+ "visibility": "hidden"
15807
+ },
15808
+ "sentAt": {
15809
+ "visibility": "hidden"
15810
+ },
15811
+ "viewedAt": {
15812
+ "visibility": "hidden"
15813
+ },
15814
+ "remindersSent": {
15815
+ "visibility": "hidden"
15816
+ },
15817
+ "lastReminderAt": {
15818
+ "visibility": "hidden"
15819
+ },
15820
+ "reference": {
15821
+ "visibility": "hidden"
15822
+ },
15823
+ "customerId": {
15824
+ "required": true
15825
+ }
15826
+ }
15827
+ },
15828
+ "@happyvertical/smrt-commerce:InvoiceLineItem": {
15829
+ "fields": {
15830
+ "invoiceEditorStateJson": {
15831
+ "visibility": "hidden"
15832
+ },
15833
+ "sourceType": {
15834
+ "visibility": "hidden"
15835
+ },
15836
+ "sourceId": {
15837
+ "visibility": "hidden"
15838
+ },
15839
+ "periodStart": {
15840
+ "visibility": "hidden"
15841
+ },
15842
+ "periodEnd": {
15843
+ "visibility": "hidden"
15844
+ },
15845
+ "revenueAccountId": {
15846
+ "visibility": "hidden"
15847
+ },
15848
+ "sortOrder": {
15849
+ "visibility": "hidden"
15850
+ },
15851
+ "sku": {
15852
+ "visibility": "hidden"
15853
+ },
15854
+ "discount": {
15855
+ "visibility": "hidden"
15856
+ },
15857
+ "taxRate": {
15858
+ "help": "Type a percentage: 5 means 5%."
15859
+ }
15860
+ }
15861
+ },
15862
+ "@happyvertical/smrt-commerce:Payment": {
15863
+ "fields": {
15864
+ "journalId": {
15865
+ "visibility": "hidden"
15866
+ },
15867
+ "externalId": {
15868
+ "visibility": "hidden"
15869
+ },
15870
+ "externalProvider": {
15871
+ "visibility": "hidden"
15872
+ },
15873
+ "syncedAt": {
15874
+ "visibility": "hidden"
15875
+ },
15876
+ "backendId": {
15877
+ "visibility": "hidden"
15878
+ },
15879
+ "backendTxRef": {
15880
+ "visibility": "hidden"
15881
+ },
15882
+ "nativeAmount": {
15883
+ "visibility": "hidden"
15884
+ },
15885
+ "nativeCurrency": {
15886
+ "visibility": "hidden"
15887
+ },
15888
+ "usdAtQuote": {
15889
+ "visibility": "hidden"
15890
+ },
15891
+ "usdAtConfirmation": {
15892
+ "visibility": "hidden"
15893
+ },
15894
+ "transactionId": {
15895
+ "visibility": "hidden"
15896
+ }
15897
+ }
15898
+ },
15899
+ "@happyvertical/smrt-commerce:PaymentAllocation": {
15900
+ "fields": {
15901
+ "allocatedBy": {
15902
+ "visibility": "hidden"
15903
+ }
15904
+ }
15905
+ }
15906
+ },
15907
+ "help": {
15908
+ "markdown": "## Overview\n\nInvoicing bills your customers and records what they pay. An invoice lists its\nline items; a payment can be spread across one or more invoices.\n\n## Tasks\n\n### Send an invoice\n\n1. Create a new invoice.\n2. Pick the **{field:customerId}** and add the line items.\n3. Check the **{field:totalAmount}** and set the **{field:dueDate}**.\n4. Set **{field:status}** to sent once it goes out.\n\n### Record a payment\n\n1. Create a new payment.\n2. Pick the **{field:customerId}**, then enter the **{field:Payment.amount}** and the\n **{field:method}** used.\n3. Set **{field:Payment.status}** to completed once the money has arrived.\n4. Apply it to the invoices it settles; each one shows what is still owed.\n",
15909
+ "fieldRefs": [
15910
+ "Payment.amount",
15911
+ "Payment.status",
15912
+ "customerId",
15913
+ "dueDate",
15914
+ "method",
15915
+ "status",
15916
+ "totalAmount"
15917
+ ]
15918
+ },
15919
+ "demo": {
15920
+ "mode": "server",
15921
+ "reasons": [
15922
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
15923
+ ]
15924
+ }
15925
+ },
15926
+ {
15927
+ "id": "commerce.leases",
15928
+ "className": "LeasesRecipe",
15929
+ "label": "Leases",
15930
+ "summary": "Rent things out and track the term and the payments due.",
15931
+ "synonyms": [
15932
+ "rentals",
15933
+ "renting",
15934
+ "hire"
15935
+ ],
15936
+ "models": [
15937
+ "@happyvertical/smrt-commerce:Lease",
15938
+ "@happyvertical/smrt-commerce:ContractLineItem"
15939
+ ],
15940
+ "nav": [
15941
+ {
15942
+ "label": "Leases",
15943
+ "model": "@happyvertical/smrt-commerce:Lease",
15944
+ "icon": "home",
15945
+ "description": "Rentals you give or take, with terms and dates."
15946
+ }
15947
+ ],
15948
+ "requires": [
15949
+ "commerce.customers"
15950
+ ],
15951
+ "group": {
15952
+ "id": "agreements",
15953
+ "label": "Agreements",
15954
+ "summary": "Contracts with customers: general agreements, leases and licence sales."
15955
+ },
15956
+ "section": {
15957
+ "id": "agreements",
15958
+ "label": "Agreements",
15959
+ "icon": "fileText",
15960
+ "description": "Contracts, leases and licenses with customers."
15961
+ },
15962
+ "options": {
15963
+ "@happyvertical/smrt-commerce:Lease": {
15964
+ "fields": {
15965
+ "contractType": {
15966
+ "default": "lease",
15967
+ "visibility": "hidden",
15968
+ "locked": true
15969
+ },
15970
+ "customerId": {
15971
+ "label": "Customer",
15972
+ "order": 1,
15973
+ "required": true
15974
+ },
15975
+ "vendorId": {
15976
+ "visibility": "hidden"
15977
+ },
15978
+ "subtotal": {
15979
+ "visibility": "hidden"
15980
+ },
15981
+ "taxAmount": {
15982
+ "visibility": "hidden"
15983
+ },
15984
+ "channelId": {
15985
+ "visibility": "hidden"
15986
+ }
15987
+ }
15988
+ },
15989
+ "@happyvertical/smrt-commerce:ContractLineItem": {
15990
+ "fields": {
15991
+ "sku": {
15992
+ "visibility": "hidden"
15993
+ },
15994
+ "startDate": {
15995
+ "visibility": "hidden"
15996
+ },
15997
+ "endDate": {
15998
+ "visibility": "hidden"
15999
+ },
16000
+ "billingPeriod": {
16001
+ "visibility": "hidden"
16002
+ },
16003
+ "sortOrder": {
16004
+ "visibility": "hidden"
16005
+ },
16006
+ "discount": {
16007
+ "visibility": "hidden"
16008
+ },
16009
+ "taxRate": {
16010
+ "help": "Type a percentage: 5 means 5%."
16011
+ }
16012
+ }
16013
+ }
16014
+ },
16015
+ "help": {
16016
+ "markdown": "## Overview\n\nLeases are agreements where a customer rents something from you for a period.\nEach lease keeps its own line items and dates.\n\n## Tasks\n\n### Record a lease\n\n1. Create a new lease.\n2. Pick the **{field:customerId}** renting from you.\n3. Set the **{field:issueDate}** it starts and the **{field:expiryDate}** it ends.\n4. Add a line item for each thing rented, then save.\n\n### Keep an eye on it\n\n1. Update **{field:status}** as the lease goes from draft to accepted to\n completed.\n2. Check **{field:expiryDate}** to see which leases end soon.\n",
16017
+ "fieldRefs": [
16018
+ "customerId",
16019
+ "expiryDate",
16020
+ "issueDate",
16021
+ "status"
16022
+ ]
16023
+ },
16024
+ "demo": {
16025
+ "mode": "server",
16026
+ "reasons": [
16027
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16028
+ ]
16029
+ }
16030
+ },
16031
+ {
16032
+ "id": "commerce.licenses",
16033
+ "className": "LicensesRecipe",
16034
+ "label": "Licence sales",
16035
+ "summary": "Sell licences to software, content or other rights.",
16036
+ "synonyms": [
16037
+ "licenses",
16038
+ "licensing",
16039
+ "subscriptions"
16040
+ ],
16041
+ "models": [
16042
+ "@happyvertical/smrt-commerce:LicenseSale",
16043
+ "@happyvertical/smrt-commerce:ContractLineItem"
16044
+ ],
16045
+ "nav": [
16046
+ {
16047
+ "label": "Licence sales",
16048
+ "model": "@happyvertical/smrt-commerce:LicenseSale",
16049
+ "icon": "shoppingBag",
16050
+ "description": "Licences you have sold and who holds them."
16051
+ }
16052
+ ],
16053
+ "requires": [
16054
+ "commerce.customers"
16055
+ ],
16056
+ "group": {
16057
+ "id": "agreements",
16058
+ "label": "Agreements",
16059
+ "summary": "Contracts with customers: general agreements, leases and licence sales."
16060
+ },
16061
+ "section": {
16062
+ "id": "agreements",
16063
+ "label": "Agreements",
16064
+ "icon": "fileText",
16065
+ "description": "Contracts, leases and licenses with customers."
16066
+ },
16067
+ "options": {
16068
+ "@happyvertical/smrt-commerce:LicenseSale": {
16069
+ "fields": {
16070
+ "contractType": {
16071
+ "default": "license_sale",
16072
+ "visibility": "hidden",
16073
+ "locked": true
16074
+ },
16075
+ "customerId": {
16076
+ "label": "Customer",
16077
+ "order": 1,
16078
+ "required": true
16079
+ },
16080
+ "vendorId": {
16081
+ "visibility": "hidden"
16082
+ },
16083
+ "subtotal": {
16084
+ "visibility": "hidden"
16085
+ },
16086
+ "taxAmount": {
16087
+ "visibility": "hidden"
16088
+ },
16089
+ "channelId": {
16090
+ "visibility": "hidden"
16091
+ }
16092
+ }
16093
+ },
16094
+ "@happyvertical/smrt-commerce:ContractLineItem": {
16095
+ "fields": {
16096
+ "sku": {
16097
+ "visibility": "hidden"
16098
+ },
16099
+ "startDate": {
16100
+ "visibility": "hidden"
16101
+ },
16102
+ "endDate": {
16103
+ "visibility": "hidden"
16104
+ },
16105
+ "billingPeriod": {
16106
+ "visibility": "hidden"
16107
+ },
16108
+ "sortOrder": {
16109
+ "visibility": "hidden"
16110
+ },
16111
+ "discount": {
16112
+ "visibility": "hidden"
16113
+ },
16114
+ "taxRate": {
16115
+ "help": "Type a percentage: 5 means 5%."
16116
+ }
16117
+ }
16118
+ }
16119
+ },
16120
+ "help": {
16121
+ "markdown": "## Overview\n\nLicence sales record selling the right to use something, such as software or\ncontent, rather than a physical item.\n\n## Tasks\n\n### Record a licence sale\n\n1. Create a new licence sale.\n2. Pick the **{field:customerId}** who bought the licence.\n3. Add a line item for what is licensed and check the **{field:totalAmount}**.\n4. Set the **{field:expiryDate}** if the licence runs out, then save.\n\n### Follow it\n\n1. Update **{field:status}** when the customer accepts or the sale completes.\n",
16122
+ "fieldRefs": [
16123
+ "customerId",
16124
+ "expiryDate",
16125
+ "status",
16126
+ "totalAmount"
16127
+ ]
16128
+ },
16129
+ "demo": {
16130
+ "mode": "server",
16131
+ "reasons": [
16132
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16133
+ ]
15039
16134
  }
15040
16135
  },
15041
16136
  {
15042
16137
  "id": "commerce.purchases",
15043
16138
  "className": "PurchasesRecipe",
15044
16139
  "label": "Purchases",
15045
- "summary": "Place orders with vendors and track them.",
16140
+ "summary": "Order from your vendors and track what you have bought.",
15046
16141
  "synonyms": [
15047
16142
  "purchase orders",
15048
16143
  "buying",
15049
16144
  "procurement"
15050
16145
  ],
15051
16146
  "models": [
15052
- "@happyvertical/smrt-commerce:PurchaseOrder"
16147
+ "@happyvertical/smrt-commerce:PurchaseOrder",
16148
+ "@happyvertical/smrt-commerce:ContractLineItem"
15053
16149
  ],
15054
16150
  "nav": [
15055
16151
  {
15056
- "label": "Purchase Orders",
15057
- "model": "@happyvertical/smrt-commerce:PurchaseOrder"
16152
+ "label": "Purchase orders",
16153
+ "model": "@happyvertical/smrt-commerce:PurchaseOrder",
16154
+ "icon": "truck",
16155
+ "description": "What you have ordered from your suppliers and when it arrives."
15058
16156
  }
15059
16157
  ],
15060
16158
  "requires": [
15061
16159
  "commerce.vendors"
15062
16160
  ],
16161
+ "section": {
16162
+ "id": "purchasing",
16163
+ "label": "Purchasing",
16164
+ "icon": "truck",
16165
+ "description": "Vendors and purchase orders: everything you buy."
16166
+ },
15063
16167
  "options": {
15064
16168
  "@happyvertical/smrt-commerce:PurchaseOrder": {
15065
16169
  "fields": {
@@ -15075,6 +16179,37 @@
15075
16179
  "vendorId": {
15076
16180
  "label": "Vendor",
15077
16181
  "order": 1
16182
+ },
16183
+ "channelId": {
16184
+ "visibility": "hidden"
16185
+ },
16186
+ "expiryDate": {
16187
+ "visibility": "hidden"
16188
+ }
16189
+ }
16190
+ },
16191
+ "@happyvertical/smrt-commerce:ContractLineItem": {
16192
+ "fields": {
16193
+ "sku": {
16194
+ "visibility": "hidden"
16195
+ },
16196
+ "startDate": {
16197
+ "visibility": "hidden"
16198
+ },
16199
+ "endDate": {
16200
+ "visibility": "hidden"
16201
+ },
16202
+ "billingPeriod": {
16203
+ "visibility": "hidden"
16204
+ },
16205
+ "sortOrder": {
16206
+ "visibility": "hidden"
16207
+ },
16208
+ "discount": {
16209
+ "visibility": "hidden"
16210
+ },
16211
+ "taxRate": {
16212
+ "help": "Type a percentage: 5 means 5%."
15078
16213
  }
15079
16214
  }
15080
16215
  }
@@ -15094,6 +16229,12 @@
15094
16229
  "totalAmount",
15095
16230
  "vendorId"
15096
16231
  ]
16232
+ },
16233
+ "demo": {
16234
+ "mode": "server",
16235
+ "reasons": [
16236
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16237
+ ]
15097
16238
  }
15098
16239
  },
15099
16240
  {
@@ -15107,17 +16248,26 @@
15107
16248
  "customer orders"
15108
16249
  ],
15109
16250
  "models": [
15110
- "@happyvertical/smrt-commerce:Order"
16251
+ "@happyvertical/smrt-commerce:Order",
16252
+ "@happyvertical/smrt-commerce:ContractLineItem"
15111
16253
  ],
15112
16254
  "nav": [
15113
16255
  {
15114
- "label": "Sales Orders",
15115
- "model": "@happyvertical/smrt-commerce:Order"
16256
+ "label": "Sales orders",
16257
+ "model": "@happyvertical/smrt-commerce:Order",
16258
+ "icon": "shoppingBag",
16259
+ "description": "Orders from your customers, from placed to delivered."
15116
16260
  }
15117
16261
  ],
15118
16262
  "requires": [
15119
16263
  "commerce.customers"
15120
16264
  ],
16265
+ "section": {
16266
+ "id": "sales",
16267
+ "label": "Sales",
16268
+ "icon": "shoppingBag",
16269
+ "description": "Customers, orders and quotes: everything you sell."
16270
+ },
15121
16271
  "options": {
15122
16272
  "@happyvertical/smrt-commerce:Order": {
15123
16273
  "fields": {
@@ -15132,7 +16282,39 @@
15132
16282
  },
15133
16283
  "customerId": {
15134
16284
  "label": "Customer",
15135
- "order": 1
16285
+ "order": 1,
16286
+ "required": true
16287
+ },
16288
+ "channelId": {
16289
+ "visibility": "hidden"
16290
+ },
16291
+ "expiryDate": {
16292
+ "visibility": "hidden"
16293
+ }
16294
+ }
16295
+ },
16296
+ "@happyvertical/smrt-commerce:ContractLineItem": {
16297
+ "fields": {
16298
+ "sku": {
16299
+ "visibility": "hidden"
16300
+ },
16301
+ "startDate": {
16302
+ "visibility": "hidden"
16303
+ },
16304
+ "endDate": {
16305
+ "visibility": "hidden"
16306
+ },
16307
+ "billingPeriod": {
16308
+ "visibility": "hidden"
16309
+ },
16310
+ "sortOrder": {
16311
+ "visibility": "hidden"
16312
+ },
16313
+ "discount": {
16314
+ "visibility": "hidden"
16315
+ },
16316
+ "taxRate": {
16317
+ "help": "Type a percentage: 5 means 5%."
15136
16318
  }
15137
16319
  }
15138
16320
  }
@@ -15152,13 +16334,19 @@
15152
16334
  "terms",
15153
16335
  "totalAmount"
15154
16336
  ]
16337
+ },
16338
+ "demo": {
16339
+ "mode": "server",
16340
+ "reasons": [
16341
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16342
+ ]
15155
16343
  }
15156
16344
  },
15157
16345
  {
15158
16346
  "id": "commerce.vendors",
15159
16347
  "className": "VendorsRecipe",
15160
16348
  "label": "Vendors",
15161
- "summary": "Keep a list of the vendors and suppliers you buy from.",
16349
+ "summary": "Keep a list of the suppliers you buy from.",
15162
16350
  "synonyms": [
15163
16351
  "suppliers",
15164
16352
  "sellers"
@@ -15169,10 +16357,28 @@
15169
16357
  "nav": [
15170
16358
  {
15171
16359
  "label": "Vendors",
15172
- "model": "@happyvertical/smrt-commerce:Vendor"
16360
+ "model": "@happyvertical/smrt-commerce:Vendor",
16361
+ "icon": "briefcase",
16362
+ "description": "The suppliers you buy from, with terms and contacts."
15173
16363
  }
15174
16364
  ],
15175
16365
  "requires": [],
16366
+ "section": {
16367
+ "id": "purchasing",
16368
+ "label": "Purchasing",
16369
+ "icon": "truck",
16370
+ "description": "Vendors and purchase orders: everything you buy."
16371
+ },
16372
+ "options": {
16373
+ "@happyvertical/smrt-commerce:Vendor": {
16374
+ "fields": {
16375
+ "profileId": {
16376
+ "label": "Name",
16377
+ "order": -1
16378
+ }
16379
+ }
16380
+ }
16381
+ },
15176
16382
  "help": {
15177
16383
  "markdown": "## Overview\n\nVendors is your list of the suppliers you buy from. Each record holds who they\nare, how to reach them and the terms you have agreed, so you can order from them\nquickly and keep track of what you have bought.\n\n## Tasks\n\n### Add a vendor\n\n1. Choose the **New** button above the list.\n2. Enter **{field:defaultContactEmail}** and **{field:defaultContactPhone}** for\n the person you normally deal with.\n3. Set the **{field:currency}** they bill you in and your **{field:paymentTerms}**,\n for example \"Net 30\".\n4. Save. The vendor is now on your list and ready to use on a purchase order.\n\n### Note how a vendor likes to work\n\n1. Open the vendor from the list and choose Edit.\n2. Enter **{field:leadTimeDays}**, the number of days they usually need between\n your order and delivery, so you can plan ahead.\n3. Enter **{field:minimumOrderAmount}** if they will not accept small orders.\n4. Use **{field:notes}** for anything else worth remembering, such as the best\n time to call.\n\n### Keep payment details in one place\n\n1. Open the vendor and choose Edit.\n2. Record where payments to this vendor should be sent, so it is all in one\n place.\n3. Set **{field:status}** to show whether you still buy from them: active,\n inactive or suspended.\n",
15178
16384
  "fieldRefs": [
@@ -15185,9 +16391,127 @@
15185
16391
  "paymentTerms",
15186
16392
  "status"
15187
16393
  ]
16394
+ },
16395
+ "demo": {
16396
+ "mode": "server",
16397
+ "reasons": [
16398
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16399
+ ]
16400
+ }
16401
+ },
16402
+ {
16403
+ "id": "commerce.wholesale",
16404
+ "className": "WholesaleRecipe",
16405
+ "label": "Wholesale orders",
16406
+ "summary": "Take bulk orders from trade customers.",
16407
+ "synonyms": [
16408
+ "bulk orders",
16409
+ "trade orders",
16410
+ "b2b"
16411
+ ],
16412
+ "models": [
16413
+ "@happyvertical/smrt-commerce:WholesaleOrder",
16414
+ "@happyvertical/smrt-commerce:ContractLineItem"
16415
+ ],
16416
+ "nav": [
16417
+ {
16418
+ "label": "Wholesale orders",
16419
+ "model": "@happyvertical/smrt-commerce:WholesaleOrder",
16420
+ "icon": "shoppingBag",
16421
+ "description": "Bulk orders from cafes, shops and other businesses."
16422
+ }
16423
+ ],
16424
+ "requires": [
16425
+ "commerce.customers"
16426
+ ],
16427
+ "section": {
16428
+ "id": "sales",
16429
+ "label": "Sales",
16430
+ "icon": "shoppingBag",
16431
+ "description": "Customers, orders and quotes: everything you sell."
16432
+ },
16433
+ "options": {
16434
+ "@happyvertical/smrt-commerce:WholesaleOrder": {
16435
+ "fields": {
16436
+ "contractType": {
16437
+ "default": "wholesale_order",
16438
+ "visibility": "hidden",
16439
+ "locked": true
16440
+ },
16441
+ "vendorId": {
16442
+ "visibility": "hidden",
16443
+ "locked": true
16444
+ },
16445
+ "customerId": {
16446
+ "label": "Customer",
16447
+ "order": 1
16448
+ },
16449
+ "channelId": {
16450
+ "visibility": "hidden"
16451
+ },
16452
+ "expiryDate": {
16453
+ "visibility": "hidden"
16454
+ }
16455
+ }
16456
+ },
16457
+ "@happyvertical/smrt-commerce:ContractLineItem": {
16458
+ "fields": {
16459
+ "sku": {
16460
+ "visibility": "hidden"
16461
+ },
16462
+ "startDate": {
16463
+ "visibility": "hidden"
16464
+ },
16465
+ "endDate": {
16466
+ "visibility": "hidden"
16467
+ },
16468
+ "billingPeriod": {
16469
+ "visibility": "hidden"
16470
+ },
16471
+ "sortOrder": {
16472
+ "visibility": "hidden"
16473
+ },
16474
+ "discount": {
16475
+ "visibility": "hidden"
16476
+ },
16477
+ "taxRate": {
16478
+ "help": "Type a percentage: 5 means 5%."
16479
+ }
16480
+ }
16481
+ }
16482
+ },
16483
+ "help": {
16484
+ "markdown": "## Overview\n\nWholesale orders are bulk orders from trade customers. They work like sales\norders, with a list of line items, but are kept in their own list so trade and\nretail sales stay apart.\n\n## Tasks\n\n### Take a wholesale order\n\n1. Create a new wholesale order.\n2. Pick the **{field:customerId}** placing the order.\n3. Add the line items and check the **{field:totalAmount}**.\n4. Set the **{field:dueDate}** for payment and save.\n\n### Track it\n\n1. Update **{field:status}** as the order moves from draft to completed.\n2. Use **{field:reference}** for the buyer's own order number.\n",
16485
+ "fieldRefs": [
16486
+ "customerId",
16487
+ "dueDate",
16488
+ "reference",
16489
+ "status",
16490
+ "totalAmount"
16491
+ ]
16492
+ },
16493
+ "demo": {
16494
+ "mode": "server",
16495
+ "reasons": [
16496
+ "Needs a server because its package does not build for a browser: @happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-ledgers, @happyvertical/smrt-subscriptions, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3626, #3627)."
16497
+ ]
15188
16498
  }
15189
16499
  }
15190
16500
  ],
16501
+ "uiSelectors": {
16502
+ "customer-select": {
16503
+ "slotId": "customer-select",
16504
+ "selects": "@happyvertical/smrt-commerce:Customer",
16505
+ "label": "Customer Select",
16506
+ "description": "Searchable customer picker for relation fields; the caller supplies the lookup"
16507
+ },
16508
+ "vendor-select": {
16509
+ "slotId": "vendor-select",
16510
+ "selects": "@happyvertical/smrt-commerce:Vendor",
16511
+ "label": "Vendor Select",
16512
+ "description": "Searchable vendor picker for relation fields; the caller supplies the lookup"
16513
+ }
16514
+ },
15191
16515
  "smrtDependencies": [
15192
16516
  "@happyvertical/smrt-core",
15193
16517
  "@happyvertical/smrt-jobs",
@@ -15195,5 +16519,21 @@
15195
16519
  "@happyvertical/smrt-subscriptions",
15196
16520
  "@happyvertical/smrt-tenancy"
15197
16521
  ],
16522
+ "browser": {
16523
+ "status": "server-only",
16524
+ "issues": [
16525
+ "#3615",
16526
+ "#3624",
16527
+ "#3626",
16528
+ "#3627"
16529
+ ],
16530
+ "reason": "@happyvertical/payments btcpay (node:crypto); core migrations (node:os). The jobs runner edge (#3615) is reported on smrt-jobs",
16531
+ "via": [
16532
+ "@happyvertical/smrt-jobs",
16533
+ "@happyvertical/smrt-ledgers",
16534
+ "@happyvertical/smrt-subscriptions",
16535
+ "@happyvertical/smrt-tenancy"
16536
+ ]
16537
+ },
15198
16538
  "stampsConstructors": true
15199
16539
  }