Jump to content

Data vencimento original no boleto


Recommended Posts

Salve Galera,

Forneço como forma de pagamento boleto próprio da Caixa SigCB, o qual tenho contrato direto, porem quando o cliente atrasadinho gera o boleto ai fica a data do vencimento, porem apliquei o código abaixo para aplicar +1 dia a partir da geração do boleto:

function Data($data){
	$expdata = explode("-",$data);
	$data = $expdata[2]."/".$expdata[1]."/".$expdata[0];
	return $data;
}
/* */
$year = substr($data [duedate],0,4);
$month = substr($data [duedate],5,2);
$day = substr($data [duedate],8,2);
/* */
function MaisDias($day,$toadd) {
     $tmp = explode("/",$day);
     $dadate = mktime(0,0,0,$tmp[1],$tmp[0]+($toadd),$tmp[2]);
     return date('d/m/Y',$dadate);
}

$venc = date("d/m/Y",mktime(0,0,0,$month,$day,$year));
$venc = strtotime($venc);

$today = date("d/m/Y");
$hoje = strtotime($today);

if ($venc < $hoje){$data_venc = date("d/m/Y",mktime(0,0,0,$month,$day,$year));}
else {$data_venc = MaisDias($today,1);}

Agora o que eu queria fazer era no campo de instruções para o caixa/recebedor, não receber depois de 30 dias do vencimento original, porem, a variável $data_venc imprime a data atualizada para pagamento.

A questão é, tem algum esquema para informar o vencimento original da fatura no boleto?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...

Important Information

Do you agree with our terms?