mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
incr: posShiftOpen modal
This commit is contained in:
parent
b9b2f3d49e
commit
06da764309
@ -74,7 +74,7 @@ export default defineComponent({
|
||||
doc: computed(() => this.posShiftDoc),
|
||||
};
|
||||
},
|
||||
emits: ['toggleShiftOpenModal'],
|
||||
emits: ['toggleModal'],
|
||||
data() {
|
||||
return {
|
||||
posShiftDoc: undefined as POSShift | undefined,
|
||||
@ -92,6 +92,7 @@ export default defineComponent({
|
||||
this.posShiftDoc = fyo.singles[ModelNameEnum.POSShift];
|
||||
|
||||
await this.seedDefaults();
|
||||
this.isValuesSeeded = true;
|
||||
},
|
||||
methods: {
|
||||
async seedDefaultCashDenomiations() {
|
||||
@ -142,10 +143,8 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
this.isValuesSeeded = false;
|
||||
await this.seedDefaultCashDenomiations();
|
||||
await this.seedPaymentMethods();
|
||||
this.isValuesSeeded = true;
|
||||
},
|
||||
getField(fieldname: string) {
|
||||
return this.fyo.getField(ModelNameEnum.POSShift, fieldname);
|
||||
@ -166,9 +165,13 @@ export default defineComponent({
|
||||
this.setOpeningCashAmount();
|
||||
},
|
||||
async handleSubmit() {
|
||||
await this.posShiftDoc?.set('isShiftOpen', true);
|
||||
await this.posShiftDoc?.setMultiple({
|
||||
isShiftOpen: true,
|
||||
openingDate: new Date(),
|
||||
});
|
||||
|
||||
await this.posShiftDoc?.sync();
|
||||
this.$emit('toggleShiftOpenModal');
|
||||
this.$emit('toggleModal', 'ShiftOpen');
|
||||
},
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue
Block a user