Revision ba0190a3
Von Jan Büren vor mehr als 1 Jahr hinzugefügt
SL/DB/Helper/Payment.pm | ||
---|---|---|
286 | 286 |
$arap_booking->save; |
287 | 287 |
push @new_acc_ids, $arap_booking->acc_trans_id; |
288 | 288 |
|
289 |
$self->paid($self->paid + _round($paid_amount)) if $paid_amount; |
|
290 |
$self->datepaid($transdate_obj); |
|
291 |
$self->save; |
|
292 |
|
|
289 | 293 |
# hook for invoice_for_advance_payment DATEV always pairs, acc_trans_id has to be higher than arap_booking ;-) |
290 | 294 |
if ($self->invoice_type eq 'invoice_for_advance_payment') { |
291 | 295 |
my $clearing_chart = SL::DB::Chart->new(id => $::instance_conf->get_advance_payment_clearing_chart_id)->load; |
292 | 296 |
die "No Clearing Chart for Advance Payment" unless ref $clearing_chart eq 'SL::DB::Chart'; |
293 | 297 |
|
294 | 298 |
# what does ptc say |
299 |
# DONT SAVE $self sellprice, fxsellprice trouble: redmine #352 |
|
295 | 300 |
my %inv_calc = $self->calculate_prices_and_taxes(); |
296 | 301 |
my @trans_ids = keys %{ $inv_calc{amounts} }; |
297 | 302 |
die "Invalid state for advance payment more than one trans_id" if (scalar @trans_ids > 1); |
... | ... | |
347 | 352 |
push @new_acc_ids, $tax_booking->acc_trans_id; |
348 | 353 |
} |
349 | 354 |
} |
350 |
$self->paid($self->paid + _round($paid_amount)) if $paid_amount; |
|
351 |
$self->datepaid($transdate_obj); |
|
352 |
$self->save; |
|
353 |
|
|
354 | 355 |
# make sure transactions will be reloaded the next time $self->transactions |
355 | 356 |
# is called, as pay_invoice saves the acc_trans objects individually rather |
356 | 357 |
# than adding them to the transaction relation array. |
Auch abrufbar als: Unified diff
Anzahlungsrechnung mit Positionsrabatt nicht fehlerhaft mit PTC berechnen
... und vor allen Dingen speichern. Workaround für das prinzipielle
Problem in redmine #352 u.a.