=item C<new PARAMS>
-Creates a new helper object. PARAMS may include:
+Creates a new helper object, $::form->{type} is mandatory.
+
+PARAMS may include:
=over 4
See C<matches> for the returned format.
+
=back
=item C<calculate OBJECTS>
note("testing purchases, no fill_up");
+$::form->{type} = 'purchase_order';
my $purchase_order = create_purchase_order(
save => 1,
orderitems => [ create_order_item(part => $part1, qty => 11),
note('testing sales, no fill_up');
+$::form->{type} = 'sales_order';
my $sales_order = create_sales_order(
save => 1,
orderitems => [ create_order_item(part => $part1, qty => 5),