Finally i able to intgrate nepali calendar in Erpnxt susscesfully…
Can you please suggest how ?
Default Language must be english
~/frappe-bench/apps/frappe/frappe/public/js/frappe/form/controls/datepicker_i18n.js reach here and add following codes :
(function ($) {
$.fn.datepicker.language["en"] = {
days: ["आईत", "सोम", "मंगल", "बुध", "बिही", "शुक्र", "शनि"],
daysShort: ["आईत", "सोम", "मंगल", "बुध", "बिही", "शुक्र", "शनि"],
daysMin: ["आईत", "सोम", "मंगल", "बुध", "बिही", "शुक्र", "शनि"],
months: [
"बैशाख",
"जेठ",
"असार",
"सावन",
"भदौ",
"असोज",
"कार्तिक",
"मंसिर",
"पौष",
"माघ",
"फागुन",
"चैत",
],
monthsShort: [
"बैशाख",
"जेठ",
"असार",
"सावन",
"भदौ",
"असोज",
"कार्तिक",
"मंसिर",
"पौष",
"माघ",
"फागुन",
"चैत",
],
today: "Today",
clear: "Clear",
dateFormat: "dd.mm.yyyy",
timeFormat: "hh:ii",
firstDay: 1,
};
})(jQuery);
From the looks of this, all it does is change the labels. It doesn’t actually change the calendar to proper Bikram Sambat logic. January => बैशाख, February => जेठ. That’s obviously not right.
Then how it should be done kindly share me the way, would be thankful. I am working with this format
It will take some significant customization:
This format will work fine if only what you are doing is creating quotations/making invoices and don’t need any back end reporting/analysis, automation etc.
Here’s an example.
If you have an employee’s join date as 2080/02/15 in BS, the system will give you an error which says you can’t join on a later date because as per the system it is only 2023. All you are doing is changing January to Baishak.
Also, it will not solve problems where a month in BS will have 32 days; or when no. of days in a Magh is 29 and on October, it is 31. How do you handle this ?
Change Company fiscal year to BS …like 2080 -2081, I think this will work
Give it a shot; I suspect you’ll see it won’t work. Try to date an invoice Jesth 30 (or, worse yet, Jesth 32) and let us know what happens.
Ok, Surely. Thank You so much for your valuable inputs.
I am also working in it if you find any improvement plz share.
Thank You in advance
Install and use nepalidate frappe app
Interesting application! How are you overriding date field storage behavior at an application level?
First of all it didnt work with me… Next will it be applied to all doctypes including invoicing and all
No. It will not be automatically applied.
You have to define new date fields, and set client scripts to allow the newly created field and the existing date field to interact and update dates when one changes.
Refer the documentation provided by @Rabin_Koirala in the link. Fairly easy to implement.
We already implemented 5 years ago.
Bidirectional Convert also possible.
Can be displayed both date for all reports.
Nepali month wise report filter available.
Nepali Month wise filter option will be very handy specially for HR and payroll reporting for Nepal.
Maybe not five years ago, since you were asking here for help here less than three years ago.
In any case, I hope you’ll make the code publicly available, since this is an open source project.
Hopefully end of Jun 2024 will be published as IRD Nepal Compliance on frappe market Place.