task #10501: Can use point of sale with different bank accounts

This commit is contained in:
Juanjo Menent 2011-07-29 10:50:16 +00:00
parent f1169e906e
commit d45ac7d297

View File

@ -1,6 +1,7 @@
<?php <?php
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net> /* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2008-2009 Laurent Destailleur <eldy@uers.sourceforge.net> * Copyright (C) 2008-2009 Laurent Destailleur <eldy@uers.sourceforge.net>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -27,7 +28,10 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php');
$obj_facturation = unserialize($_SESSION['serObjFacturation']); $obj_facturation = unserialize($_SESSION['serObjFacturation']);
unset ($_SESSION['serObjFacturation']); unset ($_SESSION['serObjFacturation']);
switch ( $_GET['action'] ) $action =GETPOST('action');
$bankaccountid=GETPOST('cashdeskbank');
switch ($action)
{ {
default: default:
@ -246,8 +250,8 @@ switch ( $_GET['action'] )
$paiement_id = $payment->create($user); $paiement_id = $payment->create($user);
if ($paiement_id > 0) if ($paiement_id > 0)
{ {
$bankaccountid=0;
if ( $obj_facturation->mode_reglement() == 'ESP' ) /*if ( $obj_facturation->mode_reglement() == 'ESP' )
{ {
$bankaccountid=$conf_fkaccount_cash; $bankaccountid=$conf_fkaccount_cash;
} }
@ -258,7 +262,7 @@ switch ( $_GET['action'] )
if ( $obj_facturation->mode_reglement() == 'CB' ) if ( $obj_facturation->mode_reglement() == 'CB' )
{ {
$bankaccountid=$conf_fkaccount_cb; $bankaccountid=$conf_fkaccount_cb;
} }*/
if (! $error) if (! $error)
{ {