1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-26 20:54:21 +01:00

(quality) remove dead code

This commit is contained in:
Sylvain 2022-12-08 14:30:04 +01:00
parent 3dcc4a5803
commit 0ca7c8fb11
3 changed files with 2 additions and 191 deletions

View File

@ -110,118 +110,6 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
} }
}; };
// Accounting codes
$scope.settings = {
journalCode: {
name: 'accounting_journal_code',
value: settings.accounting_journal_code
},
cardClientCode: {
name: 'accounting_card_client_code',
value: settings.accounting_card_client_code
},
cardClientLabel: {
name: 'accounting_card_client_label',
value: settings.accounting_card_client_label
},
walletClientCode: {
name: 'accounting_wallet_client_code',
value: settings.accounting_wallet_client_code
},
walletClientLabel: {
name: 'accounting_wallet_client_label',
value: settings.accounting_wallet_client_label
},
otherClientCode: {
name: 'accounting_other_client_code',
value: settings.accounting_other_client_code
},
otherClientLabel: {
name: 'accounting_other_client_label',
value: settings.accounting_other_client_label
},
walletCode: {
name: 'accounting_wallet_code',
value: settings.accounting_wallet_code
},
walletLabel: {
name: 'accounting_wallet_label',
value: settings.accounting_wallet_label
},
vatCode: {
name: 'accounting_VAT_code',
value: settings.accounting_VAT_code
},
vatLabel: {
name: 'accounting_VAT_label',
value: settings.accounting_VAT_label
},
subscriptionCode: {
name: 'accounting_subscription_code',
value: settings.accounting_subscription_code
},
subscriptionLabel: {
name: 'accounting_subscription_label',
value: settings.accounting_subscription_label
},
machineCode: {
name: 'accounting_Machine_code',
value: settings.accounting_Machine_code
},
machineLabel: {
name: 'accounting_Machine_label',
value: settings.accounting_Machine_label
},
trainingCode: {
name: 'accounting_Training_code',
value: settings.accounting_Training_code
},
trainingLabel: {
name: 'accounting_Training_label',
value: settings.accounting_Training_label
},
eventCode: {
name: 'accounting_Event_code',
value: settings.accounting_Event_code
},
eventLabel: {
name: 'accounting_Event_label',
value: settings.accounting_Event_label
},
spaceCode: {
name: 'accounting_Space_code',
value: settings.accounting_Space_code
},
spaceLabel: {
name: 'accounting_Space_label',
value: settings.accounting_Space_label
},
packCode: {
name: 'accounting_Pack_code',
value: settings.accounting_Pack_code
},
packLabel: {
name: 'accounting_Pack_label',
value: settings.accounting_Pack_label
},
productCode: {
name: 'accounting_Product_code',
value: settings.accounting_Product_code
},
productLabel: {
name: 'accounting_Product_label',
value: settings.accounting_Product_label
},
errorCode: {
name: 'accounting_Error_code',
value: settings.accounting_Error_code
},
errorLabel: {
name: 'accounting_Error_label',
value: settings.accounting_Error_label
}
};
// all settings // all settings
$scope.allSettings = settings; $scope.allSettings = settings;
@ -778,20 +666,6 @@ Application.Controllers.controller('InvoicesController', ['$scope', '$state', 'I
return false; return false;
}; };
/**
* Callback to bulk save all settings in the page to the database with their values
*/
$scope.save = function () {
Setting.bulkUpdate(
{ settings: Object.values($scope.settings) },
function () { growl.success(_t('app.admin.invoices.codes_customization_success')); },
function (error) {
growl.error('app.admin.invoices.unexpected_error_occurred');
console.error(error);
}
);
};
/** /**
* Return the name of the operator that creates the invoice * Return the name of the operator that creates the invoice
*/ */

View File

@ -952,15 +952,8 @@ angular.module('application.router', ['ui.router'])
return Setting.query({ return Setting.query({
names: "['invoice_legals', 'invoice_text', 'invoice_VAT-rate', 'invoice_VAT-rate_Machine', 'invoice_VAT-rate_Training', 'invoice_VAT-rate_Space', " + names: "['invoice_legals', 'invoice_text', 'invoice_VAT-rate', 'invoice_VAT-rate_Machine', 'invoice_VAT-rate_Training', 'invoice_VAT-rate_Space', " +
"'invoice_VAT-rate_Event', 'invoice_VAT-rate_Subscription', 'invoice_VAT-rate_Product', 'invoice_VAT-active', 'invoice_order-nb', 'invoice_code-value', " + "'invoice_VAT-rate_Event', 'invoice_VAT-rate_Subscription', 'invoice_VAT-rate_Product', 'invoice_VAT-active', 'invoice_order-nb', 'invoice_code-value', " +
"'invoice_code-active', 'invoice_reference', 'invoice_logo', 'accounting_journal_code', 'accounting_card_client_code', " + "'invoice_code-active', 'invoice_reference', 'invoice_logo', 'payment_gateway', 'payment_schedule_prefix', " +
"'accounting_card_client_label', 'accounting_wallet_client_code', 'accounting_wallet_client_label', 'invoicing_module', " + "'feature_tour_display', 'online_payment_module', 'stripe_public_key', 'stripe_currency', 'invoice_prefix']"
"'accounting_other_client_code', 'accounting_other_client_label', 'accounting_wallet_code', 'accounting_wallet_label', " +
"'accounting_VAT_code', 'accounting_VAT_label', 'accounting_subscription_code', 'accounting_subscription_label', " +
"'accounting_Machine_code', 'accounting_Machine_label', 'accounting_Training_code', 'accounting_Training_label', " +
"'accounting_Event_code', 'accounting_Event_label', 'accounting_Space_code', 'accounting_Space_label', 'accounting_Product_code', 'accounting_Product_label', " +
"'payment_gateway', 'accounting_Error_code', 'accounting_Error_label', 'payment_schedule_prefix', " +
"'feature_tour_display', 'online_payment_module', 'stripe_public_key', 'stripe_currency', 'invoice_prefix', " +
"'accounting_Pack_code', 'accounting_Pack_label']"
}).$promise; }).$promise;
}], }],
stripeSecretKey: ['Setting', function (Setting) { return Setting.isPresent({ name: 'stripe_secret_key' }).$promise; }], stripeSecretKey: ['Setting', function (Setting) { return Setting.isPresent({ name: 'stripe_secret_key' }).$promise; }],

View File

@ -822,62 +822,6 @@ en:
failed_to_close_period: "An error occurred, unable to close the accounting period" failed_to_close_period: "An error occurred, unable to close the accounting period"
no_periods: "No closings for now" no_periods: "No closings for now"
accounting_codes: "Accounting codes" accounting_codes: "Accounting codes"
accounting_journal_code: "Journal code"
general_journal_code: "Journal code"
accounting_card_client_code: "Card clients code"
card_client_code: "Accounting code for clients who paid by card"
accounting_card_client_label: "Card clients label"
card_client_label: "Account label for clients who paid by card"
accounting_wallet_client_code: "Wallet clients code"
wallet_client_code: "Accounting code for clients who paid by virtual wallet"
accounting_wallet_client_label: "Wallet clients label"
wallet_client_label: "Account label for clients who paid by virtual wallet"
accounting_other_client_code: "Other means client code"
other_client_code: "Accounting code for clients who paid using another payment means"
accounting_other_client_label: "Other means client label"
other_client_label: "Accounting label for clients who paid using another payment means"
accounting_wallet_code: "Wallet code"
general_wallet_code: "Accounting code for wallet credit"
accounting_wallet_label: "Wallet label"
general_wallet_label: "Account label for wallet credit"
accounting_vat_code: "VAT code"
general_vat_code: "Accounting code for VAT"
accounting_vat_label: "VAT label"
general_vat_label: "VAT account label"
accounting_subscription_code: "Subscriptions code"
general_subscription_code: "Accounting code for all subscriptions"
accounting_subscription_label: "Subscriptions label"
general_subscription_label: "Account label for all subscriptions"
accounting_Machine_code: "Machines code"
general_machine_code: "Accounting code for all machines"
accounting_Machine_label: "Machine label"
general_machine_label: "Account label for all machines"
accounting_Training_code: "Trainings code"
general_training_code: "Accounting code for all trainings"
accounting_Training_label: "Trainings label"
general_training_label: "Account label for all trainings"
accounting_Event_code: "Events code"
general_event_code: "Accounting code for all events"
accounting_Event_label: "Events label"
general_event_label: "Account label for all events"
accounting_Space_code: "Space code"
general_space_code: "Accounting code for all spaces"
accounting_Space_label: "Spaces label"
general_space_label: "Account label for all spaces"
accounting_Pack_code: "Prepaid-pack code"
general_pack_code: "Accounting code for prepaid-packs"
accounting_Pack_label: "Prepaid-pack label"
general_pack_label: "Account label for prepaid-packs"
accounting_Product_code: "Product code (Store)"
general_product_code: "Accounting code for products (Store)"
accounting_Product_label: "Product label (Store)"
general_product_label: "Account label for products (Store)"
accounting_Error_code: "Errors code"
general_error_code: "Accounting code for erroneous invoices"
accounting_Error_label: "Errors label"
general_error_label: "Account label for erroneous invoices"
codes_customization_success: "Customization of the accounting codes successfully saved."
unexpected_error_occurred: "An unexpected error occurred while saving the codes. Please try again later."
export_accounting_data: "Export accounting data" export_accounting_data: "Export accounting data"
export_what: "What do you want to export?" export_what: "What do you want to export?"
export_VAT: "Export the collected VAT" export_VAT: "Export the collected VAT"