当前位置: 首页>>代码示例>>PHP>>正文


PHP Paiement类代码示例

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


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

示例1: payerLoyerAction

 public function payerLoyerAction()
 {
     $paiement = new Paiement();
     $paiement->montant = $_GET['loyer'];
     $paiement->date = "2015-12-17";
     $paiement->mode = "enLigne";
     $paiement->type = "locataireVersAgence";
     $paiement->id_utilisateur = $_GET['id_utilisateur'];
     $paiement->id_location = $_GET['id_location'];
     $paiement->insert();
     // Redirection vers la page d'accueil
     header("Location: index.php?a=displayLoc");
 }
开发者ID:Epimanjr,项目名称:S7-Millenary42,代码行数:13,代码来源:HomeController.php

示例2: getInstance

 public static function getInstance()
 {
     if (self::$singleton === null) {
         self::$singleton = new Paiement();
     }
     return self::$singleton;
 }
开发者ID:bontiv,项目名称:intrateb,代码行数:7,代码来源:caddie_paie.php

示例3: listerTout

function listerTout()
{
    // Liste de tous les paiements
    echo "Liste des paiements disponibles dans la base : <br/>";
    $listePaiements = Paiement::findAll();
    foreach ($listePaiements as $value) {
        $value->afficher();
    }
}
开发者ID:Epimanjr,项目名称:S7-Millenary42,代码行数:9,代码来源:PaiementTest.php

示例4: GETPOST

    require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
}
$langs->load('bills');
$langs->load('banks');
$langs->load('companies');
// Security check
$id = GETPOST('id', 'int');
$action = GETPOST('action', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
// TODO ajouter regle pour restreindre acces paiement
//$result = restrictedArea($user, 'facture', $id,'');
$mesg = '';
$object = new Paiement($db);
/*
 * Actions
 */
if ($action == 'setnote' && $user->rights->facture->paiement) {
    $db->begin();
    $object->fetch($id);
    $result = $object->update_note(GETPOST('note'));
    if ($result > 0) {
        $db->commit();
        $action = '';
    } else {
        $mesg = '<div class="error">' . $object->error . '</div>';
        $db->rollback();
    }
}
开发者ID:nrjacker4,项目名称:crm-php,代码行数:31,代码来源:fiche.php

示例5: dol_mktime

 */
if ($action == 'add_paiement') {
    if ($error) {
        $action = 'create';
    }
    // Le reste propre a cette action s'affiche en bas de page.
}
/*
 * Action confirm_paiement
 */
if ($action == 'confirm_paiement' && $confirm == 'yes') {
    $error = 0;
    $datepaye = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
    $db->begin();
    // Creation of payment line
    $paiement = new Paiement($db);
    $paiement->datepaye = $datepaye;
    $paiement->amounts = $amounts;
    // Array with all payments dispatching
    $paiement->paiementid = dol_getIdFromCode($db, $_POST['paiementcode'], 'c_paiement');
    $paiement->num_paiement = $_POST['num_paiement'];
    $paiement->note = $_POST['comment'];
    if (!$error) {
        $paiement_id = $paiement->create($user, GETPOST('closepaidinvoices') == 'on' ? 1 : 0);
        if ($paiement_id < 0) {
            $errmsg = $paiement->error;
            $error++;
        }
    }
    if (!$error) {
        $result = $paiement->addPaymentToBank($user, 'payment', '(CustomerInvoicePayment)', $_POST['accountid'], $_POST['chqemetteur'], $_POST['chqbank']);
开发者ID:netors,项目名称:dolibarr,代码行数:31,代码来源:paiement.php

示例6: dol_syslog

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;
        $valarray = explode('=', $value);
        $newlangid = $valarray[1];
        print 'Use language ' . $newlangid . ".\n";
    }
开发者ID:Albertopf,项目名称:prueba,代码行数:31,代码来源:export-bank-receipts.php

示例7: foreach

 // Clean parameters amount if payment is for a credit note
 if (GETPOST('type') == 2) {
     foreach ($amounts as $key => $value) {
         $newvalue = price2num($value, 'MT');
         $amounts[$key] = -$newvalue;
     }
 }
 if (!empty($conf->banque->enabled)) {
     // Si module bank actif, un compte est obligatoire lors de la saisie d'un paiement
     if (GETPOST('accountid') <= 0) {
         setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentities('AccountToCredit')), 'errors');
         $error++;
     }
 }
 // Creation of payment line
 $paiement = new Paiement($db);
 $paiement->datepaye = $datepaye;
 $paiement->amounts = $amounts;
 // Array with all payments dispatching
 $paiement->paiementid = dol_getIdFromCode($db, $_POST['paiementcode'], 'c_paiement');
 $paiement->num_paiement = $_POST['num_paiement'];
 $paiement->note = $_POST['comment'];
 if (!$error) {
     $paiement_id = $paiement->create($user, GETPOST('closepaidinvoices') == 'on' ? 1 : 0);
     if ($paiement_id < 0) {
         setEventMessage($paiement->error, 'errors');
         $error++;
     }
 }
 if (!$error) {
     $label = '(CustomerInvoicePayment)';
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:paiement.php

示例8: GETPOST

 *   	\file       htdocs/compta/paiement/info.php
 *		\ingroup    facture
 *		\brief      Onglet info d'un paiement
 */
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/payments.lib.php';
$langs->load("bills");
$langs->load("companies");
$id = GETPOST('id');
/*
 * View
 */
llxHeader();
$paiement = new Paiement($db);
$paiement->fetch($id);
$paiement->info($id);
$head = payment_prepare_head($paiement);
dol_fiche_head($head, 'info', $langs->trans("PaymentCustomerInvoice"), 0, 'payment');
print '<table class="border" width="100%">';
// Ref
print '<tr><td valign="top" width="140">' . $langs->trans('Ref') . '</td><td colspan="3">' . $paiement->id . '</td></tr>';
print '</table>';
print '<br>';
print '<table width="100%"><tr><td>';
dol_print_object_info($paiement);
print '</td></tr></table>';
print '</div>';
$db->close();
llxFooter();
开发者ID:TAASA,项目名称:Dolibarr-ERP-3.8.1,代码行数:31,代码来源:info.php

示例9: set_infocredit

 /**
  *	Set withdrawal to credited status
  *
  *	@param	User		$user		id of user
  *	@param 	timestamp	$date		date of action
  *	@return	int						>0 if OK, <0 if KO
  */
 function set_infocredit($user, $date)
 {
     global $conf, $langs;
     $error = 0;
     if ($this->_fetched == 1) {
         if ($date >= $this->date_trans) {
             if ($this->db->begin()) {
                 $sql = " UPDATE " . MAIN_DB_PREFIX . "prelevement_bons ";
                 $sql .= " SET fk_user_credit = " . $user->id;
                 $sql .= ", statut = 2";
                 $sql .= ", date_credit = '" . $this->db->idate($date) . "'";
                 $sql .= " WHERE rowid=" . $this->id;
                 $sql .= " AND entity = " . $conf->entity;
                 $sql .= " AND statut = 1";
                 if ($this->db->query($sql)) {
                     $langs->load('withdrawals');
                     $subject = $langs->trans("InfoCreditSubject", $this->ref);
                     $message = $langs->trans("InfoCreditMessage", $this->ref, dol_print_date($date, 'dayhour'));
                     //Add payment of withdrawal into bank
                     $bankaccount = $conf->global->PRELEVEMENT_ID_BANKACCOUNT;
                     $facs = array();
                     $amounts = array();
                     $facs = $this->getListInvoices(1);
                     $num = count($facs);
                     for ($i = 0; $i < $num; $i++) {
                         $fac = new Facture($this->db);
                         $fac->fetch($facs[$i][0]);
                         $amounts[$fac->id] = $facs[$i][1];
                         $result = $fac->set_paid($user);
                     }
                     $paiement = new Paiement($this->db);
                     $paiement->datepaye = $date;
                     $paiement->amounts = $amounts;
                     $paiement->paiementid = 3;
                     //
                     $paiement->num_paiement = $this->ref;
                     $paiement_id = $paiement->create($user);
                     if ($paiement_id < 0) {
                         dol_syslog(get_class($this) . "::set_credite AddPayment Error");
                         $error++;
                     } else {
                         $result = $paiement->addPaymentToBank($user, 'payment', '(WithdrawalPayment)', $bankaccount, '', '');
                         if ($result < 0) {
                             dol_syslog(get_class($this) . "::set_credite AddPaymentToBank Error");
                             $error++;
                         }
                     }
                     // Update prelevement line
                     // TODO: Translate to ligneprelevement.class.php
                     $sql = " UPDATE " . MAIN_DB_PREFIX . "prelevement_lignes";
                     $sql .= " SET statut = 2";
                     $sql .= " WHERE fk_prelevement_bons = " . $this->id;
                     if (!$this->db->query($sql)) {
                         dol_syslog(get_class($this) . "::set_credite Update lines Error");
                         $error++;
                     }
                 } else {
                     dol_syslog(get_class($this) . "::set_infocredit Update Bons Error");
                     $error++;
                 }
                 /*
                  * End of procedure
                  */
                 if ($error == 0) {
                     $this->db->commit();
                     return 0;
                 } else {
                     $this->db->rollback();
                     dol_syslog("bon-prelevment::set_infocredit ROLLBACK ");
                     return -1;
                 }
             } else {
                 dol_syslog(get_class($this) . "::set_infocredit 1025 Open SQL transaction impossible ");
                 return -1025;
             }
         } else {
             dol_syslog("bon-prelevment::set_infocredit 1027 Date de credit < Date de trans ");
             return -1027;
         }
     } else {
         return -1026;
     }
 }
开发者ID:LionSystemsSolutions,项目名称:El-Canelo-ERP,代码行数:90,代码来源:bonprelevement.class.php

示例10: while

         $sql = "SELECT p.rowid, p.datep as dp, pf.amount, p.statut,";
         $sql .= " p.fk_user_creat, u.login, u.rowid as userid";
         $sql .= " FROM " . MAIN_DB_PREFIX . "paiement_facture as pf,";
         $sql .= " " . MAIN_DB_PREFIX . "paiement as p";
         $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "user as u ON p.fk_user_creat = u.rowid";
         $sql .= " WHERE pf.fk_paiement = p.rowid";
         $sql .= " AND p.entity = " . $conf->entity;
         $sql .= " AND pf.fk_facture = " . $fac->id;
         $sql .= " ORDER BY p.datep ASC";
         $resqlp = $db->query($sql);
         if ($resqlp) {
             $nump = $db->num_rows($resqlp);
             $j = 0;
             while ($j < $nump) {
                 $objp = $db->fetch_object($resqlp);
                 $paymentstatic = new Paiement($db);
                 $paymentstatic->id = $objp->rowid;
                 $userstatic->id = $objp->userid;
                 $userstatic->login = $objp->login;
                 $TData[] = array('date' => $db->jdate($objp->dp), 'link' => $langs->trans("Payment") . ' ' . $paymentstatic->getNomUrl(1), 'status' => '', 'amount' => -$objp->amount, 'author' => $userstatic->getLoginUrl(1));
                 $TDataSort[] = $db->jdate($objp->dp);
                 $j++;
             }
             $db->free($resqlp);
         } else {
             dol_print_error($db);
         }
     }
 } else {
     dol_print_error($db);
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:recap-compta.php

示例11: Paiement

            print '</tr>';
            $i++;
        }
        print "</table>";
        print '<div class="tabsAction">';
        if ($user->rights->banque->cheque) {
            print '<input type="submit" class="button" value="' . $langs->trans('NewCheckDepositOn', $account_label) . '">';
        } else {
            print '<a class="butActionRefused" href="#" title="' . $langs->trans("NotEnoughPermissions") . '">' . $langs->trans('NewCheckDepositOn', $account_label) . '</a>';
        }
        print '</div><br>';
        print '</form>';
    }
} else {
    $linkback = '<a href="' . $_SERVER["PHP_SELF"] . '?leftmenu=customers_bills_checks&action=new">' . $langs->trans("BackToList") . '</a>';
    $paymentstatic = new Paiement($db);
    $accountlinestatic = new AccountLine($db);
    $accountstatic = new Account($db);
    $accountstatic->id = $object->account_id;
    $accountstatic->label = $object->account_label;
    print '<table class="border" width="100%">';
    print '<tr><td width=20%>';
    print '<table class="nobordernopadding" width="100%"><tr><td>';
    print $langs->trans('Ref');
    print '</td>';
    if ($action != 'editref') {
        print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editref&amp;id=' . $object->id . '">' . img_edit($langs->trans('SetRef'), 1) . '</a></td>';
    }
    print '</tr></table>';
    print '</td><td colspan="2">';
    if ($action == 'editref') {
开发者ID:Samara94,项目名称:dolibarr,代码行数:31,代码来源:card.php

示例12: _setPayment

function _setPayment($user, $db, $conf, $langs)
{
    $TPayment = GETPOST('payment', 'array');
    $fk_bank = GETPOST('fk_bank', 'int');
    if (empty($fk_bank)) {
        if (function_exists('setEventMessages')) {
            setEventMessages($langs->transnoentitiesnoconv('ErrorPaymentImportNoBankSelected'), array(), 'errors');
        } else {
            setEventMessage($langs->transnoentitiesnoconv('ErrorPaymentImportNoBankSelected'), 'errors');
        }
        return;
    }
    $mode_reglement = GETPOST('paiementcode', 'alpha');
    $TFactureNotFound = $TPaimentError = $TWriteBankFail = array();
    $nb_facture_not_found = $nb_payment = $nb_writebank = 0;
    foreach ($TPayment as $TInfoPayment) {
        $facture_ref = trim($TInfoPayment['facture_ref']);
        $rib = trim($TInfoPayment['rib']);
        $amount = price2num($TInfoPayment['amount']);
        $date_creation = trim($TInfoPayment['date_creation']);
        $num_payment = trim($TInfoPayment['num_payment']);
        $note = trim($TInfoPayment['note']);
        if ($amount <= 0) {
            continue;
        }
        $facture = new Facture($db);
        if ($facture->fetch(null, $facture_ref) > 0) {
            if ($facture->paye) {
                $TFactureAlreadyPaid[] = $langs->transnoentitiesnoconv('paymentimport_warningFactureAlreadyPaid', $facture_ref);
                continue;
                // Sécurité si jamais la facture est déjà payé on ne saisie pas de nouveau règlement
            }
            if (!empty($conf->global->PAYMENTIMPORT_FORCE_DATE_TODAY)) {
                $datepaye = dol_mktime(date('H'), date('m'), date('s'), date('m'), date('d'), date('Y'));
            } else {
                $date_creation = explode('/', $date_creation);
                $datepaye = dol_mktime(12, 0, 0, $date_creation[1], $date_creation[0], $date_creation[2]);
            }
            if (empty($mode_reglement)) {
                $paiementcode = $facture->mode_reglement_code;
            } else {
                $paiementcode = $mode_reglement;
            }
            // Creation of payment line
            $paiement = new Paiement($db);
            $paiement->datepaye = $datepaye;
            $paiement->amounts = array($facture->id => $amount);
            // Array with all payments dispatching
            $paiement->paiementid = dol_getIdFromCode($db, $paiementcode, 'c_paiement');
            $paiement->num_paiement = $num_payment;
            $paiement->note = $note;
            $paiement_id = $paiement->create($user, 1);
            if ($paiement_id > 0) {
                $nb_payment++;
                $label = '(CustomerInvoicePayment)';
                $result = $paiement->addPaymentToBank($user, 'payment', $label, $fk_bank, '', '');
                if ($result > 0) {
                    $nb_writebank++;
                } else {
                    $TWriteBankFail[] = $langs->transnoentitiesnoconv('paymentimport_errorwritebank', $facture_ref);
                }
            } else {
                $TPaimentError[] = $langs->transnoentitiesnoconv('paymentimport_errorpayment', $facture_ref, $rib, $amount);
            }
        } else {
            $TFactureNotFound[] = $langs->transnoentitiesnoconv('paymentimport_errorfactnotfound', $facture_ref);
            $nb_facture_not_found++;
        }
    }
    if ($nb_facture_not_found > 0) {
        if (function_exists('setEventMessages')) {
            setEventMessages($langs->trans('paymentimport_nb_facture_not_found', $nb_facture_not_found), array(), 'errors');
        } else {
            setEventMessage($langs->trans('paymentimport_nb_facture_not_found', $nb_facture_not_found), 'errors');
        }
    }
    if ($nb_payment > 0) {
        if (function_exists('setEventMessages')) {
            setEventMessages($langs->trans('paymentimport_nb_payment', $nb_payment), array());
        } else {
            setEventMessage($langs->trans('paymentimport_nb_payment', $nb_payment));
        }
    }
    if ($nb_writebank > 0) {
        if (function_exists('setEventMessages')) {
            setEventMessages($langs->trans('paymentimport_nb_writebank', $nb_writebank), array());
        } else {
            setEventMessage($langs->trans('paymentimport_nb_writebank', $nb_writebank));
        }
    }
    $_SESSION['TFactureNotFound'] = $TFactureNotFound;
    $_SESSION['TPaimentError'] = $TPaimentError;
    $_SESSION['TWriteBankFail'] = $TWriteBankFail;
    $_SESSION['TFactureAlreadyPaid'] = $TFactureAlreadyPaid;
}
开发者ID:ATM-Consulting,项目名称:dolibarr_module_paymentimport,代码行数:95,代码来源:paymentimport.lib.php

示例13: llxHeader

	    $langs->load("errors");
		$mesg='<div class="error">'.$langs->trans($paiement->error).'</div>';
		$db->rollback();
	}
}


/*
 * View
 */

llxHeader();

$thirdpartystatic=new Societe($db);

$paiement = new Paiement($db);
$result=$paiement->fetch($id);
if ($result <= 0)
{
	dol_print_error($db,'Payement '.$id.' not found in database');
	exit;
}

$html = new Form($db);

$h=0;

$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$id;
$head[$h][1] = $langs->trans("Card");
$hselected = $h;
$h++;
开发者ID:remyyounes,项目名称:dolibarr,代码行数:31,代码来源:fiche.php

示例14: tripusr_paypal

function tripusr_paypal()
{
    global $root;
    require $root . 'libs' . DS . 'caddie_paie.php';
    $paiement = Paiement::getInstance();
    $paiement->addProduct('Voyage', 10);
    $paiement->sendRequest();
}
开发者ID:bontiv,项目名称:intrateb,代码行数:8,代码来源:tripusr.php

示例15: elseif

     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">';
 //print "> ".$conf->global->PAYMENT_ADDON." - ".$file;
 if ($conf->global->PAYMENT_ADDON == $file || $conf->global->PAYMENT_ADDON . '.php' == $file) {
     print img_picto($langs->trans("Activated"), 'switch_on');
 } else {
     print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setmod&value=' . preg_replace('/\\.php$/', '', $file) . '&scandir=' . $module->scandir . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>';
 }
 print '</td>';
 $payment = new Paiement($db);
 $payment->initAsSpecimen();
 // Example
 $htmltooltip = '';
 $htmltooltip .= '' . $langs->trans("Version") . ': <b>' . $module->getVersion() . '</b><br>';
 $nextval = $module->getNextValue($mysoc, $payment);
 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,代码来源:payment.php


注:本文中的Paiement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。