public function subtractOneNumber($journalVoucherIds, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    $this->JournalVoucher->setConnection($databaseConnectionName)
      ->whereIn('id', $journalVoucherIds)
      ->update(array('number' => $this->DB->raw('number - 1')));

    return true;
  }
public function subtractOneNumber($journalVoucherIds, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    $this->JournalVoucher->setConnection($databaseConnectionName)
      ->whereIn('id', $journalVoucherIds)
      ->update(array('number' => $this->DB->raw('number - 1')));

    return true;
  }
public function subtractOneNumber ( $ journalVoucherIds , $ databaseConnectionName = null ) { if ( empty ( $ databaseConnectionName ) ) { $ databaseConnectionName = $ this -> databaseConnectionName ; } $ this -> JournalVoucher -> setConnection ( $ databaseConnectionName ) -> whereIn ( 'id' , $ journalVoucherIds ) -> update ( array ( 'number' => $ this -> DB -> raw ( 'number - 1' ) ) ) ; return true ; }
Flag sales with accounting journals generated

@param array $orderIds
@param integer $organizationId
@param string $databaseConnectionName

@param Mgallegos\DecimaSale\Sale\Client $Client

@return boolean
Flag sales with accounting journals generated