Merged revisions 3015-3016 via svnmerge from
svn+ssh://danydb@svn/svn/phpcompta/branches/rel500 ........ r3015 | danydb | 2010-04-16 12:25:57 +0200 (Fri, 16 Apr 2010) | 5 lines Quick_writing ============= Limit the operation to the ODS ledger and no longer to any ledgers ........ r3016 | danydb | 2010-04-16 12:36:14 +0200 (Fri, 16 Apr 2010) | 8 lines TVA_IPOPUP ========== Add a new widget to let user select a VAT into a POPUP Add javascript to set the label and tva_id Check if TVA is valid (compute.php, acc_ledger.php) ........
This commit is contained in:
parent
e3eb3d7434
commit
9ac52c4ce6
8 changed files with 117 additions and 16 deletions
|
|
@ -49,20 +49,16 @@ foreach (array('t','c','p','q','n','gDossier') as $a) {
|
|||
$cn=new Database(dossier::id());
|
||||
$User=new User($cn);
|
||||
$User->Check();
|
||||
|
||||
/**
|
||||
*@todo check with my_own if the vat must be computed instead of
|
||||
*a special value
|
||||
*/
|
||||
// Retrieve the rate of vat, it $t == -1 it means no VAT
|
||||
if ( $t != -1 ){
|
||||
$tva_rate=new Acc_Tva($cn);
|
||||
$tva_rate->set_parameter('id',$t);
|
||||
/**
|
||||
*@todo if the tva_rate->load failed we have to return an
|
||||
*error message "invalid tva"
|
||||
*if the tva_rate->load failed we don't compute tva
|
||||
*/
|
||||
$tva_rate->load();
|
||||
if ( $tva_rate->load() != 0 ) {
|
||||
$tva_rate->set_parameter('rate',0);
|
||||
}
|
||||
}
|
||||
|
||||
$total=new Acc_Compute();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue