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 160-166 unless($confirm_budget_exceeding) { Link Here
160
    if ( $ordernumber ) {
160
    if ( $ordernumber ) {
161
        # modifying an existing order so remove order price from $budget_ordered
161
        # modifying an existing order so remove order price from $budget_ordered
162
        my $order = Koha::Acquisition::Orders->find($ordernumber);
162
        my $order = Koha::Acquisition::Orders->find($ordernumber);
163
        $budget_ordered = $budget_ordered - ( $order->ecost_tax_included * $order->quantity );
163
164
        # get correct unitprice and ecost fields
165
        my ( $unitprice_field, $ecost_field ) = FieldsForCalculatingFundValues();
166
        $budget_ordered = $budget_ordered - ( $order->$ecost_field * $order->quantity );
164
    }
167
    }
165
168
166
    my $budget_used = $budget_spent + $budget_ordered;
169
    my $budget_used = $budget_spent + $budget_ordered;
167
- 

Return to bug 31631