|
noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
|
Document used in accountancy : invoice , credit note, ... It is a specialization of Document used in Follow-UP. More...
Inheritance diagram for Acc_Document:
Collaboration diagram for Acc_Document:Public Member Functions | |
| __construct ($cn, $jr_id=0) | |
| constructor | |
| create_document ($internal, $p_array) | |
| create the invoice and saved it as attachment to the operation, | |
| export_file ($destination_file) | |
| export the file to the file system and complet $this->d_mimetype, d_filename and | |
| get_document_xml () | |
| link_download_xml () | |
| return a string with a link download XML or an empty string if there is no XML to download | |
| replace_receipt ($new_oid) | |
| for FACTURX we replace the PDF save in DB by this one, always a PDF (since it is a FACTURX document) | |
| save_receipt () | |
| Save a "piece justificative" , the name must be a receipt. | |
| set_document_xml ($document_xml) | |
| set_id ($jr_id) | |
| set_id fill up d_filename, d_mimetype,d_lob,d_description,jr_pj_number | |
| update ($filename) | |
| save the file into DB, will create a large object if there is no document to replace. | |
| update_document_xml ($oid) | |
| save the Large Object $oid in the column JRN.JR_DOCUMENT_XML | |
Public Member Functions inherited from Document | |
| __toString () | |
| anchor () | |
| create and compute a string for reference the doc <A ...> | |
| blank () | |
| insert a minimal document and set the d_id | |
| compute_filename ($pj, $filename) | |
| Insert the receipt number into the filename , each generated file will have the name of the template (model) + receipt number) | |
| download ($aDocument) | |
| Download all documents in a ZIP files. | |
| get () | |
| Get complete all the data member thx info from the database. | |
| get_all ($ag_id) | |
| get all the document of a given action | |
| parseDocument ($p_dir, $p_file, $p_type, $p_array) | |
| This function parse a document and replace all the predefined tags by a value. | |
| remove () | |
| remove a row from the table document, the lob object is not deleted because can be linked elsewhere | |
| replace ($p_tag, $p_array) | |
| replace the TAG by the real value, this value can be into the database or in $_POST The possible tags are | |
| replace_special_tag ($p_qcode, $p_tag) | |
| replace a special tag *TAGxxxx with the value from fiche_detail, the xxxx is the ad_value | |
| send () | |
| send the document | |
| transform2pdf () | |
| transform the current Document to a PDF, returns the full path of the PDF from the TMP folder if the file IS a pdf , then export it and return the path to the file. | |
| update_description ($p_desc) | |
| upload ($p_ag_id) | |
| upload a file into document all the needed data are in $_FILES we don't increment the seq $_FILES : array containing by default $_FILES | |
Static Public Member Functions | |
| static | display_supplementary_doc ($cn, $div, $jr_id) |
Static Public Member Functions inherited from Document | |
| static | insert_existing_document ($p_ag_id, $p_lob, $p_filename, $p_mimetype, $p_description="") |
| Copy a existing OID (LOB) into the table document. | |
| static | replace_value ($p_buffer, $p_pattern, $p_value, $p_limit=-1, $p_type='OOo') |
| replace a pattern with a value in the buffer , handle the change for OOo type file and amount | |
Protected Member Functions | |
| saveGenerated ($p_file) | |
| insert the generated Document into the database, update the $this->d_id that is the PK of document. and load the PDF into the database. | |
Private Attributes | |
| $document_xml | |
| $document_xml (oid) XML document e-invoice | |
Additional Inherited Members | |
Data Fields inherited from Document | |
| $ag_id | |
| $d_description | |
| $d_filename | |
| $d_id | |
| $d_lob | |
| $d_mimetype | |
| $d_name | |
| $d_number | |
| $db | |
| $f_id | |
| $md_id | |
| $md_type | |
Protected Attributes inherited from Document | |
| $counter | |
Document used in accountancy : invoice , credit note, ... It is a specialization of Document used in Follow-UP.
property :
Definition at line 43 of file acc_document.class.php.
| Acc_Document::__construct | ( | $cn, | |
| $jr_id = 0 ) |
constructor
| $cn | \Database |
| $jr_id | (int) JRN.JRID will be in d_id |
Reimplemented from Document.
Definition at line 85 of file acc_document.class.php.
References $cn, $jr_id, db, and set_id().
Here is the call graph for this function:| Acc_Document::create_document | ( | $internal, | |
| $p_array ) |
create the invoice and saved it as attachment to the operation,
| $p_array | is normally the $_POST Array ( [ledger_type] => VEN [gDossier] => x [nb_item] => 1 (number of item used to numerate e_marchX, e_quantX ,...) [p_jrn] => 2 [p_jrn_predef] => 2 [jrn_type] => VEN or ACH [e_date] => 10.06.2025 (date) [e_ech] => limite date [e_client] => CLIENT [e_pj] => 25.827 [e_pj_suggest] => 25.827 [e_comm] => E-INVOICE [p_currency_code] => 0 [p_currency_rate] => 1 (rate if 1 for EURO) [jrn_note_input] => [e_march0] => 7DVINV [e_march0_label] => Label of the operation [e_march0_price] => 10.0000 [e_quant0] => 1.0000 [htva_march0] => 10 [e_march0_tva_id] => 1 [e_march0_tva_amount] => 2.1 [tva_march0] => 2.1 [tvac_march0] => 12.1 ... [mp_date] => (dd.mm.yyyy date of payment) [acompte] => 0 (amount to deduce as advance payment) [e_comm_paiement] => (string : comment of the payment) [e_mp] => 0 (method of payment it is the XX in e_mp_qcode_XX) [e_mp_qcode_16] => Banque 1 [e_mp_qcode_17] => Banque 2 [view_invoice] => Enregistrer [gen_doc] => int DOCUMENT_MODELE.MD_ID , document template to use ) * |
Definition at line 231 of file acc_document.class.php.
References $p_array, $sql, ag_id, db, and noalyss_strlentrim().
Here is the call graph for this function:
|
static |
Definition at line 416 of file acc_document.class.php.
References $a_row, $cn, $div, $export, $gDossier, $jr_id, $q, $script, Document\download(), and Icon_Action\trash().
Here is the call graph for this function:| Acc_Document::export_file | ( | $destination_file | ) |
export the file to the file system and complet $this->d_mimetype, d_filename and
| $destination_file | (string) full path to document |
Reimplemented from Document.
Definition at line 261 of file acc_document.class.php.
References db, and record_log().
Here is the call graph for this function:| Acc_Document::get_document_xml | ( | ) |
Definition at line 46 of file acc_document.class.php.
References $document_xml.
| Acc_Document::link_download_xml | ( | ) |
return a string with a link download XML or an empty string if there is no XML to download
Definition at line 398 of file acc_document.class.php.
| Acc_Document::replace_receipt | ( | $new_oid | ) |
for FACTURX we replace the PDF save in DB by this one, always a PDF (since it is a FACTURX document)
Definition at line 152 of file acc_document.class.php.
References db.
| Acc_Document::save_receipt | ( | ) |
Save a "piece justificative" , the name must be a receipt.
If it is a XML document, split it into 2 parts : PDF and XML the PDF be stored in JR_PJ and the XML into JR_DOCUMENT_XML
pj is the $_FILES key
Definition at line 286 of file acc_document.class.php.
References Document\$d_id, $e, $i, $pdf, db, and record_log().
Here is the call graph for this function:
|
protected |
insert the generated Document into the database, update the $this->d_id that is the PK of document. and load the PDF into the database.
| $p_file | is the generated file (full path) |
Reimplemented from Document.
Definition at line 60 of file acc_document.class.php.
| Acc_Document::set_document_xml | ( | $document_xml | ) |
Definition at line 50 of file acc_document.class.php.
References $document_xml.
| Acc_Document::set_id | ( | $jr_id | ) |
set_id fill up d_filename, d_mimetype,d_lob,d_description,jr_pj_number
Definition at line 96 of file acc_document.class.php.
References $jr_id, $row, and db.
Referenced by __construct().
| Acc_Document::update | ( | $filename | ) |
save the file into DB, will create a large object if there is no document to replace.
It will change the d_filename, d_mimetype
| $d_filename | (string) full path to the file to load into DB |
Definition at line 129 of file acc_document.class.php.
References db.
| Acc_Document::update_document_xml | ( | $oid | ) |
save the Large Object $oid in the column JRN.JR_DOCUMENT_XML
| $oid( | OID) PostgreSQL Object ID |
Definition at line 178 of file acc_document.class.php.
References db.
|
private |
$document_xml (oid) XML document e-invoice
Definition at line 44 of file acc_document.class.php.
Referenced by get_document_xml(), and set_document_xml().