SUPRIXX 4.6 — COMPLETE FILE SET (read this first) ================================================== NEW IN 4.6 - Customers are remembered automatically: typing in "Party Name" suggests customers already offered to (this company, all years) and fills address + concern person. - Amounts in accounting format everywhere: 125.00 / 1,25,000.00 (PDFs, screen, Offer Bank, app). Tax keeps paisa (26,016.25) instead of rounding to whole rupees. - Currency + tax per company (Companies -> Edit): Nepal default NRs. + 13% VAT, Indian default Rs. + 18% GST; can be changed (e.g. INR, 12%). - Fixed: an amount typed with commas ("1,00,000") was counted wrong in offer values; plant offers ignored their own VAT % in the app / Offer Bank value. - config.php CHANGED in this version (offer value calculation) -- use the new one. NEW IN 4.5: in-app updates. Super Admin -> App Update: upload a new APK once; every phone shows "Update available" when the app opens and installs it with one tap. Needs app 4.5 on the phones (install 4.5 the usual way ONE last time; after that, updates come through the app). NEW IN 4.4: Nepali and Indian fiscal years. Each company has a "Fiscal year calendar" (Companies -> Edit): Nepali (B.S.) Shrawan-Asar, e.g. 2083-84 <- Nepal Ion Exchange (all existing companies start here) Indian (A.D.) April-March, e.g. 2026-27 <- choose this for Indian companies Each calendar has its own years and its own "current" year (Fiscal Years page shows both). An Indian company starts in 2026-27 automatically, numbered from QT-1. A company's calendar can't be changed once it has offers. This zip has EVERY Suprixx file in its latest version. Uploading all of them makes sure no older file is left on the server from the earlier partial updates. UPLOAD 1. Backup first: phpMyAdmin -> Export, and File Manager -> Compress the site folder. 2. Upload suprixx_4.6_complete.zip into the site folder (next to login.php) -> Extract -> replace all. It includes the folder assets/suprixx/ (letterhead tools). 3. config.php is NOT in this zip (it has your password) -- replace it with the separate config.php sent with 4.6. 4. Sign in as Super Admin -> Data Check: it must show no red "Old files" box. Database: nothing to do (it upgrades itself). suprixx_upgrade.sql is included if you prefer phpMyAdmin. APP: build Suprixx v4.6 and publish it via Super Admin -> App Update. ===================================================================== SUPRIXX 4.2 UPDATE: SUPER ADMIN (read this first) ================================================= WHAT CHANGED - Only the SUPER ADMIN can manage Users, Companies (incl. letterheads) and Fiscal Years. - Your built-in "admin" account becomes the Super Admin automatically. - Other admins keep everything else (all companies' offers, Offer Bank, editing offers), but the Users / Companies / Fiscal Years menus are hidden for them and those pages are locked. - The Super Admin can give or take away the role on the Users page ("Make Super Admin" / "Remove Super Admin", admins only). There is always at least one Super Admin: the last one can't be removed, demoted or deleted, and nobody can delete their own account. - Fixed: "Reset Pwd" on the Users page used to turn an admin into a normal user. - App: Profile shows the "Super Admin" section (Companies, Fiscal years, Manage Users) only to the Super Admin. UPLOAD (cPanel -> File Manager -> site folder) Upload suprixx_4.2_server_update.zip and Extract (replace files). 13 PHP files: suprixx.php, users.php, companies.php, fiscal_years.php, letterhead_preview.php, dashboard.php, offer.php, plant-offer.php, amc-offer.php, offer_bank.php, view_offer.php, view_plant-offer.php, view_amc-offer.php config.php does NOT change. DATABASE Nothing to do: the first page load adds users.is_super and makes "admin" the Super Admin. (Or run suprixx_upgrade.sql in phpMyAdmin; safe to run again.) APP Rebuild and install Suprixx v4.2. ===================================================================== SUPRIXX 4.1 UPDATE (read this first) ==================================== WHAT'S FIXED / NEW 1. Logout works everywhere: the app's Log Out and the website's Logout (also when it is opened inside the app) end the sign-in on the server at once. After someone logs out and another person signs in, pages always show the new person. 2. Fiscal years: "Make current" now moves everyone (website AND app) to that year, and new offers get that year's number immediately (e.g. 2082-83 continues at its own next number). In the offer forms "Fiscal Year" is now a list of your fiscal years; on a new offer the number changes with it. The Fiscal Years page shows each year's next number and lets you edit start/end dates. 3. Letterhead preview works (on phones and inside the app it shows the pages right on screen, with a "Download sample PDF" button). 4. Own letterhead = upload the company's letterhead FILE itself: PDF (best), Word .docx or PNG/JPG. The system finds the writing area automatically (two sliders to adjust) and prints every page of every offer on that letterhead. No more cutting header/footer images. 5. Smoother app: pages show a loading bar, lists open instantly (last copy first), PDFs and exports open straight in the phone's viewer, Back behaves like a normal app. 6. Website pages opened from the app (new offer, edit, View & Sign, Companies, Fiscal Years, Users) now look like app screens: app top bar with Back + Home, no website menus. After "Save Offer" you land back in the app on that offer ("Offer saved"). UPLOAD (cPanel -> File Manager -> the site folder) Upload suprixx_4.1_server_update.zip into the site folder and Extract (replace files). It contains: NEW app_logout.php, letterhead_preview.php, next_number.php, assets/suprixx/ (letterhead.js + pdf.js / docx / zip / html2canvas libraries) CHANGED suprixx.php, companies.php, fiscal_years.php, view_offer.php, view_plant-offer.php, view_amc-offer.php And config.php (separate file, has your database password) -> replace the old one. Make sure the folder assets/suprixx/ ends up next to login.php (site-folder/assets/suprixx/). DATABASE Nothing to do: the first page load adds 3 columns to "companies" (letterhead_page, lh_top, lh_bottom). If you prefer phpMyAdmin, run the new suprixx_upgrade.sql (safe to run again). APP Install the new app (version 4.1). It tells the website it's the app, which is what turns the website pages into app screens. USING THE NEW LETTERHEAD Companies -> Edit company -> "Letterhead on the PDFs" -> "Company's own letterhead" -> choose the file -> check the shaded top/bottom on the page picture -> Save company -> "Preview a sample offer PDF". (Old .doc files: open in Word -> Save as PDF or .docx first.) ===================================================================== (earlier notes below) ===================================================================== SUPRIXX UPGRADE — companies + fiscal years =========================================== BEFORE YOU UPLOAD (important) 1. cPanel -> phpMyAdmin -> your offers database -> Export -> Go (database backup) 2. cPanel -> File Manager -> the site folder -> select all -> Compress (files backup) UPLOAD Upload every .php file from this zip into the site folder (next to login.php), replacing the existing files. (In File Manager: upload this zip, then Extract.) NEW files: suprixx.php, admin_ui.php, companies.php, fiscal_years.php, switch_context.php, app_context.php CHANGED files: config.php, offer_counter.php, offer.php, plant-offer.php, amc-offer.php, view_offer.php, view_plant-offer.php, view_amc-offer.php, dashboard.php, offer_bank.php, offer_bank_export.php, users.php, login.php, app_auth.php, app_login.php, offer_status.php, offer_details.php, notifications_feed.php Not touched: logout.php, vendor/, assets/ (and any other files you have) DATABASE: TWO WAYS (use either one) A) Automatic: just upload the files; the first page load upgrades the database. B) By hand: phpMyAdmin -> your offers database -> SQL tab -> paste the contents of suprixx_upgrade.sql (or Import that file) -> Go. Then upload the files. It is safe to run twice, and the website then skips its automatic upgrade. Both give exactly the same result. WHAT HAPPENS ON THE FIRST PAGE LOAD The database upgrades itself once (nothing is deleted or renamed): - new tables: companies, fiscal_years, user_companies, sx_offer_counters, sx_meta (your existing offer_counters table is left exactly as it is) - new columns: offers.company_id, offers.fy_id, users.default_company_id - Nepal Ion Exchange becomes company #1 (details from your current PDFs) - every existing offer -> Nepal Ion Exchange + the fiscal year in its reference - every existing user -> access to Nepal Ion Exchange - offer numbers continue from the highest number already used in each year AFTER UPLOADING 1. Sign in as admin. Top-left shows "Suprixx" and "Nepal Ion Exchange · FY 2083-84". 2. Companies (menu) -> check Nepal Ion Exchange's details -> Add company for the others (upload each company's logo there). 3. Fiscal Years (menu) -> add next year when it starts, "Make current". 4. Users -> tick which companies each user may see, and their default company. 5. Switch company / year any time from the pill at the top-left of every page. Company logos are saved in uploads/company_logos/ (created automatically). If PHP can't create it, create the folder "uploads/company_logos" yourself in File Manager. OWN LETTERHEAD PER COMPANY (added in this version) Companies -> Edit a company -> "Letterhead on the PDFs": - Standard design: logo + name at the top, offices/reg. no./contacts at the bottom (made from the company details) -- what every company has by default. - Own letterhead: upload the company's letterhead as two images: Header image = the top strip of their letterhead Footer image = the bottom strip (optional) PNG or JPG, full A4 width, at least 2000 px wide, under 5 MB, cropped tightly. If the letterhead is a Word/PDF file: open it, cut out the top strip and the bottom strip, and save each as PNG. Every PDF of that company (Spares, Plant, AMC, on every page) then prints those images; the page margins adjust to the images so the text never overlaps them. "Preview a sample PDF" shows a 2-page sample before you use it on real offers. Images are stored in uploads/company_letterheads/ (created automatically). ALREADY UPLOADED THE PREVIOUS ZIP? Then only these 6 files changed: suprixx.php, companies.php, admin_ui.php, view_offer.php, view_plant-offer.php, view_amc-offer.php (the database adds its 3 letterhead columns by itself on the next page load) FROM THE APP (admin) Profile -> Admin -> "Companies & letterheads" / "Fiscal years" / "Manage Users" open these same pages inside the app, already signed in. Home -> the company pill switches the company + fiscal year you're working in.