New plain string field on ligne_comptable, positioned after Client in both form and view displays. Added as a "Facture" column in both the main table and the entrée/sortie drill-down modal, right after Type. Backfilled via figli_compta_ledger_update_8002() by extracting an invoice number from field_notes (or title, same fallback the front-end libellé already uses) wherever the pattern is unambiguous: literal F, optional _/-, 2-8 digits, optional "-digits" continuations for a compound reference (e.g. "F2549-50-51"), optional 0-3 trailing uppercase letters (e.g. "F250427A"), with a hard boundary right after -- not immediately followed by more letters/digits/underscore. That last part is what skips "F58_260506_FIGLI" or "F_2601_FIGLI_EPAU": no way to tell whether the trailing "_xxx" belongs to the reference or is an unrelated client/description code glued on, so those are left blank rather than guessed, per explicit instruction to skip when unsure. Verified the pattern against every existing ligne_comptable's notes/title before writing the migration: 319 confident matches with no false positives found on manual review of the full list, 1236 left blank. Applied via drush updb, config exported.
22 lines
394 B
YAML
22 lines
394 B
YAML
uuid: 6819b88a-a788-471f-bae0-a363bb9a1670
|
|
langcode: en
|
|
status: true
|
|
dependencies:
|
|
module:
|
|
- node
|
|
id: node.field_numero_facture
|
|
field_name: field_numero_facture
|
|
entity_type: node
|
|
type: string
|
|
settings:
|
|
max_length: 64
|
|
case_sensitive: false
|
|
is_ascii: false
|
|
module: core
|
|
locked: false
|
|
cardinality: 1
|
|
translatable: true
|
|
indexes: { }
|
|
persist_with_no_fields: false
|
|
custom_storage: false
|