<commit_before>@include('commons.textfield', ['obj' => $product, 'name' => 'name', 'label' => _i('Nome'), 'mandatory' => true])
@include('commons.decimalfield', ['obj' => $product, 'name' => 'price', 'label' => _i('Prezzo Unitario'), 'is_price' => true, 'mandatory' => true])
@include('commons.decimalfield', ['obj' => $product, 'name' => 'transport', 'label' => _i('Prezzo Trasporto'), 'is_price' => true])
@include('commons.percentagefield', ['obj' => $product, 'name' => 'discount', 'label' => _i('Sconto')])

@include('commons.selectobjfield', [
    'obj' => $product,
    'name' => 'category_id',
    'objects' => App\Category::orderBy('name', 'asc')->where('parent_id', '=', null)->get(),
    'label' => _i('Categoria'),
    'required' => ($product == null)
])

@include('commons.selectobjfield', [
    'obj' => $product,
    'name' => 'measure_id',
    'objects' => App\Measure::orderBy('name', 'asc')->get(),
    'extra_class' => 'measure-selector',
    'label' => _i('Unità di Misura'),
    'datafields' => ['discrete'],
    'enforced_default' => 'non-specificato'
])

@include('commons.textarea', ['obj' => $product, 'name' => 'description', 'label' => _i('Descrizione')])

@include('commons.selectobjfield', [
    'obj' => $product,
    'name' => 'vat_rate_id',
    'objects' => App\VatRate::orderBy('name', 'asc')->get(),
    'label' => _i('Aliquota IVA'),
    'extra_selection' => [
        '0' => _i('Nessuna')
    ]
])
<commit_msg>unità misura obbligatoria in fase creazione prodotto<commit_after>@include('commons.textfield', ['obj' => $product, 'name' => 'name', 'label' => _i('Nome'), 'mandatory' => true])
@include('commons.decimalfield', ['obj' => $product, 'name' => 'price', 'label' => _i('Prezzo Unitario'), 'is_price' => true, 'mandatory' => true])
@include('commons.decimalfield', ['obj' => $product, 'name' => 'transport', 'label' => _i('Prezzo Trasporto'), 'is_price' => true])
@include('commons.percentagefield', ['obj' => $product, 'name' => 'discount', 'label' => _i('Sconto')])

@include('commons.selectobjfield', [
    'obj' => $product,
    'name' => 'category_id',
    'objects' => App\Category::orderBy('name', 'asc')->where('parent_id', '=', null)->get(),
    'label' => _i('Categoria'),
    'required' => ($product == null)
])

@include('commons.selectobjfield', [
    'obj' => $product,
    'name' => 'measure_id',
    'objects' => App\Measure::orderBy('name', 'asc')->get(),
    'extra_class' => 'measure-selector',
    'label' => _i('Unità di Misura'),
    'datafields' => ['discrete'],
    'required' => ($product == null)
])

@include('commons.textarea', ['obj' => $product, 'name' => 'description', 'label' => _i('Descrizione')])

@include('commons.selectobjfield', [
    'obj' => $product,
    'name' => 'vat_rate_id',
    'objects' => App\VatRate::orderBy('name', 'asc')->get(),
    'label' => _i('Aliquota IVA'),
    'extra_selection' => [
        '0' => _i('Nessuna')
    ]
])

{'fraction_non_alphanumeric': 0.2612859097127223, 'fraction_numerical': 0.0006839945280437756, 'mean_word_length': 5.018518518518518, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4222396', 'n_tokens_mistral': 1046, 'n_tokens_neox': 1035, 'n_words': 189}