Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2a4583f3

Von Jan Büren vor mehr als 3 Jahren hinzugefügt

  • ID 2a4583f30144fd4d2bcec2833f1ecaaa19a5ddf6
  • Vorgänger 4e18047a
  • Nachfolger 47cbf8da

Neues Kundenattribut Rechnungsversand per Post -> Deaktiviert E-Mail für Rechnung

Unterschiede anzeigen:

SL/Controller/Order.pm
552 552

  
553 553
  if ($::form->{customer_id}) {
554 554
    $::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all_sorted(where => [ cp_cv_id => $::form->{customer_id} ]);
555
    $::form->{email_recipient_invoice_address} = SL::DB::Manager::Customer->find_by(id => $::form->{customer_id})->invoice_mail;
555
    my $customer_object = SL::DB::Manager::Customer->find_by(id => $::form->{customer_id});
556
    $::form->{postal_invoice}                  = $customer_object->postal_invoice;
557
    $::form->{email_recipient_invoice_address} = $::form->{postal_invoice} ? '' : $customer_object->invoice_mail;
558
    $config->send_email(0) if $::form->{postal_invoice};
556 559
  }
557 560

  
558 561
  $self->render('oe/edit_periodic_invoices_config', { layout => 0 },
SL/DB/MetaSetup/Customer.pm
56 56
  order_lock                => { type => 'boolean', default => 'false' },
57 57
  payment_id                => { type => 'integer' },
58 58
  phone                     => { type => 'text' },
59
  postal_invoice            => { type => 'boolean', default => 'false' },
59 60
  pricegroup_id             => { type => 'integer' },
60 61
  salesman_id               => { type => 'integer' },
61 62
  street                    => { type => 'text' },
bin/mozilla/is.pl
411 411
        action => [ t8('E Mail'),
412 412
          call     => [ 'kivi.SalesPurchase.show_email_dialog' ],
413 413
          checks   => [ 'kivi.validate_form' ],
414
          disabled => !$may_edit_create ? t8('You must not print this invoice.')
415
                    : !$form->{id}      ? t8('This invoice has not been posted yet.')
414
          disabled => !$may_edit_create       ? t8('You must not print this invoice.')
415
                    : !$form->{id}            ? t8('This invoice has not been posted yet.')
416
                    : $form->{postal_invoice} ? t8('This customer wants a postal invoices.')
416 417
                    :                     undef,
417 418
        ],
418 419
      ], # end of combobox "Export"
......
459 460
  $TMPL_VAR{customer_obj} = SL::DB::Customer->load_cached($form->{customer_id}) if $form->{customer_id};
460 461
  $TMPL_VAR{invoice_obj}  = SL::DB::Invoice->load_cached($form->{id})           if $form->{id};
461 462

  
463
  # only print, no mail
464
  $form->{postal_invoice} = $TMPL_VAR{customer_obj}->postal_invoice if ref $TMPL_VAR{customer_obj} eq 'SL::DB::Customer';
465

  
462 466
  my $current_employee   = SL::DB::Manager::Employee->current;
463 467
  $form->{employee_id}   = $form->{old_employee_id} if $form->{old_employee_id};
464 468
  $form->{salesman_id}   = $form->{old_salesman_id} if $form->{old_salesman_id};
locale/de/all
2480 2480
  'Post Payment'                => 'Zahlung buchen',
2481 2481
  'Post payments'               => 'Zahlungen buchen',
2482 2482
  'Post payments for selected invoices' => 'Zahlungen für ausgewählten Rechnungen buchen',
2483
  'Postal Invoice'              => 'Rechnung per Post',
2483 2484
  'Posting Configuration'       => 'Buchungskonfiguration',
2484 2485
  'Posting Key'                 => 'BU-Schlüssel',
2485 2486
  'Posting Text'                => 'Buchungstext',
......
3706 3707
  'This could have happened for two reasons:' => 'Dies kann aus zwei Gründen geschehen sein:',
3707 3708
  'This customer has already been added.' => 'Für diesen Kunden ist bereits ein Preis hinzugefügt.',
3708 3709
  'This customer number is already in use.' => 'Diese Kundennummer wird bereits verwendet.',
3710
  'This customer wants a postal invoices.' => 'Dieser Kunde möchte Rechnungen nur per Post.',
3709 3711
  'This discount has since gone down' => 'Dieser Rabatt ist mittlerweile niedriger',
3710 3712
  'This discount has since gone up' => 'Dieser Rabatt ist mittlerweile höher',
3711 3713
  'This discount is only valid for business #1' => 'Dieser Rabatt ist nur für Kunden-/Lieferantentyp #1 gültig',
locale/en/all
2480 2480
  'Post Payment'                => '',
2481 2481
  'Post payments'               => '',
2482 2482
  'Post payments for selected invoices' => '',
2483
  'Postal Invoice'              => '',
2483 2484
  'Posting Configuration'       => '',
2484 2485
  'Posting Key'                 => '',
2485 2486
  'Posting Text'                => '',
......
3705 3706
  'This could have happened for two reasons:' => '',
3706 3707
  'This customer has already been added.' => '',
3707 3708
  'This customer number is already in use.' => '',
3709
  'This customer wants a postal invoices.' => '',
3708 3710
  'This discount has since gone down' => '',
3709 3711
  'This discount has since gone up' => '',
3710 3712
  'This discount is only valid for business #1' => '',
sql/Pg-upgrade2/customer_add_postal_invoice.sql
1
-- @tag: customer_vendor_add_postal_invoice
2
-- @description: neue Spalte für "Rechnungsempfang nur per Post" bei Kunden
3
-- @depends: release_3_5_6_1
4

  
5
ALTER TABLE customer ADD COLUMN postal_invoice BOOLEAN DEFAULT FALSE;
templates/webpages/customer_vendor/tabs/billing.html
178 178
    [% IF ( SELF.is_customer() ) %]
179 179
    <tr>
180 180
      <th align="right">[% 'Email of the invoice recipient' | $T8 %]</th>
181
      <td>[% L.input_tag('cv.invoice_mail', SELF.cv.invoice_mail, size = 45) %]</td>
181
      <td>[% L.input_tag('cv.invoice_mail', SELF.cv.invoice_mail, size = 30) %] <label for="cv_postal_invoice">[% 'Postal Invoice' | $T8 %]</label>
182
        [% L.checkbox_tag('cv.postal_invoice', checked = SELF.cv.postal_invoice, for_submit=1) %]</td>
182 183
    </tr>
183 184
    <tr>
184 185
      <th align="right">[% 'Email of the delivery order recipient' | $T8 %]</th>
templates/webpages/oe/edit_periodic_invoices_config.html
101 101

  
102 102
    <tr class="rule-before">
103 103
     <th align="right">[%- LxERP.t8("Send invoice via email") %]</th>
104
     <td>[% L.checkbox_tag("send_email", onclick => "toggle_send_email_ctrl()", checked=config.send_email) %]</td>
104
     <td>[% L.checkbox_tag("send_email", onclick => "toggle_send_email_ctrl()", checked=config.send_email, disabled=postal_invoice) %]</td>
105 105
    </tr>
106 106
    <tr>
107 107
     <th align="right">[%- LxERP.t8("Email of the invoice recipient") %]</th>

Auch abrufbar als: Unified diff