بِسْمِ اللَّـهِ الرَّحْمَـٰنِ الرَّحِيمِ
مقدمة حاسبة الزكاة
الزكاة ليست مجرد فريضة مالية، بل هي الركن الثالث من أركان هذا الدين العظيم، ووسيلة لتطهير النفس والمال، وباب من أبواب الرحمة والتكافل، في قسم “حاسبة الزكاة”، توفر لك “بوابة الرسالة” حصريًا أداة دقيقة وميسّرة تساعدك على حساب الزكاة المستحقة وفق المعايير الشرعية المعتمدة، بطريقة سهلة وسريعة دون تعقيد..
سواء كنت تزكّي عن مال، ذهب، تجارة، أو مدخرات، فهذه الخدمة تُعينك على أداء الحق الواجب كما أراده الله، وتُزيل عنك الحرج في التقدير والتخمين، نرجو أن تكون هذه الأداة سببًا في نشر الخير، واحتساب الأجر، والوصول إلى الطمأنينة التي يمنحها أداء الزكاة عن يقين وبصيرة..
حاسبة الزكاة
🛈 الخانات المميزة بنجمة حمراء (*) إلزامية ويجب تعبئتها.
(1) إدخال البيانات
🛈 من الضروري تسجيل قيمة جرام الذهب عيار 24، وقيمة جرام الفضة، حتى في حال عدم امتلاكك لأي منهما، لأن طريقة حساب نصاب الزكاة تعتمد عليهما.
(2) ملخص البيانات
طريقة حساب نصاب الأموال:
الفترة الزمنية للزكاة:
(3) إدخال الممتلكات
(4) مراجعة الممتلكات
(5) حساب الزكاة
🛈 يُشترط لاستحقاق الزكاة أن تبلغ الممتلكات النصاب، وهو 85 جرامًا من الذهب عيار 24 أو 595 جرامًا من الفضة، بالإضافة إلى مرور عام هجري كامل عليها.
(6) تفاصيل حساب الزكاة
تاريخ البداية: ${startDay} ${hijriMonths[startMonth - 1]} ${startYear}
تاريخ النهاية: ${endDay} ${hijriMonths[endMonth - 1]} ${endYear}
`; const duration = calculateDuration( { day: parseInt(startDay), month: parseInt(startMonth), year: parseInt(startYear) }, { day: parseInt(endDay), month: parseInt(endMonth), year: parseInt(endYear) } ); if (!duration) { document.getElementById('part2').classList.remove('hidden'); return; } const durationText = ` ${duration.years} سنوات، ${duration.months} أشهر، ${duration.days} أيام ${duration.years >= 1 ? '(حال الحول)' : '(لم يحل الحول)'} `; document.getElementById('durationText').innerHTML = durationText; summaryData += `
سعر جرام ذهب (عيار 18): ${gold18} ${baseCurrency}
سعر جرام ذهب (عيار 21): ${gold21} ${baseCurrency}
سعر جرام ذهب (عيار 24): ${gold24} ${baseCurrency}
سعر جرام الفضة: ${silver} ${baseCurrency}
العملة الأساسية: ${baseCurrency}
`; const additionalCurrenciesContainer = document.getElementById('additionalCurrenciesContainer'); const currencyDivs = additionalCurrenciesContainer.querySelectorAll('.tab'); currencyDivs.forEach((div, index) => { const currency = div.querySelector('select').value; const conversionRate = formatNumberWithCommas(div.querySelector('input').value || 0); if (currency) { summaryData += `
العملة الإضافية ${index + 1}: ${currency} بسعر تحويل: ${conversionRate} ${baseCurrency}
`; summaryData += ''; } }); document.getElementById('summaryData').innerHTML = summaryData; document.getElementById('part2').classList.remove('hidden'); } function showAssetsInput() { updateBaseCurrencyLabel(); generateAdditionalMoneyFields(); const gold18 = document.getElementById('gold18').value; const gold21 = document.getElementById('gold21').value; const gold24 = document.getElementById('gold24').value; const silver = document.getElementById('silver').value; if (gold18) document.getElementById('goldSection18').classList.remove('hidden'); if (gold21) document.getElementById('goldSection21').classList.remove('hidden'); if (gold24) document.getElementById('goldSection24').classList.remove('hidden'); if (silver) document.getElementById('silverSection').classList.remove('hidden'); document.getElementById('part3').classList.remove('hidden'); } function updateBaseCurrencyLabel() { const baseCurrency = document.getElementById('baseCurrency').value; document.getElementById('selectedBaseCurrency').textContent = baseCurrency || "العملة الرئيسية"; } function generateAdditionalMoneyFields() { const additionalCurrenciesContainer = document.getElementById('additionalCurrenciesContainer'); const currencyDivs = additionalCurrenciesContainer.querySelectorAll('.tab'); const additionalMoneyFields = document.getElementById('additionalMoneyFields'); additionalMoneyFields.innerHTML = ''; currencyDivs.forEach((div, index) => { const currency = div.querySelector('select').value; if (currency) { const moneyDiv = document.createElement('div'); moneyDiv.classList.add('tab'); moneyDiv.id = `moneyCurrencyContainer${index + 1}`; moneyDiv.innerHTML = `
`; additionalMoneyFields.appendChild(moneyDiv); } }); } function addAnotherMainAmount() { const container = document.getElementById('additionalMainMoneyFields'); const newAmountField = document.createElement('div'); newAmountField.classList.add('tab'); newAmountField.innerHTML = `
`; container.appendChild(newAmountField); } function addAnotherAmount(containerId, currency) { const container = document.getElementById(containerId); const newAmountField = document.createElement('div'); newAmountField.classList.add('tab'); newAmountField.innerHTML = `
`; container.appendChild(newAmountField); } function deleteRow(button) { const row = button.parentNode; row.remove(); } function goToReviewAssets() { let assetsReview = ''; let counter = 1; // مراجعة الأموال الأساسية const mainMoney = formatNumberWithCommas(document.getElementById('mainMoney').value); const mainMoneyDescription = document.getElementById('moneyDescription').value; assetsReview += `
${counter++}. قيمة الأموال: ${mainMoney} ${document.getElementById('baseCurrency').value}${mainMoneyDescription ? ` (${mainMoneyDescription})` : ''}
`; assetsReview += ''; // مراجعة المبالغ المضافة في العملة الأساسية const additionalMainMoneyFields = document.getElementById('additionalMainMoneyFields').querySelectorAll('.tab'); additionalMainMoneyFields.forEach((div) => { const moneyAmount = formatNumberWithCommas(div.querySelector('input[type="number"]').value); const description = div.querySelector('input[type="text"]').value; assetsReview += `
${counter++}. قيمة الأموال: ${moneyAmount} ${document.getElementById('baseCurrency').value}${description ? ` (${description})` : ''}
`; assetsReview += ''; }); // مراجعة المبالغ الإضافية const additionalMoneyFields = document.getElementById('additionalMoneyFields').querySelectorAll('.tab'); additionalMoneyFields.forEach((div, index) => { const moneyAmount = formatNumberWithCommas(div.querySelector('input[type="number"]').value); const description = div.querySelector('input[type="text"]').value; const currency = div.querySelector('label').textContent.match(/\((.*?)\)/)[1]; assetsReview += `
${counter++}. قيمة الأموال: ${moneyAmount} ${currency}${description ? ` (${description})` : ''}
`; assetsReview += ''; }); // مراجعة الذهب والفضة const goldWeight18 = formatNumberWithCommas(document.getElementById('goldWeight18').value); const goldWeight21 = formatNumberWithCommas(document.getElementById('goldWeight21').value); const goldWeight24 = formatNumberWithCommas(document.getElementById('goldWeight24').value); const silverWeight = formatNumberWithCommas(document.getElementById('silverWeight').value); if (goldWeight18) { assetsReview += `
${counter++}. عدد جرامات الذهب (عيار 18): ${goldWeight18} جرام
`; assetsReview += ''; } if (goldWeight21) { assetsReview += `
${counter++}. عدد جرامات الذهب (عيار 21): ${goldWeight21} جرام
`; assetsReview += ''; } if (goldWeight24) { assetsReview += `
${counter++}. عدد جرامات الذهب (عيار 24): ${goldWeight24} جرام
`; assetsReview += ''; } if (silverWeight) { assetsReview += `
${counter++}. عدد جرامات الفضة: ${silverWeight} جرام
`; assetsReview += ''; } document.getElementById('assetsReview').innerHTML = assetsReview; document.getElementById('part4').classList.remove('hidden'); } function calculateZakat() { const baseCurrency = document.getElementById('baseCurrency').value; let zakatMainMoney = 0; let zakatGoldAndSilver = 0; let totalGold24 = 0; let totalSilver = 0; const assetsReviewFields = document.getElementById('assetsReview').querySelectorAll('p'); assetsReviewFields.forEach((field) => { const textContent = field.textContent; const match = textContent.match(/قيمة الأموال: (\d[\d,]*) (.*?)(?: \((.*?)\))?$/); if (match) { const amount = parseFloat(match[1].replace(/,/g, '')); const currency = match[2]; let conversionRate = 1; if (currency !== baseCurrency) { const additionalCurrenciesContainer = document.getElementById('additionalCurrenciesContainer'); const currencyDivs = additionalCurrenciesContainer.querySelectorAll('.tab'); currencyDivs.forEach((div) => { const selectedCurrency = div.querySelector('select').value; if (selectedCurrency === currency) { conversionRate = parseFloat(div.querySelector('input[type="number"]').value || 1); } }); } const convertedAmount = amount * conversionRate; zakatMainMoney += convertedAmount * 0.025; const gold24Price = parseFloat(document.getElementById('gold24').value || 0); const silverPrice = parseFloat(document.getElementById('silver').value || 0); totalGold24 += convertedAmount / gold24Price; totalSilver += convertedAmount / silverPrice; } }); const gold18 = parseFloat(document.getElementById('goldWeight18').value || 0); const gold21 = parseFloat(document.getElementById('goldWeight21').value || 0); const gold24 = parseFloat(document.getElementById('goldWeight24').value || 0); const silver = parseFloat(document.getElementById('silverWeight').value || 0); const gold18Price = parseFloat(document.getElementById('gold18').value || 0); const gold21Price = parseFloat(document.getElementById('gold21').value || 0); const gold24Price = parseFloat(document.getElementById('gold24').value || 0); const silverPrice = parseFloat(document.getElementById('silver').value || 0); zakatGoldAndSilver += gold18 * gold18Price * 0.025; zakatGoldAndSilver += gold21 * gold21Price * 0.025; zakatGoldAndSilver += gold24 * gold24Price * 0.025; zakatGoldAndSilver += silver * silverPrice * 0.025; totalGold24 += (gold18 * gold18Price) / gold24Price; totalGold24 += (gold21 * gold21Price) / gold24Price; totalGold24 += gold24; totalGold24 += (silver * silverPrice) / gold24Price; totalSilver += (gold18 * gold18Price) / silverPrice; totalSilver += (gold21 * gold21Price) / silverPrice; totalSilver += (gold24 * gold24Price) / silverPrice; totalSilver += silver; const totalZakat = (zakatMainMoney + zakatGoldAndSilver).toFixed(2); const startDay = document.getElementById('startDay').value; const startMonth = hijriMonths[parseInt(document.getElementById('startMonth').value) - 1]; const startYear = document.getElementById('startYear').value; const endDay = document.getElementById('endDay').value; const endMonth = hijriMonths[parseInt(document.getElementById('endMonth').value) - 1]; const endYear = document.getElementById('endYear').value; const duration = calculateDuration( { day: parseInt(startDay), month: parseInt(document.getElementById('startMonth').value), year: parseInt(startYear) }, { day: parseInt(endDay), month: parseInt(document.getElementById('endMonth').value), year: parseInt(endYear) } ); const isHawlComplete = duration.years >= 1; const zakatPeriodText = ` حالة الحول: الفترة الزمنية للزكاة (هجري): ${duration.years} سنوات، ${duration.months} أشهر، ${duration.days} أيام ${isHawlComplete ? '(حال الحول)' : '(لم يحل الحول)'} `; const zakatPeriodClass = isHawlComplete ? 'green' : 'red'; const nisaabMethod = document.getElementById('nisaabMethod').value; let isNisaabComplete = false; let nisaabText = ''; if (nisaabMethod === 'ما يعادل 85 جرام ذهب عيار 24') { isNisaabComplete = totalGold24 >= 85; nisaabText = isNisaabComplete ? `
حالة النصاب: مجموع الأموال والذهب والفضة = ${totalGold24.toFixed(2)} جرام ذهب عيار 24 (بلغ النصاب)
` : `حالة النصاب: مجموع الأموال والذهب والفضة = ${totalGold24.toFixed(2)} جرام ذهب عيار 24 (لم يبلغ النصاب)
`; } else if (nisaabMethod === 'ما يعادل 595 جرام فضة') { isNisaabComplete = totalSilver >= 595; nisaabText = isNisaabComplete ? `حالة النصاب: مجموع الأموال والذهب والفضة = ${totalSilver.toFixed(2)} جرام فضة (بلغ النصاب)
` : `حالة النصاب: مجموع الأموال والذهب والفضة = ${totalSilver.toFixed(2)} جرام فضة (لم يبلغ النصاب)
`; } let zakatSummary = ''; if (isHawlComplete && isNisaabComplete) { zakatSummary = `من ${startDay} ${startMonth} ${startYear} إلى ${endDay} ${endMonth} ${endYear} هو:
${formatNumberWithCommas(totalZakat)} ${baseCurrency}
${zakatPeriodText}
`; zakatSummary += `${counter++}. زكاة مبلغ: ${formatNumberWithCommas(amount.toFixed(2))} ${currency} = ${formatNumberWithCommas(zakatAmount.toFixed(2))} ${baseCurrency}
`; zakatDetails += ''; // إضافة الفاصل } }); } else { zakatDetails += '
لا توجد تفاصيل لأموال تم إدخالها.
'; zakatDetails += ''; // إضافة الفاصل } // عرض حسابات زكاة الذهب والفضة بالترقيم const gold18 = parseFloat(document.getElementById('goldWeight18').value || 0); const gold21 = parseFloat(document.getElementById('goldWeight21').value || 0); const gold24 = parseFloat(document.getElementById('goldWeight24').value || 0); const silver = parseFloat(document.getElementById('silverWeight').value || 0); const gold18Price = parseFloat(document.getElementById('gold18').value || 0); const gold21Price = parseFloat(document.getElementById('gold21').value || 0); const gold24Price = parseFloat(document.getElementById('gold24').value || 0); const silverPrice = parseFloat(document.getElementById('silver').value || 0); if (gold18) { const zakatGold18 = gold18 * gold18Price * 0.025; totalZakat += zakatGold18; zakatDetails += `
${counter++}. زكاة الذهب (عيار 18): ${formatNumberWithCommas(gold18.toFixed(2))} جرام × ${formatNumberWithCommas(gold18Price.toFixed(2))} ${baseCurrency} = ${formatNumberWithCommas(zakatGold18.toFixed(2))} ${baseCurrency}
`; zakatDetails += ''; // إضافة الفاصل } if (gold21) { const zakatGold21 = gold21 * gold21Price * 0.025; totalZakat += zakatGold21; zakatDetails += `
${counter++}. زكاة الذهب (عيار 21): ${formatNumberWithCommas(gold21.toFixed(2))} جرام × ${formatNumberWithCommas(gold21Price.toFixed(2))} ${baseCurrency} = ${formatNumberWithCommas(zakatGold21.toFixed(2))} ${baseCurrency}
`; zakatDetails += ''; // إضافة الفاصل } if (gold24) { const zakatGold24 = gold24 * gold24Price * 0.025; totalZakat += zakatGold24; zakatDetails += `
${counter++}. زكاة الذهب (عيار 24): ${formatNumberWithCommas(gold24.toFixed(2))} جرام × ${formatNumberWithCommas(gold24Price.toFixed(2))} ${baseCurrency} = ${formatNumberWithCommas(zakatGold24.toFixed(2))} ${baseCurrency}
`; zakatDetails += ''; // إضافة الفاصل } if (silver) { const zakatSilver = silver * silverPrice * 0.025; totalZakat += zakatSilver; zakatDetails += `
${counter++}. زكاة الفضة: ${formatNumberWithCommas(silver.toFixed(2))} جرام × ${formatNumberWithCommas(silverPrice.toFixed(2))} ${baseCurrency} = ${formatNumberWithCommas(zakatSilver.toFixed(2))} ${baseCurrency}
`; zakatDetails += ''; // إضافة الفاصل } // إضافة سطر إجمالي الزكاة المستحقة zakatDetails += `