Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 07af07c7

Von Kivitendo Admin vor etwa 1 Jahr hinzugefügt

  • ID 07af07c7b7e7c595780aa3bf862e505d1716b8b9
  • Vorgänger e6f82402
  • Nachfolger 27c3c61e

SL::Dev::Record nutzt SL::Model::Record zum Speichern

Unterschiede anzeigen:

SL/Dev/Record.pm
45 45
use Data::Dumper;
46 46
use SL::Locale::String qw(t8);
47 47
use SL::DATEV;
48
use SL::Model::Record;
48 49

  
49 50
my %record_type_to_item_type = ( sales_invoice        => 'SL::DB::InvoiceItem',
50 51
                                 purchase_invoice     => 'SL::DB::InvoiceItem',
......
181 182
    orderitems   => $orderitems,
182 183
  );
183 184
  $delivery_order->assign_attributes(%params) if %params;
184
  $delivery_order->save;
185
  SL::Model::Record->save($delivery_order);
185 186
  return $delivery_order;
186 187
}
187 188

  
......
209 210
    orderitems   => $orderitems,
210 211
  );
211 212
  $delivery_order->assign_attributes(%params) if %params;
212
  $delivery_order->save;
213
  SL::Model::Record->save($delivery_order);
213 214
  return $delivery_order;
214 215
}
215 216

  
......
262 263
  $reclamation->assign_attributes(%params) if %params;
263 264

  
264 265
  if ( $save ) {
265
    $reclamation->calculate_prices_and_taxes; # not tested
266
    $reclamation->save;
266
    SL::Model::Record->save($reclamation);
267 267
  }
268 268
  return $reclamation;
269 269
}
......
292 292
  $reclamation->assign_attributes(%params) if %params;
293 293

  
294 294
  if ( $save ) {
295
    $reclamation->calculate_prices_and_taxes; # not tested
296
    $reclamation->save;
295
    SL::Model::Record->save($reclamation);
297 296
  }
298 297
  return $reclamation;
299 298
}
......
762 761
  $record->assign_attributes(%params) if %params;
763 762

  
764 763
  if ( $save ) {
765
    $record->calculate_prices_and_taxes;
766
    $record->save;
764
    SL::Model::Record->save($record);
767 765
  }
768 766
  return $record;
769 767
}
......
794 792
  $record->assign_attributes(%params) if %params;
795 793

  
796 794
  if ( $save ) {
797
    $record->calculate_prices_and_taxes; # not tested for purchase orders
798
    $record->save;
795
    SL::Model::Record->save($record);
799 796
  }
800 797
  return $record;
801 798
};

Auch abrufbar als: Unified diff