Skip to content
Code-Schnipsel Gruppen Projekte
Commit 4a00426b erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Merge branch 'next-3.x' into 'main'

Next 3.x

See merge request !118
Übergeordnete 8a06977e bbadf35c
No related branches found
Tags 3.7.2
2 Merge Requests!140Update 'next-4.x' with latest changes from 'main',!118Next 3.x
Pipeline #9035 mit Warnungen bestanden mit Phasen
in 57 Sekunden
......@@ -51,3 +51,9 @@
border-color: #004e5a;
color: #004e5a;
}
.td.clickable:hover .processing-status,
.td.clickable:hover .payment-status {
border-color: #fff !important;
color: #fff !important;
}
\ No newline at end of file
......@@ -376,6 +376,10 @@
<de><![CDATA[Bestellung]]></de>
<en><![CDATA[Order]]></en>
</locale>
<locale name="process.history.empty.info">
<de><![CDATA[Hier werden nur Einträge aufgelistet, die nach dem 01.07.2024 erstellt wurden.]]></de>
<en><![CDATA[Only entries created after 01/07/2024 are listed here.]]></en>
</locale>
</groups>
<groups name="quiqqer/erp" datatype="php">
......
......@@ -25,6 +25,12 @@
*/
class Process
{
/**
* this date determines when the global process ids start to work.
* also the relationships.
*/
const PROCESS_ACTIVE_DATE = '2024-07-01 00:00:00';
/**
* @var string
*/
......@@ -272,6 +278,15 @@ public function getCompleteHistory(): Comments
$this->parseSalesOrders($History);
$this->parseTransactions($History);
if ($History->isEmpty()) {
$History->addComment(
QUI::getLocale()->get('quiqqer/erp', 'process.history.empty.info'),
strtotime(self::PROCESS_ACTIVE_DATE),
'quiqqer/erp',
'fa fa-info'
);
}
try {
QUI::getEvents()->fireEvent('quiqqerErpGetCompleteHistory', [$this, $this->processId]);
} catch (\Exception $exception) {
......@@ -376,7 +391,22 @@ public function getInvoices(): array
}
try {
return QUI\ERP\Accounting\Invoice\Handler::getInstance()->getInvoicesByGlobalProcessId($this->processId);
$invoices = QUI\ERP\Accounting\Invoice\Handler::getInstance()->getInvoicesByGlobalProcessId(
$this->processId
);
$processDate = strtotime(self::PROCESS_ACTIVE_DATE);
return array_filter($invoices, function ($Invoice) use ($processDate) {
$createDate = $Invoice->getAttribute('c_date');
$createDate = strtotime($createDate);
if ($createDate > $processDate) {
return true;
}
return false;
});
} catch (\QUI\Exception) {
return [];
}
......@@ -483,7 +513,19 @@ public function getOrders(): array
}
try {
return QUI\ERP\Order\Handler::getInstance()->getOrdersByGlobalProcessId($this->processId);
$orders = QUI\ERP\Order\Handler::getInstance()->getOrdersByGlobalProcessId($this->processId);
$processDate = strtotime(self::PROCESS_ACTIVE_DATE);
return array_filter($orders, function ($Order) use ($processDate) {
$createDate = $Order->getAttribute('c_date');
$createDate = strtotime($createDate);
if ($createDate > $processDate) {
return true;
}
return false;
});
} catch (QUI\Exception) {
return [];
}
......@@ -589,7 +631,18 @@ public function getOffers(): array
}
}
return $result;
$processDate = strtotime(self::PROCESS_ACTIVE_DATE);
return array_filter($result, function ($Offer) use ($processDate) {
$createDate = $Offer->getAttribute('c_date');
$createDate = strtotime($createDate);
if ($createDate > $processDate) {
return true;
}
return false;
});
}
//endregion
......@@ -675,7 +728,19 @@ public function getBookings(): array
}
}
return $result;
$processDate = strtotime(self::PROCESS_ACTIVE_DATE);
return array_filter($result, function ($Booking) use ($processDate) {
// @todo c_date??
$createDate = $Booking->getAttribute('c_date');
$createDate = strtotime($createDate);
if ($createDate > $processDate) {
return true;
}
return false;
});
}
//endregion
......@@ -760,7 +825,18 @@ public function getPurchasing(): array
}
}
return $result;
$processDate = strtotime(self::PROCESS_ACTIVE_DATE);
return array_filter($result, function ($Purchase) use ($processDate) {
$createDate = $Purchase->getAttribute('c_date');
$createDate = strtotime($createDate);
if ($createDate > $processDate) {
return true;
}
return false;
});
}
//endregion
......@@ -837,7 +913,19 @@ public function getSalesOrders(): array
}
}
return $result;
$processDate = strtotime(self::PROCESS_ACTIVE_DATE);
return array_filter($result, function ($SalesOrder) use ($processDate) {
$createDate = $SalesOrder->getAttribute('c_date');
$createDate = strtotime($createDate);
if ($createDate > $processDate) {
return true;
}
return false;
});
}
//endregion
......@@ -889,7 +977,19 @@ public function getTransactions(): array
}
$Transactions = QUI\ERP\Accounting\Payments\Transactions\Handler::getInstance();
$this->transactions = $Transactions->getTransactionsByProcessId($this->processId);
$transactions = $Transactions->getTransactionsByProcessId($this->processId);
$processDate = strtotime(self::PROCESS_ACTIVE_DATE);
$this->transactions = array_filter($transactions, function ($Transaction) use ($processDate) {
$createDate = $Transaction->getDate();
$createDate = strtotime($createDate);
if ($createDate > $processDate) {
return true;
}
return false;
});
return $this->transactions;
}
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren