qq| o.marge_total, o.marge_percent, | .
qq| o.itime::DATE AS insertdate, | .
qq| ex.$rate AS exchangerate, | .
+ qq| pt.description AS payment_terms, | .
qq| pr.projectnumber AS globalprojectnumber, | .
qq| e.name AS employee, s.name AS salesman, | .
qq| ct.${vc}number AS vcnumber, ct.country, ct.ustid, ct.business_id, | .
qq|LEFT JOIN exchangerate ex ON (ex.currency_id = o.currency_id | .
qq| AND ex.transdate = o.transdate) | .
qq|LEFT JOIN project pr ON (o.globalproject_id = pr.id) | .
+ qq|LEFT JOIN payment_terms pt ON (pt.id = o.payment_id)| .
qq|LEFT JOIN tax_zones tz ON (o.taxzone_id = tz.id) | .
qq|$periodic_invoices_joins | .
qq|WHERE (o.quotation = ?) |;
"shippingpoint" => "o.shippingpoint",
"insertdate" => "o.itime",
"taxzone" => "tz.description",
+ "payment_terms" => "pt.description",
);
if ($form->{sort} && grep($form->{sort}, keys(%allowed_sort_columns))) {
$sortorder = $allowed_sort_columns{$form->{sort}} . " ${sortdir}" . ", o.itime ${sortdir}";
"country", "shippingpoint",
"taxzone", "insertdate",
"order_probability", "expected_billing_date", "expected_netamount",
+ "payment_terms",
);
# only show checkboxes if gotten here via sales_order form.
'order_probability' => { 'text' => $locale->text('Order probability'), },
'expected_billing_date' => { 'text' => $locale->text('Exp. bill. date'), },
'expected_netamount' => { 'text' => $locale->text('Exp. netamount'), },
+ 'payment_terms' => { 'text' => $locale->text('Payment Terms'), },
%column_defs_cvars,
);
- foreach my $name (qw(id transdate reqdate quonumber ordnumber cusordnumber name employee salesman shipvia transaction_description shippingpoint taxzone insertdate)) {
+ foreach my $name (qw(id transdate reqdate quonumber ordnumber cusordnumber name employee salesman shipvia transaction_description shippingpoint taxzone insertdate payment_terms)) {
my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir};
$column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir";
}