2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 23:00:56 +00:00

feat: add label in UI to identify free items

This commit is contained in:
AbleKSaju 2024-09-04 17:58:05 +05:30
parent 7404da3483
commit 19c3ecec12
3 changed files with 27 additions and 11 deletions

View File

@ -1179,6 +1179,7 @@ export abstract class Invoice extends Transactional {
item: pricingRuleDoc.freeItem as string,
quantity: freeItemQty,
isFreeItem: true,
pricingRule: pricingRuleDoc.title,
rate: pricingRuleDoc.freeItemRate,
unit: pricingRuleDoc.freeItemUnit,
});

View File

@ -8,6 +8,11 @@
"fieldtype": "Check",
"default": false,
"hidden": true
},
{
"fieldname": "pricingRule",
"fieldtype": "Data",
"hidden": true
}
]
}

View File

@ -5,17 +5,27 @@
@click="isExapanded = !isExapanded"
/>
<Link
:df="{
fieldname: 'item',
fieldtype: 'Data',
label: 'item',
}"
size="small"
:border="false"
:value="row.item"
:read-only="true"
/>
<div class="relative">
<Link
class="pt-2"
:df="{
fieldname: 'item',
fieldtype: 'Data',
label: 'item',
}"
size="small"
:border="false"
:value="row.item"
:read-only="true"
/>
<p
v-if="row.isFreeItem"
class="absolute flex top-0 font-medium text-xs ml-2 text-green-800"
style="font-size: 0.6rem"
>
{{ row.pricingRule }}
</p>
</div>
<Int
:df="{