Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different Calendar and Prepopulated Entry Fields #119

Open
lantha opened this issue May 16, 2018 · 6 comments
Open

Different Calendar and Prepopulated Entry Fields #119

lantha opened this issue May 16, 2018 · 6 comments

Comments

@lantha
Copy link

lantha commented May 16, 2018

  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
Copy link
Author

lantha commented May 18, 2018

  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
Copy link
Owner

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
Copy link
Author

lantha commented May 19, 2018

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
Copy link
Owner

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
Copy link
Author

lantha commented May 19, 2018

thank you.. i will definitely try that

@lantha
Copy link
Author

lantha commented May 20, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants