|
@@ -1908,26 +1908,34 @@ class Procuremen extends Backend
|
|
|
*/
|
|
*/
|
|
|
protected function maskSupplierQuoteLineBeforeDeadline(array &$line): void
|
|
protected function maskSupplierQuoteLineBeforeDeadline(array &$line): void
|
|
|
{
|
|
{
|
|
|
- $text = '未到截止时间';
|
|
|
|
|
- $line['amount_filled'] = false;
|
|
|
|
|
- $line['delivery_filled'] = false;
|
|
|
|
|
- $line['unit_price_text'] = $text;
|
|
|
|
|
|
|
+ $amountFilled = !empty($line['amount_filled']);
|
|
|
|
|
+ $deliveryFilled = !empty($line['delivery_filled']);
|
|
|
|
|
+
|
|
|
|
|
+ $line['unit_price_text'] = $amountFilled ? '未到截止时间' : '未填写';
|
|
|
$line['amount_show'] = '';
|
|
$line['amount_show'] = '';
|
|
|
if (array_key_exists('amount_text', $line)) {
|
|
if (array_key_exists('amount_text', $line)) {
|
|
|
- $line['amount_text'] = $text;
|
|
|
|
|
|
|
+ $line['amount_text'] = $line['unit_price_text'];
|
|
|
}
|
|
}
|
|
|
- $line['delivery_show'] = $text;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $deliveryText = $deliveryFilled ? '未到截止时间' : '未填写';
|
|
|
|
|
+ $line['delivery_show'] = $deliveryText;
|
|
|
if (array_key_exists('delivery_text', $line)) {
|
|
if (array_key_exists('delivery_text', $line)) {
|
|
|
- $line['delivery_text'] = $text;
|
|
|
|
|
|
|
+ $line['delivery_text'] = $deliveryText;
|
|
|
}
|
|
}
|
|
|
$line['delivery_ymd'] = '';
|
|
$line['delivery_ymd'] = '';
|
|
|
- $line['subtotal_text'] = '';
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $line['subtotal_text'] = $amountFilled ? '未到截止时间' : '';
|
|
|
$line['subtotal_num'] = null;
|
|
$line['subtotal_num'] = null;
|
|
|
|
|
+
|
|
|
|
|
+ $line['amount_quote_pending'] = $amountFilled;
|
|
|
|
|
+ $line['delivery_quote_pending'] = $deliveryFilled;
|
|
|
|
|
+ $line['quote_before_deadline'] = $amountFilled || $deliveryFilled;
|
|
|
|
|
+ $line['amount_filled'] = false;
|
|
|
|
|
+ $line['delivery_filled'] = false;
|
|
|
$line['is_quoted'] = false;
|
|
$line['is_quoted'] = false;
|
|
|
if (array_key_exists('quote_label', $line)) {
|
|
if (array_key_exists('quote_label', $line)) {
|
|
|
- $line['quote_label'] = $text;
|
|
|
|
|
|
|
+ $line['quote_label'] = ($amountFilled || $deliveryFilled) ? '未到截止时间' : '未报价';
|
|
|
}
|
|
}
|
|
|
- $line['quote_before_deadline'] = true;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -4686,6 +4694,10 @@ class Procuremen extends Backend
|
|
|
}
|
|
}
|
|
|
$qtyStr = $qtyBySid[$sid] ?? '';
|
|
$qtyStr = $qtyBySid[$sid] ?? '';
|
|
|
$amountNum = $this->parseProcuremenMoneyNumber($d['amount'] ?? null);
|
|
$amountNum = $this->parseProcuremenMoneyNumber($d['amount'] ?? null);
|
|
|
|
|
+ $am = trim((string)($d['amount'] ?? ''));
|
|
|
|
|
+ $amountFilled = ($am !== '' && $am !== '0' && $am !== '0.00');
|
|
|
|
|
+ $deliveryYmd = $d['delivery_ymd'] ?? $this->formatDeliveryYmd($d['delivery'] ?? null);
|
|
|
|
|
+ $deliveryFilled = ($deliveryYmd !== '' && !preg_match('/^0000-00-00/i', $deliveryYmd));
|
|
|
$sub = null;
|
|
$sub = null;
|
|
|
if (!$isVoid && $amountNum !== null) {
|
|
if (!$isVoid && $amountNum !== null) {
|
|
|
$sub = $this->calcProcuremenDetailSubtotal($d['amount'] ?? null, $qtyStr);
|
|
$sub = $this->calcProcuremenDetailSubtotal($d['amount'] ?? null, $qtyStr);
|
|
@@ -4693,9 +4705,12 @@ class Procuremen extends Backend
|
|
|
$ct = $this->resolveDetailSupplierOperTime($d);
|
|
$ct = $this->resolveDetailSupplierOperTime($d);
|
|
|
$line = [
|
|
$line = [
|
|
|
'cgymc' => $gymcBySid[$sid] ?? trim((string)($d['CGYMC'] ?? '')),
|
|
'cgymc' => $gymcBySid[$sid] ?? trim((string)($d['CGYMC'] ?? '')),
|
|
|
- 'unit_price_text' => $amountNum !== null ? $this->formatProcuremenMoneyDisplay($amountNum) : trim((string)($d['amount'] ?? '')),
|
|
|
|
|
|
|
+ 'unit_price_text' => $amountNum !== null ? $this->formatProcuremenMoneyDisplay($amountNum) : $am,
|
|
|
'subtotal_text' => $sub !== null ? $this->formatProcuremenMoneyDisplay($sub) : '',
|
|
'subtotal_text' => $sub !== null ? $this->formatProcuremenMoneyDisplay($sub) : '',
|
|
|
- 'delivery_ymd' => $d['delivery_ymd'] ?? $this->formatDeliveryYmd($d['delivery'] ?? null),
|
|
|
|
|
|
|
+ 'delivery_ymd' => $deliveryYmd,
|
|
|
|
|
+ 'amount_filled' => $amountFilled,
|
|
|
|
|
+ 'delivery_filled' => $deliveryFilled,
|
|
|
|
|
+ 'delivery_show' => $deliveryFilled ? $deliveryYmd : '未填写',
|
|
|
'status' => ProcuremenStatus::normalizePodPickStatus($d['status'] ?? ''),
|
|
'status' => ProcuremenStatus::normalizePodPickStatus($d['status'] ?? ''),
|
|
|
'is_picked' => ProcuremenStatus::isPodPicked($d['status'] ?? ''),
|
|
'is_picked' => ProcuremenStatus::isPodPicked($d['status'] ?? ''),
|
|
|
'is_void' => $isVoid,
|
|
'is_void' => $isVoid,
|