14 include(
"../../configuration.inc.php");
15 if(!empty(
$GLOBALS[
'site_parameters'][
'require_login_for_html_bill'])) {
25 if (!empty($_GET[
'code_facture'])) {
26 $code_facture = $_GET[
'code_facture'];
27 $sql =
'SELECT c.*, sp.technical_code AS statut_paiement
29 LEFT JOIN peel_statut_paiement sp ON sp.id=c.id_statut_paiement AND ' .
get_filter_site_cond(
'statut_paiement',
'sp') .
'
31 }
elseif ((!empty($_GET[
'id']) && !empty($_GET[
'timestamp']))) {
32 $id = intval($_GET[
'id']);
33 $timestamp = $_GET[
'timestamp'];
34 $sql =
'SELECT c.*, sp.technical_code AS statut_paiement
36 LEFT JOIN peel_statut_paiement sp ON sp.id=c.id_statut_paiement AND ' .
get_filter_site_cond(
'statut_paiement',
'sp') .
'
45 $_SESSION[
'session_last_bill_viewed'] = $commande->id;
47 $GLOBALS[
'site_parameters'][
'css'] =
'html_bill.css';
50 $id = intval($commande->id);
51 $numero = intval($commande->order_id);
52 if(empty($commande->o_timestamp) || substr($commande->o_timestamp, 0, 10) ==
'0000-00-00') {
54 $commande->o_timestamp = date(
'Y-m-d H:i:s');
56 if (!empty($_GET[
'mode']) && $_GET[
'mode'] ==
'bdc') {
57 $displayed_date =
get_formatted_date($commande->o_timestamp,
'short',
vb(
$GLOBALS[
'site_parameters'][
'order_hour_display_mode'],
'long'));
60 if(!empty($commande->f_datetime) &&
String::substr($commande->f_datetime, 0, 10) !=
'0000-00-00') {
68 if (!empty($_GET[
'partial'])) {
69 if (!empty($_GET[
'currency_rate'])) {
77 if (!empty($_GET[
'mode']) && $_GET[
'mode'] ==
'bdc') {
82 $bill_address_title =
$GLOBALS[
'STR_INVOICE_ADDRESS'];
83 if (!empty($commande->id_utilisateur)) {
84 $bill_address_title .=
' ' . $commande->id_utilisateur;
89 <table class="main_table">
92 <h1 property="name" class="bill_title">' . $libelle .
" " .
$GLOBALS[
'STR_NUMBER'] .
" " . $numero .
" - " . $displayed_date .
"" .
'</h1>
97 <table cellpadding="5" style="width:50%">
99 <td>' . print_societe(
true) .
'</td>
102 <table class="full_width">
104 <td class="top" style="width:50%; padding-right:10px">
105 <table class="full_width" cellpadding="5">
107 <td class="bill_cell_title">' . $bill_address_title .
'</td>
110 <td class="bill_cell">' . nl2br($order_infos[
'client_infos_bill']) .
'</td>
114 <td class="top" style="width:50%">
115 ' . (!empty($order_infos[
'client_infos_ship'])?
'
116 <table class="full_width" cellpadding="5">
118 <td class="bill_cell_title">' .
$GLOBALS[
'STR_SHIP_ADDRESS'] .
'</td>
121 <td class="bill_cell">' . nl2br($order_infos[
'client_infos_ship']) .
'</td>
128 <table class="full_width" cellpadding="5">
130 <td class="bill_cell_title">' .
$GLOBALS[
'STR_REFERENCE'] .
'</td>
131 <td class="bill_cell_title">' .
$GLOBALS[
'STR_PRODUCT'] .
'</td>
132 <td class="bill_cell_title">' .
$GLOBALS[
'STR_MODULE_FACTURES_CATALOGUE_PRICE'] .
' ' .
$GLOBALS[
'STR_TTC'] .
'</td>
133 <td class="bill_cell_title">' .
$GLOBALS[
'STR_SOLD_PRICE'] .
' ' .
$GLOBALS[
'STR_TTC'] .
'</td>
134 <td class="bill_cell_title">' .
$GLOBALS[
'STR_QUANTITY'] .
'</td>
135 <td class="bill_cell_title">' .
$GLOBALS[
'STR_TOTAL_TTC'] .
'</td>';
138 <td class="bill_cell_title">' .$GLOBALS[
'STR_VAT'] .
'</td>';
145 foreach ($product_infos_array as $this_ordered_product) {
146 $reference = $this_ordered_product[
"reference"];
149 $quantite = $this_ordered_product[
'quantite'];
150 if(empty(
$GLOBALS[
'site_parameters'][
'allow_float_quantity']) || intval($quantite) == floatval($quantite)) {
151 $quantite = intval($quantite);
154 $tva = $this_ordered_product[
'tva_percent'];
158 <td style="width:90px" class="bill_cell center">' . $reference .
'</td>
159 <td class="left bill_cell">' . str_replace(
"\n",
'<br />', $this_ordered_product[
"product_text"]) .
'</td>
160 <td style="width:90px" class="bill_cell right">' . $prix_cat .
'</td>
161 <td style="width:70px" class="bill_cell right">' .
$prix .
'</td>
162 <td style="width:70px" class="bill_cell center">' . $quantite .
'</td>
163 <td style="width:70px" class="bill_cell right">' . $total_prix .
'</td>';
166 <td style="width:70px" class="bill_cell right">' . $tva .
' %</td>';
174 <table class="full_width" cellpadding="5">
176 <td class="right" style="width:80%" >' .
$GLOBALS[
'STR_SHIPPING_COST'] .
'' .
$GLOBALS[
'STR_BEFORE_TWO_POINTS'] .
':</td>
177 <td class="right">' . $order_infos[
'net_infos_array'][
'displayed_cout_transport'] .
'</td>
180 <td class="right" style="width:80%">' .
$GLOBALS[
'STR_TOTAL_HT'] .
'' .
$GLOBALS[
'STR_BEFORE_TWO_POINTS'] .
':</td>
181 <td class="right"><b>' . $order_infos[
'net_infos_array'][
'montant_ht'] .
'</b></td>
184 <td class="right" style="width:80%" >' .
$GLOBALS[
'STR_PDF_AVOIR'] .
'' .
$GLOBALS[
'STR_BEFORE_TWO_POINTS'] .
':</td>
185 <td class="right">' . $order_infos[
'net_infos_array'][
'avoir'] .
'</td>
191 <td class="right" style="width:80%">' .
$GLOBALS[
'STR_VAT'] .
'' .
$GLOBALS[
'STR_BEFORE_TWO_POINTS'] .
':</td>
192 <td class="right" ><b>' . $order_infos[
'net_infos_array'][
'total_tva'] .
'</b></td>
195 if (floatval($order_infos[
'net_infos_array'][
'total_tva'])==0) {
200 <td class="right" colspan="2">' .
$GLOBALS[
'STR_NO_VAT_APPLIABLE'] .
'</td>
208 <td class="right" colspan="2">' .
$GLOBALS[
'STR_INVOICE_BOTTOM_TEXT2'] .
'</td>
213 if ($commande->tarif_paiement > 0) {
216 <td class="right" style="width:80%">' .
$GLOBALS[
'STR_MODULE_FACTURES_PAY_COST'] .
'' .
$GLOBALS[
'STR_BEFORE_TWO_POINTS'] .
':</td>
217 <td class="right">+ ' . $order_infos[
'net_infos_array'][
'tarif_paiement'] .
' ' .
$GLOBALS[
'site_parameters'][
'symbole'] .
'</td>
223 <td class="right" style="width:80%"><b>' .
$GLOBALS[
'STR_NET'] .
'</b>' .
$GLOBALS[
'STR_BEFORE_TWO_POINTS'] .
':</td>
224 <td class="bill_cell_to_pay right"><b>' . $order_infos[
'net_infos_array'][
'montant'] .
'</b></td>
227 if (!empty($commande->commentaires)) {
230 <td colspan="2" class="titre" class="bill_cell_title"><b>' .
$GLOBALS[
'STR_COMMENTS'] .
'</b></td>
240 if (!empty($_GET[
'mode']) && $_GET[
'mode'] ==
'bdc') {
243 if (round($amount_to_pay, 2) != round($commande->montant, 2)) {
249 <table class="full_width" cellpadding="10">
251 <td colspan="2">' .
get_payment_form($commande->id, $commande->paiement,
false, $amount_to_pay,
false) .
'</td>
260 if (!empty($_GET[
'mode']) && $_GET[
'mode'] ==
'bdc') {
264 <table cellpadding="10" style="width:350px">
266 <td class="bill_cell_title">' .
$GLOBALS[
'STR_ACCORD'] .
'</td>
269 <td class="bill_cell left">
271 <p><i>' .
$GLOBALS[
'STR_DATE'] .
'' .
$GLOBALS[
'STR_BEFORE_TWO_POINTS'] .
':</i></p>
274 <p><i>' .
$GLOBALS[
'STR_ACCORD_OK'] .
'</i></p>
277 <p><i>' .
$GLOBALS[
'STR_SIGNATURE'] .
'' .
$GLOBALS[
'STR_BEFORE_TWO_POINTS'] .
':</i></p>
279 <div class="center" style="height:50px">
293 $title = $libelle .
" " .
$GLOBALS[
'STR_NUMBER'] .
" " . $numero .
" - " . $displayed_date ;
296 echo
'<h1 property="name">' .
$GLOBALS[
'STR_NO_ORDER'] .
'</h1>';
get_user_information($user_id=null, $get_full_infos=false)
Chargement des détails de l'utilisateur.
get_current_url($with_get=true, $get_short_url=false, $take_away_get_args_array=null)
get_current_url()
get_product_infos_array_in_order($order_id, $devise=null, $currency_rate=null, $order_by=null, $add_total_prix_attribut=false)
get_product_infos_array_in_order()
is_user_tva_intracom_for_no_vat($user_id=null)
is_user_tva_intracom_for_no_vat()
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
static html_entity_decode_if_needed($string)
String::html_entity_decode_if_needed()
nohtml_real_escape_string($value, $allowed_tags=null)
Protège les données pour insertion dans MySQL ET supprime les tags HTML pour protéger de toute sorte ...
if(!function_exists('ipGet')) if(!function_exists('isPublicIP')) is_user_bot($ip=null, $user_agent=null)
Renvoie si le visiteur est un robot ou non.
get_filter_site_cond($table_technical_code, $table_alias=null, $use_strict_rights_if_in_admin=false, $specific_site_id=null, $exclude_public_items=false, $admin_force_multisite_if_allowed=false)
Retourne la condition SQL permettant de filtrer les données pour une table.
query($query, $die_if_error=false, $database_object=null, $silent_if_error=false, $security_sql_filter=true)
The query() function is meant to be called anywhere you want to make a query.
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))
necessite_identification()
Si l'utilisateur n'est pas connecté à un compte, on affiche une page d'identification et arrête le sc...
fetch_object($query_result)
fetch_object()
get_payment_form($order_id, $forced_type=null, $send_admin_email=false, $amount_to_pay=0, $allow_autosend=true)
Renvoie le formulaire de paiement.
if(!empty($GLOBALS['site_parameters']['require_login_for_html_bill'])) if(!check_if_module_active('factures', '/commande_html.php')||is_user_bot()) $auto_refresh
$GLOBALS['page_columns_count']
get_order_infos_array($order_object)
get_order_infos_array()
fprix($price, $display_currency=false, $currency_code_or_default=null, $convertion_needed_into_currency=true, $currency_rate=null, $display_iso_currency_code=false, $format=true, $force_format_separator=null, $add_rdfa_properties=false, $round_even_if_no_format=false)
fprix formatte le prix donné en le convertissant si nécessaire au préalable et en ajoutant éventuelle...
static substr($string, $start, $length=null)
Returns the portion of string specified by the start and length parameters.
check_if_module_active($module_name, $specific_file_name=null)
Renvoie si un module est présent et activé ou non - Peut être appelé avant ou après le chargement d'u...
if(defined('IN_PEEL_ADMIN')||IN_INSTALLATION) $_SESSION['session_langue']