Quick answer: दुकान का Stock और Order Tracking App बनाने के लिए products, stock movements, orders और order items को अलग records में रखें। Confirmed order पर stock reserve करें, dispatch पर movement दर्ज करें और cancellation या return में संबंधित entry बनाएं। AI से पहले schema और business rules बनवाएं, फिर sample data से calculations verify करें।
दुकान में register, WhatsApp और Excel तीनों चलते हों तो अक्सर सवाल उठता है: “माल मौजूद है, फिर order pending क्यों है?” कारण physical stock और बेचने योग्य available stock का फर्क हो सकता है। इस educational case study में एक fictional stationery shop के लिए app की planning करेंगे। यह किसी real shop पर लागू tested project या performance report नहीं है।
पहले stock की भाषा तय करें
एक notebook का SKU NB-A5-100 हो सकता है। SKU product variant की पहचान है; display name बदलने पर पहचान नहीं बदलनी चाहिए। Unit, purchase unit, sale unit और conversion अलग तय करें। दस boxes और दस pieces समान quantity नहीं हैं। Opening balance दर्ज करने की तारीख भी तय करें, ताकि पुराने sales फिर घटकर double counting न करें।
On-hand वह stock है जो physically available है। Reserved confirmed लेकिन अभी dispatch न हुए orders के लिए रखा stock है। Available quantity = on-hand − reserved। Damaged या inspection-pending returns को तुरंत available न जोड़ें। हर shop का reservation rule अलग हो सकता है; इसे owner से confirm करें। No-code विकल्प देखने के लिए हमारी Zoho Creator inventory app guide पढ़ें।
एक छोटा calculation example
| Event | On-hand | Reserved | Available |
|---|---|---|---|
| Opening stock | 50 | 0 | 50 |
| 12 pieces order confirmed | 50 | 12 | 38 |
| 12 pieces dispatched | 38 | 0 | 38 |
| 2 pieces sellable return received | 40 | 0 | 40 |
Dispatch पर on-hand घटाने के साथ reservation release होना चाहिए। दोनों updates अलग-अलग fail होने पर report गलत बनेगी। इस example में return physically received और inspected है। केवल refund request आने पर quantity नहीं बढ़ाई गई है।

AI को app planning का prompt दें
एक stationery shop के लिए PHP/MySQL Stock और Order Tracking App की planning करें। Products, variants, units, opening stock, purchases, stock movements, orders, order items और reservations अलग model करें। हर table का primary key, relations, required fields और indexes सुझाएं। Confirm, partial dispatch, cancel और return का flow बताएं। अभी code न लिखें। Negative available stock रोकने, simultaneous orders और duplicate submission के acceptance tests दें। Missing rules पहले पूछें।
पहले schema review करें। AI अक्सर सभी quantities products table में रख देता है और history छोड़ देता है। Dashboard quantity उपयोगी है, लेकिन audit के लिए movement ledger चाहिए। Order total के लिए decimal values रखें; currency rounding rule तय करें। Product price बदलने पर पुराने order का captured unit price नहीं बदलना चाहिए।
Database tables कैसे अलग रखें?
Products में SKU, name, unit और active flag रखें। Orders में customer reference, date और status रहें। Order_items हर product की quantity और captured price रखे। Stock_movements में product, location, movement type, quantity, reference और created_by हों। Reservations order item के साथ जुड़ें। Customer और supplier records अलग रखने से repeated text कम होगा।
Primary keys और foreign keys संबंधों को स्पष्ट रखते हैं। Related changes को transaction में करना जरूरी है, लेकिन transaction अकेले overselling नहीं रोकता; row locking या atomic conditional update और retry handling भी design करें। MySQL InnoDB की official guidance related updates को transactions में group करने और table keys की planning समझाती है।

Order status और stock status को न मिलाएं
Draft order stock reserve नहीं करे। Confirmed order quantity reserve करे। Partial dispatch में केवल shipped quantity घटे और बाकी reserved रहे। Cancelled remainder reservation release करे। Payment status Unpaid, Part-paid या Paid अलग field/records से निकले; paid होने का अर्थ dispatched होना नहीं है। Purchase order बनना भी stock arrival नहीं है—goods receipt आने पर movement बने।
Staff को sale entry की permission मिले, लेकिन opening stock बदलने और adjustments करने की permission manager तक सीमित हो सकती है। Adjustment के साथ reason रखें। Reports में current balance, low-stock, pending orders और movement history पहले रखें। Field entry की जरूरत हो तो AppSheet field data entry guide से form planning समझें।
Live करने से पहले इन cases को test करें
Available quantity 5 हो और दो staff एक साथ 4-4 pieces confirm करें: दोनों orders silently accept नहीं होने चाहिए। Submit दो बार दबाने से duplicate order या double stock deduction न हो। दस में से चार pieces dispatch करके बाकी cancel करें: on-hand चार घटे और बाकी reservation release हो। Damaged return receipt stock history में दिखे, लेकिन sellable quantity न बढ़ाए।
Backup restore करके report totals match करें। Test data को real opening stock से अलग रखें। CSV import में duplicate SKU, invalid unit और negative opening balance की clear errors दें। Deployment के लिए हमारी PHP app को cPanel पर deploy करने की guide देखें।
Custom app के लिए सही hosting कैसे चुनें?
पहले app का runtime तय करें। PHP/MySQL वाला छोटा portal compatible shared hosting पर शुरू हो सकता है; Python/Odoo, लगातार चलने वाले workers या अलग services के लिए उपयुक्त VPS या managed platform चाहिए। Hosted SaaS इस्तेमाल करने पर अलग hosting खरीदना जरूरी नहीं है।
अपना project live करना चाहते हैं? Bluehost के current hosting और VPS options देखें या HostArmada पर अपने PHP project के लिए plan जाँचें। खरीदने से पहले support को PHP/Python version, database, cron और backup की अपनी exact जरूरत भेजें।
तुलना के लिए ChemiCloud के plans देखें, FlashCloud की current pricing जाँचें और FastComet के hosting options compare करें। Initial price के साथ renewal, tax, resource limits, restore सुविधा और support coverage लिखकर तुलना करें। किसी plan में हर runtime उपलब्ध मानकर न चलें।
Affiliate disclosure: इन hosting links से खरीदारी पर WebTakniki को commission मिल सकता है। Final price और features provider के checkout पर जाँचें।
अक्सर पूछे जाने वाले सवाल
क्या Excel से सीधे inventory app बन सकता है?
Spreadsheet starting data दे सकता है। SKU, units, duplicates और opening date साफ करने के बाद import करें। गलत input data नए app में भी गलत reports देगा।
क्या order बनते ही stock घटाना चाहिए?
हर business में नहीं। इस example में confirmation पर reserve और dispatch पर on-hand कम होता है। अपनी दुकान का approved rule लागू करें।
क्या केवल quantity field पर्याप्त है?
नहीं, movements और references रखने से पता चलता है कि balance कब और क्यों बदला। Audit history और approved adjustments जरूरी हैं।
अगला कदम: पाँच products और दस sample orders से पूरा flow चलाएं। Stock movements के established example के लिए Odoo moves history documentation देखें। Example और calculations 7 अक्टूबर 2026 को तैयार किए गए हैं।