Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 5.0
This commit is contained in:
commit
366df59658
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2013-2017 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
@ -121,7 +121,7 @@ dol_fiche_head($head, 'journal', $langs->trans("Configuration"), 0, 'cron');
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">' . $langs->trans('Journaux') . '</td>';
|
print '<td colspan="2">' . $langs->trans('Journaux') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
foreach ( $list as $key ) {
|
foreach ( $list as $key ) {
|
||||||
@ -145,11 +145,11 @@ print '<br>';
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">' . $langs->trans('JournalFinancial') . ' ('.$langs->trans('Opened').')</td>';
|
print '<td colspan="2">' . $langs->trans('JournalFinancial') . ' ('.$langs->trans('Opened').')</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Bank account
|
// Bank account
|
||||||
$sql = "SELECT rowid, label, number, accountancy_journal";
|
$sql = "SELECT rowid, ref, label, number, account_number, accountancy_journal";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "bank_account";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "bank_account";
|
||||||
$sql .= " WHERE entity = " . $conf->entity;
|
$sql .= " WHERE entity = " . $conf->entity;
|
||||||
$sql .= " AND clos = 0";
|
$sql .= " AND clos = 0";
|
||||||
@ -169,9 +169,12 @@ if ($resql) {
|
|||||||
|
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
|
|
||||||
|
$bankaccountstatic->rowid = $objp->rowid;
|
||||||
$bankaccountstatic->id = $objp->rowid;
|
$bankaccountstatic->id = $objp->rowid;
|
||||||
|
$bankaccountstatic->ref = $objp->ref;
|
||||||
$bankaccountstatic->label = $objp->label;
|
$bankaccountstatic->label = $objp->label;
|
||||||
$bankaccountstatic->number = $objp->number;
|
$bankaccountstatic->number = $objp->number;
|
||||||
|
$bankaccountstatic->account_number = $objp->account_number;
|
||||||
$bankaccountstatic->accountancy_journal = $objp->accountancy_journal;
|
$bankaccountstatic->accountancy_journal = $objp->accountancy_journal;
|
||||||
|
|
||||||
print '<tr ' . $bc[$var] . ' class="value">';
|
print '<tr ' . $bc[$var] . ' class="value">';
|
||||||
|
|||||||
@ -70,7 +70,8 @@ class ProductFournisseur extends Product
|
|||||||
var $fourn_unitcharges; // old version used a buggy system to calculate margin of a charge field on supplier price. Now margin is on pmp, best supplier price or cost price.
|
var $fourn_unitcharges; // old version used a buggy system to calculate margin of a charge field on supplier price. Now margin is on pmp, best supplier price or cost price.
|
||||||
|
|
||||||
var $fk_supplier_price_expression;
|
var $fk_supplier_price_expression;
|
||||||
|
var $supplier_reputation; // reputation of supplier
|
||||||
|
var $reputations=array(); // list of available supplier reputations
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -79,7 +80,11 @@ class ProductFournisseur extends Product
|
|||||||
*/
|
*/
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
|
global $langs;
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
$langs->load("suppliers");
|
||||||
|
$this->reputations= array('-1'=>'', 'FAVORITE'=>$langs->trans('Favorite'),'NOTTHGOOD'=>$langs->trans('NotTheGoodQualitySupplier'), 'DONOTORDER'=>$langs->trans('DoNotOrderThisProductToThisSupplier'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -77,8 +77,6 @@ if ($id > 0 || $ref)
|
|||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
|
|
||||||
$reputations=array('-1'=>'', 'FAVORITE'=>$langs->trans('Favorite'),'NOTTHGOOD'=>$langs->trans('NotTheGoodQualitySupplier'), 'DONOTORDER'=>$langs->trans('DoNotOrderThisProductToThisSupplier'));
|
|
||||||
|
|
||||||
if (! $sortfield) $sortfield="s.nom";
|
if (! $sortfield) $sortfield="s.nom";
|
||||||
if (! $sortorder) $sortorder="ASC";
|
if (! $sortorder) $sortorder="ASC";
|
||||||
|
|
||||||
@ -527,7 +525,7 @@ if ($id > 0 || $ref)
|
|||||||
|
|
||||||
// Reputation
|
// Reputation
|
||||||
print '<tr><td>'.$langs->trans("SupplierReputation").'</td><td>';
|
print '<tr><td>'.$langs->trans("SupplierReputation").'</td><td>';
|
||||||
echo $form->selectarray('supplier_reputation', $reputations, $supplier_reputation?$supplier_reputation:$object->supplier_reputation);
|
echo $form->selectarray('supplier_reputation', $object->reputations, $supplier_reputation?$supplier_reputation:$object->supplier_reputation);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Option to define a transport cost on supplier price
|
// Option to define a transport cost on supplier price
|
||||||
@ -673,8 +671,8 @@ if ($id > 0 || $ref)
|
|||||||
|
|
||||||
// Reputation
|
// Reputation
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if (!empty($productfourn->supplier_reputation) && !empty($reputations[$productfourn->supplier_reputation])) {
|
if (!empty($productfourn->supplier_reputation) && !empty($object->reputations[$productfourn->supplier_reputation])) {
|
||||||
print $reputations[$productfourn->supplier_reputation];
|
print $object->reputations[$productfourn->supplier_reputation];
|
||||||
}
|
}
|
||||||
print'</td>';
|
print'</td>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user