• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP FactureFournisseur类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中FactureFournisseur的典型用法代码示例。如果您正苦于以下问题:PHP FactureFournisseur类的具体用法?PHP FactureFournisseur怎么用?PHP FactureFournisseur使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了FactureFournisseur类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: createFacture

 function createFacture(&$object, &$TLine)
 {
     global $user, $conf, $langs, $db;
     dol_include_once('/fourn/class/fournisseur.facture.class.php');
     $facture = new FactureFournisseur($db);
     $facture->origin = $object->element;
     $facture->origin_id = $object->id;
     $facture->ref = '';
     $facture->ref_supplier = '';
     //$facture->ref_supplier  = $object->ref_supplier;
     $facture->socid = $object->socid;
     $facture->libelle = $object->libelle;
     $object->date = time();
     $facture->note_public = $object->note_public;
     $facture->note_private = $object->note_private;
     $facture->cond_reglement_id = $object->cond_reglement_id;
     $facture->fk_account = $object->fk_account;
     $facture->fk_project = empty($object->fk_project) ? null : $object->fk_project;
     $facture->fk_incoterms = $object->fk_incoterms;
     $facture->location_incoterms = $object->location_incoterms;
     $facture->ref_supplier = time();
     $facture->date_echeance = $facture->calculate_date_lim_reglement();
     foreach ($TLine as &$row) {
         $line = $row->line;
         $line->qty = $row->qty;
         $line->id = 0;
         $facture->lines[] = $line;
     }
     $res = $facture->create($user);
     if ($res > 0) {
         header('location:' . dol_buildpath('/fourn/facture/card.php?action=editref_supplier&id=' . $res, 1));
         exit;
     } else {
         //var_dump($res, $facture);
         setEventMessage("ImpossibleToCreateInvoice", "errors");
     }
 }
开发者ID:ATM-Consulting,项目名称:dolibarr_module_facturerreception,代码行数:37,代码来源:actions_facturerreception.class.php


示例2: FactureFournisseur

if ($page == -1) {
    $page = 0;
}
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) {
    $sortorder = "DESC";
}
if (!$sortfield) {
    $sortfield = "f.datef";
}
/*
 * View
 */
$supplierinvoicestatic = new FactureFournisseur($db);
$form = new Form($db);
if ($id > 0 || !empty($ref)) {
    $product = new Product($db);
    $result = $product->fetch($id, $ref);
    $parameters = array('id' => $id);
    $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action);
    // Note that $action and $object may have been modified by some hooks
    if ($reshook < 0) {
        setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
    }
    llxHeader("", "", $langs->trans("CardProduct" . $product->type));
    if ($result > 0) {
        /*
         *  En mode visu
         */
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:31,代码来源:facture_fournisseur.php


示例3: llxHeader

if ($user->societe_id > 0)
{
	$action = '';
	$socid = $user->societe_id;
}


/*
 * View
 */

$now=gmmktime();

llxHeader('',$langs->trans("BillsSuppliersUnpaid"));

$facturestatic=new FactureFournisseur($db);
$companystatic=new Societe($db);


/***************************************************************************
*                                                                         *
*                      Mode Liste                                         *
*                                                                         *
***************************************************************************/

$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
if ($page == -1) { $page = 0; }
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:impayees.php


示例4: loadBox

 /**
  *  Load data into info_box_contents array to show array later.
  *
  *  @param	int		$max        Maximum number of records to load
  *  @return	void
  */
 function loadBox($max = 5)
 {
     global $conf, $user, $langs, $db;
     $this->max = $max;
     include_once DOL_DOCUMENT_ROOT . "/fourn/class/fournisseur.facture.class.php";
     $facturestatic = new FactureFournisseur($db);
     $this->info_box_head = array('text' => $langs->trans("BoxTitleLastSupplierBills", $max));
     if ($user->rights->fournisseur->facture->lire) {
         $sql = "SELECT s.nom, s.rowid as socid,";
         $sql .= " f.rowid as facid, f.facnumber, f.amount,";
         $sql .= " f.paye, f.fk_statut,";
         $sql .= ' f.datef as df,';
         $sql .= ' f.datec as datec,';
         $sql .= ' f.date_lim_reglement as datelimite, f.tms, f.type';
         $sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
         $sql .= ", " . MAIN_DB_PREFIX . "facture_fourn as f";
         if (!$user->rights->societe->client->voir && !$user->societe_id) {
             $sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
         }
         $sql .= " WHERE f.fk_soc = s.rowid";
         $sql .= " AND f.entity = " . $conf->entity;
         if (!$user->rights->societe->client->voir && !$user->societe_id) {
             $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " . $user->id;
         }
         if ($user->societe_id) {
             $sql .= " AND s.rowid = " . $user->societe_id;
         }
         $sql .= " ORDER BY f.tms DESC";
         $sql .= $db->plimit($max, 0);
         $result = $db->query($sql);
         if ($result) {
             $num = $db->num_rows($result);
             $now = dol_now();
             $i = 0;
             $l_due_date = $langs->trans('Late') . ' (' . strtolower($langs->trans('DateEcheance')) . ': %s)';
             while ($i < $num) {
                 $objp = $db->fetch_object($result);
                 $datelimite = $db->jdate($objp->datelimite);
                 $datec = $db->jdate($objp->datec);
                 $late = '';
                 if ($objp->paye == 0 && $datelimite < $now - $conf->facture->fournisseur->warning_delay) {
                     $late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day')));
                 }
                 $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, 'url' => DOL_URL_ROOT . "/fourn/facture/fiche.php?facid=" . $objp->facid);
                 $this->info_box_contents[$i][1] = array('td' => 'align="left"', 'text' => $objp->facnumber, 'text2' => $late, 'url' => DOL_URL_ROOT . "/fourn/facture/fiche.php?facid=" . $objp->facid);
                 $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', 'url' => DOL_URL_ROOT . "/fourn/fiche.php?socid=" . $objp->socid);
                 $this->info_box_contents[$i][3] = array('td' => 'align="left"', 'text' => $objp->nom, 'url' => DOL_URL_ROOT . "/fourn/fiche.php?socid=" . $objp->socid);
                 $this->info_box_contents[$i][4] = array('td' => 'align="right"', 'text' => dol_print_date($datec, 'day'));
                 $fac = new FactureFournisseur($db);
                 $fac->fetch($objp->facid);
                 $alreadypaid = $fac->getSommePaiement();
                 $this->info_box_contents[$i][5] = array('td' => 'align="right" width="18"', 'text' => $facturestatic->LibStatut($objp->paye, $objp->fk_statut, 3, $alreadypaid, $objp->type));
                 $i++;
             }
             if ($num == 0) {
                 $this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoModifiedSupplierBills"));
             }
         } else {
             dol_print_error($db);
         }
     } else {
         $this->info_box_contents[0][0] = array('td' => 'align="left"', 'text' => $langs->transnoentities("ReadPermissionNotAllowed"));
     }
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:70,代码来源:box_factures_fourn.php


示例5: dol_getmypid

 * Main
 */
@set_time_limit(0);
print "***** " . $script_file . " (" . $version . ") pid=" . dol_getmypid() . " *****\n";
dol_syslog($script_file . " launched with arg " . join(',', $argv));
if (!isset($argv[3]) || !$argv[3]) {
    print "Usage: " . $script_file . " bank_ref [bank_receipt_number|all] (csv|tsv|excel|excel2007) [lang=xx_XX]\n";
    exit(-1);
}
$bankref = $argv[1];
$num = $argv[2];
$model = $argv[3];
$newlangid = 'en_EN';
// To force a new lang id
$invoicestatic = new Facture($db);
$invoicesupplierstatic = new FactureFournisseur($db);
$societestatic = new Societe($db);
$chargestatic = new ChargeSociales($db);
$memberstatic = new Adherent($db);
$paymentstatic = new Paiement($db);
$paymentsupplierstatic = new PaiementFourn($db);
$paymentsocialcontributionstatic = new PaymentSocialContribution($db);
$paymentvatstatic = new Tva($db);
$bankstatic = new Account($db);
$banklinestatic = new AccountLine($db);
// Parse parameters
foreach ($argv as $key => $value) {
    $found = false;
    // Define options
    if (preg_match('/^lang=/i', $value)) {
        $found = true;
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:export-bank-receipts.php


示例6: FactureFournisseur

 $num = $db->num_rows($resql);
 $i = 0;
 $total = 0;
 print '<b>' . $langs->trans("Invoices") . '</b><br>';
 print '<table class="noborder" width="100%">';
 print '<tr class="liste_titre">';
 print '<td>' . $langs->trans('Ref') . '</td>';
 print '<td>' . $langs->trans('RefSupplier') . '</td>';
 print '<td>' . $langs->trans('Company') . '</td>';
 print '<td align="right">' . $langs->trans('ExpectedToPay') . '</td>';
 print '<td align="center">' . $langs->trans('Status') . '</td>';
 print '<td align="right">' . $langs->trans('PayedByThisPayment') . '</td>';
 print "</tr>\n";
 if ($num > 0) {
     $var = True;
     $facturestatic = new FactureFournisseur($db);
     while ($i < $num) {
         $objp = $db->fetch_object($resql);
         $var = !$var;
         print '<tr ' . $bc[$var] . '>';
         // Ref
         print '<td><a href="' . DOL_URL_ROOT . '/fourn/facture/fiche.php?facid=' . $objp->facid . '">' . img_object($langs->trans('ShowBill'), 'bill') . ' ';
         print $objp->ref;
         print "</a></td>\n";
         // Ref supplier
         print '<td>' . $objp->ref_supplier . "</td>\n";
         // Third party
         print '<td><a href="' . DOL_URL_ROOT . '/fourn/fiche.php?socid=' . $objp->socid . '">' . img_object($langs->trans('ShowCompany'), 'company') . ' ' . $objp->nom . '</a></td>';
         // Expected to pay
         print '<td align="right">' . price($objp->total_ttc) . '</td>';
         // Status
开发者ID:abbenbouchta,项目名称:immobilier,代码行数:31,代码来源:fiche.php


示例7: foreach

     print ' (' . $langs->transnoentities("InvoiceHasAvoir");
     $i = 0;
     foreach ($facidavoir as $id) {
         if ($i == 0) {
             print ' ';
         } else {
             print ',';
         }
         $facavoir = new FactureFournisseur($db);
         $facavoir->fetch($id);
         print $facavoir->getNomUrl(1);
     }
     print ')';
 }
 if (isset($facidnext) && $facidnext > 0) {
     $facthatreplace = new FactureFournisseur($db);
     $facthatreplace->fetch($facidnext);
     print ' (' . $langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)) . ')';
 }
 print '</td></tr>';
 // Label
 print '<tr><td>' . $form->editfieldkey("Label", 'label', $object->label, $object, $user->rights->fournisseur->facture->creer) . '</td>';
 print '<td colspan="3">' . $form->editfieldval("Label", 'label', $object->label, $object, $user->rights->fournisseur->facture->creer) . '</td>';
 /*
  * List of payments
  */
 $nbrows = 9;
 $nbcols = 2;
 if (!empty($conf->projet->enabled)) {
     $nbrows++;
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:card.php


示例8: getSupplierInvoicesForThirdParty

/**
 * Get list of invoices for third party
 *
 * @param	array		$authentication		Array of authentication information
 * @param	int			$idthirdparty		Id thirdparty
 * @return	array							Array result
 *
 */
function getSupplierInvoicesForThirdParty($authentication,$idthirdparty)
{
	global $db,$conf,$langs;

	dol_syslog("Function: getSupplierInvoicesForThirdParty login=".$authentication['login']." idthirdparty=".$idthirdparty);

	if ($authentication['entity']) $conf->entity=$authentication['entity'];

    // Init and check authentication
    $objectresp=array();
    $errorcode='';$errorlabel='';
    $error=0;
    $fuser=check_authentication($authentication,$error,$errorcode,$errorlabel);
    // Check parameters
	if (! $error && empty($idthirdparty))
	{
		$error++;
		$errorcode='BAD_PARAMETERS'; $errorlabel='Parameter id is not provided';
	}

	if (! $error)
	{
		$linesinvoice=array();

		$sql.='SELECT f.rowid as facid';
		$sql.=' FROM '.MAIN_DB_PREFIX.'facture_fourn as f';
		//$sql.=', '.MAIN_DB_PREFIX.'societe as s';
		//$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product = p.rowid';
		//$sql.=" WHERE f.fk_soc = s.rowid AND nom = '".$db->escape($idthirdparty)."'";
		//$sql.=" WHERE f.fk_soc = s.rowid AND nom = '".$db->escape($idthirdparty)."'";
        $sql.=" WHERE f.entity = ".$conf->entity;
		if ($idthirdparty != 'all') $sql.=" AND f.fk_soc = ".$db->escape($idthirdparty);

		$resql=$db->query($sql);
		if ($resql)
		{
			$num=$db->num_rows($resql);
			$i=0;
			while ($i < $num)
			{
                // En attendant remplissage par boucle
			    $obj=$db->fetch_object($resql);

			    $invoice=new FactureFournisseur($db);
			    $invoice->fetch($obj->facid);

				// Define lines of invoice
				$linesresp=array();
				foreach($invoice->lines as $line)
				{
   				    $linesresp[]=array(
    					'id'=>$line->rowid,
    					'type'=>$line->product_type,
                        'desc'=>dol_htmlcleanlastbr($line->description),
    					'total_net'=>$line->total_ht,
    					'total_vat'=>$line->total_tva,
    					'total'=>$line->total_ttc,
                        'vat_rate'=>$line->tva_tx,
                        'qty'=>$line->qty,
   				        'product_ref'=>$line->product_ref,
                        'product_label'=>$line->product_label,
                        'product_desc'=>$line->product_desc,
   				    );
				}

				// Now define invoice
				$linesinvoice[]=array(
					'id'=>$invoice->id,
				    'ref'=>$invoice->ref,
				    'ref_supplier'=>$invoice->ref_supplier,
				    'ref_ext'=>$invoice->ref_ext,
                    'fk_user_author' => $invoice->fk_user_author,
                    'fk_user_valid' => $invoice->fk_user_valid,
                    'fk_thirdparty' => $invoice->fk_soc,
				    'type'=>$invoice->type,
                    'status'=>$invoice->statut,
				    'total_net'=>$invoice->total_ht,
					'total_vat'=>$invoice->total_tva,
					'total'=>$invoice->total_ttc,
                    'date_creation'=>dol_print_date($invoice->datec,'dayhourrfc'),
                    'date_modification'=>dol_print_date($invoice->tms,'dayhourrfc'),
                    'date_invoice'=>dol_print_date($invoice->date,'dayhourrfc'),
                    'date_term'=>dol_print_date($invoice->date_echeance,'dayhourrfc'),
                    'label'=>$invoice->libelle,
                    'paid'=>$invoice->paye,
                    'note'=>$invoice->note,
                    'note_public'=>$invoice->note_public,
                    'close_code'=>$invoice->close_code,
                    'close_note'=>$invoice->close_note,

				    'lines' => $linesresp
				);
//.........这里部分代码省略.........
开发者ID:nrjacker4,项目名称:crm-php,代码行数:101,代码来源:server_supplier_invoice.php


示例9: strtolower

 /**
  *  Show top header of page.
  *
  *  @param	PDF			$pdf     		Object PDF
  *  @param  FactureFournisseur		$object     	Object to show
  *  @param  int	    	$showaddress    0=no, 1=yes
  *  @param  Translate	$outputlangs	Object lang for output
  *  @return	void
  */
 function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
 {
     global $langs, $conf, $mysoc;
     $outputlangs->load("main");
     $outputlangs->load("bills");
     $outputlangs->load("orders");
     $outputlangs->load("companies");
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     // Do not add the BACKGROUND as this is for suppliers
     //pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
     $pdf->SetTextColor(0, 0, 60);
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $posy = $this->marge_haute;
     $posx = $this->page_largeur - $this->marge_droite - 100;
     $pdf->SetXY($this->marge_gauche, $posy);
     // Logo
     /*
     		$logo=$conf->mycompany->dir_output.'/logos/'.$mysoc->logo;
     		if ($mysoc->logo)
     		{
     			if (is_readable($logo))
     			{
     			    $height=pdf_getHeightForLogo($logo);
     			    $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);	// width=0 (auto)
     			}
     			else
     			{
     				$pdf->SetTextColor(200,0,0);
     				$pdf->SetFont('','B', $default_font_size - 2);
     				$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound",$logo), 0, 'L');
     				$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
     			}
     		}
     		else
     		{*/
     $text = $this->emetteur->name;
     $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
     //}
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $pdf->SetXY($posx, $posy);
     $pdf->SetTextColor(0, 0, 60);
     $pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierInvoice") . " " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
     $posy += 1;
     if ($object->ref_supplier) {
         $posy += 4;
         $pdf->SetFont('', 'B', $default_font_size);
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefSupplier") . " : " . $object->ref_supplier, '', 'R');
         $posy += 1;
     }
     $pdf->SetFont('', '', $default_font_size - 1);
     if (!empty($conf->global->PDF_SHOW_PROJECT)) {
         $object->fetch_projet();
         if (!empty($object->project->ref)) {
             $posy += 4;
             $pdf->SetXY($posx, $posy);
             $langs->load("projects");
             $pdf->SetTextColor(0, 0, 60);
             $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project") . " : " . (empty($object->project->ref) ? '' : $object->projet->ref), '', 'R');
         }
     }
     if ($object->date) {
         $posy += 4;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date") . " : " . dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R');
     } else {
         $posy += 4;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(255, 0, 0);
         $pdf->MultiCell(100, 4, strtolower($outputlangs->transnoentities("OrderToProcess")), '', 'R');
     }
     if ($object->thirdparty->code_fournisseur) {
         $posy += 4;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierCode") . " : " . $outputlangs->transnoentities($object->thirdparty->code_fournisseur), '', 'R');
     }
     $posy += 1;
     $pdf->SetTextColor(0, 0, 60);
     // Show list of linked objects
     $posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size);
     if ($showaddress) {
         // Sender properties
         $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client);
         // Show sender
         $posy = 42;
         $posx = $this->marge_gauche;
         if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
             $posx = $this->page_largeur - $this->marge_droite - 80;
//.........这里部分代码省略.........
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:101,代码来源:pdf_canelle.modules.php


示例10: isset

require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$langs->load("suppliers");
$langs->load("orders");
$langs->load("companies");
// Security check
$socid = isset($_GET["socid"]) ? $_GET["socid"] : '';
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'societe', $socid, '');
/*
 * View
 */
$commandestatic = new CommandeFournisseur($db);
$facturestatic = new FactureFournisseur($db);
$companystatic = new Societe($db);
llxHeader("", $langs->trans("SuppliersArea"));
print_fiche_titre($langs->trans("SuppliersArea"));
//print '<table border="0" width="100%" class="notopnoleftnoright">';
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
print '<div class="fichecenter"><div class="fichethirdleft">';
// Orders
$commande = new CommandeFournisseur($db);
$sql = "SELECT count(cf.rowid), cf.fk_statut";
$sql .= " FROM " . MAIN_DB_PREFIX . "commande_fournisseur as cf,";
$sql .= " " . MAIN_DB_PREFIX . "societe as s";
if (!$user->rights->societe->client->voir && !$socid) {
    $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_commerciaux as sc ON s.rowid = sc.fk_soc";
}
$sql .= " WHERE cf.fk_soc = s.rowid ";
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:index.php


示例11: Contrat

    include_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php';
    $board = new Contrat($db);
    $dashboardlines[] = $board->load_board($user, "inactives");
    // Number of active services (expired)
    $dashboardlines[] = $board->load_board($user, "expired");
}
// Number of invoices customers (has paid)
if (!empty($conf->facture->enabled) && $user->rights->facture->lire) {
    include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
    $board = new Facture($db);
    $dashboardlines[] = $board->load_board($user);
}
// Number of supplier invoices (has paid)
if (!empty($conf->fournisseur->enabled) && !empty($conf->facture->enabled) && $user->rights->facture->lire) {
    include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
    $board = new FactureFournisseur($db);
    $dashboardlines[] = $board->load_board($user);
}
// Number of transactions to conciliate
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id) {
    include_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
    $board = new Account($db);
    $dashboardlines[] = $board->load_board($user);
}
// Number of cheque to send
if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id) {
    include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php';
    $board = new RemiseCheque($db);
    $dashboardlines[] = $board->load_board($user);
}
// Number of foundation members
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:index.php


示例12: GETPOST

 */
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.class.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/fourn.lib.php';
$langs->load('bills');
$id = GETPOST("facid", 'int');
// Security check
if ($user->societe_id) {
    $socid = $user->societe_id;
}
$result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
/*
 * View
 */
llxHeader();
$object = new FactureFournisseur($db);
$object->fetch($id);
$object->info($id);
$soc = new Societe($db);
$soc->fetch($object->socid);
$head = facturefourn_prepare_head($object);
$titre = $langs->trans('SupplierInvoice');
dol_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), 0, 'bill');
print '<table width="100%"><tr><td>';
dol_print_object_info($object);
print '</td></tr></table>';
print '</div>';
llxFooter();
$db->close();
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:info.php


示例13: createFromClone

 /**
  *	Load an object from its id and create a new one in database
  *
  *	@param      int		$fromid     	Id of object to clone
  *	@param		int		$invertdetail	Reverse sign of amounts for lines
  * 	@return		int						New id of clone
  */
 function createFromClone($fromid, $invertdetail = 0)
 {
     global $user, $langs;
     $error = 0;
     $object = new FactureFournisseur($this->db);
     $object->context['createfromclone'] = 'createfromclone';
     $this->db->begin();
     // Load source object
     $object->fetch($fromid);
     $object->id = 0;
     $object->statut = self::STATUS_DRAFT;
     // Clear fields
     $object->ref_supplier = $langs->trans("CopyOf") . ' ' . $object->ref_supplier;
     $object->author = $user->id;
     $object->user_valid = '';
     $object->fk_facture_source = 0;
     $object->date_creation = '';
     $object->date_validation = '';
     $object->date = '';
     $object->date_echeance = '';
     $object->ref_client = '';
     $object->close_code = '';
     $object->close_note = '';
     // Loop on each line of new invoice
     foreach ($object->lines as $i => $line) {
         if (isset($object->lines[$i]->info_bits) && ($object->lines[$i]->info_bits & 0x2) == 0x2) {
             unset($object->lines[$i]);
         }
     }
     // Create clone
     $result = $object->create($user);
     // Other options
     if ($result < 0) {
         $this->error = $object->error;
         $error++;
     }
     if (!$error) {
     }
     unset($object->context['createfromclone']);
     // End
     if (!$error) {
         $this->db->commit();
         return $object->id;
     } else {
         $this->db->rollback();
         return -1;
     }
 }
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:55,代码来源:fournisseur.facture.class.php


示例14: FactureFournisseur

 print '<td width="100" align="center">' . $langs->trans("Date") . '</td>';
 print '<td>&nbsp;</td>';
 print '<td>' . $langs->trans("Status") . '</td>';
 print '<td align="right">' . $langs->trans("Debit") . '</td>';
 print '<td align="right">' . $langs->trans("Credit") . '</td>';
 print '<td align="right">' . $langs->trans("Balance") . '</td>';
 print '<td>&nbsp;</td>';
 print '</tr>';
 if (!$num > 0) {
     print '<tr><td colspan="7">' . $langs->trans("NoInvoice") . '</td></tr>';
 }
 $solde = 0;
 // Boucle sur chaque facture
 for ($i = 0; $i < $num; $i++) {
     $objf = $db->fetch_object($resql);
     $fac = new FactureFournisseur($db);
     $ret = $fac->fetch($objf->facid);
     if ($ret < 0) {
         print $fac->error . "<br>";
         continue;
     }
     $totalpaye = $fac->getSommePaiement();
     $var = !$var;
     print "<tr {$bc[$var]}>";
     print "<td align=\"center\">" . dol_print_date($fac->date) . "</td>\n";
     print "<td><a href=\"facture/fiche.php?facid={$fac->id}\">" . img_object($langs->trans("ShowBill"), "bill") . " " . $fac->ref . "</a></td>\n";
     print '<td aling="left">' . $fac->getLibStatut(2, $totalpaye) . '</td>';
     print '<td align="right">' . price($fac->total_ttc) . "</td>\n";
     $solde = $solde + $fac->total_ttc;
     print '<td align="right">&nbsp;</td>';
     print '<td align="right">' . price($solde) . "</td>\n";
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:recap-fourn.php


示例15: FactureFournisseur

}
/*
 * Show result array
 */
$i = 0;
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
///print "<td>".$langs->trans("JournalNum")."</td>";
print "<td>" . $langs->trans("Date") . "</td>";
print "<td>" . $langs->trans("Piece") . ' (' . $langs->trans("InvoiceRef") . ")</td>";
print "<td>" . $langs->trans("Account") . "</td>";
print "<t><td>" . $langs->trans("Type") . "</td><td align='right'>" . $langs->trans("Debit") . "</td><td align='right'>" . $langs->trans("Credit") . "</td>";
print "</tr>\n";
$var = true;
$r = '';
$invoicestatic = new FactureFournisseur($db);
$companystatic = new Fournisseur($db);
foreach ($tabfac as $key => $val) {
    $invoicestatic->id = $key;
    $invoicestatic->ref = $val["ref"];
    $invoicestatic->type = $val["type"];
    // product
    foreach ($tabht[$key] as $k => $mt) {
        if ($mt) {
            print "<tr " . $bc[$var] . " >";
            //print "<td>".$conf->global->COMPTA_JOURNAL_BUY."</td>";
            print "<td>" . $val["date"] . "</td>";
            print "<td>" . $invoicestatic->getNomUrl(1) . "</td>";
            print "<td>" . $k . "</td><td>" . $langs->trans("Products") . "</td>";
            print '<td align="right">' . ($mt >= 0 ? price($mt) : '') . "</td>";
            print '<td align="right">' . ($mt < 0 ? price(-$mt) : '') . "</td>";
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:purchasesjournal.php


示例16: header

            header('Location: ' . $loc);
            exit;
        } else {
            $db->rollback();
        }
    }
}
/*
 * View
 */
$supplierstatic = new Societe($db);
$invoicesupplierstatic = new FactureFournisseur($db);
llxHeader();
$form = new Form($db);
if ($action == 'create' || $action == 'add_paiement') {
    $object = new FactureFournisseur($db);
    $object->fetch($facid);
    $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
    $dateinvoice = $datefacture == '' ? empty($conf->global->MAIN_AUTOFILL_DATE) ? -1 : 0 : $datefacture;
    $sql = 'SELECT s.nom, s.rowid as socid,';
    $sql .= ' f.rowid, f.ref, f.ref_supplier, f.amount, f.total_ttc as total';
    if (!$user->rights->societe->client->voir && !$socid) {
        $sql .= ", sc.fk_soc, sc.fk_user ";
    }
    $sql .= ' FROM ' . MAIN_DB_PREFIX . 'societe as s, ' . MAIN_DB_PREFIX . 'facture_fourn as f';
    if (!$user->rights->societe->client->voir && !$socid) {
        $sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
    }
    $sql .= ' WHERE f.fk_soc = s.rowid';
    $sql .= ' AND f.rowid = ' . $facid;
    if (!$user->rights->societe->client->voir && !$socid) {
开发者ID:abbenbouchta,项目名称:immobilier,代码行数:31,代码来源:paiement.php


示例17: GETPOST

$action = GETPOST('action', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$line = GETPOST('lineid', 'int');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
//$result=restrictedArea($user,'produit');
$mesg = '';
/*
 *	Actions
 */
// Add product to list
if ($action == 'add') {
    $fac = new FactureFournisseur($db);
    $fac->fetch($id);
    $error = 0;
    for ($i = 0; $i < sizeof($fac->lines); $i++) {
        $object = new Labelprint($db);
        $object->fk_product = $fac->lines[$i]->fk_product;
        $object->qty = $fac->lines[$i]->qty;
        $result = $object->create($user);
        if (!$result) {
            $error++;
        }
    }
    if ($error) {
        $mesg = '<div class="error">' . $object->error . '</div>';
    } else {
        $mesg = '<font class="ok">' . $langs->trans("LinesAdded") . '</font>';
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:31,代码来源:invoice_supplier.php


示例18: elseif

     $langs->load("errors");
     print '<div class="error">' . $langs->trans($tmp) . '</div>';
 } elseif ($tmp == 'NotConfigured') {
     print $langs->trans($tmp);
 } else {
     print $tmp;
 }
 print '</td>' . "\n";
 print '<td align="center">';
 if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "{$file}") {
     print img_picto($langs->trans("Activated"), 'switch_on');
 } else {
     print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setmod&amp;value=' . $file . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
 }
 print '</td>';
 $invoice = new FactureFournisseur($db);
 $invoice->initAsSpecimen();
 // Info
 $htmltooltip = '';
 $htmltooltip .= '' . $langs->trans("Version") . ': <b>' . $module->getVersion() . '</b><br>';
 $nextval = $module->getNextValue($mysoc, $invoice);
 if ("{$nextval}" != $langs->trans("NotAvailable")) {
     // Keep " on nextval
     $htmltooltip .= '' . $langs->trans("NextValue") . ': ';
     if ($nextval) {
         if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
             $nextval = $langs->trans($nextval);
         }
         $htmltooltip .= $nextval . '<br>';
     } else {
         $htmltooltip .= $langs->trans($module->error) . '<br>';
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:supplier_invoice.php


示例19: dol_now

    $sortorder = "ASC";
}
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) {
    $search_ref = "";
    $search_ref_supplier = "";
    $search_company = "";
    $search_amount_no_tax = "";
    $search_amount_all_tax = "";
}
/*
 * View
 */
$now = dol_now();
llxHeader('', $langs->trans("BillsSuppliersUnpaid"));
$title = $langs->trans("BillsSuppliersUnpaid");
$facturestatic = new FactureFournisseur($db);
$companystatic = new Societe($db);
if ($user->rights->fournisseur->facture->lire) {
    $sql = "SELECT s.rowid as socid, s.nom as name,";
    $sql .= " f.rowid, f.ref, f.ref_supplier, f.total_ht, f.total_ttc,";
    $sql .= " f.datef as df, f.date_lim_reglement as datelimite, ";
    $sql .= " f.paye as paye, f.rowid as facid, f.fk_statut";
    $sql .= " ,sum(pf.amount) as am";
    if (!$user->rights->societe->client->voir && !$socid) {
        $sql .= ", sc.fk_soc, sc.fk_user ";
    }
    $sql .= " FROM " . MAIN_DB_PREFIX . "societe as s";
    if (!$user->rights->societe->client->voir && !$socid) {
        $sql .= ", " . MAIN_DB_PREFIX . "societe_commerciaux as sc";
    }
    $sql .= "," . MAIN_DB_PREFIX . "facture_fourn as f";
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:impayees.php


示例20: count

 /**
  *  Function to build pdf onto disk
  *
  *  @param		FactureFournisseur	$object				Id of object to generate
  *  @param		Translate			$outputlangs		Lang output object
  *  @param		string				$srctemplatepath	Full path of source filename for generator using a template file
  *  @param		int					$hidedetails		Do not show line details
  *  @param		int					$hidedesc			Do not show 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Family类代码示例发布时间:2022-05-23
下一篇:
PHP Facture类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap