Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e4b46220

Von Sven Schöling vor mehr als 11 Jahren hinzugefügt

  • ID e4b4622075414d6cb13fdc7577f99a2dcd78d3c4
  • Vorgänger f7e89226
  • Nachfolger 71e6f43b

kein use SL::DB::Object aus SL::DB::Object

Unterschiede anzeigen:

SL/DB/Invoice.pm
15 15
use SL::DB::Helper::PriceTaxCalculator;
16 16
use SL::DB::Helper::PriceUpdater;
17 17
use SL::DB::Helper::TransNumberGenerator;
18
use SL::DB::AccTransaction;
19
use SL::DB::Chart;
20
use SL::DB::Employee;
21 18

  
22 19
__PACKAGE__->meta->add_relationship(
23 20
  invoiceitems => {
......
102 99
  croak("Unsupported source object type '" . ref($source) . "'") unless ref($source) =~ m/^ SL::DB:: (?: Order | DeliveryOrder ) $/x;
103 100
  croak("Cannot create invoices for purchase records")           unless $source->customer_id;
104 101

  
102
  require SL::DB::Employee;
103

  
105 104
  my $terms = $source->can('payment_id') && $source->payment_id ? $source->payment_terms->terms_netto : 0;
106 105

  
107 106
  my %args = ( map({ ( $_ => $source->$_ ) } qw(customer_id taxincluded shippingpoint shipvia notes intnotes salesman_id cusordnumber ordnumber quonumber
......
144 143
sub post {
145 144
  my ($self, %params) = @_;
146 145

  
146
  require SL::DB::Chart;
147 147
  if (!$params{ar_id}) {
148 148
    my $chart = SL::DB::Manager::Chart->get_all(query   => [ SL::DB::Manager::Chart->link_filter('AR') ],
149 149
                                                sort_by => 'id ASC',
......
184 184
  my $default_tax_id = SL::DB::Manager::Tax->find_by(taxkey => 0)->id;
185 185
  my $chart_link;
186 186

  
187
  require SL::DB::AccTransaction;
188
  require SL::DB::Chart;
187 189
  while (my ($chart_id, $spec) = each %{ $entries }) {
188 190
    $spec = { taxkey => 0, tax_id => $default_tax_id, amount => $spec } unless ref $spec;
189 191
    $chart_link = SL::DB::Manager::Chart->find_by(id => $chart_id)->{'link'};

Auch abrufbar als: Unified diff