Actualizar index.html
This commit is contained in:
@@ -532,14 +532,19 @@
|
||||
|
||||
sigArea.classList.add('hidden');
|
||||
|
||||
// 1. Lógica Stripe: Solo si está configurado Y el presupuesto NO está pagado
|
||||
// 1. Lógica Stripe: Mostrar SOLO si está configurado, YA ESTÁ FIRMADO y NO está pagado.
|
||||
let bSet = globalCompanyData?.billing_settings || {};
|
||||
if (typeof bSet === 'string') { try { bSet = JSON.parse(bSet); } catch(e) {} }
|
||||
|
||||
if (bSet.stripe_enabled && bSet.stripe_pk && q.status !== 'paid') {
|
||||
// Comprobamos si el cliente ya ha plasmado su firma
|
||||
const isSigned = (q.status === 'accepted' || q.status === 'converted');
|
||||
|
||||
if (bSet.stripe_enabled && bSet.stripe_pk && isSigned && q.status !== 'paid') {
|
||||
// Si ya firmó, enseñamos el botón morado de Stripe
|
||||
btnStripe.classList.remove('hidden');
|
||||
btnStripe.classList.add('flex');
|
||||
} else {
|
||||
// Si no ha firmado todavía (o ya pagó), lo ocultamos
|
||||
btnStripe.classList.add('hidden');
|
||||
btnStripe.classList.remove('flex');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user