Thank a lot for help and such a nice and simple explanation of answers. I tried your solutions with taxable field value as "Y"and "N" both.But in both cases in shoppingcart.java (cart.getTotalSalesTax()) returns tax value and (cart.getGrandTotal()) adds this tax in price(already including tax value).
I changed (cart.getGrandTotal()) so that it doesn't include tax but during order creation it adds tax amount to total amount.It adds Order adjustments (like discounts or tax).So should i change there as well or there is another simple solution to it. - Regards Nandani On Mon, May 28, 2012 at 10:37 PM, Vikas Mayur <[email protected]> wrote: > Inline > > Regards > Vikas > > On May 28, 2012, at 8:59 PM, Nandani Aggarwal wrote: > > > Thanks a lot for reply. > > > > I am facing some problem in maintaining sales tax transactions.In my > case , > > on my ecommerce site i am displaying products including tax, > > Problem : > > 1. I am displaying product with price including tax.So when order is > placed > > and invoice is created then tax transactions display tax amount on price( > > already including tax). > > For example : Product "A" is displayed at price Rs100 (Price :90 + tax : > > 10). > > But on invoice transactions are : > > Sales Transactions - Rs100 > > Tax Transactions - RS 10 > > Making Invoice Total - Rs110.(which is wrong)Invoice total should be Rs > > 100/- > > I want grand total should be sum of product's subtotal. > > Check the 'taxable' field on Product entity, I think setting it to 'N' on > individual products should exempt the product from further sales tax. > > > > > 2. If i want to Apply discount on price excluding tax and then display > > final amount (Price - discount) + tax. > > But in ofbiz i am unable to display such price and grandtotal. > > > > Any idea , how above problems can be handled.? > > Discount and Tax should be created as Order Adjustments to display the > prices in the manner you mentioned. > > I haven't done any testing but I think there may be solution OOTB with > some minor modifications where required. > > Lets take your example for instance. Product 'A' displayed price is Rs. > 100 (Actual product price is 90 & tax is 10). Lets say you want to give Rs. > 20 discount on the product price which means that your order total will be > Rs. 80 with product price after discount as Rs. 70 (since discount is > applied after excluding tax from product price) & a total sales tax of Rs. > 10. > > Instead of Rs. 20 discount, you may give a discount including the sales > tax on the price displayed to customer. > > Final Product Price = Price Displayed - (Discount + Tax) = 100 - (20 + 10) > = 70 > > You may then apply the tax on the product price (note you don't need to > set the 'taxable' flag I mentioned above) in such a manner that tax amount > is added back to the order total. > > Item Sub Total = Rs. 100 > Discount = Rs. 30 > Sales Tax = Rs. 10 > > Order Total = Rs. 80 > > HTH > > > I want correct transaction details on my invoice.It should include > discount > > , tax and sales information. > > Tax is added in product price itself.Tax is not included in final order > > amount. > > > > Thanks > > Nandani > > > > > > > > > > On Mon, May 28, 2012 at 8:34 PM, Vikas Mayur <[email protected]> > wrote: > > > >> Yes, I need to keep all the related transactions so that income sheet > >> reflect the correct net income. For all the sales tax (sales taxes > could be > >> at country/state/county/city level) & COGS (for different items) > >> transaction entry detail records, I just created one detail record for > each. > >> > >> Regards > >> Vikas > >> > >> On May 28, 2012, at 7:46 PM, Nandani Aggarwal wrote: > >> > >>> Nice Approach , Are you also handling tax related transactions so that > >>> actual or final revenue can be generated or determined which may > include > >>> COGS,Discount,Tax(Sales Tax , CST , VAT etc). > >>> > >>> Thanks > >>> Nandani > >>> > >>> On Mon, May 28, 2012 at 5:37 PM, Vikas Mayur <[email protected]> > >> wrote: > >>> > >>>> Pierre, > >>>> > >>>> The approach actually worked, moreover I don't need separate accounts > >> as I > >>>> can associate the existing accounts of the parent company to other > >> parties > >>>> like wholesale and retail etc. As a test, I have placed a sales order > >> with > >>>> product GZ-2644 with 3 Qty for a wholesale party and quick ship entire > >>>> order which resulted in 4 accounting transactions namely Sales > Invoice, > >>>> Sales Shipment, Incoming Payment & Payment Applied. To setup the > income > >>>> sheet for wholesale party, I manually created all the required > >> transactions > >>>> (I believe I just needed Sales Invoice & Sales Shipment transactions) > >> and > >>>> transaction details. That is it. I think I now need to write some code > >> so > >>>> that such transactions could be created automatically. Sorry, I tested > >> this > >>>> on my local copy so you may not be able to see it on demo :) > >>>> > >>>> Your idea of setting up a separate instance for these external parties > >>>> seems good but I believe the other approach which I used is easier. > Let > >> me > >>>> know if you have any thoughts. > >>>> > >>>> Regards > >>>> Vikas > >>>> > >>>> On May 28, 2012, at 12:51 PM, Vikas Mayur wrote: > >>>> > >>>>> Hi Pierre, > >>>>> > >>>>> Thanks for your help and your interest in the topic. I am currently > >>>> testing business transaction and their related accounting transactions > >> with > >>>> the OFBiz demo data along with my custom party data of Wholesale, > Retail > >>>> channels. > >>>>> > >>>>> For instance when an invoice is captured for a sales order, you would > >>>> have various accounting transactions corresponding to this business > >>>> transaction (Invoice is being captured) like account receivables, > COGS, > >>>> discounts, general sales etc. The transactions with OFBiz demo data > are > >>>> currently posted to correct account but they are registered to > >> 'Company' - > >>>> the parent organization. > >>>>> > >>>>> After doing some of these tests and how the transactions are posted, > I > >>>> think I would need two things to be able to generate income sheet per > >>>> distribution channel. > >>>>> > >>>>> 1. Create separate revenue accounts for each distribution channels, > >> they > >>>> can be setup as subsidiary ledger accounts similar to the existing > demo > >>>> data. For example, the hierarchy of accounts for SALES would look like > >> this. > >>>>> > >>>>> > >>>> Revenue > >>>>> > >>>> | > >>>>> > >>>> Sales > >>>>> > >>>> | > >>>>> > >>>> ------------------------------------------------------------- > >>>>> | > >>>> | | > >>>>> General Sales General Sales > >>>> Wholesale General Sales Retail > >>>>> > >>>>> where 'General Sales' account transaction would be registered to > >>>> 'Company' - the parent organization. > >>>>> > >>>>> 2. Create duplicate accounting transactions for each revenue account > >> in > >>>> such a manner that these transactions are registered to Wholesale (If > >> the > >>>> sale was made to WholeSalers), Retail (If the sale was made to > >> Retailers) > >>>> etc. This would require additional code so that system can lookup the > >> 'Bill > >>>> To Customer' and automatically create all the required duplicate > >>>> transactions. > >>>>> > >>>>> Once all the transactions are posted, I should be able to generate a > >>>> consolidated income sheet (this already works OOTB) for Company and > >>>> separate income sheet per distribution channel. > >>>>> > >>>>> Let me know if you see any issues with this approach. > >>>>> > >>>>> Regards > >>>>> Vikas > >>>>> > >>>>> On May 25, 2012, at 7:24 PM, Pierre Smits wrote: > >>>>> > >>>>>> Vikas, > >>>>>> > >>>>>> If the distribution channels are truly independent organisation > >> (meaning > >>>>>> legally) you should set up for each one a different instance of > OFBiz, > >>>>>> whereby the distribution channels buys from the company and sells to > >>>> their > >>>>>> customers. Otherwise there might appear a conflict of interest. > >>>>>> > >>>>>> If otherwise the distribution channels are like daughter companies > or > >>>>>> subsidiaries (and accounting, et all is done by the company) you > could > >>>>>> (should?) link them in one instance to the company like departments > >> and > >>>>>> create separate costcenters for each. Subsequently create for each > the > >>>> set > >>>>>> of accounts regarding turnover, discount and cogs and connect those > to > >>>> the > >>>>>> costcenters. > >>>>>> > >>>>>> In order to capture for each you could then create a sales channel > for > >>>> each > >>>>>> (catalog, categories and if nessesary stores) and apply for each > >>>>>> distribution channel the various price, promotion and shipping rules > >> in > >>>>>> their respective sales channel. > >>>>>> > >>>>>> Finally, and this is something I haven't tested yet, you should map > >> the > >>>>>> earlier defined fico accounts to the categories in each sales > channel > >> in > >>>>>> ProductCategoryGLAccount in FICO. See example below. > >>>>>> > >>>>>> > >>>> > >> > https://demo-trunk.ofbiz.apache.org:8443/accounting/control/GlAccountAssignment?organizationPartyId=Company > >>>>>> > >>>>>> That should do the trick. But like I said, I haven't tested it yet. > >>>>>> > >>>>>> One thing I am also not certain about is how sales transactions will > >> be > >>>>>> handled by OFBiz when generated by a Sales Backoffice for each when > >> the > >>>>>> scenario described above is in place. > >>>>>> > >>>>>> Good luck with your endeavours and keep us posted how you will > >>>> eventually > >>>>>> get to your optimal solution. > >>>>>> > >>>>>> Regards, > >>>>>> > >>>>>> Pierre > >>>>>> > >>>>>> > >>>>>> 2012/5/25 Vikas Mayur <[email protected]> > >>>>>> > >>>>>>> Hi Pierre, > >>>>>>> > >>>>>>> Thanks for your response. Yes, you are absolutely correct. I should > >> be > >>>>>>> able to see the income sheet of the company (parent organization) > as > >>>> well > >>>>>>> as the income sheet per distribution channel. > >>>>>>> > >>>>>>> Regards > >>>>>>> Vikas > >>>>>>> > >>>>>>> On May 25, 2012, at 2:36 PM, Pierre Smits wrote: > >>>>>>> > >>>>>>>> Hi Vikas, > >>>>>>>> > >>>>>>>> Just to get a greater understanding of the challenge you're > facing, > >> I > >>>> am > >>>>>>>> understanding that the distribution channels operate as > independent > >>>>>>>> organisations and not as internal departments. And that the > >>>> distributors, > >>>>>>>> wholesales and retailers are associated to the distribution > >> channels. > >>>> And > >>>>>>>> that sales is done thru the distribution channels, but that the > >>>>>>>> transactions of the sale need to be registered with the company > >>>> combined > >>>>>>>> with commission calculations per distribution channel. > >>>>>>>> > >>>>>>>> Am I correct in assuming that's what you're saying? > >>>>>>>> > >>>>>>>> Regards, > >>>>>>>> > >>>>>>>> Pierre > >>>>>>>> > >>>>>>>> 2012/5/25 Vikas Mayur <[email protected]> > >>>>>>>> > >>>>>>>>> Hi, > >>>>>>>>> > >>>>>>>>> I am working for a customer and he is looking to setup a chart of > >>>>>>> accounts > >>>>>>>>> for his organization. I have mentioned below a brief description > of > >>>> the > >>>>>>>>> business of this customer, his requirements and a possible > solution > >>>>>>> that I > >>>>>>>>> think would meet his needs. Please take a look and also through > the > >>>> Q's > >>>>>>>>> below :), if you know anything then let me know. Thanks in > advance > >>>> !!! > >>>>>>>>> > >>>>>>>>> Business Overview: > >>>>>>>>> A parent organization with several divisions like R&D, Sales & > >>>>>>> Marketing, > >>>>>>>>> Operations, Administration etc. and employees. The company > (parent > >>>>>>>>> organization) only sell its products through a number of > >> distribution > >>>>>>>>> channels (they also call them as revenue channels & profit > centers) > >>>> like > >>>>>>>>> wholesale, distributor. retail etc. The company will give them a > >>>> certain > >>>>>>>>> commission (as per the agreement) on every sale. The distribution > >>>>>>> channels > >>>>>>>>> are not the divisions of the company and does not have any > >> employees > >>>>>>>>> either. The company will have a number of warehouses (probably > >> shared > >>>>>>> among > >>>>>>>>> the distribution channels) to fulfill the orders. > >>>>>>>>> > >>>>>>>>> Requirement: > >>>>>>>>> The company need to generate a separate income sheet for each > >>>>>>> distribution > >>>>>>>>> channels so that they know the net income by each channel. They > >> also > >>>>>>> need a > >>>>>>>>> consolidated GL totals (generate a consolidated income statement) > >>>> and a > >>>>>>>>> balance sheet report for the company. > >>>>>>>>> > >>>>>>>>> Solution: > >>>>>>>>> Distribution Channel Setup > >>>>>>>>> The distribution channels are organizations (although not > internal > >> to > >>>>>>> the > >>>>>>>>> Company) and will be setup as party group in the system. For > >> example > >>>>>>> there > >>>>>>>>> will be party group for wholesale, distributor & retail each. > There > >>>>>>> would > >>>>>>>>> be a number of wholesalers, distributors and retailers who will > >> sell > >>>> the > >>>>>>>>> products of the company and they will also be setup as party > group > >>>> with > >>>>>>> a > >>>>>>>>> party relationship to wholesale, distributor & retail party group > >>>>>>>>> respectively. > >>>>>>>>> GL Account & Chart of Accounts Setup > >>>>>>>>> I looked through the demo GL setup and Chart of Accounts template > >>>> data > >>>>>>> in > >>>>>>>>> OFBiz, was very helpful. I know that an account can be used by > one > >> or > >>>>>>> more > >>>>>>>>> internal organization but have doubts about how to associate the > >>>> account > >>>>>>>>> and how the transaction would be posted to the correct account. > >>>> Sorry, > >>>>>>>>> haven't looked through the code in detail. > >>>>>>>>> > >>>>>>>>> There will be number of accounts but lets say we have three > >> accounts, > >>>>>>> 3000 > >>>>>>>>> - Sales, 3010 - Discount on Sale, 3020 - COGS. The net income > will > >> be > >>>>>>>>> [Total of Sales - (Total Discount on Sale + Total COGS)]. > >>>>>>>>> > >>>>>>>>> Q1. Do I need to associate the above accounts to the parent > company > >>>> OR > >>>>>>> to > >>>>>>>>> each distribution channel OR both? Default mappings? > >>>>>>>>> Q2. Do I need separate accounts for the parent company and each > >>>>>>>>> distribution channels? Lets say the 4 different Sales account for > >> the > >>>>>>>>> parent and three distribution channels? Don't think so. > >>>>>>>>> Q3. Any other thing I should be concerned about, like the shared > >>>>>>> warehouse > >>>>>>>>> by all the distribution channels? > >>>>>>>>> > >>>>>>>>> Regards > >>>>>>>>> Vikas > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>> > >>>>>>> > >>>>> > >>>> > >>>> > >> > >> > >
