Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f45b296f

Von Bernd Blessmann vor etwa 13 Jahren hinzugefügt

  • ID f45b296fb0bb9491d86d80e9f7a7d79c3e0295ba
  • Vorgänger 7274f9c8
  • Nachfolger 80913703

Änderbarkeit bei Zahlungen f. Verkaufsrechnungen konfigurierbar.

Nie, immer oder am selben Tag, einstellbar in der lx_office.conf

Unterschiede anzeigen:

SL/IS.pm
877 877
  # record payments and offsetting AR
878 878
  if (!$form->{storno}) {
879 879
    for my $i (1 .. $form->{paidaccounts}) {
880
      
881
      if ($form->{"acc_trans_id_$i"}
882
          && $payments_only
883
          && ($::lx_office_conf{features}->{payments_changeable} == 0)) {
884
        next;
885
      }
880 886

  
881 887
      next if ($form->{"paid_$i"} == 0);
882 888

  
......
908 914

  
909 915
      # record payment
910 916
      $form->{"paid_$i"} *= -1;
917
      my $gldate = (conv_date($form->{"gldate_$i"}))? conv_date($form->{"gldate_$i"}) : conv_date($form->current_date($myconfig));
911 918

  
912 919
      $query =
913
      qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, source, memo, taxkey, project_id)
914
         VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, ?,
920
      qq|INSERT INTO acc_trans (trans_id, chart_id, amount, transdate, gldate, source, memo, taxkey, project_id)
921
         VALUES (?, (SELECT id FROM chart WHERE accno = ?), ?, ?, ?, ?, ?,
915 922
                 (SELECT taxkey_id FROM chart WHERE accno = ?), ?)|;
916 923
      @values = (conv_i($form->{"id"}), $accno, $form->{"paid_$i"}, $form->{"datepaid_$i"},
917
                 $form->{"source_$i"}, $form->{"memo_$i"}, $accno, $project_id);
924
                 $gldate, $form->{"source_$i"}, $form->{"memo_$i"}, $accno, $project_id);
918 925
      do_query($form, $dbh, $query, @values);
919 926

  
920 927
      # exchangerate difference
......
1128 1135
  $old_form = save_form();
1129 1136

  
1130 1137
  # Delete all entries in acc_trans from prior payments.
1131
  $self->_delete_payments($form, $dbh);
1138
  if ($::lx_office_conf{features}->{payments_changeable} != 0) {
1139
    $self->_delete_payments($form, $dbh);
1140
  }
1132 1141

  
1133 1142
  # Save the new payments the user made before cleaning up $form.
1134
  map { $payments{$_} = $form->{$_} } grep m/^datepaid_\d+$|^memo_\d+$|^source_\d+$|^exchangerate_\d+$|^paid_\d+$|^AR_paid_\d+$|^paidaccounts$/, keys %{ $form };
1143
  map { $payments{$_} = $form->{$_} } grep m/^datepaid_\d+$|^gldate_\d+$|^acc_trans_id_\d+$|^memo_\d+$|^source_\d+$|^exchangerate_\d+$|^paid_\d+$|^AR_paid_\d+$|^paidaccounts$/, keys %{ $form };
1135 1144

  
1136 1145
  # Clean up $form so that old content won't tamper the results.
1137 1146
  %keep_vars = map { $_, 1 } qw(login password id);

Auch abrufbar als: Unified diff