From 0eaebef3a0cb4513e23a0b01ac181e54d9cbc761 Mon Sep 17 00:00:00 2001 From: akshayitzme Date: Wed, 11 Dec 2024 09:53:31 +0530 Subject: [PATCH 1/2] fix: change date fieldtype to Datetime --- schemas/app/Invoice.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/app/Invoice.json b/schemas/app/Invoice.json index a5ca922f..e9c63f9f 100644 --- a/schemas/app/Invoice.json +++ b/schemas/app/Invoice.json @@ -35,7 +35,7 @@ { "fieldname": "date", "label": "Date", - "fieldtype": "Date", + "fieldtype": "Datetime", "required": true, "section": "Default" }, From d4016a54ac8ee44a9e9c39a71e443e9afa67f44f Mon Sep 17 00:00:00 2001 From: akshayitzme Date: Wed, 11 Dec 2024 12:03:02 +0530 Subject: [PATCH 2/2] fix: loyalty program dates --- models/baseModels/tests/testLoyaltyProgram.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/baseModels/tests/testLoyaltyProgram.spec.ts b/models/baseModels/tests/testLoyaltyProgram.spec.ts index c3076fd9..2be654b8 100644 --- a/models/baseModels/tests/testLoyaltyProgram.spec.ts +++ b/models/baseModels/tests/testLoyaltyProgram.spec.ts @@ -29,8 +29,8 @@ const partyData = { const loyaltyProgramData = { name: 'program', - fromDate: new Date(Date.now()), - toDate: new Date(Date.now()), + fromDate: new Date('12/10/2024'), + toDate: new Date('12/30/2024'), email: 'sample@gmail.com', mobile: '1234567890', expenseAccount: accountData.name, @@ -122,6 +122,7 @@ async function createSalesInvoice() { const sinvDoc = fyo.doc.getNewDoc(ModelNameEnum.SalesInvoice, { account: 'Debtors', party: partyData.name, + date: new Date('12/11/2024'), items: [ { item: itemData.name,