mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
14 lines
398 B
TypeScript
14 lines
398 B
TypeScript
|
import Doc from 'frappe/model/doc';
|
||
|
import { FormulaMap } from 'frappe/model/types';
|
||
|
import Money from 'pesa/dist/types/src/money';
|
||
|
|
||
|
export class TaxSummary extends Doc {
|
||
|
formulas: FormulaMap = {
|
||
|
baseAmount: async () => {
|
||
|
const amount = this.amount as Money;
|
||
|
const exchangeRate = (this.parentdoc?.exchangeRate ?? 1) as number;
|
||
|
return amount.mul(exchangeRate);
|
||
|
},
|
||
|
};
|
||
|
}
|