Taxes not being auto populated on Invoice or Quotations

174 views
Skip to first unread message

Ryan vAN GINNEKEN

unread,
Jun 12, 2012, 6:15:50 PM6/12/12
to erpnext-u...@googlegroups.com
Again this is a repost of multi question post so Please forgive me for reposting this issue, but I think with a proper Subject it will be easier for anyone else with a similar problem to find.

I have setup a tax called GST and each time i create an item i make sure to add the GST as the tax but when i create a Quotation or Sales Order etc it does  not auto populate and i have to enter GST on each item.

Here is the recommendation from

Rushabh Mehta

3. Taxes: You need to create a Tax master. See this link for more help


As the image below shows i believe i have setup a Tax master correctly the procedure is slightly different from the instructions with the new interface.  Also when creating items i have made sure to add GST to the Item tax field on each of my Items, however when i create a Invoice the Tax section is blank and needs to be filled.  Should i be applying the tax differently the only thing i can think of is changing "on net total" to something else.

To summarize i would like taxes to automagically be added to my invoice for each Item based on the values i enter in the Item tax field.  I do not want to have to manually enter Taxes on each Invoice as i create them.


Ryan vAN GINNEKEN

unread,
Jun 12, 2012, 6:19:18 PM6/12/12
to erpnext-u...@googlegroups.com
I do not think the image worked correctly so i have attached it now
Untitled.png

Addy

unread,
Jun 13, 2012, 12:51:54 AM6/13/12
to erpnext-u...@googlegroups.com
Hi,

I think this functionality has to be done via custom scripts. I am doing the same the same thing by doing the following steps:
  1. Create a custom field in Customer Master named "state_tax_type" this should be a link field and should be able to fetch all your taxes in the customer master.
  2. Now if you have this field setup then create a custom script for the invoice as below
  3. cur_frm.add_fetch('customer','state_tax_type','charge');
  4. The above script follows the cur_frm.add_fetch would ask the form to fetch the field from a. Customer, which is the customer master
  5. state_tax_type is the name of the field in the customer master
  6. charge is the name of the field in the Invoice or target form in my case it is the sales order since for all our customers a sales order is booked in my company.
The setting up of custom field should be like this:

  • Document = Customer
  • Label= "THe name you want to give it"
  • Field Type = LINK
  • Options = "Sales Taxes and Charges Master" (without the quotes)

I hope this would help you setup the taxes as desired.

Umair Sayyed

unread,
Jun 13, 2012, 1:43:48 AM6/13/12
to erpnext-u...@googlegroups.com
Dear Ryan,

I tested the same scenario in my account and found that default taxes are not fething in sales transactions. We shall fix this issue in all the accounts.

For answer given by Aditya, its a solution in a case you have different tax master made for set of customer. If taxes applicable are same on all the item (as it generally happens in GST) then that customization won't be needed.

Thanks for letting us know this issue. You will be informed when its working fine.

--
Thanks and Regards,
Umair Sayyed
um...@erpnext.com
www.erpnext.com

---- ERPNext - World's most affordable ERP ----

Anand Doshi

unread,
Jun 13, 2012, 4:56:30 AM6/13/12
to erpnext-u...@googlegroups.com
Hi Ryan,

Thanks for reporting this issue.

We have fixed the default taxes functionality. Now, if you mark a taxes master as default, its taxes will be fetched automatically in any new sales transaction.

You will need to pull the latest changes to your installation.

Thanks,
Anand.

Ryan vAN GINNEKEN

unread,
Jun 13, 2012, 3:53:59 PM6/13/12
to erpnext-u...@googlegroups.com
Hello all thank you for your replies and solutions i have pulled the changes like this from within my /var/www/erpnext directory hoping this is the correct way to do an update?

lib/wnf.py --pull origin master

The Default tax is a great feature, but i have a couple of questions about it. Now that it is default do i have to add it to each item i create?  Preferably i would like to add GST to all Items I do not mind doing this manually once when creating the item.

This is because to complicate things here in Alberta we have something called ADS (Advance Disposal Fee) it is a fixed amount based on item types example $4.00 for a Printer $8.00 for a CPU, etc

So what i was hoping is that i could create all these ADS types as taxes, then when creating an Item that is subject to an ADS Fee I could add it in the TAX section,  so some items would have just GST and some items will have GST and an ADS Fee as taxes.

So when the invoice is created i think what we should be doing is pulling the tax data from the Items, this would really make life alot easier. 

When i create having a default GST added would be great, but i would not mind having to add it to the Item, and I almost always remember to add the ADS Fee to my Item, however when adding items to an invoice i sometimes forget to add the ADS Fee

Also i have run into a couple of new issues when trying to create these new ADS Fees not sure if it has to do with the upgrade or not.  I have tried to create an ADS Fee Tax but i need an account head so i go to accounts and try to add it but there is no blank for me to enter account name








Mandatory fields required in Sales Taxes and Charges Master (Table):
Account Head

Ryan vAN GINNEKEN

unread,
Jun 13, 2012, 4:00:33 PM6/13/12
to erpnext-u...@googlegroups.com
Sorry all as you can see google does not like my screen shots sorry about the mess i have attached them here now


Hello all thank you for your replies and solutions i have pulled the changes like this from within my /var/www/erpnext directory hoping this is the correct way to do an update?

lib/wnf.py --pull origin master

The Default tax is a great feature, but i have a couple of questions about it. Now that it is default do i have to add it to each item i create?  Preferably i would like to add GST to all Items I do not mind doing this manually once when creating the item.

This is because to complicate things here in Alberta we have something called ADS (Advance Disposal Fee) it is a fixed amount based on item types example $4.00 for a Printer $8.00 for a CPU, etc

So what i was hoping is that i could create all these ADS types as taxes, then when creating an Item that is subject to an ADS Fee I could add it in the TAX section,  so some items would have just GST and some items will have GST and an ADS Fee as taxes.

So when the invoice is created i think what we should be doing is pulling the tax data from the Items, this would really make life alot easier. 

When i create having a default GST added would be great, but i would not mind having to add it to the Item, and I almost always remember to add the ADS Fee to my Item, however when adding items to an invoice i sometimes forget to add the ADS Fee

Also i have run into a couple of new issues when trying to create these new ADS Fees not sure if it has to do with the upgrade or not.  I have tried to create an ADS Fee Tax but i need an account head so i go to accounts and try to add it but there is no blank for me to enter account name



Untitled.png
Untitled2.png

Ryan vAN GINNEKEN

unread,
Jun 13, 2012, 4:20:47 PM6/13/12
to erpnext-u...@googlegroups.com
Hmmm i think i did my upgrade wrong some stuff seems broken now when i created a qoute today the GST was there automagically added. However the Item table did not autopopulate like it used to.

Umair Sayyed

unread,
Jun 14, 2012, 2:23:30 AM6/14/12
to erpnext-u...@googlegroups.com
Dear Ryan,

If there are different tax rate applicable on items, it good to define it in item master itself.

But looking at ADS rate, looks like its a flat rate applicable on item and not dependent on items basic rate. System would pull rate from item master only when its "based on net total" or "previous row amount / total". Hence, you will need to enter ADS for all the items selected collectively in other charges.

To add new ledger for ADS, go to Accounts >> Chart of account. Click on group underwhich you want to created ledger for ADS. When click on group, it will give option ""add child". Click on add child and it will raise a dialog box. Here you can define new ledger name "ADS - example", account type - Chargeable and click on create. Ledger cannot be created from Document >> New >> Account.

Hope this helps.

Thanks and regards,
Umair Sayyed

Ryan vAN GINNEKEN

unread,
Jun 14, 2012, 3:06:09 AM6/14/12
to erpnext-u...@googlegroups.com
Thank you for the infos about ADS I will figure something out regarding ADS

However my main concern right now is that after the upgrade preformed by running

lib/wnf.py --pull origin master

My Items table is not being populated any longer when i create a Sales Order or Quotation is there something i can do to get this functionality working again? here is the output from my developer console

[01:03:44.057] Traceback (innermost last):
  File "../lib/py/webnotes/handler.py", line 184, in handle
    execute_cmd(cmd)
  File "../lib/py/webnotes/handler.py", line 217, in execute_cmd
    ret = method(webnotes.form_dict.get('arg'))
  File "../lib/py/webnotes/handler.py", line 57, in runserverobj
    webnotes.widgets.form.run_method.runserverobj()
  File "../lib/py/webnotes/widgets/form/run_method.py", line 55, in runserverobj
    r = webnotes.model.code.run_server_obj(so, method, arg)
  File "../lib/py/webnotes/model/code.py", line 183, in run_server_obj
    return getattr(server_obj, method_name)(arg)
  File "/var/www/erpnext/erpnext/selling/doctype/quotation/quotation.py", line 79, in get_item_details
    return get_obj('Sales Common').get_item_details(args, self)
  File "/var/www/erpnext/erpnext/selling/doctype/sales_common/sales_common.py", line 131, in get_item_details
    item = webnotes.conn.sql("select description, item_name, brand, item_group, stock_uom, default_warehouse, default_income_account, default_sales_cost_center, description_html, barcode from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life >    now() or end_of_life = '0000-00-00') and (is_sales_item = 'Yes' or is_service_item = 'Yes')" % (args['item_code']), as_dict=1)
  File "../lib/py/webnotes/db.py", line 148, in sql
    raise e
 OperationalError: (1054, "Unknown column 'barcode' in 'field list'")
 @ http://sun.computerking.ca:18188/js/all-app.js:397

Nabin Hait

unread,
Jun 14, 2012, 3:40:04 AM6/14/12
to erpnext-u...@googlegroups.com
Hi,

You have to run sync and patches.

To sync database with files run :

lib/wnf.py --sync_all

To apply patches run:

lib/wnf.py -l

Please run those and hopefully the problem will be resolved.


Regards,
Nabin Hait

Anand Doshi

unread,
Jun 14, 2012, 4:00:53 AM6/14/12
to erpnext-u...@googlegroups.com
Hi Ryan,

You can use

lib/wnf.py --update origin master

This command pulls the latest changes, applies latest patches and synchronizes schema changes.

Thanks,
Anand.

Ryan vAN GINNEKEN

unread,
Jun 14, 2012, 4:48:24 AM6/14/12
to erpnext-u...@googlegroups.com
Thank you all the below seemes to have worked  :)

lib/wnf.py --update origin master

 I really really really really apprciate your help not to mention ERPNext. It is a fantasic project and your support is more than remarkable.  I promise to keep the techincal questions on the developer forum I am still learning ERPNext and how flexible it is just yesterday i started playing around with customizable forms and fields WOW it's all in with you folks isnt it:)

Rushabh Mehta

unread,
Jun 14, 2012, 5:06:00 AM6/14/12
to erpnext-u...@googlegroups.com
Thanks Ryan :)

The only reason I would like to insist on separation is because users and developers have different interests and its best to keep the lists separate. The developer mailing list is expected to be high frequency and people won't mind a lot of mails. But I think the members of this list would be happier if the focus remains on functional issues
and feature discussions.

Also want to take this opportunity to mention that if you are annoyed by the large number of mails, you can set the list to a daily digest (let me check if I can do it from the admin interface).

best,
Rushabh

Ryan vAN GINNEKEN

unread,
Jun 14, 2012, 6:27:24 PM6/14/12
to erpnext-u...@googlegroups.com
Thanks for the advice, i understand and have nothing but respect for you and the ERPNext team so I will start using the developers forum more, and lots email is not an issue for me.
Reply all
Reply to author
Forward
0 new messages