本文整理汇总了PHP中AccountLine::update方法的典型用法代码示例。如果您正苦于以下问题:PHP AccountLine::update方法的具体用法?PHP AccountLine::update怎么用?PHP AccountLine::update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AccountLine
的用法示例。
在下文中一共展示了AccountLine::update方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: AccountLine
// Charge objet actuel
$result = $subscription->fetch($_POST["rowid"]);
if ($result > 0) {
$db->begin();
$errmsg = '';
if ($subscription->fk_bank) {
$accountline = new AccountLine($db);
$result = $accountline->fetch($subscription->fk_bank);
// If transaction consolidated
if ($accountline->rappro) {
$errmsg = $langs->trans("SubscriptionLinkedToConciliatedTransaction");
} else {
$accountline->datev = dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
$accountline->dateo = dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
$accountline->amount = $_POST["amount"];
$result = $accountline->update($user);
if ($result < 0) {
$errmsg = $accountline->error;
}
}
}
if (!$errmsg) {
// Modifie valeures
$subscription->dateh = dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
$subscription->datef = dol_mktime($_POST['datesubendhour'], $_POST['datesubendmin'], 0, $_POST['datesubendmonth'], $_POST['datesubendday'], $_POST['datesubendyear']);
$subscription->note = $_POST["note"];
$subscription->amount = $_POST["amount"];
//print 'datef='.$subscription->datef.' '.$_POST['datesubendday'];
$result = $subscription->update($user);
if ($result >= 0 && !count($subscription->errors)) {
$db->commit();