fixed email logic in Order/Save
This commit is contained in:
@@ -74,7 +74,10 @@ class ContractqueueController extends mfBaseController {
|
||||
protected function importFinishedOrdersAction() {
|
||||
$o = 0;
|
||||
$max_orders = 1500;
|
||||
foreach(OrderModel::search(["finish_date<" => date("U")]) as $order) {
|
||||
|
||||
$not_before = new DateTime("2024-07-10");
|
||||
|
||||
foreach(OrderModel::search(["finish_date" => true, "finish_date<" => date("U"), "finish_date>" => $not_before->getTimestamp()]) as $order) {
|
||||
if(!is_array($order->products) || !count($order->products)) {
|
||||
//echo "keine Produkte in Order ".$order->id."\n";
|
||||
continue;
|
||||
|
||||
@@ -1161,7 +1161,7 @@ class OrderController extends mfBaseController {
|
||||
// send order finish email
|
||||
if($send_to_bill_email) {
|
||||
|
||||
if($ext_products && !$int_products) {
|
||||
if($ext_products) {
|
||||
if(!$order->sendExtBillinfoEmail(new Address($ext_product_owner_id))) {
|
||||
$this->layout()->setFlash("Beim Senden der externen Billing Benachrichtigung ist ein Fehler aufgetreten.", "warning");
|
||||
}
|
||||
@@ -1173,12 +1173,12 @@ class OrderController extends mfBaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($int_products) {
|
||||
|
||||
/*if($int_products) {
|
||||
if(!$order->sendIntBillinfoEmail()) {
|
||||
$this->layout()->setFlash("Beim Senden der Billing Benachrichtigung ist ein Fehler aufgetreten.", "warning");
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if($int_products && $ext_products) {
|
||||
//$this->layout()->setFlash("Eigene und Fremdprodukte gefunden, nur interne Billing Benachrichtigung verschickt.", "warning");
|
||||
|
||||
Reference in New Issue
Block a user