prashants / webzash

Easy to use web based double entry accounting software in PHP - MySQL under MIT License
http://webzash.org
Other
208 stars 109 forks source link

Different Calendar and Prepopulated Entry Fields #119

Open lantha opened 6 years ago

lantha commented 6 years ago
  1. I have to use Nepali calendar, and I saw that it was possible with the JS date picker but it was not elaborated in some other issue. Can you please give me some hints on that one?

  2. How can I pre-populate the entry fields in entry types? eg I have 5 ledger heads to be debit and one bank account to be credit while using the receipt entry-type. While loading the Add Receipt page how can I pre-populate the entry fields according to the entry-type?

lantha commented 6 years ago
  1. I did get the calendar working in the datepicker jQuery UI but I cannot get it to work on calculated dates on reports and such. Its still interpreting as English date. How can i get around this?
  2. solved.

Thanks.

prashants commented 6 years ago

What changes did you make ? How are you passing the data back to webzash and how are you storing the dates in the database ?

lantha commented 6 years ago

The problem with storing dates in the database is that the dates are not defined in the utf8_unicode_ci format. So, I am working to convert the sql files to store the date in unicode. Hopefully it works.

prashants commented 6 years ago

One option is to not change the backend but do the date manipulation in the frontend on the fly.

Convert the dates so that Nepali Calendar <---> Gregorian Calendar <---> Database

lantha commented 6 years ago

thank you.. i will definitely try that

lantha commented 6 years ago

I'm using the following jQuery for displaying Nepali calendar $('#EntryDate').nepaliDatePicker({ npdMonth: true, npdYear: true, npdYearCount: 10 // Options | Number of years to show });

and this jQuery changes the BikramSambat(BS- Nepali date) to AD $('id or class').change(function(){ $('some id or class').val(BS2AD($('id or class').val())); });

But this is not working in the system even though I can select the Nepali date and then convert it to AD. Can you suggest what is wrong?