Criando serviço de liberação por adiplência
This commit is contained in:
parent
d646ac1a82
commit
ddd9125921
2 changed files with 12 additions and 7 deletions
5
vendor/action/liberation/liberation.php
vendored
5
vendor/action/liberation/liberation.php
vendored
|
|
@ -33,7 +33,10 @@ try{
|
|||
/** Consulta por movimentações em atraso de um determinado cliente pelo seu CNS */
|
||||
$FinancialMovementsResult = $FinancialMovements->SearchDebit($FinancialMovementsValidate->getCns());
|
||||
|
||||
print_r($FinancialMovementsResult);
|
||||
foreach($FinancialMovementsResult as $FinancialMovementsKey => $Result){
|
||||
|
||||
echo $Result->financial_movements_id
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
|
|
|||
14
vendor/model/FinancialMovements.class.php
vendored
14
vendor/model/FinancialMovements.class.php
vendored
|
|
@ -413,12 +413,14 @@ class FinancialMovements
|
|||
$this->cns = $cns;
|
||||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'SELECT fm.*
|
||||
FROM financial_movements fm
|
||||
INNER JOIN companies c ON fm.company_id = c.company_id
|
||||
WHERE c.cns = :cns
|
||||
AND fm.movement_date_paid IS NULL
|
||||
AND fm.movement_date_scheduled <= CURRENT_DATE';
|
||||
$this->sql = 'SELECT fm.financial_movements_id,
|
||||
fm.movement_date_scheduled,
|
||||
DATEDIFF(CURRENT_DATE, fm.movement_date_scheduled) AS days_passed
|
||||
FROM financial_movements fm
|
||||
INNER JOIN companies c ON fm.company_id = c.company_id
|
||||
WHERE c.cns = :cns
|
||||
AND fm.movement_date_paid IS NULL
|
||||
AND fm.movement_date_scheduled <= CURRENT_DATE;';
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue