mirror of
https://github.com/frappe/books.git
synced 2024-11-09 23:30:56 +00:00
incr: remove redudant print settings
This commit is contained in:
parent
dced1ed559
commit
8ff4a97790
@ -2,7 +2,5 @@ import { Doc } from 'fyo/model/doc';
|
|||||||
import { HiddenMap } from 'fyo/model/types';
|
import { HiddenMap } from 'fyo/model/types';
|
||||||
|
|
||||||
export class PrintSettings extends Doc {
|
export class PrintSettings extends Doc {
|
||||||
override hidden: HiddenMap = {
|
override hidden: HiddenMap = {};
|
||||||
displayBatch: () => !this.fyo.singles.InventorySettings?.enableBatches,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -114,18 +114,6 @@
|
|||||||
"label": "Display Logo in Invoice",
|
"label": "Display Logo in Invoice",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"section": "Customizations"
|
"section": "Customizations"
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "displayTaxInvoice",
|
|
||||||
"label": "Display Tax Invoice",
|
|
||||||
"fieldtype": "Check",
|
|
||||||
"section": "Customizations"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldname": "displayBatch",
|
|
||||||
"label": "Display Batch",
|
|
||||||
"fieldtype": "Check",
|
|
||||||
"section": "Customizations"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ import './styles/index.css';
|
|||||||
import { initializeInstance } from './utils/initialization';
|
import { initializeInstance } from './utils/initialization';
|
||||||
import { checkForUpdates } from './utils/ipcCalls';
|
import { checkForUpdates } from './utils/ipcCalls';
|
||||||
import { updateConfigFiles } from './utils/misc';
|
import { updateConfigFiles } from './utils/misc';
|
||||||
|
import { updatePrintTemplates } from './utils/printTemplates';
|
||||||
import { Search } from './utils/search';
|
import { Search } from './utils/search';
|
||||||
import { setGlobalShortcuts } from './utils/shortcuts';
|
import { setGlobalShortcuts } from './utils/shortcuts';
|
||||||
import { routeTo } from './utils/ui';
|
import { routeTo } from './utils/ui';
|
||||||
@ -160,6 +161,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await initializeInstance(filePath, false, countryCode, fyo);
|
await initializeInstance(filePath, false, countryCode, fyo);
|
||||||
|
await updatePrintTemplates(fyo);
|
||||||
await this.setDesk(filePath);
|
await this.setDesk(filePath);
|
||||||
},
|
},
|
||||||
async setDeskRoute() {
|
async setDeskRoute() {
|
||||||
|
@ -145,7 +145,7 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<p
|
<p
|
||||||
v-if="fyo.store.isDevelopment"
|
v-if="!fyo.store.isDevelopment"
|
||||||
class="text-xs text-gray-500 select-none"
|
class="text-xs text-gray-500 select-none"
|
||||||
>
|
>
|
||||||
dev mode
|
dev mode
|
||||||
|
@ -78,6 +78,21 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
compile(template: string) {
|
compile(template: string) {
|
||||||
|
/**
|
||||||
|
* Note: This is a hacky method to prevent
|
||||||
|
* broken templates from reaching the `<component />`
|
||||||
|
* element.
|
||||||
|
*
|
||||||
|
* It's required because the CompilerOptions doesn't
|
||||||
|
* have an option to capture the errors.
|
||||||
|
*
|
||||||
|
* The compile function returns a code that can be
|
||||||
|
* converted into a render function.
|
||||||
|
*
|
||||||
|
* This render function can be used instead
|
||||||
|
* of passing the template to the `<component />` element
|
||||||
|
* where it gets compiled again.
|
||||||
|
*/
|
||||||
this.error = null;
|
this.error = null;
|
||||||
return compile(template, {
|
return compile(template, {
|
||||||
hoistStatic: true,
|
hoistStatic: true,
|
||||||
|
@ -15,7 +15,6 @@ type TemplateUpdateItem = { name: string; template: string; type: string };
|
|||||||
const printSettingsFields = [
|
const printSettingsFields = [
|
||||||
'logo',
|
'logo',
|
||||||
'displayLogo',
|
'displayLogo',
|
||||||
'displayTaxInvoice',
|
|
||||||
'color',
|
'color',
|
||||||
'font',
|
'font',
|
||||||
'email',
|
'email',
|
||||||
|
Loading…
Reference in New Issue
Block a user