const { useState, useEffect, useMemo, useRef } = React;
/* ============================================================
BRAND LOGO — lightweight, fully scalable SVG badge.
A droplet inside a gradient ring with a ripple arc: the
signature mark of the company, used large on the login
screen and small in the header so it always reads clearly.
============================================================ */
/* The icon image is 240 × 317 px (taller than wide). It is drawn with exact
width/height that keep that ratio, centred in the same size × size box as
before — instead of relying on object-fit, which html2canvas (PDF download)
ignores and which made the logo look squashed in downloaded receipts. */
const LOGO_ICON_RATIO = 240 / 317;
const Logo = ({ size = 42 }) => (
);
/* Small reusable scan-code (QR) generator for receipts — encodes the
receipt's key identifiers so it can be verified by scanning. */
/* Builds the all-digit reference number printed under the scan code,
the same way an official payment slip's reference is composed:
subscription code + receipt serial + amount due, digits only. */
const scanRefNumber = (sn, accountNo, total) => {
const digits = (v) => String(v==null?"":v).replace(/\D/g,"");
const ref = digits(accountNo) + digits(sn) + digits(total);
return ref || digits(sn) || "0";
};
/* Linear scan-code (barcode) for receipts — encodes the receipt's
reference number and prints the digits underneath, the way an
official payment slip's scan code works (not a QR code). */
const ReceiptQRCode = ({ data, size=90 }) => {
const canvasRef = useRef(null);
const [failed, setFailed] = useState(false);
useEffect(()=>{
if(!data || !canvasRef.current) return;
try{
if(typeof JsBarcode === "undefined") throw new Error("JsBarcode lib not loaded");
JsBarcode(canvasRef.current, data, {
format: "CODE128",
width: 2,
height: Math.round(size*0.6),
displayValue: false,
margin: 2,
background: "#ffffff",
lineColor: "#000000"
});
setFailed(false);
}catch(e){
setFailed(true);
}
}, [data, size]);
return (
{failed &&
Scan code unavailable
}
);
};
/* Big, unmistakable lock-up used on the login screen where the brand needs
to be the hero. In Dari we show the company's own designed lock-up image
(icon + name baked in exactly as supplied); in English — where that baked
Dari text would be wrong — we show the icon plus our own translated type. */
const BrandLockup = ({ size=84, name, tag, lang }) => (
lang === "dari" ? (
) : (
{name}
{tag}
)
);
const Icon = {
home:(p)=>(),
users:(p)=>(),
receipt:(p)=>(),
settings:(p)=>(),
logout:(p)=>(),
search:(p)=>(),
calendar:(p)=>(),
print:(p)=>(),
save:(p)=>(),
edit:(p)=>(),
plus:(p)=>(),
/* added: used instead of emoji icons in buttons */
download:(p)=>(),
upload:(p)=>(),
cloud:(p)=>(),
filePdf:(p)=>(),
fileSheet:(p)=>(),
fileDoc:(p)=>(),
trash:(p)=>(),
back:(p)=>(),
x:(p)=>(),
wallet:(p)=>(),
alert:(p)=>(),
chevronDown:(p)=>(),
menu:(p)=>(),
};
/* ============================================================
TRANSLATIONS — every label in the app is looked up here so
switching the language switches the *whole* product, not
just the navigation bar.
============================================================ */
const STR = {
dari: {
dir: "rtl",
companyName: "شرکت خدمات آبرسانی شهید وحدت ملی",
companyTag: "خدمات آبرسانی",
quickSearch: "جستجوی سریع مشتری", quickSearchPh: "نام، کد اشتراک یا تیلفون...", quickSearchEmpty: "نتیجهای یافت نشد",
loginSub: "سیستم مدیریت مشتریان و رسیدها",
username: "نام کاربری", password: "رمز عبور",
usernamePh: "نام کاربری خود را داخل کنید",
loginBtn: "ورود به سیستم",
loginError: "نام کاربری یا رمز عبور درست نیست.",
forgotPassword: "رمز عبور را فراموش کردهاید؟",
fpTitle: "بازیابی رمز عبور",
fpPhoneLabel: "شماره تیلفون", fpPhonePh: "شماره تیلفون ثبت شده در حساب خود را داخل کنید",
fpContinue: "ادامه", fpSendCode: "ارسال کد تایید",
fpCodeSentGeneric: "اگر این شماره ثبت شده باشد، یک کد تایید ارسال شده است.",
fpDemoNotice: "حالت محلی: این سیستم سرویس پیامک واقعی ندارد، بنابراین کد در همینجا نمایش داده میشود.",
fpDemoCodeLabel: "کد تایید (نمایش محلی):",
fpOtpLabel: "کد تایید", fpOtpPh: "کد ۶ رقمی را داخل کنید",
fpOtpExpiry: "این کد تا", fpOtpExpirySuffix: "معتبر است.",
fpOtpInvalid: "کد وارد شده نادرست یا منقضی شده است.",
fpOtpExpired: "کد منقضی شده است. لطفاً یک کد جدید درخواست کنید.",
fpResendCode: "ارسال دوباره کد",
fpNewPasswordLabel: "رمز عبور جدید", fpConfirmPasswordLabel: "تکرار رمز عبور جدید",
fpPasswordEmpty: "رمز عبور جدید را داخل کنید.", fpPasswordMismatch: "رمزهای عبور مطابقت ندارند.",
fpResetBtn: "بازنشانی رمز عبور", fpSuccess: "رمز عبور با موفقیت بازنشانی شد. اکنون میتوانید وارد شوید.",
fpBackToLogin: "بازگشت به ورود",
resetSystem: "بازنشانی سیستم به حالت اولیه",
resetConfirm: "تمام معلومات ذخیره شده حذف میشود و سیستم به حالت اولیه بر میگردد. ادامه میدهید؟",
nav: { home:"صفحه اصلی", customers:"مشتریان", allCustomers:"تمام مشتریان", newCustomer:"مشتری جدید / فورم", receipts:"رسیدها", allReceipts:"تمام رسیدها", settings:"تنظیمات", language:"زبان", employees:"کارمندان", allEmployees:"تمام کارمندان", addEmployee:"افزودن کارمند", expEmployee:"هزینههای کارمندان", expOther:"سایر هزینهها", expPurchases:"خریدها برای شرکت",
consumptionLists:"لیست مصرف ماه جاری", clArbaab:"لیست دریافته ارباب", clMataraffe:"لیست مصرف مطعرفه", clKhorak:"لیست مصرف خرج خوراک", clBarq:"لیست مصرف برق", clTeel:"لیست مصرف تیل", clAddCustom:"افزودن لیست معرف", clCustom:"لیست معرف" },
profileSettings:"پروفایل و تنظیمات", logout:"خروج از حساب",
changePhoto:"تغییر عکس پروفایل", photoTypeError:"لطفاً یک فایل تصویری انتخاب کنید.", photoSizeError:"اندازه تصویر باید کمتر از ۲ مگابایت باشد.",
viewPhoto:"دیدن عکس", removePhoto:"حذف عکس",
dash: {
greeting:"سلام،", sub:"خلاصه وضعیت مشتریان و صورتحسابهای شرکت", addCustomer:"ثبت مشتری جدید",
statCustomers:"تعداد کل مشتریان", statCustomersSub:"مشتری فعال در سیستم",
statReceipts:"تعداد رسیدها صادر شده", statReceiptsSub:"رسید ثبت شده در سیستم",
statRevenue:"مجموع مقدار صادر شده", statRevenueSub:"واحد: افغانی",
statArrears:"مجموع قرضداری باقیه", statArrearsSub:"باقیمانده قبلی مشتریان",
recent:"آخرین رسیدها صادر شده", viewAll:"دیدن همه",
emptyTitle:"تا حال رسیدی ثبت نشده", emptySub:"یک مشتری جدید اضافه کنید و برای او رسید ثبت کنید.",
colSn:"نمبر مسلسل", colCustomer:"نام مشتری", colDate:"تاریخ صدور", colConsumption:"مصرف (متر مکعب)", colAmount:"مقدار قابل پرداخت", currency:"افغانی",
statEmployees:"تعداد کارمندان", statEmployeesSub:"کارمند ثبت شده در سیستم",
statExpenses:"مجموع مصارف ثبت شده", statExpensesSub:"هزینههای کارمندان، سایر مصارف و خریداریها",
areasTitle:"نواحی تحت پوشش", areasSub:"تعداد مشتریان به تفکیک هر ناحیه — به همان ترتیبی که فایلهای اکسل ارائه شدند",
customersWord:"مشتری",
},
cust: {
formTitleNew:"فورم ثبت مشتری جدید", formTitleEdit:"ویرایش مشتری",
formSub:"معلومات را تکمیل کرده و سپس ذخیره یا چاپ کنید.",
save:"ذخیره فورم در سیستم", print:"چاپ / خروجی PDF", cancelEdit:"صرف نظر از ویرایش",
saved:"معلومات با موفقیت ذخیره شد ✓", needName:"لطفاً نام و تخلص مشتری را داخل کنید.",
issueDate:"تاریخ صدور:", formId:"شناسه فورم:",
formMainTitle:"فورم معلومات کانکشن مشتری",
sec1:"معلومات هویتی مشتری", fullName:"نام و تخلص مشتری", fullNamePh:"مثال: محمد عیسی نصرالله",
fatherName:"نام پدر", fatherNamePh:"نام پدر", nationalId:"نمبر تذکره", nationalIdPh:"نمبر تذکره",
phone:"نمبر تیلفون", phonePh:"نمبر موبایل / ثابت",
sec2:"معلومات کانکشن و کنتور", accountNo:"کد اشتراک (کد کانکشن)", accountNoPh:"مثال: 806",
prevAccountNo:"کد اشتراک قبلی", prevAccountNoPh:"مثال: 3169",
meterNo:"نمبر کنتور فعلی", meterNoPh:"مثال: 3205", pipeSize:"قطر/برچ پایپ انشعاب", pipeSizePh:"مثال: 10",
subType:"نوعیت اشتراک", issueDateLabel:"تاریخ صدور / ثبت", issueDatePh:"تاریخ را انتخاب کنید",
sec3:"آدرس و توضیحات", address:"آدرس محل کانکشن", addressPh:"آدرس کامل ملکیت",
notes:"توضیحات / یادداشت", notesPh:"هرگونه توضیحات اضافی در مورد مشتری یا انشعاب...",
footerCreated:"این فرم توسط سیستم مدیریت مشتریان COMPANY ایجاد شده است.",
footerSign:"امضای مسئول مربوطه: ______________",
subTypes:{ rahayishi:"رهایشی", rahayishi_tijarati:"رهایشی/تجارتی", tijarati:"تجارتی", sanati:"صنعتی", umomi:"عمومی" },
listTitle:"تمام مشتریان", listSub:"مجموع N مشتری ثبت شده در سیستم", addBtn:"اضافه کردن مشتری",
searchPh:"جستجو بر اساس نام، کد اشتراک، نمبر کنتور یا تیلفون...",
emptyTitle:"مشتری پیدا نشد", emptySub:"یک مشتری جدید اضافه کنید یا کلمه جستجو را تبدیل کنید.",
colName:"نام مشتری", colAccount:"کد اشتراک", colMeter:"نمبر کنتور", colType:"نوعیت اشتراک", colReceiptsCount:"تعداد رسیدها", colLastAmount:"آخرین مقدار", view:"دیدن",
detailTitle:"پروفایل مشتری", detailSub:"اطلاعات کامل، تاریخچه و رسیدها مشتری", backToList:"برگشت به لیست",
editInfo:"ویرایش معلومات مشتری",
historyTitle:"تاریخچه رسیدها", newReceipt:"ثبت رسید جدید",
noReceiptsTitle:"رسیدی ثبت نشده", noReceiptsSub:"برای این مشتری تا حال هیچ رسیدی صادر نشده است.",
receiptDate:"تاریخ صدور:", receiptConsumption:"مصرف:", receiptSn:"نمبر مسلسل:", receiptArrears:"باقیمانده قبلی:",
m3:"متر مکعب", deleteConfirm:"این رسید حذف شود؟",
kAccount:"کد اشتراک", kPrevAccount:"کد اشتراک قبلی", kFather:"نام پدر", kNationalId:"نمبر تذکره",
kPhone:"نمبر تیلفون", kPipe:"برج/قطر لوله", kRegDate:"تاریخ ثبت", kAddress:"آدرس",
noUserDeleteSelf:"شما نمیتوانید حساب خود را حذف کنید.",
area:"ناحیه", areaAll:"همه نواحی", areaNone:"بدون ناحیه", kArea:"ناحیه",
},
receiptModal: {
title:"ثبت رسید جدید برای", sn:"نمبر مسلسل رسید", date:"تاریخ صدور", datePh:"تاریخ را انتخاب کنید",
prevReading:"قرائت کنتور قبلی (متر مکعب)", curReading:"قرائت کنتور فعلی (متر مکعب)",
tier1Price:"قیمت پله اول (0-20 متر مکعب) - افغانی", tier2Price:"قیمت پله دوم (21-200 متر مکعب) - افغانی",
serviceFee:"محصول خدمات", penalty:"جریمه", arrears:"باقیمانده قبلی", deposit:"امانت انشعاب",
totalConsumption:"مصرف کل (متر مکعب)", tier1Line:"پله اول", tier2Line:"پله دوم",
currentMonth:"مقدار ماه جاری", totalPayable:"مجموع مقدار قابل پرداخت",
signedBy:"امضای مسئول", signedByPh:"نام مسئول مربوطه",
saveBtn:"ذخیره رسید", cancelBtn:"صرف نظر", needDate:"لطفاً تاریخ صدور رسید را داخل کنید.",
},
receiptPrint: {
title:"رسید مصرف آب", issueDate:"تاریخ صدور:", sn:"نمبر مسلسل:",
sec1:"معلومات مشتری", custName:"نام مشتری", fatherName:"نام پدر", accountNo:"کد اشتراک",
meterNo:"نمبر کنتور", subType:"نوعیت اشتراک", pipe:"برچ پایپ",
sec2:"جزئیات مصرف و مقدار", prevReading:"شماره قبلی", curReading:"شماره فعلی",
consumption:"واحد مصرف شده (متر مکعب)", serviceFee:"اجوره خدمات",
tier1:"پله اول", tier2:"پله دوم", penalty:"جریمه", arrears:"باقیمانده قبلی",
deposit:"باقیداری انشعاب", currentMonth:"مبلغ ماه جاری",
sec3:"جمع کل", totalPayable:"مبلغ قابل پرداخت", signedBy:"امضای مسئول:",
srLabel:"S/N", month:"برج", subCode:"کد اشتراک", desc:"شرح", amount:"مبلغ",
consumeUnit:"واحد مصرف شده", priceM:"قیمت فی متر", consumeDesc:"توضیحات مصارف",
tier1Range:"۰-۲۰ متر مکعب", tier2Range:"۲۱-۲۰۰ متر مکعب", totalConsume:"مجموعه مصارف",
print:"چاپ / خروجی PDF", back:"بازگشت", scanCode:"کد اسکن برای تایید رسید",
},
receiptsPage: { title:"رسیدها", sub:"مجموع N رسید ثبت شده", totalLabel:"جمع مقدار:",
searchPh:"جستجو بر اساس نام مشتری یا نمبر مسلسل...",
emptyTitle:"رسیدی پیدا نشد", emptySub:"برای مشتریان رسید ثبت کنید تا در این لیست نمایش داده شود.",
colSn:"نمبر مسلسل", colCustomer:"نام مشتری", colAccount:"کد اشتراک", colDate:"تاریخ صدور",
colConsumption:"مصرف (متر مکعب)", colCurMonth:"مقدار ماه جاری", colArrears:"باقیمانده قبلی", colTotal:"مقدار کل", currency:"افغانی",
colStatus:"وضعیت پرداخت", statusPaid:"پرداخت شده", statusUnpaid:"پرداخت نشده",
filterAll:"همه", filterPaid:"پرداخت شده", filterUnpaid:"پرداخت نشده",
tabReceipts:"تمام رسیدها", tabDebtors:"بدهکاران",
unpaidSummary:"رسید پرداخت نشده", debtorsTitle:"مشتریانی که بدهی دارند",
debtorsEmpty:"هیچ بدهکاری وجود ندارد", colTotalDebt:"مجموع بدهی", colUnpaidCount:"تعداد رسید معوقه",
},
settings: {
title:"تنظیمات", sub:"مدیریت معلومات شرکت و کاربران سیستم",
coInfo:"معلومات شرکت", coNameDari:"نام شرکت (دری)", coNameEn:"نام شرکت (انگلیسی)",
coAddress:"آدرس", coAddressPh:"آدرس دفتر مرکزی", coPhone:"نمبر تیلفون", coPhonePh:"نمبر تیلفون پشتیبانی",
saveChanges:"ذخیره تبدیلات", saved:"ذخیره شد ✓",
pwTitle:"تبدیل رمز عبور", pwCurrent:"رمز عبور فعلی", pwNext:"رمز عبور جدید", pwChange:"تبدیل رمز عبور",
pwWrong:"رمز عبور فعلی درست نیست.", pwEmpty:"رمز عبور جدید را داخل کنید.", pwOk:"رمز عبور با موفقیت تبدیل شد.",
recoveryTitle:"شماره تیلفون بازیابی", recoverySub:"در صورت فراموشی رمز عبور، کد تایید به این شماره ارسال میشود.", recoverySave:"ذخیره شماره", recoverySaved:"شماره ذخیره شد.", recoveryNeedPhone:"لطفاً شماره تیلفون را داخل کنید.", userPhone:"شماره تیلفون", userPhonePh:"مثلاً: 0700000000",
usersTitle:"کاربران سیستم", colFullName:"نام کامل", colUsername:"نام کاربری", colRole:"وظیفه",
addUserTitle:"اضافه کردن کاربر جدید", addUserBtn:"اضافه کردن کاربر",
needAllFields:"لطفاً تمام بخشهای کاربر جدید را خانهپری کنید.", usernameTaken:"این نام کاربری قبلاً ثبت شده است.",
keepOneUser:"حد اقل یک کاربر باید در سیستم باقی بماند.", removeUserConfirm:"این کاربر حذف شود؟",
roles:{ admin:"مدیر", operator:"اپراتور", accountant:"محاسب" },
},
employees: {
title:"کارمندان", sub:"مدیریت معلومات کارمندان شرکت",
addTitle:"افزودن کارمند جدید", colName:"نام کامل", colPosition:"وظیفه", colPhone:"نمبر تیلفون", colNotes:"یادداشت",
fullNamePh:"نام کامل کارمند", positionPh:"مثال: کارگر فنی، محصل آببها", phonePh:"نمبر تماس", notesPh:"یادداشت اختیاری",
addBtn:"افزودن کارمند", emptyTitle:"کارمندی ثبت نشده", emptySub:"یک کارمند جدید اضافه کنید.",
deleteConfirm:"این کارمند حذف شود؟", needName:"لطفاً نام کارمند را داخل کنید.", countSuffix:"کارمند",
},
expenses: {
addTitle:"افزودن مورد جدید", colTitle:"شرح", colAmount:"مبلغ (افغانی)", colDate:"تاریخ", colNotes:"یادداشت",
titlePh:"شرح هزینه یا خریداری", amountPh:"مبلغ به افغانی", datePh:"تاریخ را انتخاب کنید", notesPh:"یادداشت اختیاری",
addBtn:"افزودن", emptyTitle:"موردی ثبت نشده", emptySub:"یک مورد جدید اضافه کنید.",
deleteConfirm:"این مورد حذف شود؟", needTitle:"لطفاً شرح را داخل کنید.", total:"جمع کل", currency:"افغانی",
catSub:{
employee:"ثبت و پیگیری مزد و مصارف مربوط به کارمندان",
other:"ثبت سایر مصارف روزمره شرکت",
purchases:"ثبت تمام خریداریهای لوازم و تجهیزات شرکت",
},
},
common: { save:"ذخیره" },
},
en: {
dir: "ltr",
companyName: "Shaheed Wahdat-e-Milli Water Supply Services Company",
companyTag: "Water Supply Services",
quickSearch: "Quick Customer Search", quickSearchPh: "Name, account or phone...", quickSearchEmpty: "No matches found",
loginSub: "Customer & Billing Management System",
username: "Username", password: "Password",
usernamePh: "Enter your username",
loginBtn: "Sign In",
loginError: "Incorrect username or password.",
forgotPassword: "Forgot your password?",
fpTitle: "Reset Password",
fpPhoneLabel: "Phone Number", fpPhonePh: "Enter the phone number registered to your account",
fpContinue: "Continue", fpSendCode: "Send Verification Code",
fpCodeSentGeneric: "If this number is registered, a verification code has been sent.",
fpDemoNotice: "Local mode: this system has no real SMS service, so the code is shown here.",
fpDemoCodeLabel: "Verification code (local demo):",
fpOtpLabel: "Verification Code", fpOtpPh: "Enter the 6-digit code",
fpOtpExpiry: "This code is valid until", fpOtpExpirySuffix: "",
fpOtpInvalid: "The code you entered is incorrect or has expired.",
fpOtpExpired: "The code has expired. Please request a new one.",
fpResendCode: "Resend Code",
fpNewPasswordLabel: "New Password", fpConfirmPasswordLabel: "Confirm New Password",
fpPasswordEmpty: "Please enter a new password.", fpPasswordMismatch: "Passwords do not match.",
fpResetBtn: "Reset Password", fpSuccess: "Password reset successfully. You can now log in.",
fpBackToLogin: "Back to Login",
resetSystem: "Reset system to default",
resetConfirm: "All saved data will be deleted and the system reset to its initial state. Continue?",
nav: { home:"Home", customers:"Customers", allCustomers:"All Customers", newCustomer:"New Customer / Form", receipts:"Receipts", allReceipts:"All Receipts", settings:"Settings", language:"Language", employees:"Employees", allEmployees:"All Employees", addEmployee:"Add Employee", expEmployee:"Employee Expenses", expOther:"Other Expenses", expPurchases:"All Company Purchases",
consumptionLists:"Monthly Consumption Lists", clArbaab:"Arbaab Received List", clMataraffe:"Registered Consumption", clKhorak:"Food Expense List", clBarq:"Electricity List", clTeel:"Fuel List", clAddCustom:"Add Custom List", clCustom:"Custom List" },
profileSettings:"Profile & Settings", logout:"Sign Out",
changePhoto:"Change profile photo", photoTypeError:"Please choose an image file.", photoSizeError:"Image must be smaller than 2MB.",
viewPhoto:"View photo", removePhoto:"Remove photo",
dash: {
greeting:"Hello,", sub:"Overview of customers and company billing", addCustomer:"Add New Customer",
statCustomers:"Total Customers", statCustomersSub:"Active customers in the system",
statReceipts:"Receipts Issued", statReceiptsSub:"Receipts recorded in the system",
statRevenue:"Total Amount Billed", statRevenueSub:"Currency: AFN",
statArrears:"Total Outstanding Balance", statArrearsSub:"Customers' previous balances",
recent:"Latest Receipts Issued", viewAll:"View all",
emptyTitle:"No receipts recorded yet", emptySub:"Add a new customer and record a receipt for them to get started.",
colSn:"Serial No.", colCustomer:"Customer Name", colDate:"Issue Date", colConsumption:"Consumption (m³)", colAmount:"Amount Due", currency:"AFN",
statEmployees:"Total Employees", statEmployeesSub:"Staff registered in the system",
statExpenses:"Total Recorded Expenses", statExpensesSub:"Employee costs, other expenses & purchases",
areasTitle:"Areas Covered", areasSub:"Customers by area — in the same order the spreadsheets were supplied",
customersWord:"customers",
},
cust: {
formTitleNew:"New Customer Registration Form", formTitleEdit:"Edit Customer",
formSub:"Fill in the details, then save or print.",
save:"Save Form to System", print:"Print / Export PDF", cancelEdit:"Cancel Editing",
saved:"Saved successfully ✓", needName:"Please enter the customer's full name.",
issueDate:"Issue date:", formId:"Form ID:",
formMainTitle:"Customer Connection Information Form",
sec1:"Customer Identity Information", fullName:"Customer Full Name", fullNamePh:"e.g. Mohammad Isa Nasrullah",
fatherName:"Father's Name", fatherNamePh:"Father's name", nationalId:"National ID No.", nationalIdPh:"National ID number",
phone:"Phone Number", phonePh:"Mobile / landline number",
sec2:"Connection & Meter Information", accountNo:"Account No. (Connection Code)", accountNoPh:"e.g. 806",
prevAccountNo:"Previous Account No.", prevAccountNoPh:"e.g. 3169",
meterNo:"Current Meter No.", meterNoPh:"e.g. 3205", pipeSize:"Pipe Diameter / Size", pipeSizePh:"e.g. 10",
subType:"Connection Type", issueDateLabel:"Issue / Registration Date", issueDatePh:"e.g. 2026-02-01",
sec3:"Address & Notes", address:"Connection Address", addressPh:"Full property address",
notes:"Notes / Remarks", notesPh:"Any additional notes about the customer or connection...",
footerCreated:"This form was generated by the COMPANY customer management system.",
footerSign:"Authorized signature: ______________",
subTypes:{ rahayishi:"Residential", rahayishi_tijarati:"Residential/Commercial", tijarati:"Commercial", sanati:"Industrial", umomi:"Public" },
listTitle:"All Customers", listSub:"N customers registered in the system", addBtn:"Add Customer",
searchPh:"Search by name, account no., meter no. or phone...",
emptyTitle:"No customer found", emptySub:"Add a new customer or change your search term.",
colName:"Customer Name", colAccount:"Account No.", colMeter:"Meter No.", colType:"Connection Type", colReceiptsCount:"Receipts", colLastAmount:"Last Amount", view:"View",
detailTitle:"Customer Profile", detailSub:"Full details, history and receipts", backToList:"Back to list",
editInfo:"Edit Customer Info",
historyTitle:"Receipt History", newReceipt:"Record New Receipt",
noReceiptsTitle:"No receipts yet", noReceiptsSub:"No receipt has been issued for this customer yet.",
receiptDate:"Issue date:", receiptConsumption:"Consumption:", receiptSn:"Serial No.:", receiptArrears:"Previous balance:",
m3:"m³", deleteConfirm:"Delete this receipt?",
kAccount:"Account No.", kPrevAccount:"Previous Account No.", kFather:"Father's Name", kNationalId:"National ID No.",
kPhone:"Phone Number", kPipe:"Pipe Diameter", kRegDate:"Registration Date", kAddress:"Address",
noUserDeleteSelf:"You cannot delete your own account.",
area:"Area", areaAll:"All Areas", areaNone:"No area", kArea:"Area",
},
receiptModal: {
title:"Record a new receipt for", sn:"Receipt Serial No.", date:"Issue Date", datePh:"2026-02-01",
prevReading:"Previous Meter Reading (m³)", curReading:"Current Meter Reading (m³)",
tier1Price:"Tier 1 price (0–20 m³) - AFN", tier2Price:"Tier 2 price (21–200 m³) - AFN",
serviceFee:"Service Fee", penalty:"Penalty", arrears:"Previous Balance", deposit:"Connection Deposit",
totalConsumption:"Total Consumption (m³)", tier1Line:"Tier 1", tier2Line:"Tier 2",
currentMonth:"Current Month Amount", totalPayable:"Total Amount Due",
signedBy:"Signed By", signedByPh:"Name of authorized official",
saveBtn:"Save Receipt", cancelBtn:"Cancel", needDate:"Please enter the receipt issue date.",
},
receiptPrint: {
title:"Water Consumption Receipt", issueDate:"Issue date:", sn:"Serial No.:",
sec1:"Customer Information", custName:"Customer Name", fatherName:"Father's Name", accountNo:"Account No.",
meterNo:"Meter No.", subType:"Connection Type", pipe:"Pipe Size",
sec2:"Consumption & Amount Details", prevReading:"Previous Reading (m³)", curReading:"Current Reading (m³)",
consumption:"Consumed (m³)", serviceFee:"Service Fee",
tier1:"Tier 1", tier2:"Tier 2", penalty:"Penalty", arrears:"Previous Balance",
deposit:"Connection Deposit", currentMonth:"Current Month Amount",
sec3:"Grand Total", totalPayable:"Amount Due", signedBy:"Signed by:",
print:"Print / Export PDF", back:"Back", scanCode:"Scan to verify receipt",
srLabel:"S/N", month:"Period", subCode:"Subscription Code", desc:"Description", amount:"Amount",
consumeUnit:"Units Consumed", priceM:"Price per m³", consumeDesc:"Consumption Details",
tier1Range:"0–20 m³", tier2Range:"21–200 m³", totalConsume:"Total Consumption",
},
receiptsPage: { title:"Receipts", sub:"N receipts recorded", totalLabel:"Total amount:",
searchPh:"Search by customer name or serial number...",
emptyTitle:"No receipts found", emptySub:"Record receipts for customers to see them listed here.",
colSn:"Serial No.", colCustomer:"Customer Name", colAccount:"Account No.", colDate:"Issue Date",
colConsumption:"Consumption (m³)", colCurMonth:"Current Month Amount", colArrears:"Previous Balance", colTotal:"Total Amount", currency:"AFN",
colStatus:"Payment Status", statusPaid:"Paid", statusUnpaid:"Unpaid",
filterAll:"All", filterPaid:"Paid", filterUnpaid:"Unpaid",
tabReceipts:"All Receipts", tabDebtors:"Debtors",
unpaidSummary:"unpaid receipt", debtorsTitle:"Customers with outstanding balance",
debtorsEmpty:"No outstanding debts", colTotalDebt:"Total Debt", colUnpaidCount:"Unpaid Receipts",
},
settings: {
title:"Settings", sub:"Manage company information and system users",
coInfo:"Company Information", coNameDari:"Company Name (Dari)", coNameEn:"Company Name (English)",
coAddress:"Address", coAddressPh:"Head office address", coPhone:"Phone Number", coPhonePh:"Support phone number",
saveChanges:"Save Changes", saved:"Saved ✓",
pwTitle:"Change Password", pwCurrent:"Current Password", pwNext:"New Password", pwChange:"Change Password",
pwWrong:"Current password is incorrect.", pwEmpty:"Please enter a new password.", pwOk:"Password changed successfully.",
recoveryTitle:"Recovery Phone Number", recoverySub:"If you forget your password, a verification code will be sent to this number.", recoverySave:"Save Number", recoverySaved:"Number saved.", recoveryNeedPhone:"Please enter a phone number.", userPhone:"Phone Number", userPhonePh:"e.g. 0700000000",
usersTitle:"System Users", colFullName:"Full Name", colUsername:"Username", colRole:"Role",
addUserTitle:"Add New User", addUserBtn:"Add User",
needAllFields:"Please fill in all fields for the new user.", usernameTaken:"This username is already taken.",
keepOneUser:"At least one user must remain in the system.", removeUserConfirm:"Delete this user?",
roles:{ admin:"Manager", operator:"Operator", accountant:"Accountant" },
},
employees: {
title:"Employees", sub:"Manage company staff information",
addTitle:"Add New Employee", colName:"Full Name", colPosition:"Position", colPhone:"Phone Number", colNotes:"Notes",
fullNamePh:"Employee's full name", positionPh:"e.g. Technician, Meter Reader", phonePh:"Contact number", notesPh:"Optional notes",
addBtn:"Add Employee", emptyTitle:"No employees yet", emptySub:"Add a new employee to get started.",
deleteConfirm:"Delete this employee?", needName:"Please enter the employee's name.", countSuffix:"staff",
},
expenses: {
addTitle:"Add New Entry", colTitle:"Description", colAmount:"Amount (AFN)", colDate:"Date", colNotes:"Notes",
titlePh:"Expense or purchase description", amountPh:"Amount in AFN", datePh:"2026-02-01", notesPh:"Optional notes",
addBtn:"Add", emptyTitle:"No entries yet", emptySub:"Add a new entry to get started.",
deleteConfirm:"Delete this entry?", needTitle:"Please enter a description.", total:"Total", currency:"AFN",
catSub:{
employee:"Track wages and costs related to staff",
other:"Record other day-to-day company expenses",
purchases:"Record all equipment and supply purchases",
},
},
common: { save:"Save" },
},
};
/* ============ Storage helpers ============ */