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

feat: add item through barcode scan

This commit is contained in:
akshayitzme 2024-01-02 12:38:31 +05:30
parent bcb602e299
commit 8cb126851e

View File

@ -35,9 +35,10 @@
>
<div class="bg-white border col-span-5 rounded-md">
<div class="rounded-md p-4 col-span-5">
<div class="flex justify-between">
<!-- Item Search -->
<Link
class="border-r flex-shrink-0 w-full"
class="border-r flex-shrink-0 w-2/3"
:df="{
label: t`Search an Item`,
fieldtype: 'Link',
@ -51,6 +52,16 @@
"
@change="(item: string) =>itemSearchTerm= item"
/>
<Barcode
@item-selected="
async (name: string) => {
await addItem(await getItem(name));
}
"
/>
</div>
<ItemsTable @add-item="addItem" />
</div>
</div>
@ -199,6 +210,7 @@ import {
validateShipment,
validateSinv,
} from 'src/utils/pos';
import Barcode from 'src/components/Controls/Barcode.vue';
export default defineComponent({
name: 'POS',
@ -213,6 +225,7 @@ export default defineComponent({
PageHeader,
PaymentModal,
SelectedItemTable,
Barcode,
},
provide() {
return {