From 373cec3fe35cfbce3846ab41cc285d7e4a004f97 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 11 Nov 2010 17:56:18 +0100 Subject: [PATCH] =?utf8?q?Eines=20der=20zwei=20Models=20f=C3=BCr=20acc=5Ft?= =?utf8?q?rans=20gel=C3=B6scht?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/AccTrans.pm | 13 ---------- SL/DB/Helper/ALL.pm | 1 - SL/DB/Invoice.pm | 13 +++++----- SL/DB/MetaSetup/AccTrans.pm | 50 ------------------------------------- 4 files changed, 7 insertions(+), 70 deletions(-) delete mode 100644 SL/DB/AccTrans.pm delete mode 100644 SL/DB/MetaSetup/AccTrans.pm diff --git a/SL/DB/AccTrans.pm b/SL/DB/AccTrans.pm deleted file mode 100644 index e058b8d53..000000000 --- a/SL/DB/AccTrans.pm +++ /dev/null @@ -1,13 +0,0 @@ -# This file has been auto-generated only because it didn't exist. -# Feel free to modify it at will; it will not be overwritten automatically. - -package SL::DB::AccTrans; - -use strict; - -use SL::DB::MetaSetup::AccTrans; - -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; - -1; diff --git a/SL/DB/Helper/ALL.pm b/SL/DB/Helper/ALL.pm index ad369aa5e..f5973b3b7 100644 --- a/SL/DB/Helper/ALL.pm +++ b/SL/DB/Helper/ALL.pm @@ -2,7 +2,6 @@ package SL::DB::Helper::ALL; use strict; -use SL::DB::AccTrans; use SL::DB::AccTransaction; use SL::DB::Assembly; use SL::DB::AuditTrail; diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 44f13abfd..1ff45065c 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -13,6 +13,7 @@ use SL::DB::Manager::Invoice; use SL::DB::Helper::LinkedRecords; use SL::DB::Helper::PriceTaxCalculator; use SL::DB::Helper::TransNumberGenerator; +use SL::DB::AccTransaction; use SL::DB::Employee; __PACKAGE__->meta->add_relationship( @@ -155,12 +156,12 @@ sub _post_add_acctrans { while (my ($chart_id, $spec) = each %{ $entries }) { $spec = { taxkey => 0, amount => $spec } unless ref $spec; - SL::DB::AccTrans->new(trans_id => $self->id, - chart_id => $chart_id, - amount => $spec->{amount}, - taxkey => $spec->{taxkey}, - project_id => $self->globalproject_id, - transdate => $self->transdate)->save; + SL::DB::AccTransaction->new(trans_id => $self->id, + chart_id => $chart_id, + amount => $spec->{amount}, + taxkey => $spec->{taxkey}, + project_id => $self->globalproject_id, + transdate => $self->transdate)->save; } } diff --git a/SL/DB/MetaSetup/AccTrans.pm b/SL/DB/MetaSetup/AccTrans.pm deleted file mode 100644 index 8fcedbc15..000000000 --- a/SL/DB/MetaSetup/AccTrans.pm +++ /dev/null @@ -1,50 +0,0 @@ -# This file has been auto-generated. Do not modify it; it will be overwritten -# by rose_auto_create_model.pl automatically. -package SL::DB::AccTrans; - -use strict; - -use base qw(SL::DB::Object); - -__PACKAGE__->meta->setup( - table => 'acc_trans', - - columns => [ - acc_trans_id => { type => 'bigint', sequence => 'acc_trans_id_seq' }, - trans_id => { type => 'integer', not_null => 1 }, - chart_id => { type => 'integer', not_null => 1 }, - amount => { type => 'numeric', precision => 5, scale => 15 }, - transdate => { type => 'date', default => 'now' }, - gldate => { type => 'date', default => 'now' }, - source => { type => 'text' }, - cleared => { type => 'boolean', default => 'false' }, - fx_transaction => { type => 'boolean', default => 'false' }, - ob_transaction => { type => 'boolean', default => 'false' }, - cb_transaction => { type => 'boolean', default => 'false' }, - project_id => { type => 'integer' }, - memo => { type => 'text' }, - taxkey => { type => 'integer' }, - itime => { type => 'timestamp', default => 'now()' }, - mtime => { type => 'timestamp' }, - id => { type => 'integer', not_null => 1, sequence => 'acc_trans_id_seq1' }, - ], - - primary_key_columns => [ 'id' ], - - allow_inline_column_values => 1, - - foreign_keys => [ - chart => { - class => 'SL::DB::Chart', - key_columns => { chart_id => 'id' }, - }, - - project => { - class => 'SL::DB::Project', - key_columns => { project_id => 'id' }, - }, - ], -); - -1; -; -- 2.20.1