mirror of
https://github.com/frappe/books.git
synced 2026-08-24 02:24:17 -05:00
fix: formatted the code
This commit is contained in:
@@ -27,11 +27,6 @@ export default class SerialNumberSeries extends Doc {
|
||||
setCurrent() {
|
||||
let current = this.get('current') as number | null;
|
||||
|
||||
/**
|
||||
* Increment current if it isn't the first entry. This
|
||||
* is to prevent reassignment of NumberSeries document ids.
|
||||
*/
|
||||
|
||||
if (!current) {
|
||||
current = this.get('start') as number;
|
||||
} else {
|
||||
|
||||
@@ -357,18 +357,14 @@ export class StockMovementItem extends TransferItem {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const serialNumbers = await generateSerialNumbersForItem(
|
||||
this.fyo,
|
||||
this.item,
|
||||
Math.abs(this.quantity)
|
||||
);
|
||||
const serialNumbers = await generateSerialNumbersForItem(
|
||||
this.fyo,
|
||||
this.item,
|
||||
Math.abs(this.quantity)
|
||||
);
|
||||
|
||||
if (serialNumbers) {
|
||||
await this.set('serialNumber', serialNumbers);
|
||||
}
|
||||
} catch (error) {
|
||||
// Don't throw - allow the user to manually enter serial numbers if auto-generation fails
|
||||
if (serialNumbers) {
|
||||
await this.set('serialNumber', serialNumbers);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user