Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit 45ee2b66 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix(ProcessGrid): correct status and payment status display

Übergeordneter f9566ae3
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!140Update 'next-4.x' with latest changes from 'main',!111Next 3.x
......@@ -19,7 +19,27 @@ function ($globalProcessId, $entityHash) {
}
return array_map(function ($Entity) {
return $Entity->toArray();
$entityData = $Entity->toArray();
$entityData['processing_status'] = [
'id' => 0,
'title' => '---',
'color' => '#999999',
];
if (method_exists($Entity, 'getProcessingStatus')) {
/* @var $ProcessingStatus QUI\ERP\Accounting\Invoice\ProcessingStatus\Status */
$ProcessingStatus = $Entity->getProcessingStatus();
if ($ProcessingStatus) {
$entityData['processing_status'] = [
'id' => $ProcessingStatus->getId(),
'title' => $ProcessingStatus->getTitle(),
'color' => $ProcessingStatus->getColor()
];
}
}
return $entityData;
}, $Process->getEntities());
},
['globalProcessId', 'entityHash'],
......
......@@ -57,10 +57,11 @@ define('package/quiqqer/erp/bin/backend/controls/process/ProcessGrid', [
dataType: 'QUI',
width: 60
}, {
header: QUILocale.get(lg, 'erp.process.state'),
dataIndex: 'paid_status',
header: QUILocale.get(lg, 'erp.process.status'),
dataIndex: 'status',
dataType: 'node',
width: 100
width: 150,
className: 'grid-align-center'
}, {
header: QUILocale.get(lg, 'erp.process.prefixedNumber'),
dataIndex: 'prefixedNumber',
......@@ -71,6 +72,12 @@ define('package/quiqqer/erp/bin/backend/controls/process/ProcessGrid', [
dataIndex: 'uuid',
dataType: 'string',
width: 240
}, {
header: QUILocale.get(lg, 'erp.process.paid_status'),
dataIndex: 'paid_status',
dataType: 'node',
width: 100,
className: 'grid-align-center'
}
],
pagination: false
......@@ -129,6 +136,16 @@ define('package/quiqqer/erp/bin/backend/controls/process/ProcessGrid', [
break;
}
const Status = new Element('span', {
'class': 'processing-status',
text: entry.processing_status.title,
styles: {
color: entry.processing_status.color !== '---' ? entry.processing_status.color : '',
borderColor: entry.processing_status.color !== '---' ? entry.processing_status.color : ''
}
});
if (typeof entry.paid_status === 'undefined') {
entry.paid_status = 0;
}
......@@ -140,6 +157,7 @@ define('package/quiqqer/erp/bin/backend/controls/process/ProcessGrid', [
data.push({
type: Type,
status: Status,
paid_status: PaymentStatus,
prefixedNumber: entry.prefixedNumber,
uuid: entry.uuid
......
......@@ -297,9 +297,13 @@
<de><![CDATA[Typ]]></de>
<en><![CDATA[Type]]></en>
</locale>
<locale name="erp.process.state">
<locale name="erp.process.status">
<de><![CDATA[Status]]></de>
<en><![CDATA[State]]></en>
<en><![CDATA[Status]]></en>
</locale>
<locale name="erp.process.paid_status">
<de><![CDATA[Zahlungsstatus]]></de>
<en><![CDATA[Payment status]]></en>
</locale>
<locale name="erp.process.prefixedNumber">
<de><![CDATA[Entitäts-Nr]]></de>
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren