Random numbers in Basic Rate - Printable Version +- Darkky Minecraft Server Forum (https://darkkyshadow.com/forum/secret) +-- Forum: Player Section (https://darkkyshadow.com/forum/secret/forumdisplay.php?fid=3) +--- Forum: Others (https://darkkyshadow.com/forum/secret/forumdisplay.php?fid=9) +--- Thread: Random numbers in Basic Rate (/showthread.php?tid=7515) |
Random numbers in Basic Rate - abdullahiyu - 05-24-2024 I am encountering an impossible bug. I have created a Server Script to handle Before Submit of a Delivery Note. The required functionality is record a special Material Transfer type Stock Entry Today for the first time after more than 1500 executions, over the last two months, the script suddenly failed with the error … ""frappe.exceptions.Update After Submit Error: ____ Not allowed to change Basic Rate (as per Stock UOM) after submission" … as you can see here below: Code: : : : : : : After poking around for hours I edited the Frappe source code to add print statement line Code: print(f"df.label: {df.label} || self_value: ({self_value}) versus db_value: ({db_value})") File : frappe/frappe/model/base_document.py My Date and Number Format settings specify Float = 9, but evidently the random number generated can be Float = 12 and causes this first “collision” after >1500 executions. Even more annoying … it is not random!!! because I get the value 0.004792216125 every single time. Questions: From where does Basic Rate (as per Stock UOM) get its value? How can I force a value of zero? Why do I get an “after submission” fault, if I am inserting a new record? RE: Random numbers in Basic Rate - Nicostly - 05-24-2024 It's odd how it keeps generating the same random value every time. Have you tried exploring your system settings to trace where that value might be coming from?And that "after submission" fault you're encountering—even with new records—is definitely unexpected. It might be worth revisiting any validation rules or restrictions in your system to see what's causing it.Your workaround with setting 'docstatus': 0 seems to provide a temporary fix, but it's important to unravel the underlying issue. But if you're ever stuck, you can always use a d20 roller to shake things up and approach the problem from a different angle. RE: Random numbers in Basic Rate - Avaraine - 11-15-2024 If you’re looking to generate random numbers or perform calculations related to basic rates, you can use an online tool to make it easier. For instance, the Online calculadora provides a variety of calculation options that can help you with quick number generation or rate calculations. RE: Random numbers in Basic Rate - mogeti - 11-18-2024 (11-15-2024, 02:54 AM)Avaraine Wrote: If you’re looking to generate random numbers or perform calculations related to basic rates, you can use an online tool to make it easier. For instance, the Online calculadora provides a variety of calculation options that can help you with quick number generation or rate calculations. YouTube Vanced App is an advanced version of YouTube. It has all of YouTube's main features, along with additional free Premium ones. youtube vanced apk RE: Random numbers in Basic Rate - Avaraine - 11-19-2024 In the context of Basic Rate, random numbers are often used in various applications such as simulations, statistical analysis, or generating unpredictable sequences for cryptographic purposes. Basic Rate refers to a standard level of data transmission or service, and incorporating random numbers can aid in system testing or network management. By leveraging tools like Calculators, users can generate random numbers to model or experiment with different scenarios under Basic Rate conditions. These calculators simplify the process, making it easier to integrate randomness into projects that require unpredictable or non-repeating values. RE: Random numbers in Basic Rate - Avaraine - 11-21-2024 Generating random numbers in basic rate can be useful for simulations, games, or testing algorithms. In programming, random numbers are usually generated within a specified range. To generate random numbers at a basic rate, you can use built-in functions such as `RND` in BASIC programming languages. By specifying a seed value or using system time, you can control the randomness. These numbers are often used for creating unpredictable outcomes or patterns. For more details on how to implement random number generation at a basic rate in your projects, visit gbappsdl.net. |