Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c102d51f

Von Bernd Bleßmann vor fast 11 Jahren hinzugefügt

  • ID c102d51f8d6b29354bdf86c75e5f011e20ec4abd
  • Vorgänger 45f8b16a
  • Nachfolger 1b219f2a

backup_vars und restore_vars bei Einkaufsrechnungen verwenden, ...

anstatt alle Variablen einzeln zu sichern.

Unterschiede anzeigen:

bin/mozilla/ir.pl
116 116
    }
117 117
  }
118 118

  
119
  my ($payment_id, $language_id, $taxzone_id, $currency, $delivery_term_id, $intnotes);
120
  if ($form->{payment_id}) {
121
    $payment_id = $form->{payment_id};
122
  }
123
  if ($form->{language_id}) {
124
    $language_id = $form->{language_id};
125
  }
126
  if ($form->{taxzone_id}) {
127
    $taxzone_id = $form->{taxzone_id};
128
  }
129
  if ($form->{currency}) {
130
    $currency = $form->{currency};
131
  }
132
  if ($form->{delivery_term_id}) {
133
    $delivery_term_id = $form->{delivery_term_id};
134
  }
135
  if (exists $form->{intnotes}) {
136
    $intnotes = $form->{intnotes};
137
  }
119
  $form->backup_vars(qw(payment_id language_id taxzone_id
120
                        currency delivery_term_id intnotes cp_id));
138 121

  
139
  my $cp_id = $form->{cp_id};
140 122
  IR->get_vendor(\%myconfig, \%$form);
141 123
  IR->retrieve_invoice(\%myconfig, \%$form);
142
  $form->{cp_id} = $cp_id;
143 124

  
144
  if ($payment_id) {
145
    $form->{payment_id} = $payment_id;
146
  }
147
  if ($language_id) {
148
    $form->{language_id} = $language_id;
149
  }
150
  if ($taxzone_id) {
151
    $form->{taxzone_id} = $taxzone_id;
152
  }
153
  if ($currency) {
154
    $form->{currency} = $currency;
155
  }
156
  if ($delivery_term_id) {
157
    $form->{delivery_term_id} = $delivery_term_id;
158
  }
159
  if (defined $intnotes) {
160
    $form->{intnotes} = $intnotes;
161
  }
125
  $form->restore_vars(qw(payment_id language_id taxzone_id
126
                         currency delivery_term_id intnotes cp_id));
162 127

  
163 128
  my @curr = $form->get_all_currencies();
164 129
  map { $form->{selectcurrency} .= "<option>$_\n" } @curr;

Auch abrufbar als: Unified diff