–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Ok, i found the function
|
On Thursday, May 16, 2013 7:06:01 PM UTC+2, Sören H. Biere wrote:
Hi,i can figure out the cause for some observed behaviour.I try to add an Discount to a single item on a form with already entered Default chrges master and items with same tax acounts and Prices including the tax.If i have a Sales Order,Quotation or else and add an Discount in the Sales Order Item table i get theright 90€ Basic_rate for my 100€ item.The i pull my taxes from a master to the table an everythings calculated fine. for one of my items the gross sum is 90€.When I use a Default Sales tax master and my Sales order form is prefilled with the tax (item tax account and included_in_print_rate)the 10% Discount i add to my 100€ item changes the ref_rate to 111,11 and Basic_rate remains a 100€.Shoulnd it be possible to add Discount to items including tax?Best regards,Sören
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Sent from my phone
Ok, i found the function
cur_frm.cscript.consider_incl_rateon sales_common but I still don't i it should be possible somehow to have Discounts even iftax is included?Should'nt the inclusion of tax and Discount not be seperated somehow?What was intended throught this connection?Best regards,Sören
On Thursday, May 16, 2013 7:06:01 PM UTC+2, Sören H. Biere wrote:Hi,i can figure out the cause for some observed behaviour.I try to add an Discount to a single item on a form with already entered Default chrges master and items with same tax acounts and Prices including the tax.If i have a Sales Order,Quotation or else and add an Discount in the Sales Order Item table i get theright 90€ Basic_rate for my 100€ item.The i pull my taxes from a master to the table an everythings calculated fine. for one of my items the gross sum is 90€.When I use a Default Sales tax master and my Sales order form is prefilled with the tax (item tax account and included_in_print_rate)the 10% Discount i add to my 100€ item changes the ref_rate to 111,11 and Basic_rate remains a 100€.Shoulnd it be possible to add Discount to items including tax?Best regards,Sören–
You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
} else if(consider_incl_rate) {
if((flt(cl[i].ref_rate) > 0) && (flt(cl[i].adj_rate) > 0)) {
var export_rate = flt(cl[i].ref_rate) * flt(1 - flt(cl[i].adj_rate / 100));
set_multiple(tname, cl[i].name, { 'export_rate': flt(export_rate) }, fname);
}
else if(flt(cl[i].export_rate) > 0) {
// calculate basic rate based on taxes
// then calculate and set basic_rate, base_ref_rate, ref_rate, amount, export_amount
var ref_rate = flt(cl[i].adj_rate)!=flt(100) ?
flt((100 * flt(cl[i].export_rate))/flt(100 - flt(cl[i].adj_rate))) :
flt(0)
set_multiple(tname, cl[i].name, { 'ref_rate': ref_rate }, fname);
}
On Friday, May 17, 2013 5:16:15 AM UTC+2, Anand Doshi wrote:
Hi Soren,It does allow discounts.It could be due to the order in which data entry was done.As far as I remember,If the ref_rate is 0 and basic rate is 100And you enter 10 as discount,then it will calculate ref_rate as 110Now if both ref_rate and basic rate are setAnd then you specify discountThen it should change the value of basic rateThis behaviour was set because most often users don't use price lists.Hence they don't enter value in ref rate but enter in basic rate.So when they enter discount they expect that ref rate be calculated if it is 0.
Sent from my phoneOk, i found the function
cur_frm.cscript.consider_incl_rateon sales_common but I still don't i it should be possible somehow to have Discounts even iftax is included?Should'nt the inclusion of tax and Discount not be seperated somehow?What was intended throught this connection?Best regards,Sören
On Thursday, May 16, 2013 7:06:01 PM UTC+2, Sören H. Biere wrote:Hi,i can figure out the cause for some observed behaviour.I try to add an Discount to a single item on a form with already entered Default chrges master and items with same tax acounts and Prices including the tax.If i have a Sales Order,Quotation or else and add an Discount in the Sales Order Item table i get theright 90€ Basic_rate for my 100€ item.The i pull my taxes from a master to the table an everythings calculated fine. for one of my items the gross sum is 90€.When I use a Default Sales tax master and my Sales order form is prefilled with the tax (item tax account and included_in_print_rate)the 10% Discount i add to my 100€ item changes the ref_rate to 111,11 and Basic_rate remains a 100€.Shoulnd it be possible to add Discount to items including tax?Best regards,Sören–
You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Anand,thank you very much again.But the case where ref_rate is > 0 is hardly reachable in sales_common on line 754 to 765.Would'nt it make more sense to change to this like i tried in my custom script:
} else if(consider_incl_rate) {
if((flt(cl[i].ref_rate) > 0) && (flt(cl[i].adj_rate) > 0)) {
var export_rate = flt(cl[i].ref_rate) * flt(1 - flt(cl[i].adj_rate / 100));
set_multiple(tname, cl[i].name, { 'export_rate': flt(export_rate) }, fname);
}
else if(flt(cl[i].export_rate) > 0) {
// calculate basic rate based on taxes
// then calculate and set basic_rate, base_ref_rate, ref_rate, amount, export_amount
var ref_rate = flt(cl[i].adj_rate)!=flt(100) ?
flt((100 * flt(cl[i].export_rate))/flt(100 - flt(cl[i].adj_rate))) :
flt(0)
set_multiple(tname, cl[i].name, { 'ref_rate': ref_rate }, fname);
}If one uses Price lists always both fields are filled but if i enter manually i could respekt to first add add adj_rate and then the Export rate to calculate the empty ref_rate.Those are already observing the table.Do you have a better Idea to serve booth Needs, of clients using Price_list and those who enter manually?
On Friday, May 17, 2013 5:16:15 AM UTC+2, Anand Doshi wrote:Hi Soren,It does allow discounts.It could be due to the order in which data entry was done.As far as I remember,If the ref_rate is 0 and basic rate is 100And you enter 10 as discount,then it will calculate ref_rate as 110Now if both ref_rate and basic rate are setAnd then you specify discountThen it should change the value of basic rateThis behaviour was set because most often users don't use price lists.Hence they don't enter value in ref rate but enter in basic rate.So when they enter discount they expect that ref rate be calculated if it is 0.
Sent from my phoneOk, i found the function
cur_frm.cscript.consider_incl_rateon sales_common but I still don't i it should be possible somehow to have Discounts even iftax is included?Should'nt the inclusion of tax and Discount not be seperated somehow?What was intended throught this connection?Best regards,Sören
On Thursday, May 16, 2013 7:06:01 PM UTC+2, Sören H. Biere wrote:Hi,i can figure out the cause for some observed behaviour.I try to add an Discount to a single item on a form with already entered Default chrges master and items with same tax acounts and Prices including the tax.If i have a Sales Order,Quotation or else and add an Discount in the Sales Order Item table i get theright 90€ Basic_rate for my 100€ item.The i pull my taxes from a master to the table an everythings calculated fine. for one of my items the gross sum is 90€.When I use a Default Sales tax master and my Sales order form is prefilled with the tax (item tax account and included_in_print_rate)the 10% Discount i add to my 100€ item changes the ref_rate to 111,11 and Basic_rate remains a 100€.Shoulnd it be possible to add Discount to items including tax?Best regards,Sören–
You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Friday, May 17, 2013 7:51:33 AM UTC+2, Anand Doshi wrote:
Hi Soren,I am rewriting the client side calculation code. I will try to incorporate your suggestions. We will be dropping a mail before its release so that you can remove the custom script.Thanks,Anand.On 17-May-2013, at 11:12 AM, Sören H. Biere <Ko...@SHB-Technologie.de> wrote:Hi Anand,thank you very much again.But the case where ref_rate is > 0 is hardly reachable in sales_common on line 754 to 765.Would'nt it make more sense to change to this like i tried in my custom script:
} else if(consider_incl_rate) {
if((flt(cl[i].ref_rate) > 0) && (flt(cl[i].adj_rate) > 0)) {
var export_rate = flt(cl[i].ref_rate) * flt(1 - flt(cl[i].adj_rate / 100));
set_multiple(tname, cl[i].name, { 'export_rate': flt(export_rate) }, fname);
}
else if(flt(cl[i].export_rate) > 0) {
// calculate basic rate based on taxes
// then calculate and set basic_rate, base_ref_rate, ref_rate, amount, export_amount
var ref_rate = flt(cl[i].adj_rate)!=flt(100) ?
flt((100 * flt(cl[i].export_rate))/flt(100 - flt(cl[i].adj_rate))) :
flt(0)
set_multiple(tname, cl[i].name, { 'ref_rate': ref_rate }, fname);
}If one uses Price lists always both fields are filled but if i enter manually i could respekt to first add add adj_rate and then the Export rate to calculate the empty ref_rate.Those are already observing the table.Do you have a better Idea to serve booth Needs, of clients using Price_list and those who enter manually?
On Friday, May 17, 2013 5:16:15 AM UTC+2, Anand Doshi wrote:Hi Soren,It does allow discounts.It could be due to the order in which data entry was done.As far as I remember,If the ref_rate is 0 and basic rate is 100And you enter 10 as discount,then it will calculate ref_rate as 110Now if both ref_rate and basic rate are setAnd then you specify discountThen it should change the value of basic rateThis behaviour was set because most often users don't use price lists.Hence they don't enter value in ref rate but enter in basic rate.So when they enter discount they expect that ref rate be calculated if it is 0.
Sent from my phoneOk, i found the function
cur_frm.cscript.consider_incl_rateon sales_common but I still don't i it should be possible somehow to have Discounts even iftax is included?Should'nt the inclusion of tax and Discount not be seperated somehow?What was intended throught this connection?Best regards,Sören
On Thursday, May 16, 2013 7:06:01 PM UTC+2, Sören H. Biere wrote:Hi,i can figure out the cause for some observed behaviour.I try to add an Discount to a single item on a form with already entered Default chrges master and items with same tax acounts and Prices including the tax.If i have a Sales Order,Quotation or else and add an Discount in the Sales Order Item table i get theright 90€ Basic_rate for my 100€ item.The i pull my taxes from a master to the table an everythings calculated fine. for one of my items the gross sum is 90€.When I use a Default Sales tax master and my Sales order form is prefilled with the tax (item tax account and included_in_print_rate)the 10% Discount i add to my 100€ item changes the ref_rate to 111,11 and Basic_rate remains a 100€.Shoulnd it be possible to add Discount to items including tax?Best regards,Sören–
You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups “ERPNext User’s Forum” group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Soren, Glad to see another Euro using customer. The issue on discount and tax is as old as I use Erpnext now, some 1,5 years. The problem seems to be deep rooted in some old code.
On Thursday, May 16, 2013 7:06:01 PM UTC+2, Sören H. Biere wrote:
Hi,i can figure out the cause for some observed behaviour.I try to add an Discount to a single item on a form with already entered Default chrges master and items with same tax acounts and Prices including the tax.If i have a Sales Order,Quotation or else and add an Discount in the Sales Order Item table i get theright 90€ Basic_rate for my 100€ item.The i pull my taxes from a master to the table an everythings calculated fine. for one of my items the gross sum is 90€.When I use a Default Sales tax master and my Sales order form is prefilled with the tax (item tax account and included_in_print_rate)the 10% Discount i add to my 100€ item changes the ref_rate to 111,11 and Basic_rate remains a 100€.Shoulnd it be possible to add Discount to items including tax?Best regards,Sören
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Saturday, May 18, 2013 9:21:25 AM UTC+2, robert wrote:
Hi Soren, Glad to see another Euro using customer. The issue on discount and tax is as old as I use Erpnext now, some 1,5 years. The problem seems to be deep rooted in some old code.In general the team in India is doing wonderful things and are very responsive to issues.I my view, the whole part of charges and discounts should be redone, inclusive the non-intuitive (decriptive) naming as "total"and "for valuation"Unfortunately i do not master Java allowing me to do custom-scripting.Regards Robert Becht from NL
On Thursday, May 16, 2013 7:06:01 PM UTC+2, Sören H. Biere wrote:Hi,i can figure out the cause for some observed behaviour.I try to add an Discount to a single item on a form with already entered Default chrges master and items with same tax acounts and Prices including the tax.If i have a Sales Order,Quotation or else and add an Discount in the Sales Order Item table i get theright 90€ Basic_rate for my 100€ item.The i pull my taxes from a master to the table an everythings calculated fine. for one of my items the gross sum is 90€.When I use a Default Sales tax master and my Sales order form is prefilled with the tax (item tax account and included_in_print_rate)the 10% Discount i add to my 100€ item changes the ref_rate to 111,11 and Basic_rate remains a 100€.Shoulnd it be possible to add Discount to items including tax?Best regards,Sören
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Robert,great your respondig, maybe we can share some experience.I neither have much experience with js and py, but when i can throw a look at it i can deal with it.At the moment i've found a nice solution for the german system with different tax-rates and discountsfor customergroups,customers and items with prices both inclusive and exclusive tax.All is nicely possible with custom fields and custom script.What are you up to configure respectively where are the problem?As I'm really new to erpnext i don't really have a good overview and as the erpnextteam is offering payed implementationsi can't really give support but maybe we can destill some nice-to-have features and changes.Best regardsSören
On Saturday, May 18, 2013 9:21:25 AM UTC+2, robert wrote:Hi Soren, Glad to see another Euro using customer. The issue on discount and tax is as old as I use Erpnext now, some 1,5 years. The problem seems to be deep rooted in some old code.
In general the team in India is doing wonderful things and are very responsive to issues.
I my view, the whole part of charges and discounts should be redone, inclusive the non-intuitive (decriptive) naming as "total"and "for valuation"Unfortunately i do not master Java allowing me to do custom-scripting.Regards Robert Becht from NL
On Thursday, May 16, 2013 7:06:01 PM UTC+2, Sören H. Biere wrote:Hi,i can figure out the cause for some observed behaviour.I try to add an Discount to a single item on a form with already entered Default chrges master and items with same tax acounts and Prices including the tax.If i have a Sales Order,Quotation or else and add an Discount in the Sales Order Item table i get theright 90€ Basic_rate for my 100€ item.The i pull my taxes from a master to the table an everythings calculated fine. for one of my items the gross sum is 90€.When I use a Default Sales tax master and my Sales order form is prefilled with the tax (item tax account and included_in_print_rate)the 10% Discount i add to my 100€ item changes the ref_rate to 111,11 and Basic_rate remains a 100€.Shoulnd it be possible to add Discount to items including tax?Best regards,Sören–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un…@googlegroups.com.For more options, visit https://groups.google.com/groups/opt_out.
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Soeren, right now abroad, but we can talk once back early june, rgds robert
On Saturday, May 18, 2013 11:18:59 PM UTC+3, Sören H. Biere wrote:
Hi Robert,great your respondig, maybe we can share some experience.I neither have much experience with js and py, but when i can throw a look at it i can deal with it.At the moment i’ve found a nice solution for the german system with different tax-rates and discountsfor customergroups,customers and items with prices both inclusive and exclusive tax.All is nicely possible with custom fields and custom script.What are you up to configure respectively where are the problem?As I’m really new to erpnext i don’t really have a good overview and as the erpnextteam is offering payed implementationsi can’t really give support but maybe we can destill some nice-to-have features and changes.Best regardsSören
On Saturday, May 18, 2013 9:21:25 AM UTC+2, robert wrote:Hi Soren, Glad to see another Euro using customer. The issue on discount and tax is as old as I use Erpnext now, some 1,5 years. The problem seems to be deep rooted in some old code.In general the team in India is doing wonderful things and are very responsive to issues.I my view, the whole part of charges and discounts should be redone, inclusive the non-intuitive (decriptive) naming as "total"and “for valuation”Unfortunately i do not master Java allowing me to do custom-scripting.Regards Robert Becht from NL
On Thursday, May 16, 2013 7:06:01 PM UTC+2, Sören H. Biere wrote:Hi,i can figure out the cause for some observed behaviour.I try to add an Discount to a single item on a form with already entered Default chrges master and items with same tax acounts and Prices including the tax.If i have a Sales Order,Quotation or else and add an Discount in the Sales Order Item table i get theright 90€ Basic_rate for my 100€ item.The i pull my taxes from a master to the table an everythings calculated fine. for one of my items the gross sum is 90€.When I use a Default Sales tax master and my Sales order form is prefilled with the tax (item tax account and included_in_print_rate)the 10% Discount i add to my 100€ item changes the ref_rate to 111,11 and Basic_rate remains a 100€.Shoulnd it be possible to add Discount to items including tax?Best regards,Sören
–
You received this message because you are subscribed to the Google Groups "ERPNext User's Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-user-forum+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.