use SL::DB::MetaSetup::DeliveryOrderItem;
use SL::DB::Helper::ActsAsList;
use SL::DB::Helper::LinkedRecords;
+use SL::DB::Helper::RecordItem;
use SL::DB::Helper::CustomVariables (
sub_module => 'delivery_order_items',
cvars_alias => 1,
--- /dev/null
+package SL::DB::Helper::RecordItem;
+
+use strict;
+use parent qw(Exporter);
+
+our @EXPORT = qw(base_sellprice unit_multiplier);
+
+sub base_sellprice {
+ $_[0]->sellprice / $_[0]->unit_multiplier;
+}
+
+sub unit_multiplier {
+ $_[0]->unit_obj->convert_to(1, $_[0]->part->unit_obj)
+}
+
+
+1;
use SL::DB::MetaSetup::InvoiceItem;
use SL::DB::Helper::ActsAsList;
use SL::DB::Helper::LinkedRecords;
+use SL::DB::Helper::RecordItem;
use SL::DB::Helper::CustomVariables (
sub_module => 'invoice',
cvars_alias => 1,
use SL::DB::DeliveryOrderItemsStock;
use SL::DB::Helper::ActsAsList;
use SL::DB::Helper::LinkedRecords;
+use SL::DB::Helper::RecordItem;
use SL::DB::Helper::CustomVariables (
sub_module => 'orderitems',
cvars_alias => 1,