Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2020-07-24 00:09:46 +02:00
commit 26ac4e30d2
57 changed files with 252 additions and 165 deletions

View File

@ -497,6 +497,14 @@ if ($mode == 'common' || $mode == 'commonkanban')
dol_fiche_head($head, $newmode, '', -1);
$moreforfilter = '<div class="valignmiddle">';
$moreforfilter .= '<div class="floatright right pagination"><ul><li>';
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'common' ? '' : ' btnTitleSelected')));
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'commonkanban' ? '' : ' btnTitleSelected')));
$moreforfilter .= '</li></ul></div>';
$moreforfilter .= '<div class="floatright center marginrightonly hideonsmartphone" style="padding-top: 3px"><span class="">'.$moreinfo.'</span><br><b class="largenumber">'.$moreinfo2.'</b></div>';
$moreforfilter .= '<div class="colorbacktimesheet float valignmiddle">';
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('Keyword').': <input type="text" id="search_keyword" name="search_keyword" class="maxwidth100" value="'.dol_escape_htmltag($search_keyword).'">';
@ -525,13 +533,6 @@ if ($mode == 'common' || $mode == 'commonkanban')
$moreforfilter .= '</div>';
$moreforfilter .= '</div>';
$moreforfilter .= '<div class="floatright right pagination"><ul><li>';
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'common' ? '' : ' btnTitleSelected')));
$moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'commonkanban' ? '' : ' btnTitleSelected')));
$moreforfilter .= '</li></ul></div>';
$moreforfilter .= '<div class="floatright center marginrightonly hideonsmartphone" style="padding-top: 3px"><span class="">'.$moreinfo.'</span><br><b class="largenumber">'.$moreinfo2.'</b></div>';
$moreforfilter .= '</div>';
if (!empty($moreforfilter))

View File

@ -2776,18 +2776,16 @@ class ContratLigne extends CommonObjectLine
* Load object in memory from database
*
* @param int $id Id object
* @param string $ref Ref of contract
* @param string $ref Ref of contract line
* @return int <0 if KO, >0 if OK
*/
public function fetch($id, $ref = '')
{
// Check parameters
if (empty($id) && empty($ref)) return -1;
$sql = "SELECT";
$sql .= " t.rowid,";
$sql .= " t.tms,";
$sql .= " t.fk_contrat,";
$sql .= " t.fk_product,";
@ -2888,10 +2886,14 @@ class ContratLigne extends CommonObjectLine
$this->fk_user_cloture = $obj->fk_user_cloture;
$this->commentaire = $obj->commentaire;
$this->fk_fournprice = $obj->fk_fournprice;
$marginInfos = getMarginInfos($obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, $this->fk_fournprice, $obj->pa_ht);
$this->pa_ht = $marginInfos[0];
$this->fk_unit = $obj->fk_unit;
$this->fetch_optionals();
}
$this->db->free($resql);
return 1;

View File

@ -154,10 +154,10 @@ if (empty($reshook))
$arrayresult = array_merge($arrayresult, $hookmanager->resArray);
} else $arrayresult = $hookmanager->resArray;
// This allow to keep a search entry to the top
// This pushes a search entry to the top
if (!empty($conf->global->DEFAULT_SEARCH_INTO_MODULE)) {
$key = 'searchinto'.$conf->global->DEFAULT_SEARCH_INTO_MODULE;
if (array_key_exists($key, $arrayresult)) $arrayresult[$key]['position'] = -10;
if (array_key_exists($key, $arrayresult)) $arrayresult[$key]['position'] = -1000;
}
// Sort on position

View File

@ -824,7 +824,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS))
{
$langs->load("commercial");
$newmenu->add("/societe/list.php?type=p&amp;leftmenu=prospects", $langs->trans("ListProspectsShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'prospects');
$newmenu->add("/societe/list.php?type=p&amp;leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->rights->societe->lire, '', $mainmenu, 'prospects');
/* no more required, there is a filter that can do more
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&amp;sortfield=s.datec&amp;sortorder=desc&amp;begin=&amp;search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->rights->societe->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&amp;sortfield=s.datec&amp;sortorder=desc&amp;begin=&amp;search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->rights->societe->lire);
@ -832,26 +832,24 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&amp;sortfield=s.datec&amp;sortorder=desc&amp;begin=&amp;search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->rights->societe->lire);
if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&amp;sortfield=s.datec&amp;sortorder=desc&amp;begin=&amp;search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->rights->societe->lire);
*/
$newmenu->add("/societe/card.php?leftmenu=prospects&amp;action=create&amp;type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer);
//$newmenu->add("/contact/list.php?leftmenu=customers&amp;type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
$newmenu->add("/societe/card.php?leftmenu=prospects&amp;action=create&amp;type=p", $langs->trans("MenuNewProspect"), 3, $user->rights->societe->creer);
}
// Customers/Prospects
if (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))
{
$langs->load("commercial");
$newmenu->add("/societe/list.php?type=c&amp;leftmenu=customers", $langs->trans("ListCustomersShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'customers');
$newmenu->add("/societe/list.php?type=c&amp;leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->rights->societe->lire, '', $mainmenu, 'customers');
$newmenu->add("/societe/card.php?leftmenu=customers&amp;action=create&amp;type=c", $langs->trans("MenuNewCustomer"), 2, $user->rights->societe->creer);
//$newmenu->add("/contact/list.php?leftmenu=customers&amp;type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire);
$newmenu->add("/societe/card.php?leftmenu=customers&amp;action=create&amp;type=c", $langs->trans("MenuNewCustomer"), 3, $user->rights->societe->creer);
}
// Suppliers
if (!empty($conf->societe->enabled) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) || !empty($conf->supplier_proposal->enabled)))
{
$langs->load("suppliers");
$newmenu->add("/societe/list.php?type=f&amp;leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 1, ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers');
$newmenu->add("/societe/card.php?leftmenu=suppliers&amp;action=create&amp;type=f", $langs->trans("MenuNewSupplier"), 2, $user->rights->societe->creer && ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire));
$newmenu->add("/societe/list.php?type=f&amp;leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers');
$newmenu->add("/societe/card.php?leftmenu=suppliers&amp;action=create&amp;type=f", $langs->trans("MenuNewSupplier"), 3, $user->rights->societe->creer && ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire));
}
// Categories

View File

@ -48,9 +48,9 @@ class doc_generic_bom_odt extends ModelePDFBom
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* @var string Dolibarr version of the loaded document

View File

@ -48,9 +48,9 @@ class doc_generic_order_odt extends ModelePDFCommandes
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* @var string Dolibarr version of the loaded document

View File

@ -69,9 +69,9 @@ class pdf_einstein extends ModelePDFCommandes
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -69,9 +69,9 @@ class pdf_eratosthene extends ModelePDFCommandes
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -46,9 +46,9 @@ class doc_generic_contract_odt extends ModelePDFContract
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -62,9 +62,9 @@ class pdf_strato extends ModelePDFContract
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -48,9 +48,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -58,9 +58,9 @@ class pdf_espadon extends ModelePdfExpedition
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -59,9 +59,9 @@ class pdf_merou extends ModelePdfExpedition
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -59,9 +59,9 @@ class pdf_rouget extends ModelePdfExpedition
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -66,9 +66,9 @@ class pdf_standard extends ModeleExpenseReport
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -47,9 +47,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -70,9 +70,9 @@ class pdf_crabe extends ModelePDFFactures
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -70,9 +70,9 @@ class pdf_sponge extends ModelePDFFactures
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -61,9 +61,9 @@ class pdf_soleil extends ModelePDFFicheinter
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -60,9 +60,9 @@ class pdf_typhon extends ModelePDFDeliveryOrder
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -48,9 +48,9 @@ class doc_generic_mo_odt extends ModelePDFMo
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* @var string Dolibarr version of the loaded document

View File

@ -45,9 +45,9 @@ class doc_generic_product_odt extends ModelePDFProduct
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFProduct
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -62,9 +62,9 @@ class doc_generic_project_odt extends ModelePDFProjects
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -58,11 +58,11 @@ class pdf_baleine extends ModelePDFProjects
*/
public $type;
/**
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -63,9 +63,9 @@ class doc_generic_task_odt extends ModelePDFTask
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -43,11 +43,11 @@ class doc_generic_proposal_odt extends ModelePDFPropales
*/
public $emetteur;
/**
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* @var string Dolibarr version of the loaded document

View File

@ -69,9 +69,9 @@ class pdf_azur extends ModelePDFPropales
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -68,9 +68,9 @@ class pdf_cyan extends ModelePDFPropales
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -41,11 +41,11 @@ class doc_generic_reception_odt extends ModelePdfReception
*/
public $emetteur; // Objet societe qui emet
/**
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* @var string Dolibarr version of the loaded document

View File

@ -44,9 +44,9 @@ class doc_generic_odt extends ModeleThirdPartyDoc
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**

View File

@ -43,11 +43,11 @@ class doc_generic_stock_odt extends ModelePDFStock
*/
public $emetteur;
/**
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -58,9 +58,9 @@ class pdf_standard extends ModelePDFStock
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -59,9 +59,9 @@ class pdf_stdmovement extends ModelePDFMovement
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -65,9 +65,9 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -49,9 +49,9 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* @var string Dolibarr version of the loaded document

View File

@ -63,9 +63,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -61,11 +61,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
*/
public $type;
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
*/
public $phpmin = array(5, 5);
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -60,9 +60,9 @@ class pdf_standard extends ModelePDFSuppliersPayments
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -46,9 +46,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -60,9 +60,9 @@ class pdf_aurore extends ModelePDFSupplierProposal
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
/* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2020 Charlene Benke <charlie@patas-monkey.com>
*
* 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
@ -24,6 +25,38 @@
* and parent class for projects numbering models
*/
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
/**
* Parent class for documents models
*/
abstract class ModelePDFTicket extends CommonDocGenerator
{
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Return list of active generation modules
*
* @param DoliDB $db Database handler
* @param integer $maxfilenamelength Max length of value to show
* @return array List of templates
*/
public static function liste_modeles($db, $maxfilenamelength = 0)
{
// phpcs:enable
global $conf;
$type = 'ticket';
$list = array();
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$list = getListOfModels($db, $type, $maxfilenamelength);
return $list;
}
}
/**
* Classe mere des modeles de numerotation des references de projets
*/

View File

@ -43,9 +43,9 @@ class doc_generic_user_odt extends ModelePDFUser
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -46,9 +46,9 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -6,7 +6,7 @@
* Copyright (C) 2010-2019 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2014 Cedric Gross <c.gross@kreiz-it.fr>
* Copyright (C) 2016 Florian Henry <florian.henry@atm-consulting.fr>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2017-2020 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2020 Christophe Battarel <christophe@altairis.fr>
*
@ -243,7 +243,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) {
if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) {
$dto = GETPOST("dto_".$reg[1].'_'.$reg[2]);
$dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int');
if (!empty($dto)) {
$unit_price = price2num(GETPOST("pu_".$reg[1]) * (100 - $dto) / 100, 'MU');
}
@ -269,14 +269,14 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) {
if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) {
$dto = GETPOST("dto_".$reg[1].'_'.$reg[2]);
$dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int');
//update supplier price
if (GETPOSTISSET($saveprice)) {
// TODO Use class
$sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price";
$sql .= " SET unitprice='".GETPOST($pu)."'";
$sql .= ", price=".GETPOST($pu)."*quantity";
$sql .= ", remise_percent='".$dto."'";
$sql .= ", remise_percent='".(!empty($dto)?$dto:0)."'";
$sql .= " WHERE fk_soc=".$object->socid;
$sql .= " AND fk_product=".GETPOST($prod, 'int');
@ -306,6 +306,16 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
$fk_commandefourndet = 'fk_commandefourndet_'.$reg[1].'_'.$reg[2];
if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) {
if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) {
$dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int');
if (!empty($dto)) {
$unit_price = price2num(GETPOST("pu_".$reg[1]) * (100 - $dto) / 100, 'MU');
}
$saveprice = "saveprice_".$reg[1].'_'.$reg[2];
}
}
// We ask to move a qty
if (GETPOST($qty) > 0) {
if (!(GETPOST($ent, 'int') > 0)) {
@ -328,6 +338,24 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner)
setEventMessages($object->error, $object->errors, 'errors');
$error++;
}
if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) {
if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) {
$dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int');
//update supplier price
if (GETPOSTISSET($saveprice)) {
// TODO Use class
$sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price";
$sql .= " SET unitprice='".GETPOST($pu)."'";
$sql .= ", price=".GETPOST($pu)."*quantity";
$sql .= ", remise_percent='".(!empty($dto)?$dto:0)."'";
$sql .= " WHERE fk_soc=".$object->socid;
$sql .= " AND fk_product=".GETPOST($prod, 'int');
$resql = $db->query($sql);
}
}
}
}
}
}

View File

@ -5,6 +5,7 @@
-- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
-- Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- Copyright (C) 2020 Udo Tamm <software@dolibit.de>
--
-- 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
@ -21,21 +22,24 @@
--
--
--
-- Do not place a comment at the end of the line, this file is parsed when
-- from the install and all '--' are removed.
--
-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors
-- de l'install et tous les sigles '--' sont supprimés.
--
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('EXW', 'Ex Works, au départ non chargé, non dédouané sortie d''usine (uniquement adapté aux flux domestiques, nationaux)', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('FCA', 'Free Carrier, marchandises dédouanées et chargées dans le pays de départ, chez le vendeur ou chez le commissionnaire de transport de l''acheteur', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('FAS', 'Free Alongside Ship, sur le quai du port de départ', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('FOB', 'Free On Board, chargé sur le bateau, les frais de chargement dans celui-ci étant fonction du liner term indiqué par la compagnie maritime (à la charge du vendeur)', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CFR', 'Cost and Freight, chargé dans le bateau, livraison au port de départ, frais payés jusqu''au port d''arrivée, sans assurance pour le transport, non déchargé du navire à destination (les frais de déchargement sont inclus ou non au port d''arrivée)', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CIF', 'Cost, Insurance and Freight, chargé sur le bateau, frais jusqu''au port d''arrivée, avec l''assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CPT', 'Carriage Paid To, livraison au premier transporteur, frais jusqu''au déchargement du mode de transport, sans assurance pour le transport', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CIP', 'Carriage and Insurance Paid to, idem CPT, avec assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('DAT', 'Delivered At Terminal, marchandises (déchargées) livrées sur quai, dans un terminal maritime, fluvial, aérien, routier ou ferroviaire désigné (dédouanement import, et post-acheminement payés par l''acheteur)', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('DAP', 'Delivered At Place, marchandises (non déchargées) mises à disposition de l''acheteur dans le pays d''importation au lieu précisé dans le contrat (déchargement, dédouanement import payé par l''acheteur)', 1);
INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('DDP', 'Delivered Duty Paid, marchandises (non déchargées) livrées à destination finale, dédouanement import et taxes à la charge du vendeur ; l''acheteur prend en charge uniquement le déchargement (si exclusion des taxes type TVA, le préciser clairement)', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('EXW', 'Ex Works', 'Ex Works, au départ non chargé, non dédouané sortie d''usine (uniquement adapté aux flux domestiques, nationaux)', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('FCA', 'Free Carrier', 'Free Carrier, marchandises dédouanées et chargées dans le pays de départ, chez le vendeur ou chez le commissionnaire de transport de l''acheteur', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('FAS', 'Free Alongside Ship', 'Free Alongside Ship, sur le quai du port de départ', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('FOB', 'Free On Board', 'Free On Board, chargé sur le bateau, les frais de chargement dans celui-ci étant fonction du liner term indiqué par la compagnie maritime (à la charge du vendeur)', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CFR', 'Cost and Freight', 'Cost and Freight, chargé dans le bateau, livraison au port de départ, frais payés jusqu''au port d''arrivée, sans assurance pour le transport, non déchargé du navire à destination (les frais de déchargement sont inclus ou non au port d''arrivée)', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CIF', 'Cost, Insurance, Freight', 'Cost, Insurance and Freight, chargé sur le bateau, frais jusqu''au port d''arrivée, avec l''assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CPT', 'Carriage Paid To', 'Carriage Paid To, livraison au premier transporteur, frais jusqu''au déchargement du mode de transport, sans assurance pour le transport', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CIP', 'Carriage Insurance Paid', 'Carriage and Insurance Paid to, idem CPT, avec assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DAT', 'Delivered At Terminal', 'Delivered At Terminal, marchandises (déchargées) livrées sur quai, dans un terminal maritime, fluvial, aérien, routier ou ferroviaire désigné (dédouanement import, et post-acheminement payés par l''acheteur)', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DAP', 'Delivered At Place', 'Delivered At Place, marchandises (non déchargées) mises à disposition de l''acheteur dans le pays d''importation au lieu précisé dans le contrat (déchargement, dédouanement import payé par l''acheteur)', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DDP', 'Delivered Duty Paid', 'Delivered Duty Paid, marchandises (non déchargées) livrées à destination finale, dédouanement import et taxes à la charge du vendeur ; l''acheteur prend en charge uniquement le déchargement (si exclusion des taxes type TVA, le préciser clairement)', 1);
INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DPU', 'Delivered at Place Unloaded', 'Delivered at Place unloaded', 1);

View File

@ -74,3 +74,5 @@ ALTER TABLE llx_user DROP COLUMN whatsapp;
ALTER TABLE llx_user ADD COLUMN datestartvalidity datetime;
ALTER TABLE llx_user ADD COLUMN dateendvalidity datetime;
ALTER TABLE llx_c_incoterms ADD COLUMN label varchar(100) NULL;

View File

@ -1,5 +1,6 @@
-- ========================================================================
-- Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2020 Udo Tamm <software@dolibit.de>
--
-- 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
@ -19,6 +20,7 @@
CREATE TABLE llx_c_incoterms (
rowid integer AUTO_INCREMENT PRIMARY KEY,
code varchar(3) NOT NULL,
label varchar(100),
libelle varchar(255) NOT NULL,
active tinyint DEFAULT 1 NOT NULL
) ENGINE=innodb;

View File

@ -143,7 +143,7 @@ Replenishments=Replenishments
NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s)
NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s)
MassMovement=Mass movement
SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s".
SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s".
RecordMovement=Record transfer
ReceivingForSameOrder=Receipts for this order
StockMovementRecorded=Stock movements recorded

View File

@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* 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
@ -180,6 +181,7 @@ if ($id > 0) $sql .= " d.fk_product,";
if ($id > 0) $sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,";
$sql .= " SUM(d.total_ht) as selling_price,";
// Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this)
$sql .= " SUM(d.qty) as product_qty,";
$sql .= " SUM(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1 * (d.situation_percent / 100)', 'd.qty * d.buy_price_ht * (d.situation_percent / 100)').") as buying_price,";
$sql .= " SUM(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100)))', 'd.total_ht - (d.buy_price_ht * d.qty * (d.situation_percent / 100))').") as marge";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
@ -235,27 +237,30 @@ if ($result)
print '<tr class="liste_titre">';
if ($id > 0) {
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&amp;id=".$id, '', $sortfield, $sortorder);
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&amp;id=".$id, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'center ');
} else {
print_liste_field_titre("ProductService", $_SERVER["PHP_SELF"], "p.ref", "", "&amp;id=".$id, '', $sortfield, $sortorder);
}
print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&amp;id=".$id, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&amp;id=".$id, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&amp;id=".$id, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "product_qty", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right ');
if (!empty($conf->global->DISPLAY_MARGIN_RATES))
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$id, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right ');
if (!empty($conf->global->DISPLAY_MARK_RATES))
print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$id, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&amp;id=".$id, '', $sortfield, $sortorder, 'right ');
print "</tr>\n";
$cumul_achat = 0;
$cumul_vente = 0;
$cumul_qty = 0;
if ($num > 0)
{
while ($i < $num /*&& $i < $conf->liste_limit*/)
{
$objp = $db->fetch_object($result);
$qty = $objp->product_qty;
$pa = $objp->buying_price;
$pv = $objp->selling_price;
$marge = $objp->marge;
@ -295,9 +300,10 @@ if ($result)
print "</td>\n";
//print "<td>".$product_static->getNomUrl(1)."</td>\n";
}
print "<td class=\"right\">".price(price2num($pv, 'MT'))."</td>\n";
print "<td class=\"right\">".price(price2num($pa, 'MT'))."</td>\n";
print "<td class=\"right\">".price(price2num($marge, 'MT'))."</td>\n";
print "<td class=\"center\">".$qty."</td>\n";
print "<td class=\"nowrap right\">".price(price2num($pv, 'MT'))."</td>\n";
print "<td class=\"nowrap right\">".price(price2num($pa, 'MT'))."</td>\n";
print "<td class=\"nowrap right\">".price(price2num($marge, 'MT'))."</td>\n";
if (!empty($conf->global->DISPLAY_MARGIN_RATES))
print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."</td>\n";
if (!empty($conf->global->DISPLAY_MARK_RATES))
@ -307,6 +313,7 @@ if ($result)
$i++;
$cumul_achat += $objp->buying_price;
$cumul_vente += $objp->selling_price;
$cumul_qty += $objp->product_qty;
}
}
@ -322,9 +329,10 @@ if ($result)
print '<td colspan=2>';
else print '<td>';
print $langs->trans('TotalMargin')."</td>";
print "<td class=\"right\">".price(price2num($cumul_vente, 'MT'))."</td>\n";
print "<td class=\"right\">".price(price2num($cumul_achat, 'MT'))."</td>\n";
print "<td class=\"right\">".price(price2num($totalMargin, 'MT'))."</td>\n";
print "<td class=\"center\">".$cumul_qty."</td>";
print "<td class=\"nowrap right\">".price(price2num($cumul_vente, 'MT'))."</td>\n";
print "<td class=\"nowrap right\">".price(price2num($cumul_achat, 'MT'))."</td>\n";
print "<td class=\"nowrap right\">".price(price2num($totalMargin, 'MT'))."</td>\n";
if (!empty($conf->global->DISPLAY_MARGIN_RATES))
print "<td class=\"right\">".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."</td>\n";
if (!empty($conf->global->DISPLAY_MARK_RATES))

View File

@ -47,10 +47,10 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
public $emetteur;
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
*/
public $phpmin = array(5, 5);
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 6);
/**
* @var string Dolibarr version of the loaded document

View File

@ -70,9 +70,9 @@ class pdf_standard_myobject extends ModelePDFMyObject
/**
* @var array Minimum version of PHP required by module.
* e.g.: PHP 5.5 = array(5, 5)
* e.g.: PHP 5.6 = array(5, 6)
*/
public $phpmin = array(5, 5);
public $phpmin = array(5, 6);
/**
* Dolibarr version of the loaded document

View File

@ -866,7 +866,7 @@ class Products extends DolibarrApi
$product_fourn_list = $product_fourn->list_product_fournisseur_price($this->product->id, '', '', 0, 0);
}
foreach($product_fourn_list as $tmpobj) {
foreach ($product_fourn_list as $tmpobj) {
$this->_cleanObjectDatas($tmpobj);
}

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2013-2018 Laurent Destaileur <ely@users.sourceforge.net>
/* Copyright (C) 2013-2020 Laurent Destaileur <ely@users.sourceforge.net>
* Copyright (C) 2014 Regis Houssin <regis.houssin@inodbox.com>
*
* This program is free software: you can redistribute it and/or modify
@ -122,7 +122,7 @@ if ($action == 'addline')
}
// TODO Check qty is ok for stock move. Note qty may not be enough yet, but we make a check now to report a warning.
// What is important is to have qty when doing action 'createmovements'
// What is more important is to have qty when doing action 'createmovements'
if (!$error)
{
// Warning, don't forget lines already added into the $_SESSION['massstockmove']
@ -139,9 +139,10 @@ if ($action == 'addline')
$listofdata[$id] = array('id'=>$id, 'id_product'=>$id_product, 'qty'=>$qty, 'id_sw'=>$id_sw, 'id_tw'=>$id_tw, 'batch'=>$batch);
$_SESSION['massstockmove'] = json_encode($listofdata);
unset($id_product);
//unset($id_sw);
//unset($id_tw);
unset($id_product);
unset($batch);
unset($qty);
}
}
@ -338,18 +339,26 @@ print '<table class="liste centpercent">';
$param = '';
print '<tr class="liste_titre">';
print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
if ($conf->productbatch->enabled) {
print getTitleFieldOfList($langs->trans('Batch'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
}
print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone ');
print getTitleFieldOfList($langs->trans('Qty'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'center tagtd maxwidthonsmartphone ');
print getTitleFieldOfList('', 0);
print '</tr>';
print '<tr class="oddeven">';
// From warehouse
print '<td>';
print $formproduct->selectWarehouses($id_sw, 'id_sw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200');
print '</td>';
// To warehouse
print '<td>';
print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200');
print '</td>';
// Product
print '<td class="titlefield">';
$filtertype = 0;
@ -360,7 +369,7 @@ if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) {
$limit = $conf->global->PRODUIT_LIMIT_SIZE;
}
$form->select_produits($id_product, 'productid', $filtertype, $limit, 0, -1, 2, '', 0, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1);
$form->select_produits($id_product, 'productid', $filtertype, $limit, 0, -1, 2, '', 1, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1);
print '</td>';
// Batch number
if ($conf->productbatch->enabled)
@ -369,14 +378,6 @@ if ($conf->productbatch->enabled)
print '<input type="text" name="batch" class="flat maxwidth50" value="'.$batch.'">';
print '</td>';
}
// In warehouse
print '<td>';
print $formproduct->selectWarehouses($id_sw, 'id_sw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200');
print '</td>';
// Out warehouse
print '<td>';
print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200');
print '</td>';
// Qty
print '<td class="center"><input type="text" class="flat maxwidth50" name="qty" value="'.$qty.'"></td>';
// Button to add line
@ -393,6 +394,12 @@ foreach ($listofdata as $key => $val)
print '<tr class="oddeven">';
print '<td>';
print $warehousestatics->getNomUrl(1);
print '</td>';
print '<td>';
print $warehousestatict->getNomUrl(1);
print '</td>';
print '<td>';
print $productstatic->getNomUrl(1).' - '.$productstatic->label;
print '</td>';
if ($conf->productbatch->enabled)
@ -401,12 +408,6 @@ foreach ($listofdata as $key => $val)
print $val['batch'];
print '</td>';
}
print '<td>';
print $warehousestatics->getNomUrl(1);
print '</td>';
print '<td>';
print $warehousestatict->getNomUrl(1);
print '</td>';
print '<td class="center">'.$val['qty'].'</td>';
print '<td class="right"><a href="'.$_SERVER["PHP_SELF"].'?action=delline&idline='.$val['id'].'">'.img_delete($langs->trans("Remove")).'</a></td>';

View File

@ -323,7 +323,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<tr><td class="titlefield">'.$langs->trans("Product").'</td><td>';
$producttmp = new Product($db);
$producttmp->fetch($object->fk_product);
print $producttmp->getNomUrl(1, 'stock');
print $producttmp->getNomUrl(1, 'stock'). " - " . $producttmp->label;
print '</td></tr>';
// Eat by

View File

@ -139,6 +139,8 @@ $fieldstosearchall = array(
's.code_fournisseur'=>"SupplierCode",
's.code_compta'=>"CustomerAccountancyCodeShort",
's.code_compta_fournisseur'=>"SupplierAccountancyCodeShort",
's.zip'=>"Zip",
's.town'=>"Town",
's.email'=>"EMail",
's.url'=>"URL",
's.tva_intra'=>"VATIntra",

View File

@ -22,10 +22,13 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
border: 1px solid #e9e9e9;
margin-bottom: 15px;
}
.info-box.info-box-sm{
.info-box.info-box-sm {
min-height: 80px;
margin-bottom: 10px;
}
.opened-dash-board-wrap .info-box.info-box-sm {
border-radius: 0 0 0 20px;
}
.info-box-more {
float: right;
top: 5px;
@ -82,6 +85,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
font-size: 25px;
line-height: 92px;
}
.opened-dash-board-wrap .info-box-sm .info-box-icon {
border-radius: 0 20px 0 20px;
}
.opened-dash-board-wrap .info-box-sm .info-box-icon {
line-height: 80px;
}