Debitoren-/Kreditoren-/Dialogbuchungen: Fremdschlüsselspalte "department_id" nicht...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 28 Jan 2013 13:55:25 +0000 (14:55 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 28 Jan 2013 13:58:08 +0000 (14:58 +0100)
Conflicts:
SL/AP.pm

SL/AP.pm
SL/AR.pm
SL/GL.pm

index 3c8e240..44ddc11 100644 (file)
--- a/SL/AP.pm
+++ b/SL/AP.pm
@@ -58,7 +58,6 @@ sub post_transaction {
   delete $form->{currency} unless $form->{defaultcurrency};
 
   ($null, $form->{department_id}) = split(/--/, $form->{department});
-  $form->{department_id} *= 1;
 
   if ($form->{currency} eq $form->{defaultcurrency}) {
     $form->{exchangerate} = 1;
index 26c0bca..5b82ff1 100644 (file)
--- a/SL/AR.pm
+++ b/SL/AR.pm
@@ -143,7 +143,6 @@ sub post_transaction {
 
   # update department
   ($null, $form->{department_id}) = split(/--/, $form->{department});
-  $form->{department_id} *= 1;
 
   # amount for AR account
   $form->{receivables} = $form->round_amount($form->{amount}, 2) * -1;
index 7bcb475..bf9e1c9 100644 (file)
--- a/SL/GL.pm
+++ b/SL/GL.pm
@@ -109,7 +109,6 @@ sub post_transaction {
   }
 
   my ($null, $department_id) = split(/--/, $form->{department});
-  $department_id *= 1;
 
   $form->{ob_transaction} *= 1;
   $form->{cb_transaction} *= 1;
@@ -122,7 +121,7 @@ sub post_transaction {
        WHERE id = ?|;
 
   @values = ($form->{reference}, $form->{description}, $form->{notes},
-             conv_date($form->{transdate}), $department_id, $form->{taxincluded} ? 't' : 'f',
+             conv_date($form->{transdate}), conv_i($department_id), $form->{taxincluded} ? 't' : 'f',
              $form->{storno} ? 't' : 'f', conv_i($form->{storno_id}), $form->{ob_transaction} ? 't' : 'f', $form->{cb_transaction} ? 't' : 'f',
              conv_i($form->{id}));
   do_query($form, $dbh, $query, @values);