Merge branch 'master' into rb-wiederkehrende-rechnungen
[kivitendo-erp.git] / bin / mozilla / ar.pl
index 251c464..585301c 100644 (file)
@@ -95,7 +95,7 @@ sub add {
   # /saving the history
 
   $form->{title}    = "Add";
-  $form->{callback} = "ar.pl?action=add" unless $form->{callback};
+  $form->{callback} = "ar.pl?action=add&DONT_LOAD_DRAFT=1" unless $form->{callback};
 
   AR->get_transdate(\%myconfig, $form);
   $form->{initial_transdate} = $form->{transdate};
@@ -983,12 +983,12 @@ sub update {
   $form->{invdate} = $form->{transdate};
 
   my %saved_variables = map +( $_ => $form->{$_} ), qw(AR AR_amount_1 taxchart_1 oldcustomer);
+
   &check_name("customer");
-     
+
   # check_name ruft get_customer auf, oldcustomer wird überschrieben, daher wird dies vorher gemerkt
   # get_customer holt Bemerkungen als intnotes, für Debitorenbuchungen gibt es aber nur das Feld notes
-  $form->{notes} = $form->{intnotes} if $saved_variables{oldcustomer} ne $form->{customer}; 
+  $form->{notes} = $form->{intnotes} if $saved_variables{oldcustomer} ne $form->{customer};
 
   $form->{AR} = $saved_variables{AR};
   if ($saved_variables{AR_amount_1} =~ m/.--./) {
@@ -1346,7 +1346,7 @@ sub ar_transactions {
   @columns =
     qw(transdate id type invnumber ordnumber name netamount tax amount paid
        datepaid due duedate transaction_description notes salesman employee shippingpoint shipvia
-       marge_total marge_percent globalprojectnumber customernumber country ustid taxzone payment_terms charts);
+       marge_total marge_percent globalprojectnumber customernumber country ustid taxzone payment_terms charts customertype);
 
   my @hidden_variables = map { "l_${_}" } @columns;
   push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber transaction_description notes project_id transdatefrom transdateto);
@@ -1382,6 +1382,7 @@ sub ar_transactions {
     'taxzone'                 => { 'text' => $locale->text('Steuersatz'), },
     'payment_terms'           => { 'text' => $locale->text('Payment Terms'), },
     'charts'                  => { 'text' => $locale->text('Buchungskonto'), },
+    'customertype'            => { 'text' => $locale->text('Customer type'), },
   );
 
   foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description)) {