|
Lines 124-140
my $subtotal_for_funds;
Link Here
|
| 124 |
for my $order ( @orders ) { |
124 |
for my $order ( @orders ) { |
| 125 |
$order->{'unitprice'} += 0; |
125 |
$order->{'unitprice'} += 0; |
| 126 |
|
126 |
|
| 127 |
if ( $bookseller->{listincgst} and not $bookseller->{invoiceincgst} ) { |
127 |
if ( $bookseller->{invoiceincgst} ) { |
| 128 |
$order->{ecost} = $order->{ecost_tax_excluded}; |
|
|
| 129 |
$order->{unitprice} = $order->{unitprice_tax_excluded}; |
| 130 |
} |
| 131 |
elsif ( not $bookseller->{listinct} and $bookseller->{invoiceincgst} ) { |
| 132 |
$order->{ecost} = $order->{ecost_tax_included}; |
128 |
$order->{ecost} = $order->{ecost_tax_included}; |
| 133 |
$order->{unitprice} = $order->{unitprice_tax_included}; |
129 |
$order->{unitprice} = $order->{unitprice_tax_included}; |
| 134 |
} else { |
130 |
} |
| 135 |
$order->{ecost} = $order->{ecost_tax_excluded}; |
131 |
else { |
|
|
132 |
$order->{ecost} = $order->{ecost_tax_excluded}; |
| 136 |
$order->{unitprice} = $order->{unitprice_tax_excluded}; |
133 |
$order->{unitprice} = $order->{unitprice_tax_excluded}; |
| 137 |
} |
134 |
} |
|
|
135 |
|
| 138 |
$order->{total} = $order->{unitprice} * $order->{quantity}; |
136 |
$order->{total} = $order->{unitprice} * $order->{quantity}; |
| 139 |
|
137 |
|
| 140 |
my %line = %{ $order }; |
138 |
my %line = %{ $order }; |
|
Lines 224-232
unless( defined $invoice->{closedate} ) {
Link Here
|
| 224 |
for (my $i = 0 ; $i < $countpendings ; $i++) { |
222 |
for (my $i = 0 ; $i < $countpendings ; $i++) { |
| 225 |
my $order = $pendingorders->[$i]; |
223 |
my $order = $pendingorders->[$i]; |
| 226 |
|
224 |
|
| 227 |
if ( $bookseller->{listincgst} and not $bookseller->{invoiceincgst} ) { |
225 |
if ( $bookseller->{invoiceincgst} ) { |
| 228 |
$order->{ecost} = $order->{ecost_tax_excluded}; |
|
|
| 229 |
} elsif ( not $bookseller->{listinct} and $bookseller->{invoiceincgst} ) { |
| 230 |
$order->{ecost} = $order->{ecost_tax_included}; |
226 |
$order->{ecost} = $order->{ecost_tax_included}; |
| 231 |
} else { |
227 |
} else { |
| 232 |
$order->{ecost} = $order->{ecost_tax_excluded}; |
228 |
$order->{ecost} = $order->{ecost_tax_excluded}; |
| 233 |
- |
|
|