fix_record_price_pdf (#592)
Reviewed-on: daoyoucloud/tachycode#592 Co-authored-by: hello@lv <2256334253@qq.com> Co-committed-by: hello@lv <2256334253@qq.com>
This commit is contained in:
parent
ff9ae1a2f5
commit
0a98e7e8f2
@ -103,6 +103,7 @@
|
|||||||
"six-dolphins-mix",
|
"six-dolphins-mix",
|
||||||
"slimy-sloths-repeat",
|
"slimy-sloths-repeat",
|
||||||
"smart-jokes-whisper",
|
"smart-jokes-whisper",
|
||||||
|
"tricky-eyes-knock",
|
||||||
"unlucky-dolls-hope"
|
"unlucky-dolls-hope"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
5
.changeset/tricky-eyes-knock.md
Normal file
5
.changeset/tricky-eyes-knock.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@hera/plugin-rental": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
报价单pdf报价不显示异常
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@hera/plugin-rental",
|
"name": "@hera/plugin-rental",
|
||||||
"displayName": "professional construction materials rental system - customized based on hera",
|
"displayName": "professional construction materials rental system - customized based on hera",
|
||||||
"version": "1.7.6-alpha.8",
|
"version": "1.7.6-alpha.9",
|
||||||
"description": "Offering a standardized leasing management system, encompassing comprehensive administration from materials to contracts to labor personnel, while providing a robust financial management mechanism, and real-time monitoring of the operational capacity of the leasing system.",
|
"description": "Offering a standardized leasing management system, encompassing comprehensive administration from materials to contracts to labor personnel, while providing a robust financial management mechanism, and real-time monitoring of the operational capacity of the leasing system.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"System management"
|
"System management"
|
||||||
|
@ -42,8 +42,13 @@ export class RecordPdfService {
|
|||||||
data['count'] = item.count;
|
data['count'] = item.count;
|
||||||
data['unit'] = item.unit;
|
data['unit'] = item.unit;
|
||||||
} else if (item.conversion_logic_id === ConversionLogics.Product) {
|
} else if (item.conversion_logic_id === ConversionLogics.Product) {
|
||||||
if (item.convertible) (data['count'] = item.count * item.ratio), (data['unit'] = item.conversion_unit);
|
if (item.convertible) {
|
||||||
else (data['count'] = item.count), (data['unit'] = item.unit);
|
data['count'] = item.count * item.ratio;
|
||||||
|
data['unit'] = item.conversion_unit;
|
||||||
|
} else {
|
||||||
|
data['count'] = item.count;
|
||||||
|
data['unit'] = item.unit;
|
||||||
|
}
|
||||||
} else if (item.conversion_logic_id === ConversionLogics.ProductWeight) {
|
} else if (item.conversion_logic_id === ConversionLogics.ProductWeight) {
|
||||||
data['count'] = item.count * item.weight;
|
data['count'] = item.count * item.weight;
|
||||||
data['unit'] = 'KG';
|
data['unit'] = 'KG';
|
||||||
@ -102,16 +107,24 @@ export class RecordPdfService {
|
|||||||
data['total'] = lease.count;
|
data['total'] = lease.count;
|
||||||
data['conversion_unit'] = lease.unit;
|
data['conversion_unit'] = lease.unit;
|
||||||
} else if (lease.conversion_logic_id === ConversionLogics.Product) {
|
} else if (lease.conversion_logic_id === ConversionLogics.Product) {
|
||||||
if (lease.convertible)
|
if (lease.convertible) {
|
||||||
(data['total'] = lease.count * lease.ratio), (data['conversion_unit'] = lease.conversion_unit);
|
data['total'] = lease.count * lease.ratio;
|
||||||
else (data['total'] = lease.count), (data['conversion_unit'] = lease.unit);
|
data['conversion_unit'] = lease.conversion_unit;
|
||||||
|
} else {
|
||||||
|
data['total'] = lease.count;
|
||||||
|
data['conversion_unit'] = lease.unit;
|
||||||
|
}
|
||||||
} else if (lease.conversion_logic_id === ConversionLogics.ProductWeight) {
|
} else if (lease.conversion_logic_id === ConversionLogics.ProductWeight) {
|
||||||
data['total'] = lease.count * lease.weight;
|
data['total'] = lease.count * lease.weight;
|
||||||
data['conversion_unit'] = 'KG';
|
data['conversion_unit'] = 'KG';
|
||||||
} else if (lease.conversion_logic_id === ConversionLogics.ActualWeight) {
|
} else if (lease.conversion_logic_id === ConversionLogics.ActualWeight) {
|
||||||
if (lease.convertible)
|
if (lease.convertible) {
|
||||||
(data['total'] = lease.count * lease.ratio), (data['conversion_unit'] = lease.conversion_unit);
|
data['total'] = lease.count * lease.ratio;
|
||||||
else (data['total'] = lease.count), (data['conversion_unit'] = lease.unit);
|
data['conversion_unit'] = lease.conversion_unit;
|
||||||
|
} else {
|
||||||
|
data['total'] = lease.count;
|
||||||
|
data['conversion_unit'] = lease.unit;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
data['conversion_unit'] = 'KG';
|
data['conversion_unit'] = 'KG';
|
||||||
if (lease.wr?.conversion_logic_id === ConversionLogics.Keep) {
|
if (lease.wr?.conversion_logic_id === ConversionLogics.Keep) {
|
||||||
@ -135,8 +148,9 @@ export class RecordPdfService {
|
|||||||
recordData.category === RecordCategory.purchase ||
|
recordData.category === RecordCategory.purchase ||
|
||||||
recordData.category === RecordCategory.staging ||
|
recordData.category === RecordCategory.staging ||
|
||||||
recordData.category === RecordCategory.inventory
|
recordData.category === RecordCategory.inventory
|
||||||
)
|
) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
// 人工录入没有数量
|
// 人工录入没有数量
|
||||||
if (item.count_source === SourcesType.staff && !item.fee_count) return;
|
if (item.count_source === SourcesType.staff && !item.fee_count) return;
|
||||||
// 出库单,计数为入库量
|
// 出库单,计数为入库量
|
||||||
@ -156,8 +170,11 @@ export class RecordPdfService {
|
|||||||
if (item.conversion_logic_id === ConversionLogics.Keep) {
|
if (item.conversion_logic_id === ConversionLogics.Keep) {
|
||||||
data['total'] = data.count1;
|
data['total'] = data.count1;
|
||||||
} else if (item.conversion_logic_id === ConversionLogics.Product) {
|
} else if (item.conversion_logic_id === ConversionLogics.Product) {
|
||||||
if (item.convertible) data['total'] = data.count1 * item.product_ratio;
|
if (item.convertible) {
|
||||||
else data['total'] = data.count1;
|
data['total'] = data.count1 * item.product_ratio;
|
||||||
|
} else {
|
||||||
|
data['total'] = data.count1;
|
||||||
|
}
|
||||||
} else if (item.conversion_logic_id === ConversionLogics.ProductWeight) {
|
} else if (item.conversion_logic_id === ConversionLogics.ProductWeight) {
|
||||||
data['total'] = data.count1 * item.product_weight;
|
data['total'] = data.count1 * item.product_weight;
|
||||||
} else if (item.conversion_logic_id === ConversionLogics.ActualWeight) {
|
} else if (item.conversion_logic_id === ConversionLogics.ActualWeight) {
|
||||||
|
@ -2,16 +2,24 @@
|
|||||||
SELECT
|
SELECT
|
||||||
r.category,
|
r.category,
|
||||||
ri.comment AS item_comment,
|
ri.comment AS item_comment,
|
||||||
ri.*,
|
ri.count,
|
||||||
p.*,
|
ri.product_id,
|
||||||
pc.*,
|
p.label,
|
||||||
|
p.ratio,
|
||||||
|
p.weight,
|
||||||
|
p.category_id,
|
||||||
pc.name AS product_category_name,
|
pc.name AS product_category_name,
|
||||||
lr.*,
|
pc.unit,
|
||||||
|
pc.convertible,
|
||||||
|
pc.conversion_unit,
|
||||||
lr.unit_price AS price_price,
|
lr.unit_price AS price_price,
|
||||||
vp."label" AS price_label,
|
vp."label" AS price_label,
|
||||||
lr."comment" AS price_comment,
|
lr."comment" AS price_comment,
|
||||||
cpli.*,
|
rwi.product_category_id,
|
||||||
rwi.*,
|
CASE
|
||||||
|
WHEN r.category = '0' THEN cpli.conversion_logic_id
|
||||||
|
ELSE lr.conversion_logic_id
|
||||||
|
END AS conversion_logic_id,
|
||||||
CASE
|
CASE
|
||||||
WHEN ucl.id > 4
|
WHEN ucl.id > 4
|
||||||
AND c.id IS NOT NULL THEN (
|
AND c.id IS NOT NULL THEN (
|
||||||
|
Loading…
Reference in New Issue
Block a user