Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a05eead3

Von Sven Schöling vor etwa 17 Jahren hinzugefügt

  • ID a05eead353b55ba228a5eec40f90c0f2c330092a
  • Vorgänger 82c41aac
  • Nachfolger 6ca711a5

Kosmetik, merge aus -r5105,5106,5118,5120,5124

Unterschiede anzeigen:

bin/mozilla/oe.pl
2137 2137

  
2138 2138
    # also copy deliverydate from the order
2139 2139
    $form->{deliverydate} = $form->{reqdate} if $form->{reqdate};
2140
    $form->{orddate} = $form->{transdate};
2140
    $form->{orddate}      = $form->{transdate};
2141 2141
  } else {
2142 2142
    $form->isblank("quonumber", $locale->text('Quotation Number missing!'));
2143 2143
    $form->isblank("transdate", $locale->text('Quotation Date missing!'));
2144
    $form->{ordnumber} = "";
2145
    $form->{quodate} = $form->{transdate};
2144
    $form->{ordnumber}    = "";
2145
    $form->{quodate}      = $form->{transdate};
2146 2146
  }
2147 2147
  
2148
  if($form->{payment_id}) { 
2149
    $payment_id = $form->{payment_id};
2150
  }
2148
  $payment_id = $form->{payment_id} if $form->{payment_id};
2151 2149
  
2152 2150
  # if the name changed get new values
2153 2151
  if (&check_name($form->{vc})) {
2154
    if($form->{payment_id} eq "") { 
2155
      $form->{payment_id} = $payment_id;
2156
    }
2152
    $form->{payment_id} = $payment_id if $form->{payment_id} eq "";
2157 2153
    &update;
2158 2154
    exit;
2159 2155
  }
......
2161 2157
  $form->{cp_id} *= 1;
2162 2158

  
2163 2159
  for $i (1 .. $form->{rowcount}) {
2164
    map({ $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig,
2165
                                                     $form->{"${_}_${i}"})
2166
            if ($form->{"${_}_${i}"}) }
2167
        qw(ship qty sellprice listprice basefactor));
2160
    for (qw(ship qty sellprice listprice basefactor)) {
2161
      $form->{"${_}_${i}"} = $form->parse_amount(\%myconfig, $form->{"${_}_${i}"}) if $form->{"${_}_${i}"};
2162
    }
2168 2163
  }
2169 2164

  
2170 2165
  if (   $form->{type} =~ /_order/
......
2174 2169
    $buysell = ($form->{type} eq 'sales_order') ? "buy" : "sell";
2175 2170

  
2176 2171
    $orddate      = $form->current_date(\%myconfig);
2177
    $exchangerate =
2178
      $form->check_exchangerate(\%myconfig, $form->{currency}, $orddate,
2179
                                $buysell);
2172
    $exchangerate = $form->check_exchangerate(\%myconfig, $form->{currency}, $orddate, $buysell);
2180 2173

  
2181 2174
    if (!$exchangerate) {
2182 2175
      &backorder_exchangerate($orddate, $buysell);
......
2197 2190
  }
2198 2191

  
2199 2192
  $form->{transdate} = $form->{invdate} = $form->current_date(\%myconfig);
2200
  $form->{duedate} =
2201
    $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
2193
  $form->{duedate}   = $form->current_date(\%myconfig, $form->{invdate}, $form->{terms} * 1);
2202 2194

  
2203 2195
  $form->{id}     = '';
2204 2196
  $form->{closed} = 0;
......
2219 2211
    $script         = "ir";
2220 2212
    $buysell        = 'sell';
2221 2213
  }
2222
  if ($form->{type} eq 'sales_order' || $form->{type} eq 'sales_quotation') {
2214

  
2215
  if (   $form->{type} eq 'sales_order' 
2216
      || $form->{type} eq 'sales_quotation') {
2223 2217
    $form->{title}  = $locale->text('Add Sales Invoice');
2224 2218
    $form->{script} = 'is.pl';
2225 2219
    $script         = "is";
......
2227 2221
  }
2228 2222

  
2229 2223
  # bo creates the id, reset it
2230
  map { delete $form->{$_} }
2231
    qw(id subject message cc bcc printed emailed queued);
2224
  map { delete $form->{$_} } qw(id subject message cc bcc printed emailed queued);
2232 2225
  $form->{ $form->{vc} } =~ s/--.*//g;
2233 2226
  $form->{type} = "invoice";
2234 2227

  

Auch abrufbar als: Unified diff