View | Details | Raw Unified | Return to bug 10461
Collapse All | Expand All

(-)a/acqui/addorder.pl (-2 / +2 lines)
Lines 154-160 my $orderinfo = $input->Vars; Link Here
154
$orderinfo->{'list_price'}    ||=  0;
154
$orderinfo->{'list_price'}    ||=  0;
155
$orderinfo->{'uncertainprice'} ||= 0;
155
$orderinfo->{'uncertainprice'} ||= 0;
156
$orderinfo->{subscriptionid} ||= undef;
156
$orderinfo->{subscriptionid} ||= undef;
157
157
$orderinfo->{gstrate};
158
my $user = $input->remote_user;
158
my $user = $input->remote_user;
159
159
160
# create, modify or delete biblio
160
# create, modify or delete biblio
Lines 195-201 if ( $orderinfo->{quantity} ne '0' ) { Link Here
195
        }
195
        }
196
        $orderinfo->{biblionumber}=$biblionumber;
196
        $orderinfo->{biblionumber}=$biblionumber;
197
    }
197
    }
198
198
$orderinfo->{ecost}=  $orderinfo->{ecost} +  $orderinfo->{ecost}*$orderinfo->{gstrate}  if $orderinfo->{listinc} == 0;
199
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
199
    $orderinfo->{unitprice} = $orderinfo->{ecost} if not defined $orderinfo->{unitprice} or $orderinfo->{unitprice} eq '';
200
200
201
    # if we already have $ordernumber, then it's an ordermodif
201
    # if we already have $ordernumber, then it's an ordermodif
(-)a/acqui/orderreceive.pl (-10 / +6 lines)
Lines 170-188 if ( $bookseller->{listincgst} ) { Link Here
170
        $ecost = $order->{ecost};
170
        $ecost = $order->{ecost};
171
        $unitprice = $order->{unitprice};
171
        $unitprice = $order->{unitprice};
172
    } else {
172
    } else {
173
        $rrp = $order->{rrp} / ( 1 + $order->{gstrate} );
173
        $unitprice = $order->{unitprice} + ($order->{unitprice}*$order->{gstrate} );
174
        $ecost = $order->{ecost} / ( 1 + $order->{gstrate} );
175
        $unitprice = $order->{unitprice} / ( 1 + $order->{gstrate} );
176
    }
174
    }
177
} else {
175
} else {
178
    if ( $bookseller->{invoiceincgst} ) {
176
    if ( $bookseller->{invoiceincgst} ) {
179
        $rrp = $order->{rrp} * ( 1 + $order->{gstrate} );
177
        $rrp = $order->{rrp} +($order->{rrp}*$order->{gstrate} );
180
        $ecost = $order->{ecost} * ( 1 + $order->{gstrate} );
178
        $ecost = $order->{ecost} +($order->{ecost}*$order->{gstrate});
181
        $unitprice = $order->{unitprice} * ( 1 + $order->{gstrate} );
182
    } else {
179
    } else {
183
        $rrp = $order->{rrp};
180
        $unitprice = $order->{unitprice} + ($order->{unitprice}*$order->{gstrate} );
184
        $ecost = $order->{ecost};
181
	$rrp = $order->{rrp} +($order->{rpp}*$order->{gstrate} );
185
        $unitprice = $order->{unitprice};
182
        $ecost = $order->{ecost} +($order->{ecost}*$order->{gstrate})
186
    }
183
    }
187
 }
184
 }
188
185
189
- 

Return to bug 10461