This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::uses('AppController', 'Controller'); | |
/** | |
* PriceLists Controller | |
* | |
* @property PriceList $PriceList | |
*/ | |
class PriceListsController extends AppController { | |
var $layout = 'default_notop'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Routes configuration | |
* | |
* In this file, you set up routes to your controllers and their actions. | |
* Routes are very important mechanism that allows you to freely connect | |
* different urls to chosen controllers and their actions (functions). | |
* | |
* PHP 5 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::uses('AppController', 'Controller'); | |
/** | |
* PriceLists Controller | |
* | |
* @property PriceList $PriceList | |
*/ | |
class PriceListsController extends AppController { | |
var $layout = 'default_notop'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function resetPasswords() { | |
$users = $this->User->find('all', array( | |
'conditions' => array('username REGEXP' => '[0-9]+') | |
) | |
); | |
foreach ($users as $user => $item) { | |
$this->User->read(null, $item['User']['id']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function resetPasswords() { | |
$users = $this->User->find('all', array( | |
'conditions' => array('username REGEXP' => '[0-9]+') | |
) | |
); | |
foreach ($users as $user => $item) { | |
$this->User->read(null, $item['User']['id']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function resetPasswords() { | |
$users = $this->User->find('all', array( | |
'conditions' => array('username REGEXP' => '[0-9]+') | |
) | |
); | |
foreach ($users as $user => $item) { | |
$this->User->read(null, $item['User']['id']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function resetPasswords() { | |
$users = $this->User->find('all', array( | |
'conditions' => array('username REGEXP' => '[0-9]+') | |
) | |
); | |
foreach ($users as $user => $item) { | |
$this->User->create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array( | |
'password' => '*****', | |
'username' => array( | |
(int) 0 => 'login necessary' | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def nfe_export_txt(self, cr, uid, ids, nfe_environment='1', context=False): | |
StrFile = '' | |
StrNF = 'NOTA FISCAL|%s|\n' % len(ids) | |
StrFile = StrNF | |
for inv in self.browse(cr, uid, ids, context={'lang': 'pt_BR'}): | |
#Endereço do company | |
company_addr = self.pool.get('res.partner').address_get(cr, uid, [inv.company_id.partner_id.id], ['default']) | |
company_addr_default = self.pool.get('res.partner.address').browse(cr, uid, [company_addr['default']], context={'lang': 'pt_BR'})[0] | |
#nfe_key = unicode(company_addr_default.state_id.ibge_code).strip().rjust(2, u'0') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
indIEDest = 2 | |
if inv.partner_id.inscr_est: | |
indIEDest = 1 |
OlderNewer