Revision 07af07c7
Von Kivitendo Admin vor mehr als 1 Jahr hinzugefügt
| SL/Dev/Record.pm | ||
|---|---|---|
|
use Data::Dumper;
|
||
|
use SL::Locale::String qw(t8);
|
||
|
use SL::DATEV;
|
||
|
use SL::Model::Record;
|
||
|
|
||
|
my %record_type_to_item_type = ( sales_invoice => 'SL::DB::InvoiceItem',
|
||
|
purchase_invoice => 'SL::DB::InvoiceItem',
|
||
| ... | ... | |
|
orderitems => $orderitems,
|
||
|
);
|
||
|
$delivery_order->assign_attributes(%params) if %params;
|
||
|
$delivery_order->save;
|
||
|
SL::Model::Record->save($delivery_order);
|
||
|
return $delivery_order;
|
||
|
}
|
||
|
|
||
| ... | ... | |
|
orderitems => $orderitems,
|
||
|
);
|
||
|
$delivery_order->assign_attributes(%params) if %params;
|
||
|
$delivery_order->save;
|
||
|
SL::Model::Record->save($delivery_order);
|
||
|
return $delivery_order;
|
||
|
}
|
||
|
|
||
| ... | ... | |
|
$reclamation->assign_attributes(%params) if %params;
|
||
|
|
||
|
if ( $save ) {
|
||
|
$reclamation->calculate_prices_and_taxes; # not tested
|
||
|
$reclamation->save;
|
||
|
SL::Model::Record->save($reclamation);
|
||
|
}
|
||
|
return $reclamation;
|
||
|
}
|
||
| ... | ... | |
|
$reclamation->assign_attributes(%params) if %params;
|
||
|
|
||
|
if ( $save ) {
|
||
|
$reclamation->calculate_prices_and_taxes; # not tested
|
||
|
$reclamation->save;
|
||
|
SL::Model::Record->save($reclamation);
|
||
|
}
|
||
|
return $reclamation;
|
||
|
}
|
||
| ... | ... | |
|
$record->assign_attributes(%params) if %params;
|
||
|
|
||
|
if ( $save ) {
|
||
|
$record->calculate_prices_and_taxes;
|
||
|
$record->save;
|
||
|
SL::Model::Record->save($record);
|
||
|
}
|
||
|
return $record;
|
||
|
}
|
||
| ... | ... | |
|
$record->assign_attributes(%params) if %params;
|
||
|
|
||
|
if ( $save ) {
|
||
|
$record->calculate_prices_and_taxes; # not tested for purchase orders
|
||
|
$record->save;
|
||
|
SL::Model::Record->save($record);
|
||
|
}
|
||
|
return $record;
|
||
|
};
|
||
Auch abrufbar als: Unified diff
SL::Dev::Record nutzt SL::Model::Record zum Speichern