RT# 73382 - fixed formatting issue with calendar
authorChristopher Burger <burgerc@freeside.biz>
Thu, 11 Oct 2018 14:14:32 +0000 (10:14 -0400)
committerChristopher Burger <burgerc@freeside.biz>
Wed, 31 Oct 2018 18:08:40 +0000 (14:08 -0400)
httemplate/elements/customer-table.html
httemplate/misc/process/batch-cust_pay.cgi

index 9f76384..0e4bfa6 100644 (file)
@@ -640,6 +640,7 @@ and probably should be cleaned up more before being used by anything else.
 
       var my_cell = document.createElement('TD');
       my_cell.setAttribute('align', '<% $align{ $opt{align}->[$col] || 'l' } %>');
+      my_cell.style.whiteSpace = 'nowrap';
 %     if ($opt{'color'}->[$col]) {
       my_cell.style.color = '<% $opt{color}->[$col] %>';
 %     }
@@ -667,6 +668,7 @@ and probably should be cleaned up more before being used by anything else.
       my_input_button.setAttribute('title', <% mt('Select date') |js_string %>);
       my_input_button.setAttribute('name', '<% $name %>'+thisrownum+'button');
       my_input_button.setAttribute('id',   '<% $name %>'+thisrownum+'button');
+      my_input_button.style.verticalAlign = 'top';
 %     }
       my_input.value = (values && values.<% $field %>) || '';
 %     if ( $opt{onchange}->[$col] ) {
@@ -732,7 +734,7 @@ and probably should be cleaned up more before being used by anything else.
   <TH>Customer</TH>
   <TH>Balance</TH>
 % foreach my $header ( @{$opt{header}} ) {
-    <TH><% $header %></TH>
+    <TH style="white-space: nowrap"><% $header %></TH>
 % }
 </TR>
 
index b4580bb..0720fda 100644 (file)
@@ -33,12 +33,14 @@ foreach my $row ( map /^custnum(\d+)$/, keys %$param ) {
   $custnum = $cust_main->custnum if $cust_main;
   # if !$cust_main, then this will throw an error on batch_insert
 
+  my $_date = $param->{"_date$row"} ? parse_datetime($param->{"_date$row"}) : '';
+
   my $cust_pay = new FS::cust_pay {
                     'custnum'        => $custnum,
                     'paid'           => $param->{"paid$row"},
                     'payby'          => 'BILL',
                     'payinfo'        => $param->{"payinfo$row"},
-                    '_date'          => $param->{"_date$row"},
+                    '_date'          => $_date,
                     'discount_term'  => $param->{"discount_term$row"},
                     'paybatch'       => $paybatch,
                     'no_auto_apply'  => exists($param->{"no_auto_apply$row"}) ? 'Y' : '',