kcommons 9.13.2 → 9.14.0
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.
|
@@ -18,6 +18,7 @@ import { INestedUser } from "./user.typings";
|
|
|
18
18
|
import { IPaginationFilters } from "./common/paginationFilters.typings";
|
|
19
19
|
import { INestedISTDItem } from "./company/istd/istdItems.typings";
|
|
20
20
|
import { INestedInventoryLog } from "./company/inventory/inventoryLogger.typings";
|
|
21
|
+
import { INestedPo } from "./po.typings";
|
|
21
22
|
export interface IItemFilters {
|
|
22
23
|
name?: string;
|
|
23
24
|
company_id?: string;
|
|
@@ -58,7 +59,9 @@ export declare enum ITEM_INCLUDE {
|
|
|
58
59
|
approval_chain = "approval_chain",
|
|
59
60
|
used_in_istd_items = "used_in_istd_items",
|
|
60
61
|
used_in_iads = "used_in_iads",
|
|
61
|
-
used_in_inventory_logs = "used_in_inventory_logs"
|
|
62
|
+
used_in_inventory_logs = "used_in_inventory_logs",
|
|
63
|
+
previous_purchase_po = "previous_purchase_po",
|
|
64
|
+
least_purchase_po = "least_purchase_po"
|
|
62
65
|
}
|
|
63
66
|
export interface IItem {
|
|
64
67
|
id: string;
|
|
@@ -79,9 +82,11 @@ export interface IItem {
|
|
|
79
82
|
least_purchase_price: number | null;
|
|
80
83
|
least_purchase_company_vendor_id: string | null;
|
|
81
84
|
least_purchase_date: string | null;
|
|
85
|
+
least_purchase_po_id: string | null;
|
|
82
86
|
previous_purchase_price: number | null;
|
|
83
87
|
previous_purchase_company_vendor_id: string | null;
|
|
84
88
|
previous_purchase_date: string | null;
|
|
89
|
+
previous_purchase_po_id: string | null;
|
|
85
90
|
item_description: string | null;
|
|
86
91
|
item_image?: string | null;
|
|
87
92
|
primary_item_image?: string | null;
|
|
@@ -132,8 +137,10 @@ export interface IItem {
|
|
|
132
137
|
used_in_istd_items: INestedISTDItem[] | null;
|
|
133
138
|
used_in_iads: INestedISTDItem[] | null;
|
|
134
139
|
used_in_inventory_logs: INestedInventoryLog[] | null;
|
|
140
|
+
previous_purchase_po: INestedPo | null;
|
|
141
|
+
least_purchase_po: INestedPo | null;
|
|
135
142
|
}
|
|
136
|
-
export interface INestedItem extends Omit<IItem, "inventory_entries" | "approved_by" | "item_category" | "item_subcategory" | "company" | "used_in_indent_items" | "used_in_mi_items" | "used_in_pr_items" | "used_in_quote_items" | "used_in_grn_items" | "used_in_mrn_items" | "used_in_bom_items" | "used_in_comparative_items" | "previous_purchase_vendor" | "least_purchase_vendor" | "dealing_company_vendors" | "used_in_po_asn_item_junction" | "vendor_item_versions" | "used_in_istd_items" | "used_in_iads" | "used_in_inventory_logs"> {
|
|
143
|
+
export interface INestedItem extends Omit<IItem, "inventory_entries" | "approved_by" | "item_category" | "item_subcategory" | "company" | "used_in_indent_items" | "used_in_mi_items" | "used_in_pr_items" | "used_in_quote_items" | "used_in_grn_items" | "used_in_mrn_items" | "used_in_bom_items" | "used_in_comparative_items" | "previous_purchase_vendor" | "least_purchase_vendor" | "dealing_company_vendors" | "used_in_po_asn_item_junction" | "vendor_item_versions" | "used_in_istd_items" | "used_in_iads" | "used_in_inventory_logs" | "previous_purchase_po" | "least_purchase_po"> {
|
|
137
144
|
}
|
|
138
145
|
export declare const ITEM_CLASSIFICATION: {
|
|
139
146
|
DIRECT: string;
|
|
@@ -34,6 +34,8 @@ var ITEM_INCLUDE;
|
|
|
34
34
|
ITEM_INCLUDE["used_in_istd_items"] = "used_in_istd_items";
|
|
35
35
|
ITEM_INCLUDE["used_in_iads"] = "used_in_iads";
|
|
36
36
|
ITEM_INCLUDE["used_in_inventory_logs"] = "used_in_inventory_logs";
|
|
37
|
+
ITEM_INCLUDE["previous_purchase_po"] = "previous_purchase_po";
|
|
38
|
+
ITEM_INCLUDE["least_purchase_po"] = "least_purchase_po";
|
|
37
39
|
})(ITEM_INCLUDE || (exports.ITEM_INCLUDE = ITEM_INCLUDE = {}));
|
|
38
40
|
exports.ITEM_CLASSIFICATION = {
|
|
39
41
|
DIRECT: "Direct",
|
|
@@ -98,8 +98,10 @@ export interface IPurchaseOrder {
|
|
|
98
98
|
taxes: INestedDocumentTaxes[] | null;
|
|
99
99
|
vendor: INestedVendor | null;
|
|
100
100
|
po_asn_items_junctions: INestedPOASNItemJunction[] | null;
|
|
101
|
+
least_purchase_price_items: INestedItem[] | null;
|
|
102
|
+
previous_purchase_price_items: INestedItem[] | null;
|
|
101
103
|
}
|
|
102
|
-
export interface INestedPo extends Omit<IPurchaseOrder, "company" | "purchase_location" | "shipping_store_location" | "created_by_user" | "company_vendor" | "contact_person" | "external_contact_person" | "sent_for_approval_by" | "sent_to_vendor_by" | "parent_quote" | "comparative" | "items" | "boms" | "approval_chain" | "taxes" | "vendor" | "po_asn_items_junctions"> {
|
|
104
|
+
export interface INestedPo extends Omit<IPurchaseOrder, "company" | "purchase_location" | "shipping_store_location" | "created_by_user" | "company_vendor" | "contact_person" | "external_contact_person" | "sent_for_approval_by" | "sent_to_vendor_by" | "parent_quote" | "comparative" | "items" | "boms" | "approval_chain" | "taxes" | "vendor" | "po_asn_items_junctions" | "least_purchase_price_items" | "previous_purchase_price_items"> {
|
|
103
105
|
}
|
|
104
106
|
export declare enum PO_INCLUDE {
|
|
105
107
|
company = "company",
|
|
@@ -119,7 +121,9 @@ export declare enum PO_INCLUDE {
|
|
|
119
121
|
taxes = "taxes",
|
|
120
122
|
purchase_location = "purchase_location",
|
|
121
123
|
vendor = "vendor",
|
|
122
|
-
po_asn_items_junctions = "po_asn_items_junctions"
|
|
124
|
+
po_asn_items_junctions = "po_asn_items_junctions",
|
|
125
|
+
least_purchase_price_items = "least_purchase_price_items",
|
|
126
|
+
previous_purchase_price_items = "previous_purchase_price_items"
|
|
123
127
|
}
|
|
124
128
|
export interface IPOItem extends ITaxRelatedItemInputs {
|
|
125
129
|
id: string;
|
|
@@ -45,6 +45,8 @@ var PO_INCLUDE;
|
|
|
45
45
|
PO_INCLUDE["purchase_location"] = "purchase_location";
|
|
46
46
|
PO_INCLUDE["vendor"] = "vendor";
|
|
47
47
|
PO_INCLUDE["po_asn_items_junctions"] = "po_asn_items_junctions";
|
|
48
|
+
PO_INCLUDE["least_purchase_price_items"] = "least_purchase_price_items";
|
|
49
|
+
PO_INCLUDE["previous_purchase_price_items"] = "previous_purchase_price_items";
|
|
48
50
|
})(PO_INCLUDE || (exports.PO_INCLUDE = PO_INCLUDE = {}));
|
|
49
51
|
var PO_ITEM_INCLUDE;
|
|
50
52
|
(function (PO_ITEM_INCLUDE) {
|
|
@@ -6,5 +6,6 @@ function getMediaNameFromLink(link) {
|
|
|
6
6
|
return null;
|
|
7
7
|
const linkBase = link === null || link === void 0 ? void 0 : link.split("?")[0];
|
|
8
8
|
const mediaName = linkBase === null || linkBase === void 0 ? void 0 : linkBase.split("/").pop();
|
|
9
|
-
|
|
9
|
+
const mediaNameWithoutExt = mediaName === null || mediaName === void 0 ? void 0 : mediaName.split(".").reverse().slice(1).reverse().join(".");
|
|
10
|
+
return mediaNameWithoutExt || null;
|
|
10
11
|
}
|