Fix: class not defined
This commit is contained in:
parent
f3ad345930
commit
4241244345
@ -406,15 +406,20 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid';
|
$this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid';
|
||||||
$this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_invoice',1).')';
|
$this->export_sql_end[$r] .=' AND f.entity IN ('.getEntity('supplier_invoice',1).')';
|
||||||
|
|
||||||
|
// Order
|
||||||
$r++;
|
$r++;
|
||||||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||||
$this->export_label[$r]='Commandes fournisseurs et lignes de commandes';
|
$this->export_label[$r]='Commandes fournisseurs et lignes de commandes';
|
||||||
$this->export_icon[$r]='order';
|
$this->export_icon[$r]='order';
|
||||||
$this->export_permission[$r]=array(array("fournisseur","commande","export"));
|
$this->export_permission[$r]=array(array("fournisseur","commande","export"));
|
||||||
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.note_public'=>"NotePublic",'f.note_private'=>"NotePrivate",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
|
$this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.zip'=>'Zip','s.town'=>'Town','c.code'=>'CountryCode','s.phone'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.idprof5'=>'ProfId5','s.idprof6'=>'ProfId6','s.tva_intra'=>'VATIntra','f.rowid'=>"OrderId",'f.ref'=>"Ref",'f.ref_supplier'=>"RefSupplier",'f.date_creation'=>"DateCreation",'f.date_commande'=>"OrderDate",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.tva'=>"TotalVAT",'f.fk_statut'=>'Status','f.date_approve'=>'DateApprove','f.date_approve2'=>'DateApprove2','f.note_public'=>"NotePublic",'f.note_private'=>"NotePrivate",'ua1.login'=>'ApprovedBy','ua2.login'=>'ApprovedBy2','fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_tx'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.remise_percent'=>"Discount",'fd.total_ht'=>"LineTotalHT",'fd.total_ttc'=>"LineTotalTTC",'fd.total_tva'=>"LineTotalVAT",'fd.product_type'=>'TypeOfLineServiceOrProduct','fd.fk_product'=>'ProductId','p.ref'=>'ProductRef','p.label'=>'ProductLabel');
|
||||||
$this->export_TypeFields_array[$r]=array('s.rowid'=>"company",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.idprof5'=>'Text','s.idprof6'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.date_creation'=>"Date",'f.date_commande'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.fk_statut'=>'Status','f.note_public'=>"Text",'f.note_private'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Number",'fd.qty'=>"Number",'fd.remise_percent'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.total_tva'=>"Number",'fd.product_type'=>'Number','fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text');
|
if (empty($conf->global->SUPPLIER_ORDER_DOUBLE_APPROVAL))
|
||||||
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','f.rowid'=>"order",'f.ref'=>"order",'f.ref_supplier'=>"order",'f.date_creation'=>"order",'f.date_commande'=>"order",'f.total_ht'=>"order",'f.total_ttc'=>"order",'f.tva'=>"order",'f.fk_statut'=>'order','f.note_public'=>"order",'f.note_private'=>"order",'fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
|
{
|
||||||
|
unset($this->export_fields_array['f.date_approve2']);
|
||||||
|
unset($this->export_fields_array['ua2.login']);
|
||||||
|
}
|
||||||
|
$this->export_TypeFields_array[$r]=array('s.rowid'=>"company",'s.nom'=>'Text','s.address'=>'Text','s.cp'=>'Text','s.ville'=>'Text','c.code'=>'Text','s.tel'=>'Text','s.siren'=>'Text','s.siret'=>'Text','s.ape'=>'Text','s.idprof4'=>'Text','s.idprof5'=>'Text','s.idprof6'=>'Text','s.tva_intra'=>'Text','f.ref'=>"Text",'f.ref_supplier'=>"Text",'f.date_creation'=>"Date",'f.date_commande'=>"Date",'f.total_ht'=>"Number",'f.total_ttc'=>"Number",'f.tva'=>"Number",'f.fk_statut'=>'Status','f.date_approve'=>'Date','f.date_approve2'=>'Date','f.note_public'=>"Text",'f.note_private'=>"Text",'fd.description'=>"Text",'fd.tva_tx'=>"Number",'fd.qty'=>"Number",'fd.remise_percent'=>"Number",'fd.total_ht'=>"Number",'fd.total_ttc'=>"Number",'fd.total_tva'=>"Number",'fd.product_type'=>'Number','fd.fk_product'=>'List:product:label','p.ref'=>'Text','p.label'=>'Text');
|
||||||
|
$this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.zip'=>'company','s.town'=>'company','c.code'=>'company','s.phone'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.idprof5'=>'company','s.idprof6'=>'company','s.tva_intra'=>'company','ua1.login'=>'user','ua2.login'=>'user','fd.rowid'=>'order_line','fd.description'=>"order_line",'fd.tva_tx'=>"order_line",'fd.qty'=>"order_line",'fd.remise_percent'=>"order_line",'fd.total_ht'=>"order_line",'fd.total_ttc'=>"order_line",'fd.total_tva'=>"order_line",'fd.product_type'=>'order_line','fd.fk_product'=>'product','p.ref'=>'product','p.label'=>'product');
|
||||||
$this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
$this->export_dependencies_array[$r]=array('order_line'=>'fd.rowid','product'=>'fd.rowid'); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them
|
||||||
// Add extra fields object
|
// Add extra fields object
|
||||||
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur'";
|
$sql="SELECT name, label, type, param FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande_fournisseur'";
|
||||||
@ -494,6 +499,8 @@ class modFournisseur extends DolibarrModules
|
|||||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON s.fk_pays = c.rowid,';
|
||||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseur as f';
|
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseur as f';
|
||||||
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as ua1 ON ua1.rowid = f.fk_user_approve';
|
||||||
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'user as ua2 ON ua2.rowid = f.fk_user_approve2';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_extrafields as extra ON f.rowid = extra.fk_object,';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseur_extrafields as extra ON f.rowid = extra.fk_object,';
|
||||||
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseurdet as fd';
|
$this->export_sql_end[$r] .=' '.MAIN_DB_PREFIX.'commande_fournisseurdet as fd';
|
||||||
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseurdet_extrafields as extraline ON fd.rowid = extraline.fk_object';
|
$this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseurdet_extrafields as extraline ON fd.rowid = extraline.fk_object';
|
||||||
|
|||||||
@ -242,6 +242,8 @@ DatePlanShort=Date planed
|
|||||||
DateRealShort=Date real.
|
DateRealShort=Date real.
|
||||||
DateBuild=Report build date
|
DateBuild=Report build date
|
||||||
DatePayment=Date of payment
|
DatePayment=Date of payment
|
||||||
|
DateApprove=Approving date
|
||||||
|
DateApprove2=Approving date (second approval)
|
||||||
DurationYear=year
|
DurationYear=year
|
||||||
DurationMonth=month
|
DurationMonth=month
|
||||||
DurationWeek=week
|
DurationWeek=week
|
||||||
@ -408,6 +410,8 @@ OtherInformations=Other informations
|
|||||||
Quantity=Quantity
|
Quantity=Quantity
|
||||||
Qty=Qty
|
Qty=Qty
|
||||||
ChangedBy=Changed by
|
ChangedBy=Changed by
|
||||||
|
ApprovedBy=Approved by
|
||||||
|
ApprovedBy2=Approved by (second approval)
|
||||||
ReCalculate=Recalculate
|
ReCalculate=Recalculate
|
||||||
ResultOk=Success
|
ResultOk=Success
|
||||||
ResultKo=Failure
|
ResultKo=Failure
|
||||||
|
|||||||
@ -69,7 +69,6 @@ MOTIF_CANCEL=Reason
|
|||||||
DATE_REFUS=Deny date
|
DATE_REFUS=Deny date
|
||||||
DATE_SAVE=Validation date
|
DATE_SAVE=Validation date
|
||||||
DATE_VALIDE=Validation date
|
DATE_VALIDE=Validation date
|
||||||
DateApprove=Approving date
|
|
||||||
DATE_CANCEL=Cancelation date
|
DATE_CANCEL=Cancelation date
|
||||||
DATE_PAIEMENT=Payment date
|
DATE_PAIEMENT=Payment date
|
||||||
|
|
||||||
|
|||||||
@ -232,7 +232,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print dol_print_date($db->jdate($objp->date_commande))."</td>";
|
print dol_print_date($db->jdate($objp->date_commande))."</td>";
|
||||||
print '<td align="center">'.$objp->qty."</td>\n";
|
print '<td align="center">'.$objp->qty."</td>\n";
|
||||||
print '<td align="right">'.price($objp->total_ht)."</td>\n";
|
print '<td align="right">'.price($objp->total_ht)."</td>\n";
|
||||||
print '<td align="right">'.$commandestatic->LibStatut($objp->statut,$objp->facture,5).'</td>';
|
print '<td align="right">'.$orderstatic->LibStatut($objp->statut,$objp->facture,5).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) {
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$commandefournstatic = new CommandeFournisseur($db);
|
$supplierorderstatic = new CommandeFournisseur($db);
|
||||||
$societestatic = new Societe($db);
|
$societestatic = new Societe($db);
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -228,10 +228,10 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
|
|
||||||
print '<tr ' . $bc[$var] . '>';
|
print '<tr ' . $bc[$var] . '>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
$commandestatic->id = $objp->commandeid;
|
$supplierorderstatic->id = $objp->commandeid;
|
||||||
$commandestatic->ref = $objp->ref;
|
$supplierorderstatic->ref = $objp->ref;
|
||||||
$commandestatic->statut = $objp->statut;
|
$supplierorderstatic->statut = $objp->statut;
|
||||||
print $commandestatic->getNomUrl(1);
|
print $supplierorderstatic->getNomUrl(1);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
$societestatic->fetch($objp->socid);
|
$societestatic->fetch($objp->socid);
|
||||||
print '<td>' . $societestatic->getNomUrl(1) . '</td>';
|
print '<td>' . $societestatic->getNomUrl(1) . '</td>';
|
||||||
@ -240,7 +240,7 @@ if ($id > 0 || ! empty($ref)) {
|
|||||||
print dol_print_date($db->jdate($objp->date_commande)) . "</td>";
|
print dol_print_date($db->jdate($objp->date_commande)) . "</td>";
|
||||||
print '<td align="center">' . $objp->qty . "</td>\n";
|
print '<td align="center">' . $objp->qty . "</td>\n";
|
||||||
print '<td align="right">' . price($objp->total_ht) . "</td>\n";
|
print '<td align="right">' . price($objp->total_ht) . "</td>\n";
|
||||||
print '<td align="right">' . $commandestatic->getLibStatut(4) . '</td>';
|
print '<td align="right">' . $supplierorderstatic->getLibStatut(4) . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i ++;
|
$i ++;
|
||||||
|
|
||||||
|
|||||||
@ -1917,7 +1917,7 @@ table.liste td {
|
|||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
tr.pair td, tr.impair td {
|
tr.pair td, tr.impair td {
|
||||||
padding: 4px;
|
padding: 2px;
|
||||||
border-bottom: 1px solid #ddd;
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
div.liste_titre .tagtd {
|
div.liste_titre .tagtd {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user