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';
|
||||
|
||||
export class PrintSettings extends Doc {
|
||||
override hidden: HiddenMap = {
|
||||
displayBatch: () => !this.fyo.singles.InventorySettings?.enableBatches,
|
||||
};
|
||||
override hidden: HiddenMap = {};
|
||||
}
|
||||
|
@ -114,18 +114,6 @@
|
||||
"label": "Display Logo in Invoice",
|
||||
"fieldtype": "Check",
|
||||
"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 { checkForUpdates } from './utils/ipcCalls';
|
||||
import { updateConfigFiles } from './utils/misc';
|
||||
import { updatePrintTemplates } from './utils/printTemplates';
|
||||
import { Search } from './utils/search';
|
||||
import { setGlobalShortcuts } from './utils/shortcuts';
|
||||
import { routeTo } from './utils/ui';
|
||||
@ -160,6 +161,7 @@ export default {
|
||||
}
|
||||
|
||||
await initializeInstance(filePath, false, countryCode, fyo);
|
||||
await updatePrintTemplates(fyo);
|
||||
await this.setDesk(filePath);
|
||||
},
|
||||
async setDeskRoute() {
|
||||
|
@ -145,7 +145,7 @@
|
||||
</button>
|
||||
|
||||
<p
|
||||
v-if="fyo.store.isDevelopment"
|
||||
v-if="!fyo.store.isDevelopment"
|
||||
class="text-xs text-gray-500 select-none"
|
||||
>
|
||||
dev mode
|
||||
|
@ -78,6 +78,21 @@ export default defineComponent({
|
||||
},
|
||||
methods: {
|
||||
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;
|
||||
return compile(template, {
|
||||
hoistStatic: true,
|
||||
|
@ -15,7 +15,6 @@ type TemplateUpdateItem = { name: string; template: string; type: string };
|
||||
const printSettingsFields = [
|
||||
'logo',
|
||||
'displayLogo',
|
||||
'displayTaxInvoice',
|
||||
'color',
|
||||
'font',
|
||||
'email',
|
||||
|
Loading…
Reference in New Issue
Block a user