Merge branch 'master' of ssh://lx-office/~/lx-office-erp
[kivitendo-erp.git] / bin / mozilla / cp.pl
index e0c5679..f4a9efb 100644 (file)
@@ -144,17 +144,17 @@ sub form_header {
       $form->format_amount(\%myconfig, $form->{exchangerate});
     if ($form->{forex}) {
       $exchangerate = qq|
-             <tr>
-               <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
-               <td colspan=3><input type=hidden name=exchangerate size=10 value=$form->{exchangerate}>$form->{exchangerate}</td>
-             </tr>
+              <tr>
+                <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
+                <td colspan=3><input type=hidden name=exchangerate size=10 value=$form->{exchangerate}>$form->{exchangerate}</td>
+              </tr>
 |;
     } else {
       $exchangerate = qq|
-             <tr>
-               <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
-               <td colspan=3><input name=exchangerate size=10 value=$form->{exchangerate}></td>
-             </tr>
+               <tr>
+                <th align=right nowrap>| . $locale->text('Exchangerate') . qq|</th>
+                <td colspan=3><input name=exchangerate size=10 value=$form->{exchangerate}></td>
+              </tr>
 |;
     }
   }
@@ -317,6 +317,19 @@ sub form_header {
 $jsscript
 |;
 
+  if ($form->{openinvoices_other_currencies}) {
+    my $warning = $form->{vc} eq 'customer' ? $::locale->text('There are #1 more open invoices for this customer with other currencies.', $form->{openinvoices_other_currencies})
+                :                             $::locale->text('There are #1 more open invoices from this vendor with other currencies.',  $form->{openinvoices_other_currencies});
+
+    print qq|
+
+  <input type="hidden" name="openinvoices_other_currencies" value="| . H($form->{openinvoices_other_currencies}) . qq|">
+  <tr>
+   <td><b>| . $::locale->text('Note') . qq|: $warning</b></td>
+  </tr>
+|;
+  }
+
   $lxdebug->leave_sub();
 }
 
@@ -339,9 +352,9 @@ sub list_invoices {
   <tr>
     <td>
       <table width=100%>
-       <tr>
-         <th class=listheading colspan=$colspan>$invoice</th>
-       </tr>
+        <tr>
+          <th class=listheading colspan=$colspan>$invoice</th>
+        </tr>
 |;
 
   $column_data{invnumber} =
@@ -404,7 +417,7 @@ sub list_invoices {
     $j++;
     $j %= 2;
     print qq|
-       <tr class=listrow$j>
+        <tr class=listrow$j>
 |;
     map { print "$column_data{$_}\n" } @column_index;
     print qq|
@@ -465,7 +478,7 @@ sub form_footer {
     $format .= qq|
             <option value=postscript $form->{DF}{postscript}>|
       . $locale->text('Postscript') . qq|
-           <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF');
+            <option value=pdf $form->{DF}{pdf}>| . $locale->text('PDF');
   }
 
   print qq|