Skip to content

Commit b721434

Browse files
authored
feat: APP-51737 - Add new relation fields for item and warehouse creation/updating (#3)
* add new relation fields for warehouse creation and item update * add warehouseId field to item create as well * remove trailing whitespace
1 parent be0bc0a commit b721434

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

src/Functions/InventoryControl/AbstractItem.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export default abstract class AbstractItem extends AbstractFunction {
6666
public numberOfPeriods: number;
6767
public proratePriceAllowed: boolean;
6868
public defaultRenewalMacroId: string;
69+
public warehouseId: string;
6970

7071
public customFields: Array<[string, any]> = [];
7172
}

src/Functions/InventoryControl/AbstractWarehouse.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@ export default abstract class AbstractWarehouse extends AbstractFunction {
4141

4242
public active: boolean;
4343

44+
public vendorRecordNo: number;
45+
4446
public customFields: Array<[string, any]> = [];
4547
}

src/Functions/InventoryControl/ItemCreate.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ export default class ItemCreate extends AbstractItem {
8686
xml.writeElement("COMPUTEFORSHORTTERM", this.proratePriceAllowed);
8787
xml.writeElement("RENEWALMACROID", this.defaultRenewalMacroId);
8888

89+
if (this.warehouseId != null) {
90+
xml.writeStartElement("WAREHOUSEINFO");
91+
xml.writeStartElement("ITEMWAREHOUSEINFO");
92+
xml.writeElement("WAREHOUSEID", this.warehouseId);
93+
xml.writeEndElement(); // ITEMWAREHOUSEINFO
94+
xml.writeEndElement(); // WAREHOUSEINFO
95+
}
96+
8997
xml.writeCustomFieldsImplicit(this.customFields);
9098

9199
xml.writeEndElement(); // ITEM

src/Functions/InventoryControl/ItemUpdate.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ export default class ItemUpdate extends AbstractItem {
8282
xml.writeElement("COMPUTEFORSHORTTERM", this.proratePriceAllowed);
8383
xml.writeElement("RENEWALMACROID", this.defaultRenewalMacroId);
8484

85+
if (this.warehouseId != null) {
86+
xml.writeStartElement("WAREHOUSEINFO");
87+
xml.writeStartElement("ITEMWAREHOUSEINFO");
88+
xml.writeElement("WAREHOUSEID", this.warehouseId);
89+
xml.writeEndElement(); // ITEMWAREHOUSEINFO
90+
xml.writeEndElement(); // WAREHOUSEINFO
91+
}
92+
8593
xml.writeCustomFieldsImplicit(this.customFields);
8694

8795
xml.writeEndElement(); // ITEM

src/Functions/InventoryControl/WarehouseCreate.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ export default class WarehouseCreate extends AbstractWarehouse {
5151
xml.writeEndElement(); // SHIPTO
5252
}
5353

54+
if (this.vendorRecordNo != null) {
55+
xml.writeElement("RVENDOR", this.vendorRecordNo);
56+
}
57+
5458
xml.writeElement("USEDINGL", this.usedInGeneralLedger);
5559

5660
if (this.active === true) {

0 commit comments

Comments
 (0)