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",
|
||||
"slimy-sloths-repeat",
|
||||
"smart-jokes-whisper",
|
||||
"tricky-eyes-knock",
|
||||
"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",
|
||||
"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.",
|
||||
"keywords": [
|
||||
"System management"
|
||||
|
@ -42,8 +42,13 @@ export class RecordPdfService {
|
||||
data['count'] = item.count;
|
||||
data['unit'] = item.unit;
|
||||
} else if (item.conversion_logic_id === ConversionLogics.Product) {
|
||||
if (item.convertible) (data['count'] = item.count * item.ratio), (data['unit'] = item.conversion_unit);
|
||||
else (data['count'] = item.count), (data['unit'] = item.unit);
|
||||
if (item.convertible) {
|
||||
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) {
|
||||
data['count'] = item.count * item.weight;
|
||||
data['unit'] = 'KG';
|
||||
@ -102,16 +107,24 @@ export class RecordPdfService {
|
||||
data['total'] = lease.count;
|
||||
data['conversion_unit'] = lease.unit;
|
||||
} else if (lease.conversion_logic_id === ConversionLogics.Product) {
|
||||
if (lease.convertible)
|
||||
(data['total'] = lease.count * lease.ratio), (data['conversion_unit'] = lease.conversion_unit);
|
||||
else (data['total'] = lease.count), (data['conversion_unit'] = lease.unit);
|
||||
if (lease.convertible) {
|
||||
data['total'] = lease.count * lease.ratio;
|
||||
data['conversion_unit'] = lease.conversion_unit;
|
||||
} else {
|
||||
data['total'] = lease.count;
|
||||
data['conversion_unit'] = lease.unit;
|
||||
}
|
||||
} else if (lease.conversion_logic_id === ConversionLogics.ProductWeight) {
|
||||
data['total'] = lease.count * lease.weight;
|
||||
data['conversion_unit'] = 'KG';
|
||||
} else if (lease.conversion_logic_id === ConversionLogics.ActualWeight) {
|
||||
if (lease.convertible)
|
||||
(data['total'] = lease.count * lease.ratio), (data['conversion_unit'] = lease.conversion_unit);
|
||||
else (data['total'] = lease.count), (data['conversion_unit'] = lease.unit);
|
||||
if (lease.convertible) {
|
||||
data['total'] = lease.count * lease.ratio;
|
||||
data['conversion_unit'] = lease.conversion_unit;
|
||||
} else {
|
||||
data['total'] = lease.count;
|
||||
data['conversion_unit'] = lease.unit;
|
||||
}
|
||||
} else {
|
||||
data['conversion_unit'] = 'KG';
|
||||
if (lease.wr?.conversion_logic_id === ConversionLogics.Keep) {
|
||||
@ -135,8 +148,9 @@ export class RecordPdfService {
|
||||
recordData.category === RecordCategory.purchase ||
|
||||
recordData.category === RecordCategory.staging ||
|
||||
recordData.category === RecordCategory.inventory
|
||||
)
|
||||
) {
|
||||
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) {
|
||||
data['total'] = data.count1;
|
||||
} else if (item.conversion_logic_id === ConversionLogics.Product) {
|
||||
if (item.convertible) data['total'] = data.count1 * item.product_ratio;
|
||||
else data['total'] = data.count1;
|
||||
if (item.convertible) {
|
||||
data['total'] = data.count1 * item.product_ratio;
|
||||
} else {
|
||||
data['total'] = data.count1;
|
||||
}
|
||||
} else if (item.conversion_logic_id === ConversionLogics.ProductWeight) {
|
||||
data['total'] = data.count1 * item.product_weight;
|
||||
} else if (item.conversion_logic_id === ConversionLogics.ActualWeight) {
|
||||
|
@ -2,16 +2,24 @@
|
||||
SELECT
|
||||
r.category,
|
||||
ri.comment AS item_comment,
|
||||
ri.*,
|
||||
p.*,
|
||||
pc.*,
|
||||
ri.count,
|
||||
ri.product_id,
|
||||
p.label,
|
||||
p.ratio,
|
||||
p.weight,
|
||||
p.category_id,
|
||||
pc.name AS product_category_name,
|
||||
lr.*,
|
||||
pc.unit,
|
||||
pc.convertible,
|
||||
pc.conversion_unit,
|
||||
lr.unit_price AS price_price,
|
||||
vp."label" AS price_label,
|
||||
lr."comment" AS price_comment,
|
||||
cpli.*,
|
||||
rwi.*,
|
||||
rwi.product_category_id,
|
||||
CASE
|
||||
WHEN r.category = '0' THEN cpli.conversion_logic_id
|
||||
ELSE lr.conversion_logic_id
|
||||
END AS conversion_logic_id,
|
||||
CASE
|
||||
WHEN ucl.id > 4
|
||||
AND c.id IS NOT NULL THEN (
|
||||
|
Loading…
Reference in New Issue
Block a user