caromax Posted February 6, 2014 Share Posted February 6, 2014 (edited) bonjour, J'ai modifié mon fichier AdminOrders.php de manière à m'afficher les bons de livraison, les factures et les avoirs, au lieu d'avoir plusieurs bloc d'info pour bon/facture/avoir. C'est ce qu'on voit sur les PS1.5. Tout va bien sauf que je n'arrive pas à afficher le montant pour chaque facture d'avoir, si il y a par exemple 2 avoirs sur la même commande. J'ai besoin d'un peu d'aide de la communauté! Merci d'avance. Voila ou j'en suis: dans AdminOrders.php, après /* Display invoice information */ j'ai supprimé le code jusqu'à /* Display shipping infos */ ce qui me donne en fin de compte : /* Display invoice information */ echo ' <fieldset style="width: 400px"> <legend> <img src="../img/admin/document.gif" /> '.$this->l('Documents').' </legend> <table class="table" width="100%;" cellspacing="1" cellpadding="0" id="documents_table"> <thead> <tr> <th style="font-weight: bold; width: 25%;">'.$this->l('Amount').'</th> <th style="font-weight: bold; width: 25%;">'.$this->l('Document').'</th> <th style="font-weight: bold; width: 20%;">'.$this->l('Number').'</th> <th style="font-weight: bold; padding-left: 20px; text-align: left; width: 30%;">'.$this->l('Date').'</th> </tr> </thead> <tbody>'; if ($currentState->delivery OR $order->delivery_number) { echo ' <tr> <td> -- </td> <td> '.$this->l('Delivery Slip').' </td> <td> <a href="pdf.php?id_delivery='.$order->delivery_number.'"> <img src="../img/admin/document.gif" alt="'.$this->l('See the document').'"/> </a> '.Configuration::get('PS_DELIVERY_PREFIX', intval($cookie->id_lang)).sprintf('%06d', $order->delivery_number).' </td> <td style="text-align: right;"> '.Tools::displayDate($order->delivery_date, intval($cookie->id_lang), true).' </td> </tr> '; } if (($currentState->invoice OR $order->invoice_number) AND count($products)) { echo ' <tr> <td> '.Tools::displayPrice($order->total_paid, $currency, false, false).($order->total_paid != $order->total_paid_real ? '<font color="red">('.$this->l('Paid:').' '.Tools::displayPrice($order->total_paid_real, $currency, false, false).')</font>' : '').' </td> <td> '.$this->l('Invoice').' </td> <td> <a href="pdf.php?id_order='.$order->id.'&pdf"> <img src="../img/admin/document.gif" alt="'.$this->l('See the document').'"/> </a> '.Configuration::get('PS_INVOICE_PREFIX', intval($cookie->id_lang)).sprintf('%06d', $order->invoice_number).' </td> <td style="text-align: right;"> '.Tools::displayDate($order->invoice_date, intval($cookie->id_lang), true).' </td> </tr> '; } else if (sizeof($slips)) { foreach ($slips as $slip) { echo ' <tr> <td>'; foreach ($products as $product) { //if (intval($product['product_quantity_return'])) //{ $totalCreditSlip = Tools::displayPrice($product['product_price'] * (1 + ($product['tax_rate'] * 0.01)) * (intval($product['product_quantity']) - $product['customizationQuantityTotal']) + ($order->total_shipping), $currency, false, false); echo ' '.Tools::displayPrice($product['product_price'] * (1 + ($product['tax_rate'] * 0.01)) + ($order->total_shipping), $currency, false, false).' '; $test = Tools::displayPrice($product['product_price'] * (1 + ($product['tax_rate'] * 0.01)), $currency, false, false); $z = $test+$test + ($order->total_shipping); // } } echo ' </td> <td> '.$this->l('Credit Slip').' '.$z.' </td> <td> <a style="color: #000000;" href="pdf.php?id_order_slip='.$slip['id_order_slip'].'"> <img src="../img/admin/document.gif" alt="'.$this->l('See the document').'"/> </a> '.Configuration::get('PS_CREDIT_SLIP_PREFIX', intval($cookie->id_lang)).sprintf('%06d', $slip['id_order_slip']).' </td> <td style="text-align: right;"> '.Tools::displayDate($slip['date_add'], intval($cookie->id_lang), true).' </td> </tr> '; } } else { echo ' <tr> <td colspan ="4" style="text-align: center; color: #C0C0C0;"> '.$this->l('There is not yet available accounting documents.').' </td> </tr>'; } echo ' </tbody> </table> </fieldset> <br />'; /* Display shipping infos */ Edited February 6, 2014 by caromax (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now