2
0
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:
18alantom 2023-03-13 21:14:10 +05:30
parent dced1ed559
commit 8ff4a97790
6 changed files with 19 additions and 17 deletions

View File

@ -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 = {};
}

View File

@ -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"
}
]
}

View File

@ -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() {

View File

@ -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

View File

@ -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,

View File

@ -15,7 +15,6 @@ type TemplateUpdateItem = { name: string; template: string; type: string };
const printSettingsFields = [
'logo',
'displayLogo',
'displayTaxInvoice',
'color',
'font',
'email',