($form->{type} eq 'sales_order') ? (
opthash("sales_order", $form->{PD}{sales_order}, $locale->text('Confirmation')),
opthash("proforma", $form->{PD}{proforma}, $locale->text('Proforma Invoice')),
+ opthash("ic_supply", $form->{PD}{ic_supply}, $locale->text('Intra-Community supply')),
) : undef,
($form->{type} =~ /sales_quotation$/) ?
opthash('sales_quotation', $form->{PD}{sales_quotation}, $locale->text('Quotation')) : undef,
$order = 1;
}
+ if (($form->{type} eq 'sales_order') && ($form->{formname} eq 'ic_supply') ) {
+ $inv = "inv";
+ $due = "due";
+ $form->{"${inv}date"} = $form->{transdate};
+ $form->{"invdate"} = $form->{transdate};
+ $form->{invnumber} = $form->{ordnumber};
+ $form->{label} = $locale->text('Intra-Community supply');
+ $numberfld = "sonumber";
+ $order = 1;
+ }
+
if ($form->{formname} eq 'request_quotation') {
$inv = "quo";
$due = "req";