Example #1
0
    $object->fetch($id);
    $datepaye = dol_mktime(12, 0, 0, $_POST['datepmonth'], $_POST['datepday'], $_POST['datepyear']);
    $res = $object->update_date($datepaye);
    if ($res === 0) {
        setEventMessage($langs->trans('PaymentDateUpdateSucceeded'));
    } else {
        setEventMessage($langs->trans('PaymentDateUpdateFailed'), 'errors');
    }
}
/*
 * View
 */
llxHeader();
$result = $object->fetch($id);
$form = new Form($db);
$head = payment_supplier_prepare_head($object);
dol_fiche_head($head, 'payment', $langs->trans('SupplierPayment'), 0, 'payment');
if ($result > 0) {
    /*
     * Confirmation de la suppression du paiement
     */
    if ($action == 'delete') {
        print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete');
    }
    /*
     * Confirmation de la validation du paiement
     */
    if ($action == 'valide') {
        print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide');
    }
    print '<table class="border" width="100%">';
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
/**
 *   	\file       htdocs/fourn/paiement/info.php
 *		\ingroup    facture
 *		\brief      Onglet info d'un paiement fournisseur
 */
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT . '/fourn/class/paiementfourn.class.php';
require DOL_DOCUMENT_ROOT . '/core/lib/payments.lib.php';
$langs->load("bills");
$langs->load("suppliers");
$langs->load("companies");
$paiement = new PaiementFourn($db);
$paiement->fetch($_GET["id"], $user);
$paiement->info($_GET["id"]);
/*
 * View
 */
llxHeader();
$head = payment_supplier_prepare_head($paiement);
dol_fiche_head($head, 'info', $langs->trans("SupplierPayment"), 0, 'payment');
print '<table width="100%"><tr><td>';
dol_print_object_info($paiement);
print '</td></tr></table>';
print '</div>';
$db->close();
llxFooter();