Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6aa3c3ea

Von Tamino Steinert vor 10 Monaten hinzugefügt

  • ID 6aa3c3ea5487605d446647c1348c0e6c43713837
  • Vorgänger a03a52eb
  • Nachfolger 4337cbf1

EmailJournal: ZUGFeRD-Import mit ausgewähter Buchungsvorlage

Unterschiede anzeigen:

SL/Controller/ZUGFeRD.pm
161 161
}
162 162

  
163 163
sub build_ap_transaction_form_defaults {
164
  my ($self, $data) = @_;
164
  my ($self, $data, %params) = @_;
165
  my $vendor = $params{vendor};
165 166

  
166 167
  my $parser = $data->{'invoice_xml'};
167 168

  
......
172 173
  my $iban = $metadata{'iban'};
173 174
  my $invnumber = $metadata{'invnumber'};
174 175

  
175
  if ( ! ($metadata{'ustid'} or $metadata{'taxnumber'}) ) {
176
    die t8("Cannot process this invoice: neither VAT ID nor tax ID present.");
177
  }
176
  if ($vendor) {
177
    if ($metadata{'ustid'} && $vendor->ustid && ($metadata{'ustid'} ne $vendor->ustid)) {
178
      $intnotes .= "\n" . t8('USt-IdNr.') . ': '
179
      . t8("Record VAT ID #1 doesn't match vendor VAT ID #2", $metadata{'ustid'}, $vendor->ustid);
180
    }
181
    if ($metadata{'taxnumber'} && $vendor->taxnumber && ($metadata{'taxnumber'} ne $vendor->taxnumber)) {
182
      $intnotes .= "\n" . t8("Tax Number") . ': '
183
      . t8("Record tax ID #1 doesn't match vendor tax ID #2", $metadata{'taxnumber'}, $vendor->taxnumber);
184
    }
185
  } else {
186
    if ( ! ($metadata{'ustid'} or $metadata{'taxnumber'}) ) {
187
      die t8("Cannot process this invoice: neither VAT ID nor tax ID present.");
188
    }
178 189

  
179
  my $vendor = find_vendor($metadata{'ustid'}, $metadata{'taxnumber'});
190
    $vendor = find_vendor($metadata{'ustid'}, $metadata{'taxnumber'});
180 191

  
181
  die t8("Vendor with VAT ID (#1) and/or tax ID (#2) not found. Please check if the vendor " .
182
          "#3 exists and whether it has the correct tax ID/VAT ID." ,
183
           $metadata{'ustid'},
184
           $metadata{'taxnumber'},
185
           $metadata{'vendor_name'},
186
  ) unless $vendor;
192
    die t8("Vendor with VAT ID (#1) and/or tax ID (#2) not found. Please check if the vendor " .
193
            "#3 exists and whether it has the correct tax ID/VAT ID." ,
194
             $metadata{'ustid'},
195
             $metadata{'taxnumber'},
196
             $metadata{'vendor_name'},
197
    ) unless $vendor;
198
  }
187 199

  
188 200

  
189 201
  # Check IBAN specified on bill matches the one we've got in

Auch abrufbar als: Unified diff