News for hackers. Stuff that matters.

sram

Re:The best investment advice you'll never get on Monday November 29, 2010 @01:51AM (#1949612)
I got a wake up call about 4 years ago when my broker tried to convince me to buy into a hedge fund. Buried in the prospectus was an entry load of 8%. Fired him, and have been in index funds since.
Re:Ask HN: Why U.S. people dislike Nokia? on Friday June 11, 2010 @06:05PM (#1424910)
One Word: Symbian.

Make that two: Ewww

Re:Interviewing programmers: coding test example explained on Thursday June 03, 2010 @10:52AM (#1401462)
I always end up using perl when I have to do string manipulations and have let my c skills suffer as a result. Sad. Using perl regexp kills brain cells.

#!/usr/bin/perl

$in = <STDIN>;

$remove = <STDIN>;

chomp ($remove);

chomp ($in);

$in =~ s/$remove//g;

Re:Intuit QuickBooks Discount Error Goes Unfixed on Friday May 14, 2010 @11:47AM (#1347608)
It may appear like a defect, but it is actually doing what I'd consider to be the right thing. (Note: I am an Intuit Employee)

The crux of the matter is: How should the discount be applied, when there are multiple line items - taxable and non-taxable? One way of applying it is to say that the discount will be split equally between the line items that precede the discount.

In your example, there is a discount of $1, and there are two line items, one taxable, the other not. The software splits the discounts between the two line items. So there is 50c of taxable discount applied to item 1 (taxable), 50c of non-taxable applied to item 2 (non-taxable)

Well, then the calculation becomes more apparent. The calculation becomes

( 50c taxable + (50c*8%tax)) + 50c non-taxable

for a total of $1.04.

This way of calculating has been validated over a decade by Quickbooks users and accountants, so I do not consider it a defect. If you want to accomplish it differently, you can always apply a discount to a subtotal. If you look up Quickbooks help, you will find an entry for

'How is sales tax calculated for a discounted sale? '

That explains the behavior in great detail.

Hope this helps. Please let me know if there are additional clarifications needed on this

Thanks for being a QuickBooks user :-)