diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index faf10596d8c..c0851dfee1d 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -344,8 +344,8 @@ class Commande extends CommonOrder 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>270), 'module_source' =>array('type'=>'varchar(32)', 'label'=>'POSModule', 'enabled'=>1, 'visible'=>-1, 'position'=>275), 'pos_source' =>array('type'=>'varchar(32)', 'label'=>'POSTerminal', 'enabled'=>1, 'visible'=>-1, 'position'=>280), + 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>400), 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'position'=>500), - 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900), ); // END MODULEBUILDER PROPERTIES diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index df1c3e096e2..b8c3ad28039 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -163,21 +163,21 @@ $checkedtypetiers = 0; $arrayfields = array( 'c.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5), 'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>-1, 'position'=>10), - 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>20), + 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>20), 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled) ? 0 : 1), 'position'=>25), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), - 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>31), - 's.town'=>array('label'=>"Town", 'checked'=>1, 'position'=>35), - 's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>40), + 's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1, 'position'=>31), + 's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>35), + 's.zip'=>array('label'=>"Zip", 'checked'=>-1, 'position'=>40), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45), 'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>50), 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55), 'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60), 'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE), 'position'=>65), - 'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>0, 'position'=>66 , 'enabled'=>!empty($conf->expedition->enabled)), - 'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>0, 'position'=>67), - 'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0, 'position'=>68), - 'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>0, 'position'=>69), + 'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>!empty($conf->expedition->enabled)), + 'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67), + 'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68), + 'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69), 'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>75), 'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>80), 'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>85), @@ -186,15 +186,15 @@ $arrayfields = array( 'c.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>100), 'c.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>105), 'c.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>110), - 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10, 'position'=>115), - 'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500, 'position'=>120), - 'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500, 'position'=>125), - 'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>500, 'position'=>130), - 'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135), - 'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140), - 'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'position'=>990, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)), 'position'=>145), - 'shippable'=>array('label'=>"Shippable", 'checked'=>1, 'position'=>995, 'enabled'=>(!empty($conf->expedition->enabled)), 'position'=>150), - 'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000, 'position'=>155) + 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>115), + 'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120), + 'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125), + 'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130), + 'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135), + 'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140), + 'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(!empty($conf->expedition->enabled)), 'position'=>990), + 'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)), 'position'=>995), + 'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000) ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -1115,7 +1115,7 @@ if ($resql) { // Channel if (!empty($arrayfields['c.fk_input_reason']['checked'])) { print ''; - $form->selectInputReason($search_fk_input_reason, 'search_fk_input_reason', '', 1); + $form->selectInputReason($search_fk_input_reason, 'search_fk_input_reason', '', 1, '', 1); print ''; } if (!empty($arrayfields['c.total_ht']['checked'])) { @@ -1838,6 +1838,9 @@ if ($resql) { } } print ''; + if (!$i) { + $totalarray['nbfield']++; + } } // Billed