In Turkish commercial law (TTK Madde 21/2), when a merchant receives an invoice, they have 8 days to formally object. If they don't, the invoice is deemed accepted. This creates a critical automation opportunity.
The Legal Framework
TTK Madde 21/2:
"Bir fatura alan kişi, aldığı tarihten itibaren
sekiz gün içinde, faturanın içeriği hakkında bir
itirazda bulunmamışsa, bu içeriği kabul etmiş sayılır."
Translation: If a person who receives an invoice does not object to its content within 8 days from the date of receipt, they are deemed to have accepted its content.
Why This Matters
Missing the 8-day window means:
- You've legally accepted the invoice amount
- You can't dispute pricing errors later
- In court, the invoice becomes conclusive evidence against you
- Tax implications are locked in
Building a Deadline Tracker
class InvoiceDeadlineTracker {
constructor() {
this.invoices = [];
}
addInvoice(invoiceId, receivedDate, amount, supplier) {
const received = new Date(receivedDate);
const deadline = new Date(received);
deadline.setDate(deadline.getDate() + 8);
// Skip weekends? Turkish law counts calendar days
// but if day 8 falls on a holiday, it extends to next business day
deadline = this.adjustForHolidays(deadline);
this.invoices.push({
id: invoiceId,
received,
deadline,
amount,
supplier,
status: 'pending', // pending | objected | accepted
daysRemaining: this.calcDaysRemaining(deadline)
});
}
calcDaysRemaining(deadline) {
const now = new Date();
const diff = deadline.getTime() - now.getTime();
return Math.ceil(diff / (1000 * 60 * 60 * 24));
}
adjustForHolidays(date) {
// Turkish official holidays
const holidays2026 = [
'2026-01-01', // New Year
'2026-04-23', // National Sovereignty
'2026-05-01', // Labour Day
'2026-05-19', // Commemoration of Atatürk
'2026-07-15', // Democracy Day
'2026-08-30', // Victory Day
'2026-10-28', // Republic Day Eve
'2026-10-29', // Republic Day
// Ramadan and Eid dates change yearly
];
const dateStr = date.toISOString().split('T')[0];
while (holidays2026.includes(dateStr) || date.getDay() === 0) {
date.setDate(date.getDate() + 1);
}
return date;
}
getUrgent(withinDays = 3) {
return this.invoices
.filter(inv => inv.status === 'pending' && inv.daysRemaining <= withinDays)
.sort((a, b) => a.daysRemaining - b.daysRemaining);
}
objectToInvoice(invoiceId, objectionText) {
const inv = this.invoices.find(i => i.id === invoiceId);
if (!inv) throw new Error('Invoice not found');
if (inv.daysRemaining < 0) {
console.warn('⚠️ Objection period has expired!');
}
inv.status = 'objected';
inv.objection = {
text: objectionText,
date: new Date(),
// Should be sent via KEP for legal validity
method: 'KEP recommended'
};
return inv;
}
}
// Usage
const tracker = new InvoiceDeadlineTracker();
tracker.addInvoice('ABC2026000000042', '2026-09-22', 15000, 'Tedarikçi A.Ş.');
const urgent = tracker.getUrgent(3);
// [{ id: 'ABC2026000000042', daysRemaining: 6, ... }]
Notification Architecture
Invoice Received
│
▼
┌─────────────────┐
│ Parse e-Fatura │
│ XML (UBL-TR) │
└────────┬────────┘
│
┌────────▼────────┐
│ Calculate 8-day │
│ deadline │
└────────┬────────┘
│
┌────────▼────────┐ Day 1-5: Low priority
│ Schedule alerts │────▶ Day 6: ⚠️ Warning
│ │────▶ Day 7: 🔴 Urgent
│ │────▶ Day 8: 🚨 Last day
└────────┬────────┘
│
┌────────▼────────┐
│ If objecting: │
│ Send via KEP │──▶ Creates legal evidence
│ (not email!) │
└──────────────────┘
Integration with e-Fatura
Combine this with our e-Fatura XML Viewer to automatically parse incoming invoices and start the 8-day countdown.
Key Takeaway
The 8-day rule is one of the most commonly missed deadlines in Turkish commercial law. Automating it isn't just convenient — it's essential risk management.
All our open-source tools: github.com/eimza-kep
Top comments (0)