Invoice-item: Difference between revisions
From SemanticOrganization
(Created page with "{{Semorg-generator |template-id=II |form-add-button-text=Add Item |form-unique-number=No |rows=description,amount-net,vat-rate |template-fields={{semorg-generator-field |id=in...") |
No edit summary |
||
Line 30: | Line 30: | ||
|property-id=AV | |property-id=AV | ||
|name=VAT Amount | |name=VAT Amount | ||
|type=num | |||
}}{{semorg-generator-field | }}{{semorg-generator-field | ||
|id=vat-rate | |id=vat-rate |
Latest revision as of 20:09, 1 February 2021
Messages
"semorg-invoice-item-template": "semorg-invoice-item",
"semorg-form-invoice-item-add-button-text": "Add Item",
"semorg-form-invoice-item-template": "invoice-item",
"semorg-form-invoice-item-rows": "description,amount-net,vat-rate",
"semorg-list-invoice-item-headers": "invoice-item-amount-vat, invoice-item-invoice, invoice-item-description, invoice-item-vat-rate, invoice-item-amount-net, invoice-item-amount-gross",
"semorg-field-invoice-item-amount-gross-name": "Gross Amount",
"semorg-field-invoice-item-amount-gross-parameters": "",
"semorg-field-invoice-item-amount-net-name": "Net Amount",
"semorg-field-invoice-item-amount-net-parameters": "size=5",
"semorg-field-invoice-item-amount-vat-name": "VAT Amount",
"semorg-field-invoice-item-amount-vat-parameters": "",
"semorg-field-invoice-item-description-name": "Description",
"semorg-field-invoice-item-description-parameters": "input type=textarea",
"semorg-field-invoice-item-invoice-name": "Invoice",
"semorg-field-invoice-item-invoice-parameters": "",
"semorg-field-invoice-item-vat-rate-name": "VAT Rate",
"semorg-field-invoice-item-vat-rate-parameters": "size=5",
Form
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{{info |create title={{int:semorg-form-invoice-item-create-title}} |edit title={{int:semorg-form-invoice-item-edit-title}}<span class="d-none">: <page name></span> |page name= }}} {{semorg-form-template|invoice-item}} {{semorg-form-standard-inputs}} </includeonly>
as embedded:
Use this code, if this is not meant to be a standalone feature but rather a supplement that should be embedded in other forms. Add this line to a form definition that includes a field with the parameter holds template
. The second parameter of the semorg-form-template-embed
call should be the target field, specified with <feature>[<field>]
(e.g. meeting-group[files]
or {{int:semorg-meeting-group-template}}[files]
to respect template customization).
{{semorg-form-template-embed|invoice-item|}}
Category
{{semorg-category}}
Template
<noinclude>{{semorg-bundle}}</noinclude><includeonly>[[Category:{{int:semorg-invoice-item-category}}]]{{#semorg-set:invoice-item |amount-vat={{{amount-vat|}}} |invoice={{{invoice|}}} |description={{{description|}}} |vat-rate={{{vat-rate|}}} |amount-net={{{amount-net|}}} |amount-gross={{{amount-gross|}}} }}{{#semorg-detail:invoice-item}}{{#semorg-table:invoice-item |amount-vat={{{amount-vat|}}} |invoice={{{invoice|}}} |description={{{description|}}} |vat-rate={{{vat-rate|}}} |amount-net={{{amount-net|}}} |amount-gross={{{amount-gross|}}} }}</includeonly>
Row Template
Template:Semorg-invoice-item-row
<noinclude>{{semorg-bundle}}</noinclude><includeonly><tr> <td>[[{{{target|}}}]]</td> <td>{{{amount-vat|}}}</td> <td>{{{invoice|}}}</td> <td>{{{description|}}}</td> <td>{{{vat-rate|}}}</td> <td>{{{amount-net|}}}</td> <td>{{{amount-gross|}}}</td> {{semorg-showedit |target={{{target|}}} }} </tr></includeonly>
Overview Page Template
Template:Semorg-invoice-item-overview
<noinclude>{{semorg-bundle}}</noinclude><includeonly>{{#semorg-list:invoice-item |heading={{int:semorg-invoice-item-page-name}} |formlink={{#semorg-forminput:invoice-item}} |links={{{links|}}} |query={{{query|}}} |sort={{{sort|}}} |order={{{order|}}} |limit={{{limit|}}} |filter links={{{filter links|}}} |filters={{{filters|}}} |category={{{category|}}} |headers={{{headers|}}} |row template={{{row template|}}} |tableclass={{{tableclass|}}} |title={{{title|}}} |sums={{{sums|}}} |csv={{{csv|}}} |default={{{default|}}} |returnto={{{returnto|}}} |help={{{help|}}} }}</includeonly>
Overview Page
[[]]
{{semorg-invoice-item-overview}}
Property Registration
Add the following line to LocalSettings.php
:
$wgSemorgAdditionalProperties['invoice-item'] = [ "id" => "II","fields" => ["amount-vat" => [ "id" => "AV","type" => "num" ],"invoice" => [ "id" => "IN","type" => "wpg" ],"description" => [ "id" => "DE","type" => "txt" ],"vat-rate" => [ "id" => "VR","type" => "num" ],"amount-net" => [ "id" => "AN","type" => "num" ],"amount-gross" => [ "id" => "AG","type" => "num" ], ] ];