UBL21: fix change description item
This commit is contained in:
parent
163400769c
commit
b7bdad4bf1
2 changed files with 8 additions and 2 deletions
|
|
@ -449,7 +449,7 @@ class InvoiceUBL21 extends XMLInvoice {
|
|||
|
||||
// ITEM
|
||||
$item=$this->createElement("cac:Item");
|
||||
$item->appendChild($this->createElement("cbc:Description",$row['name']));
|
||||
$item->appendChild($this->createElement("cbc:Description",$row['description']));
|
||||
$item->appendChild($this->createElement("cbc:Name", $row['qcode']));
|
||||
$classifiedTaxCat=$this->createElement("cac:ClassifiedTaxCategory");
|
||||
|
||||
|
|
@ -562,6 +562,10 @@ class InvoiceUBL21 extends XMLInvoice {
|
|||
}
|
||||
$root->appendChild($this->createElement('cbc:DueDate',$this->data['due_date']));
|
||||
$root->appendChild($this->createElement('cbc:InvoiceTypeCode',380));
|
||||
/**
|
||||
* add note if any
|
||||
*/
|
||||
|
||||
$root->appendChild($this->createElement('cbc:DocumentCurrencyCode',$this->data['currency']));
|
||||
$root->appendChild($this->createElement('cbc:BuyerReference',$this->data['info']['order']));
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ abstract class XMLInvoice extends \DOMDocument
|
|||
// document description
|
||||
$result['description']=$operation->det->jr_comment;
|
||||
|
||||
// note if any
|
||||
// goods and services
|
||||
$result['operation']=array();
|
||||
|
||||
|
|
@ -196,7 +197,8 @@ abstract class XMLInvoice extends \DOMDocument
|
|||
$card=new \Fiche($this->cn,$operation->det->array[$i]['qs_fiche']);
|
||||
$result['operation'][$i]['qcode']=$card->get_attribute(ATTR_DEF_QUICKCODE);
|
||||
$result['operation'][$i]['name']=$card->get_attribute(ATTR_DEF_NAME);
|
||||
$result['operation'][$i]['description']=$card->get_attribute(9);
|
||||
$result['operation'][$i]['description']=($operation->det->array[$i]['j_text']=="")?$card->get_attribute(9):$operation->det->array[$i]['j_text'];
|
||||
|
||||
// get the type of unity, if not found then it will be EA
|
||||
$x= $card->get_attribute(ATTR_DEF_QUANTITY_TYPE,0);
|
||||
$result['operation'][$i]['code_quantity']=($x===false||$x=="")?"EA":$x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue