ข้ามไปเนื้อหา

ผลต่างระหว่างรุ่นของ "CuneiForm"

เพิ่มขึ้น 1,013 ไบต์ ,  5 เมษายน 2567
บรรทัดที่ 103: บรรทัดที่ 103:


=== Auto-numbering Function ===
=== Auto-numbering Function ===
Forms with auto-numbering specifications work with CuneiFox core system to serve auto running numbers in a particular format (usually for document numbers).


The specifications for this feature are embedded within {{code|MASTER_autorun}} in this format:
<syntaxhighlight lang="python">
MASTER_autorun = [(str run_field0, str sec_field0, str date_field0, str ref_field0),
                  (str run_field1, str sec_field1, str date_field1, str ref_field1),
                  ...]
# Example from Sale Invoice Form
MASTER_ autorun = [("docno", "section_stid", "docdate", None),
                  ("invno", "section_stid", "invdate", "docno")]
</syntaxhighlight>
* '''run_fieldX''' is the field to trigger the auto-numbering function.
* '''sec_fieldX''' is the field holding the corresponding section static ID.
* '''date_fieldX''' is the field holding the corresponding date.
* '''ref_fieldX''' is the field holding the original value for WAIT function (Set to {{code|lang=python|None}} to disable WAIT support).


=== Other Form Definition Variables ===
=== Other Form Definition Variables ===