Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/product/class/product.class.php
This commit is contained in:
commit
08d8670bb3
@ -544,14 +544,16 @@ if (empty($action) || $action == "view")
|
||||
print $object->posmodule;
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td valign="middle">'.$langs->trans("CashDesk").' ID</td><td>';
|
||||
print '<tr><td valign="middle">'.$langs->trans("Terminal").'</td><td>';
|
||||
print $object->posnumber;
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="nowrap">';
|
||||
print $langs->trans("Period");
|
||||
print '</td><td>';
|
||||
print $object->year_close."-".$object->month_close."-".$object->day_close;
|
||||
print $object->year_close;
|
||||
print ($object->month_close ? "-" : "").$object->month_close;
|
||||
print ($object->day_close ? "-" : "").$object->day_close;
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@ -570,7 +572,6 @@ if (empty($action) || $action == "view")
|
||||
print '<tr><td valign="middle">'.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").'</td><td>';
|
||||
print price($object->opening, 0, $langs, 1, -1, -1, $conf->currency);
|
||||
print "</td></tr>";
|
||||
|
||||
foreach ($arrayofpaymentmode as $key => $val)
|
||||
{
|
||||
print '<tr><td valign="middle">'.$langs->trans($val).'</td><td>';
|
||||
|
||||
@ -59,7 +59,7 @@ class CashControl extends CommonObject
|
||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>15),
|
||||
'ref' =>array('type'=>'varchar(64)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>18),
|
||||
'posmodule' =>array('type'=>'varchar(30)', 'label'=>'Module', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>19),
|
||||
'posnumber' =>array('type'=>'varchar(30)', 'label'=>'CashDesk', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>20),
|
||||
'posnumber' =>array('type'=>'varchar(30)', 'label'=>'Terminal', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>20, 'css'=>'center'),
|
||||
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>0, 'position'=>24),
|
||||
'opening' =>array('type'=>'price', 'label'=>'Opening', 'enabled'=>1, 'visible'=>1, 'position'=>25),
|
||||
'cash' =>array('type'=>'price', 'label'=>'Cash', 'enabled'=>1, 'visible'=>1, 'position'=>30),
|
||||
|
||||
@ -33,11 +33,13 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php';
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
|
||||
$_GET['optioncss']="print";
|
||||
include_once 'class/cashcontrol.class.php';
|
||||
$cashcontrol= new CashControl($db);
|
||||
$cashcontrol->fetch($id);
|
||||
|
||||
@ -50,7 +52,8 @@ $arrayfields=array(
|
||||
'b.dateo'=>array('label'=>$langs->trans("DateOperationShort"), 'checked'=>1),
|
||||
'b.num_chq'=>array('label'=>$langs->trans("Number"), 'checked'=>1),
|
||||
'ba.ref'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>1),
|
||||
'b.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1, 'position'=>600),
|
||||
'cp.code'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1),
|
||||
'b.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1, 'position'=>600),
|
||||
'b.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1, 'position'=>605),
|
||||
);
|
||||
|
||||
@ -128,7 +131,6 @@ if ($resql)
|
||||
|
||||
$invoicetmp = new Facture($db);
|
||||
|
||||
|
||||
print "<div style='text-align: right'><h2>";
|
||||
print $langs->trans("InitialBankBalance").' - '.$langs->trans("Cash")." : ".price($cashcontrol->opening);
|
||||
print "</h2></div>";
|
||||
@ -136,13 +138,16 @@ if ($resql)
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste">'."\n";
|
||||
|
||||
$param = '';
|
||||
|
||||
// Fields title
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($arrayfields['b.rowid']['label'], $_SERVER['PHP_SELF'], 'b.rowid', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, 'class="left"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, '"', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre($arrayfields['cp.code']['label'], $_SERVER['PHP_SELF'], 'cp.code', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
print "</tr>\n";
|
||||
|
||||
$posconciliatecol = 0;
|
||||
@ -151,7 +156,9 @@ if ($resql)
|
||||
$sign = 1;
|
||||
$cash=$bank=$cheque=$other=0;
|
||||
|
||||
$totalarray=array();
|
||||
$totalarray = array();
|
||||
$cachebankaccount = array();
|
||||
$amountpertype = array();
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
@ -168,7 +175,9 @@ if ($resql)
|
||||
$bankaccount = $cachebankaccount[$objp->bankid];
|
||||
}
|
||||
|
||||
/*if ($first == "yes")
|
||||
$invoicetmp->fetch($objp->facid);
|
||||
|
||||
/*if ($first == "yes")
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").'</td>';
|
||||
@ -181,12 +190,10 @@ if ($resql)
|
||||
|
||||
// Ref
|
||||
print '<td class="nowrap left">';
|
||||
$invoicetmp->fetch($objp->facid);
|
||||
print $invoicetmp->getNomUrl(1);
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
|
||||
// Date ope
|
||||
print '<td class="nowrap left">';
|
||||
print '<span id="dateoperation_'.$objp->rowid.'">'.dol_print_date($db->jdate($objp->do), "day")."</span>";
|
||||
@ -197,26 +204,38 @@ if ($resql)
|
||||
print '<td class="nowrap right">';
|
||||
print $bankaccount->getNomUrl(1);
|
||||
if ($cashcontrol->posmodule=="takepos"){
|
||||
if ($conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$cashcontrol->posnumber}==$bankaccount->id) $cash+=$objp->amount;
|
||||
elseif ($conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$cashcontrol->posnumber}==$bankaccount->id) $bank+=$objp->amount;
|
||||
elseif ($conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$cashcontrol->posnumber}==$bankaccount->id) $cheque+=$objp->amount;
|
||||
else $other+=$objp->amount;
|
||||
$var1 = 'CASHDESK_ID_BANKACCOUNT_CASH'.$cashcontrol->posnumber;
|
||||
}
|
||||
else{
|
||||
if ($conf->global->CASHDESK_ID_BANKACCOUNT_CASH==$bankaccount->id) $cash+=$objp->amount;
|
||||
elseif ($conf->global->CASHDESK_ID_BANKACCOUNT_CB==$bankaccount->id) $bank+=$objp->amount;
|
||||
elseif ($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE==$bankaccount->id) $cheque+=$objp->amount;
|
||||
else $other+=$objp->amount;
|
||||
$var1 = 'CASHDESK_ID_BANKACCOUNT_CASH';
|
||||
}
|
||||
if ($objp->code == 'CHQ') {
|
||||
$cheque += $objp->amount;
|
||||
} elseif ($objp->code == 'CB') {
|
||||
$bank += $objp->amount;
|
||||
} else {
|
||||
if ($conf->global->$var1 == $bankaccount->id) $cash += $objp->amount;
|
||||
//elseif ($conf->global->$var2 == $bankaccount->id) $bank+=$objp->amount;
|
||||
//elseif ($conf->global->$var3 == $bankaccount->id) $cheque+=$objp->amount;
|
||||
else $other += $objp->amount;
|
||||
}
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
// Debit
|
||||
// Type
|
||||
print '<td class="right">';
|
||||
print $objp->code;
|
||||
if (empty($amountpertype[$objp->code])) $amountpertype[$objp->code] = 0;
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
// Debit
|
||||
print '<td class="right">';
|
||||
if ($objp->amount < 0)
|
||||
{
|
||||
print price($objp->amount * -1);
|
||||
$totalarray['val']['totaldebfield'] += $objp->amount;
|
||||
$amountpertype[$objp->code] += $objp->amount;
|
||||
}
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -228,6 +247,7 @@ if ($resql)
|
||||
{
|
||||
print price($objp->amount);
|
||||
$totalarray['val']['totalcredfield'] += $objp->amount;
|
||||
$amountpertype[$objp->code] -= $objp->amount;
|
||||
}
|
||||
print "</td>\n";
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
@ -243,12 +263,34 @@ if ($resql)
|
||||
|
||||
print "</table>";
|
||||
|
||||
$cash=$cash+$cashcontrol->opening;
|
||||
//$cash = $amountpertype['LIQ'] + $cashcontrol->opening;
|
||||
$cash = $cash + $cashcontrol->opening;
|
||||
|
||||
print "<div style='text-align: right'><h2>";
|
||||
print $langs->trans("Cash").": ".price($cash)."<br><br>";
|
||||
print $langs->trans("PaymentTypeCB").": ".price($bank)."<br><br>";
|
||||
print $langs->trans("PaymentTypeCHQ").": ".price($cheque)."<br><br>";
|
||||
if ($other) print $langs->trans("Other").": ".price($other)."<br><br>";
|
||||
print $langs->trans("Cash").": ".price($cash);
|
||||
if ($cash != $cashcontrol->cash) {
|
||||
print ' <> <span class="amountremaintopay">'.$langs->trans("Declared").': '.price($cashcontrol->cash).'</span>';
|
||||
}
|
||||
print "<br><br>";
|
||||
|
||||
//print '<br>';
|
||||
print $langs->trans("PaymentTypeCHQ").": ".price($cheque);
|
||||
if ($cheque != $cashcontrol->cheque) {
|
||||
print ' <> <span class="amountremaintopay">'.$langs->trans("Declared").': '.price($cashcontrol->cheque).'</span>';
|
||||
}
|
||||
print "<br><br>";
|
||||
|
||||
//print '<br>';
|
||||
print $langs->trans("PaymentTypeCB").": ".price($bank);
|
||||
if ($bank != $cashcontrol->card) {
|
||||
print ' <> <span class="amountremaintopay">'.$langs->trans("Declared").': '.price($cashcontrol->card).'</span>';
|
||||
}
|
||||
print "<br><br>";
|
||||
|
||||
// print '<br>';
|
||||
if ($other) {
|
||||
print '<br>'.$langs->trans("Other").": ".price($other)."<br><br>";
|
||||
}
|
||||
print "</h2></div>";
|
||||
|
||||
//save totals to DB
|
||||
|
||||
@ -1712,8 +1712,8 @@ class FormFile
|
||||
if (count($filearray) == 0)
|
||||
{
|
||||
print '<tr class="oddeven"><td colspan="5">';
|
||||
if (empty($textifempty)) print $langs->trans("NoFileFound");
|
||||
else print $textifempty;
|
||||
if (empty($textifempty)) print '<span class="opacitymedium">'.$langs->trans("NoFileFound").'</span>';
|
||||
else print '<span class="opacitymedium">'.$textifempty.'</span>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
@ -1140,7 +1140,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab
|
||||
{
|
||||
$limittitle = 30;
|
||||
$out .= '<a class="tabTitle">';
|
||||
if ($picto) $out .= img_picto($title, ($pictoisfullpath ? '' : 'object_').$picto, '', $pictoisfullpath).' ';
|
||||
if ($picto) $out .= img_picto($title, ($pictoisfullpath ? '' : 'object_').$picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle').' ';
|
||||
$out .= '<span class="tabTitleText">'.dol_trunc($title, $limittitle).'</span>';
|
||||
$out .= '</a>';
|
||||
}
|
||||
|
||||
@ -283,7 +283,7 @@ if (! function_exists('dol_loginfunction'))
|
||||
// Set jquery theme
|
||||
$dol_loginmesg = (! empty($_SESSION["dol_loginmesg"])?$_SESSION["dol_loginmesg"]:'');
|
||||
|
||||
$favicon = DOL_URL_ROOT.'/theme/common/dolibarr_logo_256x256.png';
|
||||
$favicon = DOL_URL_ROOT.'/theme/dolibarr_logo_256x256.png';
|
||||
if (! empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini);
|
||||
if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL;
|
||||
|
||||
|
||||
@ -64,3 +64,5 @@ ConfirmProductionDesc=By clicking on '%s', you will validate the consumption and
|
||||
ProductionForRef=Production of %s
|
||||
AutoCloseMO=Close automatically the Manufacturing Order if quantities to consume and to produce are reached
|
||||
NoStockChangeOnServices=No stock change on services
|
||||
ProductQtyToConsumeByMO=Product quantity still to consume by open MO
|
||||
ProductQtyToProduceByMO=Product quentity still to produce by open MO
|
||||
|
||||
@ -24,7 +24,7 @@ MessageOK=Message on the return page for a validated payment
|
||||
MessageKO=Message on the return page for a canceled payment
|
||||
ContentOfDirectoryIsNotEmpty=Content of this directory is not empty.
|
||||
DeleteAlsoContentRecursively=Check to delete all content recursively
|
||||
|
||||
PoweredBy=Powered by
|
||||
YearOfInvoice=Year of invoice date
|
||||
PreviousYearOfInvoice=Previous year of invoice date
|
||||
NextYearOfInvoice=Following year of invoice date
|
||||
|
||||
@ -1224,7 +1224,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
||||
print '<meta name="author" content="Dolibarr Development Team">'."\n";
|
||||
|
||||
// Favicon
|
||||
$favicon = DOL_URL_ROOT.'/theme/common/dolibarr_logo_256x256.png';
|
||||
$favicon = DOL_URL_ROOT.'/theme/dolibarr_logo_256x256.png';
|
||||
if (!empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini);
|
||||
if (!empty($conf->global->MAIN_FAVICON_URL)) $favicon = $conf->global->MAIN_FAVICON_URL;
|
||||
if (empty($conf->dol_use_jmobile)) print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n"; // Not required into an Android webview
|
||||
|
||||
@ -318,6 +318,9 @@ class Product extends CommonObject
|
||||
public $stats_contrat = array();
|
||||
public $stats_facture = array();
|
||||
public $stats_commande_fournisseur = array();
|
||||
public $stats_reception = array();
|
||||
public $stats_mrptoconsume = array();
|
||||
public $stats_mrptoproduce = array();
|
||||
|
||||
public $multilangs = array();
|
||||
|
||||
@ -2806,6 +2809,93 @@ class Product extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Charge tableau des stats commande client pour le produit/service
|
||||
*
|
||||
* @param int $socid Id societe pour filtrer sur une societe
|
||||
* @param string $filtrestatut Id statut pour filtrer sur un statut
|
||||
* @param int $forVirtualStock Ignore rights filter for virtual stock calculation.
|
||||
* @return integer Array of stats in $this->stats_commande (nb=nb of order, qty=qty ordered), <0 if ko or >0 if ok
|
||||
*/
|
||||
public function load_stats_inproduction($socid = 0, $filtrestatut = '', $forVirtualStock = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $user;
|
||||
|
||||
$sql = "SELECT COUNT(DISTINCT m.fk_soc) as nb_customers, COUNT(DISTINCT m.rowid) as nb,";
|
||||
$sql .= " COUNT(mp.rowid) as nb_rows, SUM(mp.qty) as qty, role";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."mrp_production as mp";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."mrp_mo as m";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = m.fk_soc";
|
||||
if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
}
|
||||
$sql .= " WHERE m.rowid = mp.fk_mo";
|
||||
$sql .= " AND m.entity IN (".getEntity('mrp').")";
|
||||
$sql .= " AND mp.fk_product = ".$this->id;
|
||||
if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) {
|
||||
$sql .= " AND m.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
}
|
||||
if ($socid > 0) {
|
||||
$sql .= " AND m.fk_soc = ".$socid;
|
||||
}
|
||||
if ($filtrestatut <> '') {
|
||||
$sql .= " AND m.status in (".$filtrestatut.")";
|
||||
}
|
||||
$sql .= " GROUP BY role";
|
||||
|
||||
$this->stats_mrptoconsume['customers'] = 0;
|
||||
$this->stats_mrptoconsume['nb'] = 0;
|
||||
$this->stats_mrptoconsume['rows'] = 0;
|
||||
$this->stats_mrptoconsume['qty'] = 0;
|
||||
$this->stats_mrptoproduce['customers'] = 0;
|
||||
$this->stats_mrptoproduce['nb'] = 0;
|
||||
$this->stats_mrptoproduce['rows'] = 0;
|
||||
$this->stats_mrptoproduce['qty'] = 0;
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
while ($obj = $this->db->fetch_object($result)) {
|
||||
if ($obj->role == 'toconsume') {
|
||||
$this->stats_mrptoconsume['customers'] += $obj->nb_customers;
|
||||
$this->stats_mrptoconsume['nb'] += $obj->nb;
|
||||
$this->stats_mrptoconsume['rows'] += $obj->nb_rows;
|
||||
$this->stats_mrptoconsume['qty'] += ($obj->qty ? $obj->qty : 0);
|
||||
}
|
||||
if ($obj->role == 'consumed') {
|
||||
//$this->stats_mrptoconsume['customers'] += $obj->nb_customers;
|
||||
//$this->stats_mrptoconsume['nb'] += $obj->nb;
|
||||
//$this->stats_mrptoconsume['rows'] += $obj->nb_rows;
|
||||
$this->stats_mrptoconsume['qty'] -= ($obj->qty ? $obj->qty : 0);
|
||||
}
|
||||
if ($obj->role == 'toproduce') {
|
||||
$this->stats_mrptoproduce['customers'] += $obj->nb_customers;
|
||||
$this->stats_mrptoproduce['nb'] += $obj->nb;
|
||||
$this->stats_mrptoproduce['rows'] += $obj->nb_rows;
|
||||
$this->stats_mrptoproduce['qty'] += ($obj->qty ? $obj->qty : 0);
|
||||
}
|
||||
if ($obj->role == 'produced') {
|
||||
//$this->stats_mrptoproduce['customers'] += $obj->nb_customers;
|
||||
//$this->stats_mrptoproduce['nb'] += $obj->nb;
|
||||
//$this->stats_mrptoproduce['rows'] += $obj->nb_rows;
|
||||
$this->stats_mrptoproduce['qty'] -= ($obj->qty ? $obj->qty : 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Clean data
|
||||
if ($this->stats_mrptoconsume['qty'] < 0) $this->stats_mrptoconsume['qty'] = 0;
|
||||
if ($this->stats_mrptoproduce['qty'] < 0) $this->stats_mrptoproduce['qty'] = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error = $this->db->error();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Charge tableau des stats contrat pour le produit/service
|
||||
@ -4717,8 +4807,9 @@ class Product extends CommonObject
|
||||
}
|
||||
if (!empty($conf->mrp->enabled))
|
||||
{
|
||||
// TODO
|
||||
$stock_inproduction = 0;
|
||||
$result = $this->load_stats_inproduction(0, '1,2', 1);
|
||||
if ($result < 0) dol_print_error($this->db, $this->error);
|
||||
$stock_inproduction = $this->stats_mrptoproduce['qty'] - $this->stats_mrptoconsume['qty'];
|
||||
}
|
||||
|
||||
$this->stock_theorique = $this->stock_reel + $stock_inproduction;
|
||||
|
||||
@ -689,6 +689,14 @@ if ($id > 0 || $ref)
|
||||
$helpondiff .= $langs->trans("ProductQtyInSuppliersShipmentAlreadyRecevied").': '.$object->stats_reception['qty'];
|
||||
}
|
||||
|
||||
// Number of product in production
|
||||
if (!empty($conf->mrp->enabled)) {
|
||||
if ($found) $helpondiff .= '<br>'; else $found = 1;
|
||||
$helpondiff .= $langs->trans("ProductQtyToConsumeByMO").': '.$object->stats_mrptoconsume['qty'].'<br>';
|
||||
$helpondiff .= $langs->trans("ProductQtyToProduceByMO").': '.$object->stats_mrptoproduce['qty'];
|
||||
}
|
||||
|
||||
|
||||
// Calculating a theorical value
|
||||
print '<tr><td>';
|
||||
print $form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc"));
|
||||
|
||||
@ -717,7 +717,8 @@ if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) $head = '<link rel="styleshee
|
||||
$conf->dol_hide_topmenu = 1;
|
||||
$conf->dol_hide_leftmenu = 1;
|
||||
|
||||
llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody');
|
||||
$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
|
||||
llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea);
|
||||
|
||||
// Check link validity
|
||||
if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', '')))
|
||||
@ -753,27 +754,7 @@ print '<input type="hidden" name="securekey" value="'.dol_escape_htmltag($SECURE
|
||||
print '<input type="hidden" name="e" value="'.$entity.'" />';
|
||||
print '<input type="hidden" name="forcesandbox" value="'.GETPOST('forcesandbox', 'int').'" />';
|
||||
print "\n";
|
||||
print '<!-- Form to send a payment -->'."\n";
|
||||
print '<!-- creditor = '.$creditor.' -->'."\n";
|
||||
// Additionnal information for each payment system
|
||||
if (!empty($conf->paypal->enabled))
|
||||
{
|
||||
print '<!-- PAYPAL_API_SANDBOX = '.$conf->global->PAYPAL_API_SANDBOX.' -->'."\n";
|
||||
print '<!-- PAYPAL_API_INTEGRAL_OR_PAYPALONLY = '.$conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY.' -->'."\n";
|
||||
}
|
||||
if (!empty($conf->paybox->enabled))
|
||||
{
|
||||
print '<!-- PAYBOX_CGI_URL = '.$conf->global->PAYBOX_CGI_URL_V2.' -->'."\n";
|
||||
}
|
||||
if (!empty($conf->stripe->enabled))
|
||||
{
|
||||
print '<!-- STRIPE_LIVE = '.$conf->global->STRIPE_LIVE.' -->'."\n";
|
||||
}
|
||||
print '<!-- urlok = '.$urlok.' -->'."\n";
|
||||
print '<!-- urlko = '.$urlko.' -->'."\n";
|
||||
print "\n";
|
||||
|
||||
print '<table id="dolpaymenttable" summary="Payment form" class="center">'."\n";
|
||||
|
||||
// Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo)
|
||||
$width = 0;
|
||||
@ -803,13 +784,43 @@ elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$log
|
||||
// Output html code for logo
|
||||
if ($urllogo)
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td align="center"><img id="dolpaymentlogo" title="'.$title.'" src="'.$urllogo.'"';
|
||||
print '<div class="backgreypublicpayment">';
|
||||
print '<div class="logopublicpayment">';
|
||||
print '<img id="dolpaymentlogo" src="'.$urllogo.'"';
|
||||
if ($width) print ' width="'.$width.'"';
|
||||
print '></td>';
|
||||
print '</tr>'."\n";
|
||||
print '>';
|
||||
print '</div>';
|
||||
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
|
||||
print '<div class="poweredbypublicpayment opacitymedium right"><a href="https://www.dolibarr.org" target="dolibarr">'.$langs->trans("PoweredBy").'<br><img src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" width="80px"></a></div>';
|
||||
}
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
print '<!-- Form to send a payment -->'."\n";
|
||||
print '<!-- creditor = '.$creditor.' -->'."\n";
|
||||
// Additionnal information for each payment system
|
||||
if (!empty($conf->paypal->enabled))
|
||||
{
|
||||
print '<!-- PAYPAL_API_SANDBOX = '.$conf->global->PAYPAL_API_SANDBOX.' -->'."\n";
|
||||
print '<!-- PAYPAL_API_INTEGRAL_OR_PAYPALONLY = '.$conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY.' -->'."\n";
|
||||
}
|
||||
if (!empty($conf->paybox->enabled))
|
||||
{
|
||||
print '<!-- PAYBOX_CGI_URL = '.$conf->global->PAYBOX_CGI_URL_V2.' -->'."\n";
|
||||
}
|
||||
if (!empty($conf->stripe->enabled))
|
||||
{
|
||||
print '<!-- STRIPE_LIVE = '.$conf->global->STRIPE_LIVE.' -->'."\n";
|
||||
}
|
||||
print '<!-- urlok = '.$urlok.' -->'."\n";
|
||||
print '<!-- urlko = '.$urlko.' -->'."\n";
|
||||
print "\n";
|
||||
|
||||
print '<table id="dolpaymenttable" summary="Payment form" class="center">'."\n";
|
||||
|
||||
// Output introduction text
|
||||
$text = '';
|
||||
if (!empty($conf->global->PAYMENT_NEWFORM_TEXT))
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 791 B |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
htdocs/theme/dolibarr_logo_bw.png
Normal file
BIN
htdocs/theme/dolibarr_logo_bw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 646 B |
@ -100,7 +100,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
||||
}
|
||||
|
||||
.side-nav-vert .user-menu .dropdown-menu > .user-header {
|
||||
min-height: 175px;
|
||||
min-height: 100px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
white-space: normal;
|
||||
|
||||
@ -2462,6 +2462,9 @@ a.tabTitle {
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.imgTabTitle {
|
||||
max-height: 14px;
|
||||
}
|
||||
|
||||
a.tabunactive {
|
||||
color: rgb(<?php print $colortextlink; ?>) !important;
|
||||
@ -3663,6 +3666,18 @@ table.table-fiche-title {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
|
||||
div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bottom: 1px solid #ddd; }
|
||||
.backgreypublicpayment a { color: #222 !important; }
|
||||
.poweredbypublicpayment {
|
||||
float: right;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
position: absolute;
|
||||
font-size: 0.8em;
|
||||
color: #222;
|
||||
opacity: 0.3;
|
||||
}
|
||||
#dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */
|
||||
#tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; }
|
||||
#tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; }
|
||||
|
||||
@ -153,7 +153,7 @@ a.info-box-text{ text-decoration: none;}
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
$prefix='';
|
||||
$prefix = 'background-';
|
||||
//$prefix = 'background-';
|
||||
if (! empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-';
|
||||
|
||||
if (! isset($conf->global->THEME_AGRESSIVENESS_RATIO) && $prefix) $conf->global->THEME_AGRESSIVENESS_RATIO=-50;
|
||||
|
||||
@ -46,7 +46,7 @@ if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_AP
|
||||
"name": "<?php echo $appli; ?>",
|
||||
"icons": [
|
||||
{
|
||||
"src": "<?php echo DOL_URL_ROOT.'/theme/common/dolibarr_logo_256x256.png'; ?>",
|
||||
"src": "<?php echo DOL_URL_ROOT.'/theme/dolibarr_logo_256x256.png'; ?>",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ $theme_bgcolor = array(hexdec('F4'), hexdec('F4'), hexdec('F4'));
|
||||
$theme_bgcoloronglet = array(hexdec('DE'), hexdec('E7'), hexdec('EC'));
|
||||
|
||||
// Colors
|
||||
$colorbackhmenu1 = '60,70,100'; // topmenu
|
||||
$colorbackhmenu1 = '68,68,90'; // topmenu
|
||||
$colorbackvmenu1 = '250,250,250'; // vmenu
|
||||
$colortopbordertitle1 = '200,200,200'; // top border of title
|
||||
$colorbacktitle1 = '233,234,237'; // title of tables,list
|
||||
|
||||
@ -98,7 +98,7 @@ a.info-box-text{ text-decoration: none;}
|
||||
|
||||
|
||||
|
||||
/* ICONS */
|
||||
/* ICONS INFO BOX */
|
||||
.info-box-icon {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
@ -2637,8 +2637,6 @@ div.popuptab {
|
||||
}
|
||||
|
||||
a.tabTitle {
|
||||
/* background: #657090;
|
||||
color: white;*/
|
||||
color:rgba(0,0,0,.5);
|
||||
margin-<?php print $right; ?>: 10px;
|
||||
text-shadow:1px 1px 1px #ffffff;
|
||||
@ -2649,6 +2647,9 @@ a.tabTitle {
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.imgTabTitle {
|
||||
max-height: 14px;
|
||||
}
|
||||
|
||||
a.tab:link, a.tab:visited, a.tab:hover, a.tab#active {
|
||||
font-family: <?php print $fontlist ?>;
|
||||
@ -3780,6 +3781,20 @@ table.table-fiche-title .col-title div.titre{
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bottom: 1px solid #ddd; }
|
||||
.backgreypublicpayment a { color: #222 !important; }
|
||||
.poweredbypublicpayment {
|
||||
float: right;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
position: absolute;
|
||||
font-size: 0.8em;
|
||||
color: #222;
|
||||
opacity: 0.3;
|
||||
}
|
||||
span.buttonpaymentsmall {
|
||||
text-shadow: none;
|
||||
}
|
||||
#dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */
|
||||
#tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; }
|
||||
#tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user