* Copyright (C) 2010-2011 Laurent Destailleur * Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2012-2014 Raphaël Doursenaud * Copyright (C) 2013 Florian Henry * Copyright (C) 2017 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) * $conf * $langs * $element (used to test $user->rights->$element->creer) * $permtoedit (used to replace test $user->rights->$element->creer) * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) * $outputalsopricetotalwithtax * $usemargins (0 to disable all margins columns, 1 to show according to margin setup) * * $type, $text, $description, $line */ // Protection to avoid direct call of template if (empty($object) || ! is_object($object)) { print "Error, template page can't be called as URL"; exit; } print "\n"; // Title line print "\n"; print ''; // Adds a line numbering column if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print ' '; // Description print ''.$langs->trans('Description').''; if ($this->element == 'supplier_proposal' || $this->element == 'order_supplier' || $this->element == 'invoice_supplier') { print ''.$langs->trans("SupplierRef").''; } // VAT print ''.$langs->trans('VAT').''; // Price HT print ''.$langs->trans('PriceUHT').''; // Multicurrency if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print ''.$langs->trans('PriceUHTCurrency', $this->multicurrency_code).''; if ($inputalsopricewithtax) print ''.$langs->trans('PriceUTTC').''; // Qty print ''.$langs->trans('Qty').''; if($conf->global->PRODUCT_USE_UNITS) { print ''.$langs->trans('Unit').''; } // Reduction short print ''.$langs->trans('ReductionShort').''; // Fields for situation invoice if ($this->situation_cycle_ref) { print '' . $langs->trans('Progress') . ''; print '' . $langs->trans('TotalHT100Short') . ''; } if ($usemargins && ! empty($conf->margin->enabled) && empty($user->socid)) { if (!empty($user->rights->margins->creer)) { if ($conf->global->MARGIN_TYPE == "1") { print ''.$langs->trans('BuyingPrice').''; } else { print ''.$langs->trans('CostPrice').''; } } if (! empty($conf->global->DISPLAY_MARGIN_RATES) && $user->rights->margins->liretous) { print ''.$langs->trans('MarginRate').''; } if (! empty($conf->global->DISPLAY_MARK_RATES) && $user->rights->margins->liretous) { print ''.$langs->trans('MarkRate').''; } } // Total HT print ''.$langs->trans('TotalHTShort').''; // Multicurrency if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) print ''.$langs->trans('TotalHTShortCurrency', $this->multicurrency_code).''; if ($outputalsopricetotalwithtax) print ''.$langs->trans('TotalTTCShort').''; print ''; // No width to allow autodim print ''; print ''; if($action == 'selectlines') { print ''; print ''; print ''; print ''; } print "\n"; print "\n"; print "\n";