2
0
mirror of https://github.com/frappe/books.git synced 2025-01-09 17:53:56 +00:00
books/models/baseModels/ERPNextSyncSettings/ERPNextSyncSettings.ts
2024-12-18 17:47:58 +05:30

63 lines
1.5 KiB
TypeScript

import { Doc } from 'fyo/model/doc';
import { HiddenMap } from 'fyo/model/types';
export class ERPNextSyncSettings extends Doc {
deviceID?: string;
endpoint?: string;
authToken?: string;
integrationAppVersion?: string;
isEnabled?: boolean;
dataSyncInterval?: number;
syncItem?: boolean;
itemSyncType?: string;
syncCustomer?: boolean;
customerSyncType?: string;
syncSupplier?: boolean;
supplierSyncType?: string;
syncSalesInvoice?: boolean;
salesInvoiceSyncType?: string;
syncSalesInvoicePayment?: boolean;
sinvPaymentType?: string;
syncStockMovement?: boolean;
stockMovementSyncType?: string;
syncPriceList?: boolean;
priceListSyncType?: string;
syncSerialNumber?: boolean;
serialNumberSyncType?: string;
syncBatch?: boolean;
batchSyncType?: string;
syncShipment?: boolean;
shipmentSyncType?: string;
hidden: HiddenMap = {
syncPriceList: () => {
return !this.fyo.singles.AccountingSettings?.enablePriceList;
},
priceListSyncType: () => {
return !this.fyo.singles.AccountingSettings?.enablePriceList;
},
syncSerialNumber: () => {
return !this.fyo.singles.InventorySettings?.enableSerialNumber;
},
serialNumberSyncType: () => {
return !this.fyo.singles.InventorySettings?.enableSerialNumber;
},
syncBatch: () => {
return !this.fyo.singles.InventorySettings?.enableBatches;
},
batchSyncType: () => {
return !this.fyo.singles.InventorySettings?.enableBatches;
},
};
}