Changeset 482

Show
Ignore:
Timestamp:
12/02/08 10:18:12 (1 month ago)
Author:
nicolas
Message:

Correction calendrier, ecriture gestion et recherche ventes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/apps/intranet/i18n/messages.fr_FR.xml

    r447 r482  
    987987    <target>imprimé par nos soins</target> 
    988988  </trans-unit> 
     989  <trans-unit> 
     990    <source>are you sure?</source> 
     991    <target>êtes-vous sûrs ?</target> 
     992  </trans-unit> 
    989993  </body> 
    990994  </file> 
  • trunk/apps/intranet/modules/calendar/templates/listSuccess.php

    r297 r482  
    3030 
    3131<?php echo javascript_tag(" 
    32   window.open('http://".$_SERVER['HTTP_HOST']."/app/phpicalendar/week.php?cal=http%3A%2F%2F".$sf_user->getSubscriber()->getUser().":".$sf_user->getSubscriber()->getPassword()."@".$_SERVER['HTTP_HOST']."%2Fcalendar%2Fapimo', 'calendar', 'location=no,toolbar=no,scrollbars=yes,width=900,height=650'); 
    3332  window.location.href='/homepage/'; 
    3433") ?> 
  • trunk/apps/intranet/modules/lease_event/actions/actions.class.php

    r435 r482  
    7373    if($lease_charges_lessor): 
    7474    foreach($lease_charges_lessor as $charge): 
     75      $total = $total + $charge->getAmount(); 
     76      $i++; 
     77    endforeach; 
     78    if($total>0): 
     79      $lease_event = new Lease_event(); 
     80      $lease_event->setLeaseId($this->getRequestParameter('lease_id')); 
     81      $lease_event->setTypeId(10); 
     82      if ($this->getRequestParameter('reported_at')) 
     83      { 
     84        list($d, $m, $y) = sfI18N::getDateForCulture($this->getRequestParameter('reported_at'), $this->getUser()->getCulture()); 
     85        $lease_event->setReportedAt("$y-$m-$d"); 
     86      } 
     87      if ($this->getRequestParameter('limit_at')) 
     88      { 
     89        list($d, $m, $y) = sfI18N::getDateForCulture($this->getRequestParameter('limit_at'), $this->getUser()->getCulture()); 
     90        $lease_event->setLimitAt("$y-$m-$d"); 
     91      } 
     92      $lease_event->setPeriod($this->getRequestParameter('period_year').'-'.$this->getRequestParameter('period_month').'-01'); 
     93      $lease_event->setAmount($total); 
     94      $lease_event->setCreatedBy($this->getUser()->getSubscriberId()); 
     95      $lease_event->setUpdatedBy($this->getUser()->getSubscriberId()); 
     96      $lease_event->save(); 
     97    endif; 
     98    foreach($lease_charges_lessor as $charge): 
    7599      $lease_event_charge = new Lease_event_charge(); 
    76100      $lease_event_charge->setEventId($lease_event->getId()); 
     
    81105      $lease_event_charge->setBilledAt($charge->getBilledAt()); 
    82106      $lease_event_charge->save(); 
    83  
    84107      $charge->setVentilatedIs(1); 
    85108      $charge->save(); 
    86       $total = $total + $charge->getAmount(); 
    87       $i++; 
    88109    endforeach; 
    89     if($total>0): 
    90       $lease_event = new Lease_event(); 
    91       $lease_event->setLeaseId($this->getRequestParameter('lease_id')); 
    92       $lease_event->setTypeId(10); 
    93       if ($this->getRequestParameter('reported_at')) 
    94       { 
    95         list($d, $m, $y) = sfI18N::getDateForCulture($this->getRequestParameter('reported_at'), $this->getUser()->getCulture()); 
    96         $lease_event->setReportedAt("$y-$m-$d"); 
    97       } 
    98       if ($this->getRequestParameter('limit_at')) 
    99       { 
    100         list($d, $m, $y) = sfI18N::getDateForCulture($this->getRequestParameter('limit_at'), $this->getUser()->getCulture()); 
    101         $lease_event->setLimitAt("$y-$m-$d"); 
    102       } 
    103       $lease_event->setPeriod($this->getRequestParameter('period_year').'-'.$this->getRequestParameter('period_month').'-01'); 
    104       $lease_event->setAmount($total); 
    105       $lease_event->setCreatedBy($this->getUser()->getSubscriberId()); 
    106       $lease_event->setUpdatedBy($this->getUser()->getSubscriberId()); 
    107       $lease_event->save(); 
    108     endif; 
    109110    endif; 
    110111 
     
    231232    if($lease_charges_lessor): 
    232233    foreach($lease_charges_lessor as $charge): 
     234      $total = $total + $charge->getAmount(); 
     235      $i++; 
     236    endforeach; 
     237    if($total>0): 
     238      $lease_event = new Lease_event(); 
     239      $lease_event->setLeaseId($this->getRequestParameter('lease_id')); 
     240      $lease_event->setTypeId(11); 
     241      if ($this->getRequestParameter('reported_at')) 
     242      { 
     243        list($d, $m, $y) = sfI18N::getDateForCulture($this->getRequestParameter('reported_at'), $this->getUser()->getCulture()); 
     244        $lease_event->setReportedAt("$y-$m-$d"); 
     245      } 
     246      if ($this->getRequestParameter('limit_at')) 
     247      { 
     248        list($d, $m, $y) = sfI18N::getDateForCulture($this->getRequestParameter('limit_at'), $this->getUser()->getCulture()); 
     249        $lease_event->setLimitAt("$y-$m-$d"); 
     250      } 
     251      $lease_event->setPeriod($this->getRequestParameter('period_year').'-'.$this->getRequestParameter('period_month').'-01'); 
     252      $lease_event->setAmount($total); 
     253      $lease_event->setCreatedBy($this->getUser()->getSubscriberId()); 
     254      $lease_event->setUpdatedBy($this->getUser()->getSubscriberId()); 
     255      $lease_event->save(); 
     256    endif; 
     257    foreach($lease_charges_lessor as $charge): 
    233258      $lease_event_charge = new Lease_event_charge(); 
    234259      $lease_event_charge->setEventId($lease_event->getId()); 
     
    239264      $lease_event_charge->setBilledAt($charge->getBilledAt()); 
    240265      $lease_event_charge->save(); 
    241  
    242266      $charge->setVentilatedIs(1); 
    243267      $charge->save(); 
    244       $total = $total + $charge->getAmount(); 
    245       $i++; 
    246268    endforeach; 
    247     if($total>0): 
    248       $lease_event = new Lease_event(); 
    249       $lease_event->setLeaseId($this->getRequestParameter('lease_id')); 
    250       $lease_event->setTypeId(11); 
    251       if ($this->getRequestParameter('reported_at')) 
    252       { 
    253         list($d, $m, $y) = sfI18N::getDateForCulture($this->getRequestParameter('reported_at'), $this->getUser()->getCulture()); 
    254         $lease_event->setReportedAt("$y-$m-$d"); 
    255       } 
    256       if ($this->getRequestParameter('limit_at')) 
    257       { 
    258         list($d, $m, $y) = sfI18N::getDateForCulture($this->getRequestParameter('limit_at'), $this->getUser()->getCulture()); 
    259         $lease_event->setLimitAt("$y-$m-$d"); 
    260       } 
    261       $lease_event->setPeriod($this->getRequestParameter('period_year').'-'.$this->getRequestParameter('period_month').'-01'); 
    262       $lease_event->setAmount($total); 
    263       $lease_event->setCreatedBy($this->getUser()->getSubscriberId()); 
    264       $lease_event->setUpdatedBy($this->getUser()->getSubscriberId()); 
    265       $lease_event->save(); 
    266     endif; 
    267269    endif; 
    268270 
  • trunk/apps/intranet/modules/sales/templates/_search.php

    r435 r482  
    153153 
    154154<?php 
    155 if($sf_user->getAttribute('search_district_id') && $sf_user->getAttribute('search_city_id')) 
     155if($sf_user->getAttribute('search_district_id') || $sf_user->getAttribute('search_city_id')) 
    156156echo javascript_tag(" 
    157   new Ajax.Updater('apidistrict', '".url_for('apidistrict/listWithSelect?city_id='.$sf_user->getAttribute('search_city_id').'&value='.$sf_user->getAttribute('search_district_id'))."', {asynchronous:true, evalScripts:false}); 
     157  new Ajax.Updater('apidistrict', '".url_for('apidistrict/listWithSelect?city_id='.$sf_user->getAttribute('search_city_id', '0').'&value='.$sf_user->getAttribute('search_district_id', '0'))."', {asynchronous:true, evalScripts:false}); 
    158158"); 
    159159?>