noalyss Version-10
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
export_xml-invoice.php File Reference

export the XML invoice from JRN.JR_DOCUMENT_XML More...

Go to the source code of this file.

Variables

if(Database::num_row($r)==0) $a =Database::fetch_array($r,0)
 
catch(Exception $exc) $cn =Dossier::connect()
 
 $file =fopen($tmp,'r')
 
global $g_user
 
 $http =new HttpInput()
 
 $jrn =$a['jr_def_id']
 
 $new_name =$row['jr_pj_name']
 
if(! empty($receipt_number) &&strpos($new_name, $receipt_number)===false) $pos_ext =strrpos($new_name,'.')
 
 $r =$cn->exec_sql("select jr_def_id from jrn where jr_id=$1",array($jr_id))
 
 $receipt_number =clean_filename($row['jr_pj_number'])
 
if($g_user->check_jrn($jrn)=='X') $ret
 
 $row =Database::fetch_array($ret,0)
 
if( $row['jr_document_xml']==null) $tmp =tempnam($_ENV['TMP'],'document_')
 
if( $pos_ext==0) else
 
 try
 
 while (!feof( $file)) echo fread( $file
 

Detailed Description

export the XML invoice from JRN.JR_DOCUMENT_XML

Definition in file export_xml-invoice.php.

Variable Documentation

◆ $a

Definition at line 50 of file export_xml-invoice.php.

◆ $cn

catch (Exception $exc) $cn =Dossier::connect()

Definition at line 41 of file export_xml-invoice.php.

◆ $file

$file =fopen($tmp,'r')

Definition at line 116 of file export_xml-invoice.php.

◆ $g_user

global $g_user

Definition at line 52 of file export_xml-invoice.php.

◆ $http

$http =new HttpInput()

Definition at line 29 of file export_xml-invoice.php.

◆ $jrn

$jrn =$a['jr_def_id']

Definition at line 51 of file export_xml-invoice.php.

◆ $new_name

$new_name =$row['jr_pj_name']

Definition at line 85 of file export_xml-invoice.php.

◆ $pos_ext

if (! empty( $receipt_number) &&strpos( $new_name, $receipt_number)===false) $pos_ext =strrpos($new_name,'.')

Definition at line 94 of file export_xml-invoice.php.

◆ $r

$r =$cn->exec_sql("select jr_def_id from jrn where jr_id=$1",array($jr_id))

Definition at line 43 of file export_xml-invoice.php.

◆ $receipt_number

$receipt_number =clean_filename($row['jr_pj_number'])

Definition at line 86 of file export_xml-invoice.php.

◆ $ret

if ( $g_user->check_jrn( $jrn)=='X') $ret
Initial value:
=$cn->exec_sql("select jr_pj_name,jr_pj_number ,jr_document_xml from jrn where jr_id=$1",
array($jr_id))
$jr_id

Definition at line 60 of file export_xml-invoice.php.

◆ $row

$row =Database::fetch_array($ret,0)

Definition at line 66 of file export_xml-invoice.php.

◆ $tmp

if ($row[ 'jr_document_xml']==null) $tmp =tempnam($_ENV['TMP'],'document_')

Definition at line 83 of file export_xml-invoice.php.

◆ else

if ($pos_ext==0) else
Initial value:
{
$new_name=substr_replace($new_name,'.xml',$pos_ext)
$new_name
if(! empty($receipt_number) &&strpos($new_name, $receipt_number)===false) $pos_ext

Definition at line 99 of file export_xml-invoice.php.

◆ try

try
Initial value:
{
$jr_id=$http->get('jr_id',"number")

Definition at line 31 of file export_xml-invoice.php.

◆ while

while(!feof($file)) echo fread($file ( ! feof $file)

Definition at line 117 of file export_xml-invoice.php.