- SQL trae fd.DIASVENC en ambas queries de ventas - total==0 → codFormaPago=CIAC, plazoDias=0, fechaVence=fechaFactura - total>0 → codFormaPago=CR, plazoDias=DIASVENC, fechaVence=FECHAFACT+DIASVENC días Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>