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

(-)a/acqui/addorder.pl (-3 / +5 lines)
Lines 129-135 use C4::Biblio qw( Link Here
129
    TransformHtmlToXml
129
    TransformHtmlToXml
130
    TransformKohaToMarc
130
    TransformKohaToMarc
131
);
131
);
132
use C4::Budgets qw( GetBudget GetBudgetSpent GetBudgetOrdered );
132
use C4::Budgets qw( GetBudget GetBudgetSpent GetBudgetOrdered FieldsForCalculatingFundValues );
133
use C4::Items qw( AddItemFromMarc );
133
use C4::Items qw( AddItemFromMarc );
134
use C4::Output qw( output_html_with_http_headers );
134
use C4::Output qw( output_html_with_http_headers );
135
use C4::Log qw( logaction );
135
use C4::Log qw( logaction );
Lines 162-168 unless($confirm_budget_exceeding) { Link Here
162
    if ( $ordernumber ) {
162
    if ( $ordernumber ) {
163
        # modifying an existing order so remove order price from $budget_ordered
163
        # modifying an existing order so remove order price from $budget_ordered
164
        my $order = Koha::Acquisition::Orders->find($ordernumber);
164
        my $order = Koha::Acquisition::Orders->find($ordernumber);
165
        $budget_ordered = $budget_ordered - ( $order->ecost_tax_included * $order->quantity );
165
166
        # get correct unitprice and ecost fields
167
        my ( $unitprice_field, $ecost_field ) = FieldsForCalculatingFundValues();
168
        $budget_ordered = $budget_ordered - ( $order->$ecost_field * $order->quantity );
166
    }
169
    }
167
170
168
    my $budget_used = $budget_spent + $budget_ordered;
171
    my $budget_used = $budget_spent + $budget_ordered;
169
- 

Return to bug 31631