Ajout lot export factures fournisseurs

This commit is contained in:
Laurent Destailleur 2006-02-09 21:44:25 +00:00
parent 77482e4d1e
commit 382612ec19
4 changed files with 165 additions and 121 deletions

View File

@ -150,6 +150,7 @@ class modFacture extends DolibarrModules
// Permissions // Permissions
$this->rights = array(); $this->rights = array();
$this->rights_class = 'facture'; $this->rights_class = 'facture';
$r=0;
$r++; $r++;
$this->rights[$r][0] = 11; $this->rights[$r][0] = 11;
@ -195,7 +196,7 @@ class modFacture extends DolibarrModules
$r++; $r++;
$this->rights[$r][0] = 1320; $this->rights[$r][0] = 1320;
$this->rights[$r][1] = 'Exporter les factures et attributs'; $this->rights[$r][1] = 'Exporter les factures clients et attributs';
$this->rights[$r][2] = 'r'; $this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0; $this->rights[$r][3] = 0;
$this->rights[$r][4] = 'facture'; $this->rights[$r][4] = 'facture';
@ -216,8 +217,8 @@ class modFacture extends DolibarrModules
$r++; $r++;
$this->export_code[$r]=$this->id.'_'.$r; $this->export_code[$r]=$this->id.'_'.$r;
$this->export_label[$r]='Liste des factures clients et lignes de facture'; $this->export_label[$r]='Factures clients et lignes de facture';
$this->export_fields_array[$r]=array('f.rowid'=>"Id",'f.facnumber'=>"Ref",'f.fk_soc'=>"IdCompany",'f.datec'=>"DateCreation",'f.datef'=>"DateInvoice",'f.amount'=>"Amount",'f.remise_percent'=>"GlobalDiscount",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.paye'=>"Paid",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_taux'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd"); $this->export_fields_array[$r]=array('f.rowid'=>"Id",'f.facnumber'=>"Ref",'f.fk_soc'=>"IdCompany",'f.datec'=>"DateCreation",'f.datef'=>"DateInvoice",'f.amount'=>"Amount",'f.remise_percent'=>"GlobalDiscount",'f.total'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.paye'=>"BillShortStatusPayed",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_taux'=>"LineVATRate",'fd.qty'=>"LineQty",'fd.date_start'=>"DateStart",'fd.date_end'=>"DateEnd");
$this->export_alias_array[$r]=array('f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.fk_soc'=>"fk_soc",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.amount'=>"amount",'f.remise_percent'=>"globaldiscount",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.tva_taux'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend"); $this->export_alias_array[$r]=array('f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.fk_soc'=>"fk_soc",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.amount'=>"amount",'f.remise_percent'=>"globaldiscount",'f.total'=>"totalht",'f.total_ttc'=>"totalttc",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.tva_taux'=>"linevatrate",'fd.qty'=>"lineqty",'fd.date_start'=>"linedatestart",'fd.date_end'=>"linedateend");
$this->export_sql[$r]="select distinct "; $this->export_sql[$r]="select distinct ";
$i=0; $i=0;

View File

@ -67,6 +67,7 @@ class modFournisseur extends DolibarrModules
// Dépendances // Dépendances
$this->depends = array("modSociete"); $this->depends = array("modSociete");
$this->requiredby = array(); $this->requiredby = array();
$this->langfiles = array("bills","companies","suppliers");
// Constantes // Constantes
$this->const = array(); $this->const = array();
@ -79,84 +80,124 @@ class modFournisseur extends DolibarrModules
// Permissions // Permissions
$this->rights = array(); $this->rights = array();
$this->rights_class = 'fournisseur'; $this->rights_class = 'fournisseur';
$r=0;
$this->rights[2][0] = 181; $r++;
$this->rights[2][1] = 'Lire les commandes fournisseur'; $this->rights[$r][0] = 181;
$this->rights[2][2] = 'r'; $this->rights[$r][1] = 'Lire les commandes fournisseur';
$this->rights[2][3] = 1; $this->rights[$r][2] = 'r';
$this->rights[2][4] = 'commande'; $this->rights[$r][3] = 1;
$this->rights[2][5] = 'lire'; $this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'lire';
$this->rights[3][0] = 182; $r++;
$this->rights[3][1] = 'Créer une commande fournisseur'; $this->rights[$r][0] = 182;
$this->rights[3][2] = 'w'; $this->rights[$r][1] = 'Créer une commande fournisseur';
$this->rights[3][3] = 0; $this->rights[$r][2] = 'w';
$this->rights[3][4] = 'commande'; $this->rights[$r][3] = 0;
$this->rights[3][5] = 'creer'; $this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'creer';
$this->rights[4][0] = 183; $r++;
$this->rights[4][1] = 'Valider une commande fournisseur'; $this->rights[$r][0] = 183;
$this->rights[4][2] = 'w'; $this->rights[$r][1] = 'Valider une commande fournisseur';
$this->rights[4][3] = 0; $this->rights[$r][2] = 'w';
$this->rights[4][4] = 'commande'; $this->rights[$r][3] = 0;
$this->rights[4][5] = 'valider'; $this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'valider';
$this->rights[5][0] = 184; $r++;
$this->rights[5][1] = 'Approuver les commandes fournisseur'; $this->rights[$r][0] = 184;
$this->rights[5][2] = 'w'; $this->rights[$r][1] = 'Approuver les commandes fournisseur';
$this->rights[5][3] = 0; $this->rights[$r][2] = 'w';
$this->rights[5][4] = 'commande'; $this->rights[$r][3] = 0;
$this->rights[5][5] = 'approuver'; $this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'approuver';
$this->rights[6][0] = 185; $r++;
$this->rights[6][1] = 'Commander une commande fournisseur'; $this->rights[$r][0] = 185;
$this->rights[6][2] = 'w'; $this->rights[$r][1] = 'Commander une commande fournisseur';
$this->rights[6][3] = 0; $this->rights[$r][2] = 'w';
$this->rights[6][4] = 'commande'; $this->rights[$r][3] = 0;
$this->rights[6][5] = 'commander'; $this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'commander';
$this->rights[7][0] = 186; $r++;
$this->rights[7][1] = 'Réceptionner les commandes fournisseur'; $this->rights[$r][0] = 186;
$this->rights[7][2] = 'd'; $this->rights[$r][1] = 'Réceptionner les commandes fournisseur';
$this->rights[7][3] = 0; $this->rights[$r][2] = 'd';
$this->rights[7][4] = 'commande'; $this->rights[$r][3] = 0;
$this->rights[7][5] = 'receptionner'; $this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'receptionner';
$this->rights[8][0] = 187; $r++;
$this->rights[8][1] = 'Clotûrer les commandes fournisseur'; $this->rights[$r][0] = 187;
$this->rights[8][2] = 'd'; $this->rights[$r][1] = 'Clotûrer les commandes fournisseur';
$this->rights[8][3] = 0; $this->rights[$r][2] = 'd';
$this->rights[8][4] = 'commande'; $this->rights[$r][3] = 0;
$this->rights[8][5] = 'cloturer'; $this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'cloturer';
$this->rights[9][0] = 188; $r++;
$this->rights[9][1] = 'Annuler les commandes fournisseur'; $this->rights[$r][0] = 188;
$this->rights[9][2] = 'd'; $this->rights[$r][1] = 'Annuler les commandes fournisseur';
$this->rights[9][3] = 0; $this->rights[$r][2] = 'd';
$this->rights[9][4] = 'commande'; $this->rights[$r][3] = 0;
$this->rights[9][5] = 'annuler'; $this->rights[$r][4] = 'commande';
$this->rights[$r][5] = 'annuler';
$r++;
$this->rights[$r][0] = 231;
$this->rights[$r][1] = 'Lire les factures fournisseur';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 1;
$this->rights[$r][4] = 'facture';
$this->rights[$r][5] = 'lire';
$r++;
$this->rights[$r][0] = 232;
$this->rights[$r][1] = 'Créer une facture fournisseur';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'facture';
$this->rights[$r][5] = 'creer';
$r++;
$this->rights[$r][0] = 233;
$this->rights[$r][1] = 'Valider une facture fournisseur';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'facture';
$this->rights[$r][5] = 'valider';
$r++;
$this->rights[$r][0] = 236;
$this->rights[$r][1] = 'Exporter les factures fournisseurs et attributs';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'facture';
$this->rights[$r][5] = 'export';
$this->rights[10][0] = 231; // Exports
$this->rights[10][1] = 'Lire les factures fournisseur'; //--------
$this->rights[10][2] = 'r'; $r=0;
$this->rights[10][3] = 1;
$this->rights[10][4] = 'facture';
$this->rights[10][5] = 'lire';
$this->rights[11][0] = 232; $r++;
$this->rights[11][1] = 'Créer une facture fournisseur'; $this->export_code[$r]=$this->id.'_'.$r;
$this->rights[11][2] = 'w'; $this->export_label[$r]='Factures fournisseurs et lignes de facture';
$this->rights[11][3] = 0; $this->export_fields_array[$r]=array('f.rowid'=>"Id",'f.facnumber'=>"Ref",'f.fk_soc'=>"IdCompany",'f.datec'=>"DateCreation",'f.datef'=>"DateInvoice",'f.total_ht'=>"TotalHT",'f.total_ttc'=>"TotalTTC",'f.paye'=>"BillShortStatusPayed",'f.fk_statut'=>'Status','f.note'=>"Note",'fd.rowid'=>'LineId','fd.description'=>"LineDescription",'fd.tva_taux'=>"LineVATRate",'fd.qty'=>"LineQty");
$this->rights[11][4] = 'facture'; $this->export_alias_array[$r]=array('f.rowid'=>"invoiceid",'f.facnumber'=>"ref",'f.fk_soc'=>"fk_soc",'f.datec'=>"datecreation",'f.datef'=>"dateinvoice",'f.total_ht'=>"totalht",'f.total_ttc'=>"totalttc",'f.paye'=>"paid",'f.fk_statut'=>'status','f.note'=>"note",'fd.rowid'=>'lineid','fd.description'=>"linedescription",'fd.tva_taux'=>"linevatrate",'fd.qty'=>"lineqty");
$this->rights[11][5] = 'creer'; $this->export_sql[$r]="select distinct ";
$i=0;
$this->rights[12][0] = 233; foreach ($this->export_alias_array[$r] as $key => $value)
$this->rights[12][1] = 'Valider une facture fournisseur'; {
$this->rights[12][2] = 'w'; if ($i > 0) $this->export_sql[$r].=', ';
$this->rights[12][3] = 0; else $i++;
$this->rights[12][4] = 'facture'; $this->export_sql[$r].=$key.' as '.$value;
$this->rights[12][5] = 'valider'; }
$this->export_sql[$r].=' from '.MAIN_DB_PREFIX.'facture_fourn as f, '.MAIN_DB_PREFIX.'facture_fourn_det as fd WHERE fd.fk_facture_fourn = f.rowid';
$this->export_permission[$r]=array(array("fournisseur","facture","export"));
} }

View File

@ -97,7 +97,8 @@ RelatedCommercialProposals=Related commercial proposals
MenuToValid=To valid MenuToValid=To valid
DateClosing=Closing date DateClosing=Closing date
DateEcheance=Due date limit DateEcheance=Due date limit
DateBill=Bill date DateBill=Invoice date
DateInvoice=Invoice date
ClassifyBill=Classify invoice ClassifyBill=Classify invoice
NoSupplierBillsUnpayed=No suppliers invoices unpayed NoSupplierBillsUnpayed=No suppliers invoices unpayed
SupplierBillsToPay=Suppliers invoices to pay SupplierBillsToPay=Suppliers invoices to pay

View File

@ -97,7 +97,8 @@ RelatedCommercialProposals=Propositions commerciales associ
MenuToValid=A valider MenuToValid=A valider
DateClosing=Date limite réglement DateClosing=Date limite réglement
DateEcheance=Date échéance DateEcheance=Date échéance
DateBill=Date facturation DateBill=Date facturaction
DateInvoice=Date facturation
ClassifyBill=Classer la facture ClassifyBill=Classer la facture
NoSupplierBillsUnpayed=Aucune facture fournisseur impayée NoSupplierBillsUnpayed=Aucune facture fournisseur impayée
SupplierBillsToPay=Factures fournisseurs à payer SupplierBillsToPay=Factures fournisseurs à payer