code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
import { t } from 'fyo'; import { Doc } from 'fyo/model/doc'; import { FormulaMap, ListsMap, ValidationMap } from 'fyo/model/types'; import { validateEmail } from 'fyo/model/validationFunction'; import { DateTime } from 'luxon'; import { getCountryInfo, getFiscalYear } from 'utils/misc'; function getCurrencyList(): { ...
2302_79757062/books
models/baseModels/SetupWizard/SetupWizard.ts
TypeScript
agpl-3.0
5,343
import { Doc } from 'fyo/model/doc'; import { ListViewSettings } from 'fyo/model/types'; export class Tax extends Doc { static getListViewSettings(): ListViewSettings { return { columns: ['name'] }; } }
2302_79757062/books
models/baseModels/Tax/Tax.ts
TypeScript
agpl-3.0
212
import { Fyo } from 'fyo'; import { DocValueMap } from 'fyo/core/types'; import { Doc } from 'fyo/model/doc'; import { CurrenciesMap } from 'fyo/model/types'; import { DEFAULT_CURRENCY } from 'fyo/utils/consts'; import { Money } from 'pesa'; import { FieldTypeEnum, Schema } from 'schemas/types'; import { Invoice } from...
2302_79757062/books
models/baseModels/TaxSummary/TaxSummary.ts
TypeScript
agpl-3.0
1,289
import { Fyo, t } from 'fyo'; import { Doc } from 'fyo/model/doc'; import { Action, ColumnConfig, DocStatus, LeadStatus, RenderData, } from 'fyo/model/types'; import { DateTime } from 'luxon'; import { Money } from 'pesa'; import { safeParseFloat } from 'utils/index'; import { Router } from 'vue-router'; impo...
2302_79757062/books
models/helpers.ts
TypeScript
agpl-3.0
23,014
import { ModelMap } from 'fyo/model/types'; import { Account } from './baseModels/Account/Account'; import { AccountingLedgerEntry } from './baseModels/AccountingLedgerEntry/AccountingLedgerEntry'; import { AccountingSettings } from './baseModels/AccountingSettings/AccountingSettings'; import { Address } from './baseMo...
2302_79757062/books
models/index.ts
TypeScript
agpl-3.0
4,396
import { Doc } from 'fyo/model/doc'; import { ListViewSettings } from 'fyo/model/types'; export class Batch extends Doc { static getListViewSettings(): ListViewSettings { return { columns: ['name', 'expiryDate', 'manufactureDate'], }; } }
2302_79757062/books
models/inventory/Batch.ts
TypeScript
agpl-3.0
258
import { Doc } from 'fyo/model/doc'; import { FiltersMap, ReadOnlyMap } from 'fyo/model/types'; import { AccountTypeEnum } from 'models/baseModels/Account/types'; export class InventorySettings extends Doc { defaultLocation?: string; stockInHand?: string; stockReceivedButNotBilled?: string; costOfGoodsSold?: s...
2302_79757062/books
models/inventory/InventorySettings.ts
TypeScript
agpl-3.0
1,415
import { Doc } from 'fyo/model/doc'; export class Location extends Doc { item?: string; }
2302_79757062/books
models/inventory/Location.ts
TypeScript
agpl-3.0
93
import { Doc } from 'fyo/model/doc'; import { Money } from 'pesa'; export abstract class CashDenominations extends Doc { denomination?: Money; }
2302_79757062/books
models/inventory/Point of Sale/CashDenominations.ts
TypeScript
agpl-3.0
148
import { Doc } from 'fyo/model/doc'; import { FormulaMap } from 'fyo/model/types'; import { Money } from 'pesa'; export class ClosingAmounts extends Doc { closingAmount?: Money; differenceAmount?: Money; expectedAmount?: Money; openingAmount?: Money; paymentMethod?: string; formulas: FormulaMap = { di...
2302_79757062/books
models/inventory/Point of Sale/ClosingAmounts.ts
TypeScript
agpl-3.0
607
import { CashDenominations } from './CashDenominations'; export class ClosingCash extends CashDenominations { count?: number; }
2302_79757062/books
models/inventory/Point of Sale/ClosingCash.ts
TypeScript
agpl-3.0
131
import { CashDenominations } from './CashDenominations'; export class DefaultCashDenominations extends CashDenominations {}
2302_79757062/books
models/inventory/Point of Sale/DefaultCashDenominations.ts
TypeScript
agpl-3.0
125
import { Doc } from 'fyo/model/doc'; import { Money } from 'pesa'; export class OpeningAmounts extends Doc { amount?: Money; paymentMethod?: 'Cash' | 'Transfer'; get openingCashAmount() { return this.parentdoc?.openingCashAmount as Money; } }
2302_79757062/books
models/inventory/Point of Sale/OpeningAmounts.ts
TypeScript
agpl-3.0
257
import { CashDenominations } from './CashDenominations'; export class OpeningCash extends CashDenominations { count?: number; }
2302_79757062/books
models/inventory/Point of Sale/OpeningCash.ts
TypeScript
agpl-3.0
131
import { Doc } from 'fyo/model/doc'; import { FiltersMap } from 'fyo/model/types'; import { AccountRootTypeEnum, AccountTypeEnum, } from 'models/baseModels/Account/types'; export class POSSettings extends Doc { inventory?: string; cashAccount?: string; writeOffAccount?: string; static filters: FiltersMap ...
2302_79757062/books
models/inventory/Point of Sale/POSSettings.ts
TypeScript
agpl-3.0
471
import { ClosingAmounts } from './ClosingAmounts'; import { ClosingCash } from './ClosingCash'; import { Doc } from 'fyo/model/doc'; import { OpeningAmounts } from './OpeningAmounts'; import { OpeningCash } from './OpeningCash'; export class POSShift extends Doc { closingAmounts?: ClosingAmounts[]; closingCash?: C...
2302_79757062/books
models/inventory/Point of Sale/POSShift.ts
TypeScript
agpl-3.0
1,600
import { Action, ListViewSettings } from 'fyo/model/types'; import { getStockTransferActions, getTransactionStatusColumn, } from 'models/helpers'; import { PurchaseReceiptItem } from './PurchaseReceiptItem'; import { StockTransfer } from './StockTransfer'; import { Fyo } from 'fyo'; import { ModelNameEnum } from 'm...
2302_79757062/books
models/inventory/PurchaseReceipt.ts
TypeScript
agpl-3.0
753
import { StockTransferItem } from './StockTransferItem'; export class PurchaseReceiptItem extends StockTransferItem {}
2302_79757062/books
models/inventory/PurchaseReceiptItem.ts
TypeScript
agpl-3.0
120
import { Doc } from 'fyo/model/doc'; import { ListViewSettings } from 'fyo/model/types'; import { getSerialNumberStatusColumn } from 'models/helpers'; import { SerialNumberStatus } from './types'; export class SerialNumber extends Doc { name?: string; item?: string; description?: string; status?: SerialNumberS...
2302_79757062/books
models/inventory/SerialNumber.ts
TypeScript
agpl-3.0
542
import { Fyo } from 'fyo'; import { Action, ListViewSettings } from 'fyo/model/types'; import { getStockTransferActions, getTransactionStatusColumn, } from 'models/helpers'; import { ModelNameEnum } from 'models/types'; import { ShipmentItem } from './ShipmentItem'; import { StockTransfer } from './StockTransfer'; ...
2302_79757062/books
models/inventory/Shipment.ts
TypeScript
agpl-3.0
718
import { StockTransferItem } from './StockTransferItem'; export class ShipmentItem extends StockTransferItem {}
2302_79757062/books
models/inventory/ShipmentItem.ts
TypeScript
agpl-3.0
113
import { Doc } from 'fyo/model/doc'; import { ListViewSettings } from 'fyo/model/types'; import { Money } from 'pesa'; export class StockLedgerEntry extends Doc { date?: Date; item?: string; rate?: Money; quantity?: number; location?: string; referenceName?: string; referenceType?: string; batch?: stri...
2302_79757062/books
models/inventory/StockLedgerEntry.ts
TypeScript
agpl-3.0
575
import { Fyo, t } from 'fyo'; import { ValidationError } from 'fyo/utils/errors'; import { ModelNameEnum } from 'models/types'; import { Money } from 'pesa'; import { StockLedgerEntry } from './StockLedgerEntry'; import { SMDetails, SMIDetails, SMTransferDetails } from './types'; import { getSerialNumbers } from './hel...
2302_79757062/books
models/inventory/StockManager.ts
TypeScript
agpl-3.0
8,487
import { Fyo, t } from 'fyo'; import { Action, DefaultMap, FiltersMap, FormulaMap, ListViewSettings, } from 'fyo/model/types'; import { ValidationError } from 'fyo/utils/errors'; import { LedgerPosting } from 'models/Transactional/LedgerPosting'; import { addItem, getDocStatusListColumn, getLedgerLinkAc...
2302_79757062/books
models/inventory/StockMovement.ts
TypeScript
agpl-3.0
5,039
import { t } from 'fyo'; import { DocValue } from 'fyo/core/types'; import { FiltersMap, FormulaMap, HiddenMap, ReadOnlyMap, RequiredMap, ValidationMap, } from 'fyo/model/types'; import { ValidationError } from 'fyo/utils/errors'; import { ModelNameEnum } from 'models/types'; import { Money } from 'pesa'; i...
2302_79757062/books
models/inventory/StockMovementItem.ts
TypeScript
agpl-3.0
6,505
import { t } from 'fyo'; import { Attachment, DocValueMap } from 'fyo/core/types'; import { Doc } from 'fyo/model/doc'; import { ChangeArg, DefaultMap, FiltersMap, FormulaMap, HiddenMap, } from 'fyo/model/types'; import { ValidationError } from 'fyo/utils/errors'; import { LedgerPosting } from 'models/Transac...
2302_79757062/books
models/inventory/StockTransfer.ts
TypeScript
agpl-3.0
14,878
import { DocValue } from 'fyo/core/types'; import { Doc } from 'fyo/model/doc'; import { FiltersMap, FormulaMap, HiddenMap, ValidationMap, } from 'fyo/model/types'; import { ValidationError } from 'fyo/utils/errors'; import { ModelNameEnum } from 'models/types'; import { Money } from 'pesa'; import { safeParseF...
2302_79757062/books
models/inventory/StockTransferItem.ts
TypeScript
agpl-3.0
5,962
import { Transactional } from 'models/Transactional/Transactional'; import { StockManager } from './StockManager'; import type { SMTransferDetails } from './types'; import type { TransferItem } from './TransferItem'; import { createSerialNumbers } from './helpers'; export abstract class Transfer extends Transactional ...
2302_79757062/books
models/inventory/Transfer.ts
TypeScript
agpl-3.0
1,586
import { Doc } from 'fyo/model/doc'; import type { Transfer } from './Transfer'; import type { Money } from 'pesa'; export class TransferItem extends Doc { item?: string; unit?: string; transferUnit?: string; quantity?: number; transferQuantity?: number; unitConversionFactor?: number; rate?: Money; a...
2302_79757062/books
models/inventory/TransferItem.ts
TypeScript
agpl-3.0
406
import { Fyo, t } from 'fyo'; import { ValidationError } from 'fyo/utils/errors'; import type { Invoice } from 'models/baseModels/Invoice/Invoice'; import type { InvoiceItem } from 'models/baseModels/InvoiceItem/InvoiceItem'; import { ModelNameEnum } from 'models/types'; import { SerialNumber } from './SerialNumber'; i...
2302_79757062/books
models/inventory/helpers.ts
TypeScript
agpl-3.0
8,350
export class StockQueue { quantity: number; value: number; queue: { rate: number; quantity: number }[]; movingAverage: number; constructor() { this.value = 0; this.quantity = 0; this.movingAverage = 0; this.queue = []; } get fifo() { /** * Stock value maintained is based on the ...
2302_79757062/books
models/inventory/stockQueue.ts
TypeScript
agpl-3.0
1,987
import { Fyo } from 'fyo'; import { Batch } from 'models/inventory/Batch'; import { ModelNameEnum } from 'models/types'; import { StockMovement } from '../StockMovement'; import { StockTransfer } from '../StockTransfer'; import { MovementTypeEnum } from '../types'; type ALE = { date: string; account: string; par...
2302_79757062/books
models/inventory/tests/helpers.ts
TypeScript
agpl-3.0
2,821
import { Money } from 'pesa'; export enum ValuationMethod { 'FIFO' = 'FIFO', 'MovingAverage' = 'MovingAverage', } export enum MovementTypeEnum { 'MaterialIssue' = 'MaterialIssue', 'MaterialReceipt' = 'MaterialReceipt', 'MaterialTransfer' = 'MaterialTransfer', 'Manufacture' = 'Manufacture', } export type ...
2302_79757062/books
models/inventory/types.ts
TypeScript
agpl-3.0
1,307
import { FormulaMap, ListsMap } from 'fyo/model/types'; import { Address as BaseAddress } from 'models/baseModels/Address/Address'; import { codeStateMap } from 'regional/in'; export class Address extends BaseAddress { formulas: FormulaMap = { addressDisplay: { formula: () => { return [ t...
2302_79757062/books
models/regionalModels/in/Address.ts
TypeScript
agpl-3.0
1,107
import { HiddenMap } from 'fyo/model/types'; import { Party as BaseParty } from 'models/baseModels/Party/Party'; import { GSTType } from './types'; import { PartyRole } from 'models/baseModels/Party/types'; export class Party extends BaseParty { gstin?: string; role?: PartyRole; gstType?: GSTType; loyaltyProgr...
2302_79757062/books
models/regionalModels/in/Party.ts
TypeScript
agpl-3.0
969
export type GSTType = 'Unregistered' | 'Registered Regular' | 'Consumer';
2302_79757062/books
models/regionalModels/in/types.ts
TypeScript
agpl-3.0
74
export type InvoiceStatus = 'Draft' | 'Saved' | 'Unpaid' | 'Cancelled' | 'Paid' | 'Return' | 'ReturnIssued'; export enum ModelNameEnum { Account = 'Account', AccountingLedgerEntry = 'AccountingLedgerEntry', AccountingSettings = 'AccountingSettings', Address = 'Address', Batch= 'Batch', Color = 'Color', Cu...
2302_79757062/books
models/types.ts
TypeScript
agpl-3.0
2,009
module.exports = { plugins: [require('tailwindcss'), require('autoprefixer')], };
2302_79757062/books
postcss.config.js
JavaScript
agpl-3.0
84
export const codeStateMap = { '01': 'Jammu and Kashmir', '02': 'Himachal Pradesh', '03': 'Punjab', '04': 'Chandigarh', '05': 'Uttarakhand', '06': 'Haryana', '07': 'Delhi', '08': 'Rajasthan', '09': 'Uttar Pradesh', '10': 'Bihar', '11': 'Sikkim', '12': 'Arunachal Pradesh', '13': 'Nagaland', '1...
2302_79757062/books
regional/in.ts
TypeScript
agpl-3.0
870
import { Fyo, t } from 'fyo'; import { cloneDeep } from 'lodash'; import { DateTime } from 'luxon'; import { AccountRootType } from 'models/baseModels/Account/types'; import { isCredit } from 'models/helpers'; import { ModelNameEnum } from 'models/types'; import { LedgerReport } from 'reports/LedgerReport'; import { ...
2302_79757062/books
reports/AccountReport.ts
TypeScript
agpl-3.0
16,677
import { t } from 'fyo'; import { AccountRootType, AccountRootTypeEnum, } from 'models/baseModels/Account/types'; import { AccountReport, convertAccountRootNodesToAccountList, } from 'reports/AccountReport'; import { ReportData, RootTypeRow } from 'reports/types'; import { getMapFromList } from 'utils'; export...
2302_79757062/books
reports/BalanceSheet/BalanceSheet.ts
TypeScript
agpl-3.0
2,838
import { Fyo, t } from 'fyo'; import { DateTime } from 'luxon'; import { ModelNameEnum } from 'models/types'; import { LedgerReport } from 'reports/LedgerReport'; import { ColumnField, GroupedMap, LedgerEntry, ReportData, ReportRow, } from 'reports/types'; import { Field, FieldTypeEnum } from 'schemas/types';...
2302_79757062/books
reports/GeneralLedger/GeneralLedger.ts
TypeScript
agpl-3.0
10,031
import { t } from 'fyo'; import { Action } from 'fyo/model/types'; import { DateTime } from 'luxon'; import { Invoice } from 'models/baseModels/Invoice/Invoice'; import { Party } from 'models/regionalModels/in/Party'; import { ModelNameEnum } from 'models/types'; import { codeStateMap } from 'regional/in'; import { Rep...
2302_79757062/books
reports/GoodsAndServiceTax/BaseGSTR.ts
TypeScript
agpl-3.0
8,686
import { BaseGSTR } from './BaseGSTR'; import { GSTRType } from './types'; export class GSTR1 extends BaseGSTR { static title = 'GSTR1'; static reportName = 'gstr-1'; gstrType: GSTRType = 'GSTR-1'; }
2302_79757062/books
reports/GoodsAndServiceTax/GSTR1.ts
TypeScript
agpl-3.0
208
import { BaseGSTR } from './BaseGSTR'; import { GSTRType } from './types'; export class GSTR2 extends BaseGSTR { static title = 'GSTR2'; static reportName = 'gstr-2'; gstrType: GSTRType = 'GSTR-2'; }
2302_79757062/books
reports/GoodsAndServiceTax/GSTR2.ts
TypeScript
agpl-3.0
208
import { Action } from 'fyo/model/types'; import { Verb } from 'fyo/telemetry/types'; import { DateTime } from 'luxon'; import { ModelNameEnum } from 'models/types'; import { codeStateMap } from 'regional/in'; import { ExportExtention } from 'reports/types'; import { showDialog } from 'src/utils/interactive'; import { ...
2302_79757062/books
reports/GoodsAndServiceTax/gstExporter.ts
TypeScript
agpl-3.0
9,119
export enum TransferTypeEnum { 'B2B' = 'B2B', 'B2CL' = 'B2CL', 'B2CS' = 'B2CS', 'NR' = 'NR', } export type TransferType = keyof typeof TransferTypeEnum; export type GSTRType = 'GSTR-1' | 'GSTR-2'; export interface GSTRRow { gstin: string; partyName: string; invNo: string; invDate: Date; rate: number;...
2302_79757062/books
reports/GoodsAndServiceTax/types.ts
TypeScript
agpl-3.0
546
import { Fyo, t } from 'fyo'; import { Action } from 'fyo/model/types'; import { ModelNameEnum } from 'models/types'; import { Report } from 'reports/Report'; import { GroupedMap, LedgerEntry, RawLedgerEntry } from 'reports/types'; import { QueryFilter } from 'utils/db/types'; import { safeParseFloat, safeParseInt } fr...
2302_79757062/books
reports/LedgerReport.ts
TypeScript
agpl-3.0
3,130
import { t } from 'fyo'; import { AccountRootType, AccountRootTypeEnum, } from 'models/baseModels/Account/types'; import { AccountReport, convertAccountRootNodesToAccountList, } from 'reports/AccountReport'; import { AccountListNode, AccountTreeNode, ReportData, ValueMap, } from 'reports/types'; export...
2302_79757062/books
reports/ProfitAndLoss/ProfitAndLoss.ts
TypeScript
agpl-3.0
4,636
import { Fyo } from 'fyo'; import { Converter } from 'fyo/core/converter'; import { DocValue } from 'fyo/core/types'; import { Action } from 'fyo/model/types'; import Observable from 'fyo/utils/observable'; import { Field, RawValue } from 'schemas/types'; import { getIsNullOrUndef } from 'utils'; import { ColumnField, ...
2302_79757062/books
reports/Report.ts
TypeScript
agpl-3.0
2,579
import { t } from 'fyo'; import { ValueError } from 'fyo/utils/errors'; import { DateTime } from 'luxon'; import { AccountRootType, AccountRootTypeEnum, } from 'models/baseModels/Account/types'; import { AccountReport, ACC_BAL_WIDTH, ACC_NAME_WIDTH, convertAccountRootNodesToAccountList, getFiscalEndpoints...
2302_79757062/books
reports/TrialBalance/TrialBalance.ts
TypeScript
agpl-3.0
7,301
import { t } from 'fyo'; import { Action } from 'fyo/model/types'; import { Verb } from 'fyo/telemetry/types'; import { getSavePath, showExportInFolder } from 'src/utils/ui'; import { getIsNullOrUndef } from 'utils'; import { generateCSV } from 'utils/csvParser'; import { Report } from './Report'; import { ExportExtent...
2302_79757062/books
reports/commonExporter.ts
TypeScript
agpl-3.0
4,491
import { BalanceSheet } from './BalanceSheet/BalanceSheet'; import { GeneralLedger } from './GeneralLedger/GeneralLedger'; import { GSTR1 } from './GoodsAndServiceTax/GSTR1'; import { GSTR2 } from './GoodsAndServiceTax/GSTR2'; import { ProfitAndLoss } from './ProfitAndLoss/ProfitAndLoss'; import { TrialBalance } from '...
2302_79757062/books
reports/index.ts
TypeScript
agpl-3.0
615
import { t } from 'fyo'; import { RawValueMap } from 'fyo/core/types'; import { Action } from 'fyo/model/types'; import getCommonExportActions from 'reports/commonExporter'; import { ColumnField, ReportData } from 'reports/types'; import { Field } from 'schemas/types'; import { getStockBalanceEntries } from './helpers'...
2302_79757062/books
reports/inventory/StockBalance.ts
TypeScript
agpl-3.0
3,904
import { Fyo, t } from 'fyo'; import { RawValueMap } from 'fyo/core/types'; import { Action } from 'fyo/model/types'; import { cloneDeep } from 'lodash'; import { DateTime } from 'luxon'; import { InventorySettings } from 'models/inventory/InventorySettings'; import { ValuationMethod } from 'models/inventory/types'; im...
2302_79757062/books
reports/inventory/StockLedger.ts
TypeScript
agpl-3.0
10,461
import { Fyo } from 'fyo'; import { StockQueue } from 'models/inventory/stockQueue'; import { ValuationMethod } from 'models/inventory/types'; import { ModelNameEnum } from 'models/types'; import { safeParseFloat, safeParseInt } from 'utils/index'; import type { ComputedStockLedgerEntry, RawStockLedgerEntry, Stoc...
2302_79757062/books
reports/inventory/helpers.ts
TypeScript
agpl-3.0
6,782
import { ModelNameEnum } from "models/types"; export interface RawStockLedgerEntry { name: string; date: string; item: string; rate: string; batch: string | null; serialNumber: string | null; quantity: number; location: string; referenceName: string; referenceType: string; [key: string]: unknown;...
2302_79757062/books
reports/inventory/types.ts
TypeScript
agpl-3.0
1,153
import { DateTime } from 'luxon'; import { AccountRootType } from 'models/baseModels/Account/types'; import { BaseField, FieldType, RawValue } from 'schemas/types'; export type ExportExtention = 'csv' | 'json'; export interface ReportCell { bold?: boolean; italics?: boolean; align?: 'left' | 'right' | 'center';...
2302_79757062/books
reports/types.ts
TypeScript
agpl-3.0
2,650
import { RawCustomField } from 'backend/database/types'; import { cloneDeep } from 'lodash'; import { getListFromMap, getMapFromList } from 'utils'; import regionalSchemas from './regional'; import { appSchemas, coreSchemas, metaSchemas } from './schemas'; import type { DynamicLinkField, Field, OptionField, Sch...
2302_79757062/books
schemas/index.ts
TypeScript
agpl-3.0
9,472
import { SchemaStub } from '../../types'; import AccountingSettings from './AccountingSettings.json'; export default [AccountingSettings] as SchemaStub[];
2302_79757062/books
schemas/regional/ch/index.ts
TypeScript
agpl-3.0
156
import { SchemaStub } from '../../types'; import AccountingSettings from './AccountingSettings.json'; import Address from './Address.json'; import Party from './Party.json'; export default [AccountingSettings, Address, Party] as SchemaStub[];
2302_79757062/books
schemas/regional/in/index.ts
TypeScript
agpl-3.0
244
import { SchemaStub } from 'schemas/types'; import IndianSchemas from './in'; import SwissSchemas from './ch'; /** * Regional Schemas are exported by country code. */ export default { in: IndianSchemas, ch: SwissSchemas } as Record< string, SchemaStub[] >;
2302_79757062/books
schemas/regional/index.ts
TypeScript
agpl-3.0
264
import Account from './app/Account.json'; import AccountingLedgerEntry from './app/AccountingLedgerEntry.json'; import AccountingSettings from './app/AccountingSettings.json'; import Address from './app/Address.json'; import Batch from './app/Batch.json'; import Color from './app/Color.json'; import Currency from './ap...
2302_79757062/books
schemas/schemas.ts
TypeScript
agpl-3.0
6,134
import { cloneDeep } from 'lodash'; import Account from '../app/Account.json'; import JournalEntry from '../app/JournalEntry.json'; import JournalEntryAccount from '../app/JournalEntryAccount.json'; import PartyRegional from '../regional/in/Party.json'; import { Schema, SchemaStub, SchemaStubMap } from '../types'; impo...
2302_79757062/books
schemas/tests/helpers.ts
TypeScript
agpl-3.0
1,746
import { PropertyEnum } from "utils/types"; export type FieldType = | 'Data' | 'Select' | 'Link' | 'Date' | 'Datetime' | 'Table' | 'AutoComplete' | 'Check' | 'AttachImage' | 'DynamicLink' | 'Int' | 'Float' | 'Currency' | 'Text' | 'Color' | 'Attachment'; export const FieldTypeEnum: Prop...
2302_79757062/books
schemas/types.ts
TypeScript
agpl-3.0
5,330
import fs from 'fs/promises'; import path from 'path'; import { UnknownMap } from 'utils/types'; import { generateCSV, parseCSV } from '../utils/csvParser'; import { getIndexFormat, getWhitespaceSanitized, schemaTranslateables, } from '../utils/translationHelpers'; /* eslint-disable no-console, @typescript-eslin...
2302_79757062/books
scripts/generateTranslations.ts
TypeScript
agpl-3.0
8,929
#! /usr/bin/env zsh # https://nodejs.org/en/docs/guides/simple-profiling/ export TS_NODE_COMPILER_OPTIONS='{"module":"commonjs"}' rm ./isolate-*-v8.log 2> /dev/null rm ./profiler-output.log 2> /dev/null export ELECTRON_RUN_AS_NODE=true alias electron_node=./node_modules/.bin/electron echo "running profile.ts" elec...
2302_79757062/books
scripts/profile.sh
Shell
agpl-3.0
581
import { DatabaseManager } from 'backend/database/manager'; import { setupDummyInstance } from 'dummy'; import { unlink } from 'fs/promises'; import { Fyo } from 'fyo'; import { DummyAuthDemux } from 'fyo/tests/helpers'; import { getTestDbPath } from 'tests/helpers'; async function run() { const fyo = new Fyo({ ...
2302_79757062/books
scripts/profile.ts
TypeScript
agpl-3.0
637
# #! /bin/zsh set -e # Check node and yarn versions YARN_VERSION=$(yarn --version) if [ "$YARN_VERSION" != "1.22.18" ]; then echo "Incorrect yarn version: $YARN_VERSION" exit 1 fi # Source secrets source .env.publish # Create folder for the publish build cd ../ rm -rf build_publish mkdir build_publish cd build_...
2302_79757062/books
scripts/publish-mac-arm.sh
Shell
agpl-3.0
910
#! /usr/bin/env zsh # basically uses electron's node to prevent # mismatch in NODE_MODULE_VERSION when running # better-sqlite3 export TS_NODE_COMPILER_OPTIONS='{"module":"commonjs"}' export ELECTRON_RUN_AS_NODE=true alias electron_node="./node_modules/.bin/electron --require ts-node/register --require tsconfig-paths...
2302_79757062/books
scripts/runner.sh
Shell
agpl-3.0
347
TEST_PATH=$@ if [ $# -eq 0 ] then TEST_PATH=./**/tests/**/*.spec.ts fi export IS_TEST=true ./scripts/runner.sh ./node_modules/.bin/tape $TEST_PATH | ./node_modules/.bin/tap-spec
2302_79757062/books
scripts/test.sh
Shell
agpl-3.0
185
<template> <div id="app" class=" dark:bg-gray-900 h-screen flex flex-col font-sans overflow-hidden antialiased " :dir="languageDirection" :language="language" > <WindowsTitleBar v-if="platform === 'Windows'" :db-path="dbPath" :company-nam...
2302_79757062/books
src/App.vue
Vue
agpl-3.0
7,914
<template> <div class="rounded-full overflow-hidden" :class="sizeClasses"> <img v-if="imageURL" :src="imageURL" class="object-cover" :class="sizeClasses" /> <div v-else class=" bg-gray-500 flex h-full items-center justify-center ...
2302_79757062/books
src/components/Avatar.vue
Vue
agpl-3.0
797
<template> <div class="inline-block rounded-md px-2 py-1 truncate select-none" :class="colorClass" > <slot></slot> </div> </template> <script> import { getBgTextColorClass } from 'src/utils/colors'; export default { name: 'Badge', props: { color: { default: 'gray', }, }, comput...
2302_79757062/books
src/components/Badge.vue
Vue
agpl-3.0
416
<template> <button class="rounded-md flex justify-center items-center text-sm" :disabled="disabled" :class="_class" v-bind="$attrs" > <slot></slot> </button> </template> <script lang="ts"> import { defineComponent } from 'vue'; export default defineComponent({ name: 'Button', props: { ...
2302_79757062/books
src/components/Button.vue
Vue
agpl-3.0
1,327
<template> <div> <svg ref="chartSvg" :viewBox="`0 0 ${viewBoxWidth} ${viewBoxHeight}`" xmlns="http://www.w3.org/2000/svg" > <!-- x Grid Lines --> <path v-if="drawXGrid" :d="xGrid" :stroke="gridColor" :stroke-width="gridThickness" stroke-lin...
2302_79757062/books
src/components/Charts/BarChart.vue
Vue
agpl-3.0
10,260
<template> <div> <svg version="1.1" viewBox="0 0 100 100" @mouseleave="$emit('change', null)" > <defs> <clipPath id="donut-hole"> <circle :cx="cx" :cy="cy" :r="radius + thickness / 2" fill="black" stroke-widt...
2302_79757062/books
src/components/Charts/DonutChart.vue
Vue
agpl-3.0
4,678
<template> <div> <svg ref="chartSvg" :viewBox="`0 0 ${viewBoxWidth} ${viewBoxHeight}`" xmlns="http://www.w3.org/2000/svg" @mousemove="update" > <!-- x Grid Lines --> <path v-if="drawXGrid" :d="xGrid" :stroke="gridColor" :stroke-width="gridThi...
2302_79757062/books
src/components/Charts/LineChart.vue
Vue
agpl-3.0
10,048
<template> <div class=" relative bg-white dark:bg-gray-900 border dark:border-gray-800 flex-center overflow-hidden group " :class="{ rounded: size === 'form', 'w-20 h-20 rounded-full': size !== 'small' && size !== 'form', 'w-12 h-12 rounded...
2302_79757062/books
src/components/Controls/AttachImage.vue
Vue
agpl-3.0
3,471
<template> <div> <div v-if="showLabel && df" :class="labelClasses"> {{ df.label }} </div> <div :class="containerClasses" class="flex gap-2 items-center"> <label for="attachment" class="block whitespace-nowrap overflow-auto no-scrollbar" :class="[ inputClasses,...
2302_79757062/books
src/components/Controls/Attachment.vue
Vue
agpl-3.0
3,748
<template> <Dropdown :items="suggestions" :is-loading="isLoading" :df="df" :doc="doc"> <template #default="{ toggleDropdown, highlightItemUp, highlightItemDown, selectHighlightedItem, }" > <div v-if="showLabel" :class="labelClasses"> {{ df.label }} ...
2302_79757062/books
src/components/Controls/AutoComplete.vue
Vue
agpl-3.0
7,456
<template> <div class=" flex items-center border w-36 rounded px-2 bg-gray-50 dark:bg-gray-890 focus-within:bg-gray-100 dark:focus-within:bg-gray-900 " > <input ref="scanner" type="text" class="text-base placeholder-gray-600 w...
2302_79757062/books
src/components/Controls/Barcode.vue
Vue
agpl-3.0
3,730
<template> <div :title="df.label"> <div v-if="showLabel" :class="labelClasses"> {{ df.label }} </div> <div :class="showMandatory ? 'show-mandatory' : ''"> <input ref="input" spellcheck="false" class="bg-transparent" :class="[inputClasses, containerClasses]" ...
2302_79757062/books
src/components/Controls/Base.vue
Vue
agpl-3.0
6,197
<template> <div :class="[inputClasses, containerClasses]"> <label class="flex items-center" :class="spaceBetween ? 'justify-between' : ''" > <div v-if="showLabel && !labelRight" class="me-3" :class="labelClasses"> {{ df.label }} </div> <div style="width: 14px; hei...
2302_79757062/books
src/components/Controls/Check.vue
Vue
agpl-3.0
5,037
<template> <div> <div v-if="showLabel" :class="labelClasses"> {{ df.label }} </div> <Popover placement="bottom-end"> <template #target="{ togglePopover }"> <div tabindex="0" :class="[inputClasses, containerClasses]" @click="!isReadOnly && togglePopover()" ...
2302_79757062/books
src/components/Controls/Color.vue
Vue
agpl-3.0
2,367
<template> <div> <div v-if="showLabel" :class="labelClasses"> {{ df.label }} </div> <input v-show="showInput" ref="input" class="text-end" :class="[inputClasses, containerClasses]" :type="inputType" :value="round(value)" :placeholder="inputPlaceholder" ...
2302_79757062/books
src/components/Controls/Currency.vue
Vue
agpl-3.0
2,247
<script lang="ts"> import Base from './Base.vue'; import { defineComponent } from 'vue'; export default defineComponent({ name: 'Data', extends: Base, computed: { inputType() { return 'text'; }, }, }); </script>
2302_79757062/books
src/components/Controls/Data.vue
Vue
agpl-3.0
235
<template> <div> <div v-if="showLabel" :class="labelClasses"> {{ df.label }} </div> <input v-show="showInput" ref="input" :class="[inputClasses, containerClasses]" :type="inputType" :value="inputValue" :placeholder="inputPlaceholder" :readonly="isReadOnly" ...
2302_79757062/books
src/components/Controls/Date.vue
Vue
agpl-3.0
3,291
<script lang="ts"> import { defineComponent } from 'vue'; import DateVue from './Date.vue'; import { DateTime } from 'luxon'; export default defineComponent({ extends: DateVue, computed: { inputType() { return 'datetime-local'; }, inputValue(): string { let value = this.value; if (typ...
2302_79757062/books
src/components/Controls/Datetime.vue
Vue
agpl-3.0
574
<template> <div> <!-- Datetime header --> <div class="flex justify-between items-center text-sm px-4 pt-4"> <div v-if="viewMonth !== month || viewYear !== year" class="text-gray-900" > {{ `${months[viewMonth]}, ${viewYear}` }} </div> <div v-else class="text-blue...
2302_79757062/books
src/components/Controls/DatetimePicker.vue
Vue
agpl-3.0
13,589
<template> <Popover> <!-- Datetime Selected Display --> <template #target="{ togglePopover }"> <div v-if="showLabel" :class="labelClasses"> {{ df?.label }} </div> <div :class="[containerClasses, sizeClasses]" class="flex" @click="() => !isReadOnly && togglePop...
2302_79757062/books
src/components/Controls/Datetime_old.vue
Vue
agpl-3.0
2,735
<script> import { fyo } from 'src/initFyo'; import Link from './Link.vue'; export default { name: 'DynamicLink', extends: Link, inject: { report: { default: null }, }, props: ['target'], created() { const watchKey = `doc.${this.df.references}`; this.targetWatcher = this.$watch(watchKey, function...
2302_79757062/books
src/components/Controls/DynamicLink.vue
Vue
agpl-3.0
2,363
<template> <div class=" flex items-center bg-gray-50 dark:bg-gray-890 rounded-md text-sm p-1 border " > <div class="rate-container" :class=" disabled ? 'bg-gray-100 dark:bg-gray-850' : 'bg-gray-25 dark:bg-gray-890' ...
2302_79757062/books
src/components/Controls/ExchangeRate.vue
Vue
agpl-3.0
2,771
<script lang="ts"> import { safeParseFloat } from 'utils/index'; import { defineComponent } from 'vue'; import Int from './Int.vue'; export default defineComponent({ name: 'Float', extends: Int, computed: { inputType() { return 'number'; }, }, methods: { parse(value: unknown): number { ...
2302_79757062/books
src/components/Controls/Float.vue
Vue
agpl-3.0
378
<script> import { h } from 'vue'; import AttachImage from './AttachImage.vue'; import Attachment from './Attachment.vue'; import AutoComplete from './AutoComplete.vue'; import Check from './Check.vue'; import Color from './Color.vue'; import Currency from './Currency.vue'; import Data from './Data.vue'; import Date fro...
2302_79757062/books
src/components/Controls/FormControl.vue
Vue
agpl-3.0
1,383
<script lang="ts"> import Data from './Data.vue'; import { defineComponent } from 'vue'; import { safeParseInt } from 'utils/index'; export default defineComponent({ name: 'Int', extends: Data, computed: { inputType() { return 'number'; }, }, methods: { parse(value: unknown): number { ...
2302_79757062/books
src/components/Controls/Int.vue
Vue
agpl-3.0
375
<template> <AutoComplete :df="languageDf" :value="value" :border="true" input-class="rounded py-1.5" @change="onChange" /> </template> <script lang="ts"> import { DEFAULT_LANGUAGE } from 'fyo/utils/consts'; import { OptionField } from 'schemas/types'; import { fyo } from 'src/initFyo'; import { ...
2302_79757062/books
src/components/Controls/LanguageSelector.vue
Vue
agpl-3.0
1,500
<script> import { t } from 'fyo'; import Badge from 'src/components/Badge.vue'; import { fyo } from 'src/initFyo'; import { fuzzyMatch } from 'src/utils'; import { getCreateFiltersFromListViewFilters } from 'src/utils/misc'; import { markRaw } from 'vue'; import AutoComplete from './AutoComplete.vue'; export default {...
2302_79757062/books
src/components/Controls/Link.vue
Vue
agpl-3.0
4,958
<template> <div> <div v-if="showLabel" :class="labelClasses"> {{ df.label }} </div> <div class="flex items-center justify-between" :class="[inputClasses, containerClasses]" > <select class=" appearance-none bg-transparent focus:outline-none...
2302_79757062/books
src/components/Controls/Select.vue
Vue
agpl-3.0
2,435
<template> <div v-if="tableFields?.length"> <div v-if="showLabel" class="text-gray-600 dark:text-gray-400 text-sm mb-1"> {{ df.label }} </div> <div :class="border ? 'border dark:border-gray-800 rounded-md' : ''"> <!-- Title Row --> <Row :ratio="ratio" class=" b...
2302_79757062/books
src/components/Controls/Table.vue
Vue
agpl-3.0
4,892