Revision 18a0b975
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
53 | 53 |
use SL::DB::PurchaseInvoice; |
54 | 54 |
use SL::DB::RecordTemplate; |
55 | 55 |
use SL::DB::Tax; |
56 |
use SL::DB::EmailJournal; |
|
56 | 57 |
use SL::DB::ValidityToken; |
57 | 58 |
use SL::Presenter::ItemsList; |
58 | 59 |
use SL::Webdav; |
... | ... | |
257 | 258 |
|
258 | 259 |
AP->get_transdate(\%myconfig, $form); |
259 | 260 |
$form->{initial_transdate} = $form->{transdate}; |
261 |
$form->{initial_vendor_id} = $form->{vendor_id}; |
|
260 | 262 |
create_links(dont_save => 1); |
261 | 263 |
$form->{transdate} = $form->{initial_transdate}; |
264 |
$form->{vendor_id} = $form->{initial_vendor_id} if $form->{initial_vendor_id}; |
|
262 | 265 |
|
263 | 266 |
if ($form->{vendor_id}) { |
264 | 267 |
my $vendor = SL::DB::Vendor->load_cached($form->{vendor_id}); |
... | ... | |
961 | 964 |
} |
962 | 965 |
} |
963 | 966 |
|
967 |
if ($form->{email_journal_id}) { |
|
968 |
my $ap_transaction = SL::DB::PurchaseInvoice->new(id => $form->{id})->load; |
|
969 |
my $email_journal = SL::DB::EmailJournal->new( |
|
970 |
id => delete $form->{email_journal_id} |
|
971 |
)->load; |
|
972 |
$email_journal->link_to_record_with_attachment($ap_transaction, delete $::form->{email_attachment_id}); |
|
973 |
} |
|
974 |
|
|
964 | 975 |
if (!$inline) { |
965 | 976 |
my $msg = $locale->text("AP transaction '#1' posted (ID: #2)", $form->{invnumber}, $form->{id}); |
966 | 977 |
if ($form->{callback} =~ /BankTransaction/) { |
... | ... | |
1008 | 1019 |
|
1009 | 1020 |
$main::auth->assert('ap_transactions'); |
1010 | 1021 |
|
1022 |
$form->{email_journal_id} = delete $form->{workflow_email_journal_id}; |
|
1023 |
$form->{email_attachment_id} = delete $form->{workflow_email_attachment_id}; |
|
1024 |
|
|
1011 | 1025 |
map { delete $form->{$_} } qw(printed emailed queued invnumber deliverydate id datepaid_1 gldate_1 acc_trans_id_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno convert_from_oe_id); |
1012 | 1026 |
$form->{paidaccounts} = 1; |
1013 | 1027 |
$form->{rowcount}--; |
... | ... | |
1396 | 1410 |
); |
1397 | 1411 |
} |
1398 | 1412 |
|
1413 |
sub add_from_email_journal { |
|
1414 |
die "No 'email_journal_id' was given." unless ($::form->{email_journal_id}); |
|
1415 |
&add; |
|
1416 |
} |
|
1417 |
|
|
1418 |
sub edit_with_email_journal_workflow { |
|
1419 |
my ($self) = @_; |
|
1420 |
die "No 'email_journal_id' was given." unless ($::form->{email_journal_id}); |
|
1421 |
$::form->{workflow_email_journal_id} = delete $::form->{email_journal_id}; |
|
1422 |
$::form->{workflow_email_attachment_id} = delete $::form->{email_attachment_id}; |
|
1423 |
|
|
1424 |
&edit; |
|
1425 |
} |
|
1426 |
|
|
1399 | 1427 |
sub setup_ap_search_action_bar { |
1400 | 1428 |
my %params = @_; |
1401 | 1429 |
|
Auch abrufbar als: Unified diff
Workflow: E-Mail → Kreditorenbuchung hinzugefügt