Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e68a2521

Von Tamino Steinert vor 11 Monaten hinzugefügt

  • ID e68a252155190e2601301f97f7e09473be521c09
  • Vorgänger 48508b25
  • Nachfolger 8bb63908

EmailJournal: Workflow mit Callback zu Bericht

Unterschiede anzeigen:

bin/mozilla/is.pl
133 133
  die "No 'email_journal_id' was given." unless ($::form->{email_journal_id});
134 134
  $::form->{workflow_email_journal_id}    = delete $::form->{email_journal_id};
135 135
  $::form->{workflow_email_attachment_id} = delete $::form->{email_attachment_id};
136
  $::form->{workflow_email_callback}      = delete $::form->{callback};
136 137

  
137 138
  &edit;
138 139
}
......
1303 1304

  
1304 1305
  $form->{email_journal_id}    = delete $form->{workflow_email_journal_id};
1305 1306
  $form->{email_attachment_id} = delete $form->{workflow_email_attachment_id};
1307
  $form->{callback}            = delete $form->{workflow_email_callback};
1306 1308

  
1307 1309
  delete @{ $form }{qw(printed emailed queued invnumber invdate exchangerate forex deliverydate id datepaid_1 gldate_1 acc_trans_id_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno locked qr_unstructured_message)};
1308 1310
  $form->{rowcount}--;
......
1331 1333

  
1332 1334
  $form->{email_journal_id}    = delete $form->{workflow_email_journal_id};
1333 1335
  $form->{email_attachment_id} = delete $form->{workflow_email_attachment_id};
1336
  $form->{callback}            = delete $form->{workflow_email_callback};
1334 1337

  
1335 1338
  delete @{ $form }{qw(printed emailed queued invnumber invdate exchangerate forex deliverydate datepaid_1 gldate_1 acc_trans_id_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno locked)};
1336 1339
  $form->{convert_from_ar_ids} = $form->{id};
......
1358 1361

  
1359 1362
  $form->{email_journal_id}    = delete $form->{workflow_email_journal_id};
1360 1363
  $form->{email_attachment_id} = delete $form->{workflow_email_attachment_id};
1364
  $form->{callback}            = delete $form->{workflow_email_callback};
1361 1365

  
1362 1366
  my $related_invoices = IS->_get_invoices_for_advance_payment($form->{id});
1363 1367

  
......
1433 1437

  
1434 1438
  my $email_journal_id    = delete $form->{workflow_email_journal_id};
1435 1439
  my $email_attachment_id = delete $form->{workflow_email_attachment_id};
1440
  my $callback            = delete $form->{workflow_email_callback};
1436 1441
  map({ my $key = $_; delete($form->{$key}) unless (grep({ $key eq $_ } qw(id login password type))); } keys(%{ $form }));
1437 1442

  
1438 1443
  $form->{email_journal_id}    = $email_journal_id;
1439 1444
  $form->{email_attachment_id} = $email_attachment_id;
1445
  $form->{callback}            = $callback;
1440 1446

  
1441 1447
  invoice_links();
1442 1448
  prepare_invoice();
......
1462 1468
  # post expects the field as user input
1463 1469
  $form->{exchangerate} = $form->format_amount(\%myconfig, $form->{exchangerate});
1464 1470
  $form->{script}       = 'is.pl';
1465
  post();
1471
  if ($form->{callback}) {
1472
    post_and_close();
1473
  } else {
1474
    post();
1475
  }
1466 1476
  $main::lxdebug->leave_sub();
1467 1477
}
1468 1478

  
......
1493 1503

  
1494 1504
  $form->{email_journal_id}    = delete $form->{workflow_email_journal_id};
1495 1505
  $form->{email_attachment_id} = delete $form->{workflow_email_attachment_id};
1506
  $form->{callback}            = delete $form->{workflow_email_callback};
1496 1507

  
1497 1508
  $form->{form_validity_token} = SL::DB::ValidityToken->create(scope => SL::DB::ValidityToken::SCOPE_SALES_INVOICE_POST())->token;
1498 1509

  

Auch abrufbar als: Unified diff