Fix: Remove remaining static method from inside init() function

The getItemValueSC static method was still incorrectly placed inside the
init() method, causing 'Unexpected strict mode reserved word' error at line 103.
This moves it to the class level with calculateItemValueSC.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-06-07 21:36:14 +02:00
parent 116ac66a8a
commit cb4b255b35
+1 -8
View File
@@ -99,14 +99,7 @@ export class MournbladeCYD2Utility {
.join(', ');
});
// Helper pour calculer la valeur SC d'un item avec quantité
static getItemValueSC(item) {
const value = this.calculateItemValueSC(item.system?.prixpo, item.system?.prixca, item.system?.prixsc);
const quantity = item.system?.quantite || 1;
return value * quantity;
}
Handlebars.registerHelper('select', function(value, options) {
Handlebars.registerHelper('select', function(value, options) {
const html = options.fn(this);
const escaped = String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
return html.replace(new RegExp(`value="${escaped}"`, 'g'), `value="${value}" selected="selected"`);