|
@@ -30,6 +30,7 @@ from app.crud.crm.contract_product import (
|
|
|
)
|
|
)
|
|
|
from app.crud.crm.customer import get_customer
|
|
from app.crud.crm.customer import get_customer
|
|
|
from app.crud.crm.invoice_info import list_invoice_info_by_customer
|
|
from app.crud.crm.invoice_info import list_invoice_info_by_customer
|
|
|
|
|
+from app.services.crm_settlement_clause import default_settlement_clause
|
|
|
from app.services.crm_supplier_hazard import assert_products_allowed_for_supplier
|
|
from app.services.crm_supplier_hazard import assert_products_allowed_for_supplier
|
|
|
from app.crud.crm.product import resolve_product_id_for_quote_item
|
|
from app.crud.crm.product import resolve_product_id_for_quote_item
|
|
|
from app.crud.crm.quote import get_quote
|
|
from app.crud.crm.quote import get_quote
|
|
@@ -1661,12 +1662,10 @@ def save_template(
|
|
|
drafts = settlement_clause_drafts
|
|
drafts = settlement_clause_drafts
|
|
|
if not (drafts or "").strip():
|
|
if not (drafts or "").strip():
|
|
|
method = (entity.settlement_method or "").strip() or "arrive_payment"
|
|
method = (entity.settlement_method or "").strip() or "arrive_payment"
|
|
|
- default_clause = (
|
|
|
|
|
- "款到发货。需方付款后安排发货,需方收到货物后,供方开具13%增值税专用发票。"
|
|
|
|
|
- if method == "advance_payment"
|
|
|
|
|
- else "货到付款,需方收到供方货物后,供方开具13%增值税专用发票,无异议后,以现汇方式月结。"
|
|
|
|
|
|
|
+ drafts = json.dumps(
|
|
|
|
|
+ {method: default_settlement_clause(method)},
|
|
|
|
|
+ ensure_ascii=False,
|
|
|
)
|
|
)
|
|
|
- drafts = json.dumps({method: default_clause}, ensure_ascii=False)
|
|
|
|
|
|
|
|
|
|
entity.template_content = template_content or ""
|
|
entity.template_content = template_content or ""
|
|
|
entity.settlement_clause_drafts = drafts
|
|
entity.settlement_clause_drafts = drafts
|