feat: facturación primer pago, fixes SAT/MP, autocompletado RFCs/conceptos
Backend: - Notificación email al admin cuando llega primer pago aprobado (sin factura auto) - Endpoints GET /pagos-sin-factura y POST /emitir-factura-pago para admin global - Fix vinculación org Facturapi Horux 360 (69f23a5a242e0af47a41fa0d) - Fix webhook MP: validación defensiva de x-signature header - Fix autocompleto RFCs: eliminado filtro por contribuyenteId - Fix autocompleto conceptos: eliminado filtro por contribuyenteId - SAT fixes: anti-bot CSF scraper, request reuse, date range fix, stale job thresholds - SAT sync request reuse across jobs para evitar agotar cuota diaria - Typo fix MP_ACCESS_TOKEN en .env - Trial invitations system backend Frontend: - Nueva página /admin/facturas-pendientes con tabla y emisión manual - Métrica 'Facturas pendientes' en /clientes (clickable) - Navegación onboarding FIEL/CSD corregida - Sidebar themes sincronizados - Fix SAT portal migration scraper (NetIQ) - Trial invitation acceptance pages
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
import { apiClient } from './client';
|
||||
|
||||
export interface TenantSubscription {
|
||||
id: string;
|
||||
amount: number;
|
||||
currentPeriodEnd: string | null;
|
||||
status: string;
|
||||
}
|
||||
|
||||
export interface Tenant {
|
||||
id: string;
|
||||
nombre: string;
|
||||
@@ -11,6 +18,7 @@ export interface Tenant {
|
||||
/** Memberships activos (matches el `_count.memberships` que retorna `getAllTenants`). */
|
||||
memberships: number;
|
||||
};
|
||||
subscriptions?: TenantSubscription[];
|
||||
}
|
||||
|
||||
export type TenantPlan = 'trial' | 'custom' | 'mi_empresa' | 'mi_empresa_plus' | 'business_control' | 'business_cloud';
|
||||
@@ -46,6 +54,8 @@ export interface UpdateTenantData {
|
||||
rfc?: string;
|
||||
plan?: TenantPlan;
|
||||
active?: boolean;
|
||||
amount?: number;
|
||||
firstPaymentDueAt?: string | null;
|
||||
}
|
||||
|
||||
export async function updateTenant(id: string, data: UpdateTenantData): Promise<Tenant> {
|
||||
|
||||
Reference in New Issue
Block a user