@fabriktor/fx 0.0.89 → 0.0.90
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.
|
@@ -3,6 +3,7 @@ import { type Bill, BillableFolder, Charge, Equipment, Item, LaborRate, MeterRea
|
|
|
3
3
|
import type { ContactsFXOperator, EmploymentOwnerScope } from "../contacts/contacts.js";
|
|
4
4
|
import { type OwnerSearchOptions, type SearchOptions, type SearchPage, type SearchQuery } from "../core/search.js";
|
|
5
5
|
type GenerateBillPayload = Parameters<BillableOperator["generateBill"]>[0];
|
|
6
|
+
export type SalaryEstimateInput = GenerateBillPayload["salary_estimate"];
|
|
6
7
|
type BillInsertOptions = Parameters<BillableOperator["insertOneBill"]>[0];
|
|
7
8
|
type BillReplaceOptions = Parameters<BillableOperator["replaceOneBill"]>[0];
|
|
8
9
|
type BillableFolderInsertOptions = Parameters<BillableOperator["insertOneBillableFolder"]>[0];
|
|
@@ -134,6 +135,7 @@ export type GenerateDynamicBillOptions = {
|
|
|
134
135
|
in: GenerateBillPayload;
|
|
135
136
|
exclude_billed?: boolean;
|
|
136
137
|
};
|
|
138
|
+
export declare function zeroSalaryEstimate(): SalaryEstimateInput;
|
|
137
139
|
export type MarkLocationAchievedOptions = {
|
|
138
140
|
in: GenerateBillPayload;
|
|
139
141
|
};
|
|
@@ -65,6 +65,14 @@ export const BillableReadResource = {
|
|
|
65
65
|
VendorInvoice: "vendor_invoice",
|
|
66
66
|
Warehouse: "warehouse",
|
|
67
67
|
};
|
|
68
|
+
export function zeroSalaryEstimate() {
|
|
69
|
+
return {
|
|
70
|
+
employee_ids: [],
|
|
71
|
+
daily_work_hours: 0,
|
|
72
|
+
daily_transport_hours: 0,
|
|
73
|
+
days_per_week: 0,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
68
76
|
export const BillablePreActionReason = {
|
|
69
77
|
VendorInvoiceNumberExists: "vendor_invoice_number_exists",
|
|
70
78
|
};
|
|
@@ -364,6 +372,7 @@ export class BillableFX {
|
|
|
364
372
|
is_estimate: false,
|
|
365
373
|
upfront_rate: 0,
|
|
366
374
|
exclude_billed: opts.exclude_billed,
|
|
375
|
+
salary_estimate: zeroSalaryEstimate(),
|
|
367
376
|
}));
|
|
368
377
|
}
|
|
369
378
|
async markLocationAchieved(opts) {
|