fix(crm): mesghal by metal, jalali fit, scoped group filters

This commit is contained in:
2026-10-24 22:25:27 +03:30
parent f8128ebe3a
commit 48815852fc
8 changed files with 202 additions and 27 deletions
@@ -13,6 +13,7 @@ import {
printTahesabInvoicePdf,
rowInvoiceDesc,
formatInvoiceWeightBalance,
invoiceMesghalLabels,
sumInvoiceMali,
tabdilVaznColumnLabel,
type TahesabInvoiceGroup,
@@ -71,6 +72,10 @@ const company = computed(
const generatedAtLabel = computed(() =>
props.open ? formatJalaliDateTime(new Date()) : '',
);
const mesghalLabels = computed(() =>
invoiceMesghalLabels(sourceRows.value),
);
function printPdf() {
if (!props.group) return;
const ok = printTahesabInvoicePdf({
@@ -243,8 +248,14 @@ function printPdf() {
<div class="account-row">
<div class="mesghal-box">
<span class="ib-k">قیمت یک مثقال نقره خام:</span>
<span class="mesghal-blank" aria-hidden="true" />
<div
v-for="label in mesghalLabels"
:key="label"
class="mesghal-line"
>
<span class="ib-k">{{ label }}</span>
<span class="mesghal-blank" aria-hidden="true" />
</div>
</div>
<div class="account-box">
<div class="acc-line">
@@ -612,11 +623,17 @@ th {
border-radius: 10px;
background: transparent;
padding: 8px 12px;
display: flex;
flex-direction: column;
justify-content: center;
gap: 8px;
min-height: 2.5rem;
}
.mesghal-line {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
min-height: 2.5rem;
}
.mesghal-blank {
flex: 1;