Debug v20

This commit is contained in:
Laurent Destailleur
2024-05-07 10:27:17 +02:00
parent d74065ab12
commit 642f70e152
8 changed files with 22 additions and 14 deletions

View File

@@ -2782,7 +2782,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
$phototoshow .= '</div>'; $phototoshow .= '</div>';
} }
} }
} elseif (!$phototoshow) { // example if modulepart = 'societe' or 'photo' } elseif (!$phototoshow) { // example if modulepart = 'societe' or 'photo' or 'memberphoto'
$phototoshow .= $form->showphoto($modulepart, $object, 0, 0, 0, 'photowithmargin photoref', 'small', 1, 0, $maxvisiblephotos); $phototoshow .= $form->showphoto($modulepart, $object, 0, 0, 0, 'photowithmargin photoref', 'small', 1, 0, $maxvisiblephotos);
} }

View File

@@ -454,12 +454,18 @@ class FormCardWebPortal
// } // }
//} //}
$html .= '<!-- html.formcardwebportal.class.php -->';
$html .= '<header>'; $html .= '<header>';
// Left block - begin // Left block - begin
$html .= '<div class="header-card-left-block" style="width: 75%;">'; $html .= '<div class="header-card-left-block" style="width: 75%;">';
$html .= '<div>'; $html .= '<div>';
$form = new Form($this->db);
$html .= $form->showphoto('memberphoto', $object, 0, 0, 0, 'photowithmargin photoref', 'small', 1, 0, 1);
//include DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
//$html .= getImagePublicURLOfObject($object, 1, '_small');
// logo or photo // logo or photo
$html .= '<div></div>'; $html .= '<div></div>';
@@ -504,7 +510,7 @@ class FormCardWebPortal
// Left block - end // Left block - end
// Right block - begin // Right block - begin
$html .= '<div class="grid header-card-right-block">'; $html .= '<div class="header-card-right-block">';
// show status // show status
$htmlStatus = $object->getLibStatut(6); $htmlStatus = $object->getLibStatut(6);
if (empty($htmlStatus) || $htmlStatus == $object->getLibStatut(3)) { if (empty($htmlStatus) || $htmlStatus == $object->getLibStatut(3)) {

View File

@@ -313,6 +313,8 @@ class FormListWebPortal
} }
// filter on logged third-party // filter on logged third-party
$sql .= " AND t.fk_soc = " . ((int) $socid); $sql .= " AND t.fk_soc = " . ((int) $socid);
// discard record with status draft
$sql .= " AND t.fk_statut <> 0";
foreach ($search as $key => $val) { foreach ($search as $key => $val) {
if (array_key_exists($key, $object->fields)) { if (array_key_exists($key, $object->fields)) {

View File

@@ -40,7 +40,7 @@ class WebPortalInvoice extends Facture
/** /**
* Status list (short label) * Status list (short label)
*/ */
const STATUS_SHORT_LIST = array( const ARRAY_STATUS_LABEL = array(
Facture::STATUS_DRAFT => 'BillShortStatusDraft', Facture::STATUS_DRAFT => 'BillShortStatusDraft',
Facture::STATUS_VALIDATED => 'BillShortStatusNotPaid', Facture::STATUS_VALIDATED => 'BillShortStatusNotPaid',
Facture::STATUS_CLOSED => 'BillShortStatusPaid', Facture::STATUS_CLOSED => 'BillShortStatusPaid',
@@ -109,7 +109,7 @@ class WebPortalInvoice extends Facture
'multicurrency_total_ht' => array('type' => 'price', 'label' => 'MulticurrencyAmountHT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 290, 'isameasure' => 1,), 'multicurrency_total_ht' => array('type' => 'price', 'label' => 'MulticurrencyAmountHT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 290, 'isameasure' => 1,),
'multicurrency_total_tva' => array('type' => 'price', 'label' => 'MulticurrencyAmountVAT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 291, 'isameasure' => 1,), 'multicurrency_total_tva' => array('type' => 'price', 'label' => 'MulticurrencyAmountVAT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 291, 'isameasure' => 1,),
'multicurrency_total_ttc' => array('type' => 'price', 'label' => 'MulticurrencyAmountTTC', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 292, 'isameasure' => 1,), 'multicurrency_total_ttc' => array('type' => 'price', 'label' => 'MulticurrencyAmountTTC', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 292, 'isameasure' => 1,),
'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'notnull' => 1, 'position' => 1000, 'arrayofkeyval' => self::STATUS_SHORT_LIST,), 'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'notnull' => 1, 'position' => 1000, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL,),
); );
//public $rowid; //public $rowid;
//public $ref; //public $ref;

View File

@@ -40,7 +40,7 @@ class WebPortalMember extends Adherent
/** /**
* Status list (short label) * Status list (short label)
*/ */
const STATUS_SHORT_LIST = array( const ARRAY_STATUS_LABEL = array(
Adherent::STATUS_DRAFT => 'Draft', Adherent::STATUS_DRAFT => 'Draft',
Adherent::STATUS_VALIDATED => 'Validated', Adherent::STATUS_VALIDATED => 'Validated',
Adherent::STATUS_RESILIATED => 'MemberStatusResiliatedShort', Adherent::STATUS_RESILIATED => 'MemberStatusResiliatedShort',
@@ -140,7 +140,7 @@ class WebPortalMember extends Adherent
'datefin' => array('type' => 'date', 'label' => 'SubscriptionEndDate', 'enabled' => 1, 'visible' => 5, 'position' => 400,), 'datefin' => array('type' => 'date', 'label' => 'SubscriptionEndDate', 'enabled' => 1, 'visible' => 5, 'position' => 400,),
'status' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::STATUS_SHORT_LIST, 'showonheader' => 1,), 'status' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 5, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL, 'showonheader' => 1,),
); );
public $rowid; public $rowid;
//public $ref; //public $ref;
@@ -219,7 +219,7 @@ class WebPortalMember extends Adherent
*/ */
public function getTooltipContentArray($params) public function getTooltipContentArray($params)
{ {
global $conf, $langs; global $langs;
$datas = []; $datas = [];
@@ -250,7 +250,7 @@ class WebPortalMember extends Adherent
*/ */
public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0, $addlinktonotes = 0) public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0, $addlinktonotes = 0)
{ {
global $conf, $langs, $hookmanager; global $langs, $hookmanager;
if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') && $withpictoimg) { if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER') && $withpictoimg) {
$withpictoimg = 0; $withpictoimg = 0;

View File

@@ -40,7 +40,7 @@ class WebPortalOrder extends Commande
/** /**
* Status list (short label) * Status list (short label)
*/ */
const STATUS_SHORT_LIST = array( const ARRAY_STATUS_LABEL = array(
Commande::STATUS_DRAFT => 'StatusOrderDraftShort', Commande::STATUS_DRAFT => 'StatusOrderDraftShort',
Commande::STATUS_VALIDATED => 'StatusOrderValidated', Commande::STATUS_VALIDATED => 'StatusOrderValidated',
Commande::STATUS_SHIPMENTONPROCESS => 'StatusOrderSentShort', Commande::STATUS_SHIPMENTONPROCESS => 'StatusOrderSentShort',
@@ -108,7 +108,7 @@ class WebPortalOrder extends Commande
'multicurrency_total_ht' => array('type' => 'price', 'label' => 'MulticurrencyAmountHT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 255, 'isameasure' => 1,), 'multicurrency_total_ht' => array('type' => 'price', 'label' => 'MulticurrencyAmountHT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 255, 'isameasure' => 1,),
'multicurrency_total_tva' => array('type' => 'price', 'label' => 'MulticurrencyAmountVAT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 260, 'isameasure' => 1,), 'multicurrency_total_tva' => array('type' => 'price', 'label' => 'MulticurrencyAmountVAT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 260, 'isameasure' => 1,),
'multicurrency_total_ttc' => array('type' => 'price', 'label' => 'MulticurrencyAmountTTC', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 265, 'isameasure' => 1,), 'multicurrency_total_ttc' => array('type' => 'price', 'label' => 'MulticurrencyAmountTTC', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 265, 'isameasure' => 1,),
'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'position' => 500, 'notnull' => -5, 'arrayofkeyval' => self::STATUS_SHORT_LIST,), 'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'position' => 500, 'notnull' => -5, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL,),
); );
//public $rowid; //public $rowid;
//public $ref; //public $ref;

View File

@@ -40,7 +40,7 @@ class WebPortalPartnership extends Partnership
/** /**
* Status list (short label) * Status list (short label)
*/ */
const STATUS_SHORT_LIST = array( const ARRAY_STATUS_LABEL = array(
Partnership::STATUS_DRAFT => 'Draft', Partnership::STATUS_DRAFT => 'Draft',
Partnership::STATUS_VALIDATED => 'Accepted', Partnership::STATUS_VALIDATED => 'Accepted',
Partnership::STATUS_APPROVED => 'Refused', Partnership::STATUS_APPROVED => 'Refused',
@@ -119,7 +119,7 @@ class WebPortalPartnership extends Partnership
'reason_decline_or_cancel' => array('type' => 'text', 'label' => 'ReasonDeclineOrCancel', 'enabled' => 1, 'position' => 73, 'notnull' => 0, 'visible' => -2,), 'reason_decline_or_cancel' => array('type' => 'text', 'label' => 'ReasonDeclineOrCancel', 'enabled' => 1, 'position' => 73, 'notnull' => 0, 'visible' => -2,),
'ip' => array('type' => 'varchar(250)', 'label' => 'Ip', 'enabled' => 1, 'position' => 74, 'notnull' => 0, 'visible' => -2,), 'ip' => array('type' => 'varchar(250)', 'label' => 'Ip', 'enabled' => 1, 'position' => 74, 'notnull' => 0, 'visible' => -2,),
'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => 1, 'position' => 2000, 'notnull' => 1, 'visible' => 5, 'default' => '0', 'index' => 1, 'arrayofkeyval' => self::STATUS_SHORT_LIST, 'showonheader' => 1,), 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => 1, 'position' => 2000, 'notnull' => 1, 'visible' => 5, 'default' => '0', 'index' => 1, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL, 'showonheader' => 1,),
); );
//public $rowid; //public $rowid;
//public $ref; //public $ref;

View File

@@ -40,7 +40,7 @@ class WebPortalPropal extends Propal
/** /**
* Status list (short label) * Status list (short label)
*/ */
const STATUS_SHORT_LIST = array( const ARRAY_STATUS_LABEL = array(
Propal::STATUS_DRAFT => 'PropalStatusDraftShort', Propal::STATUS_DRAFT => 'PropalStatusDraftShort',
Propal::STATUS_VALIDATED => 'PropalStatusValidatedShort', Propal::STATUS_VALIDATED => 'PropalStatusValidatedShort',
Propal::STATUS_SIGNED => 'PropalStatusSignedShort', Propal::STATUS_SIGNED => 'PropalStatusSignedShort',
@@ -108,7 +108,7 @@ class WebPortalPropal extends Propal
'multicurrency_total_ht' => array('type' => 'price', 'label' => 'MulticurrencyAmountHT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 245, 'isameasure' => 1,), 'multicurrency_total_ht' => array('type' => 'price', 'label' => 'MulticurrencyAmountHT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 245, 'isameasure' => 1,),
'multicurrency_total_tva' => array('type' => 'price', 'label' => 'MulticurrencyAmountVAT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 250, 'isameasure' => 1,), 'multicurrency_total_tva' => array('type' => 'price', 'label' => 'MulticurrencyAmountVAT', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 250, 'isameasure' => 1,),
'multicurrency_total_ttc' => array('type' => 'price', 'label' => 'MulticurrencyAmountTTC', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 255, 'isameasure' => 1,), 'multicurrency_total_ttc' => array('type' => 'price', 'label' => 'MulticurrencyAmountTTC', 'enabled' => 'isModEnabled("multicurrency")', 'visible' => -2, 'position' => 255, 'isameasure' => 1,),
'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::STATUS_SHORT_LIST,), 'fk_statut' => array('type' => 'smallint(6)', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'notnull' => 1, 'position' => 500, 'arrayofkeyval' => self::ARRAY_STATUS_LABEL,),
); );
//public $rowid; //public $rowid;
//public $ref; //public $ref;