Snippets Collections
End-to-end solutions for P2E Game Development can help your business generate new revenue streams.  We are the top Play-to-Earn Game development Company, providing outstanding P2E game development services.  Hire Play-to-Earn game developers to make your gaming concepts a reality.  Attract players and investors with an advanced gaming platform that is built for long-term growth and success.
https://chatgpt.com/share/67fea1e0-4fe0-800f-bdd8-9a39c7ea02d9
OTT Influence is the best influencer marketing agency in Delhi, offering impeccable services that connect your brand with the right influencers. At OTT, we unite brands with top micro-influencers, ensuring maximum engagement.
{"url":"https://chatgpt.com","cookies":[{"domain":"chatgpt.com","hostOnly":true,"httpOnly":true,"name":"__Host-next-auth.csrf-token","path":"/","sameSite":"lax","secure":true,"session":true,"storeId":"0","value":"337eca6f64d51ab44e96ad2d730a6cf61bb4dd6a187648fb95eff5251758c62a%7C34fa57fcbc4a093c97c166ee58c7514903c45ebb9d0c77871c193edded99daf9"},{"domain":".chatgpt.com","expirationDate":1775794870.919494,"hostOnly":false,"httpOnly":false,"name":"oai-did","path":"/","sameSite":"lax","secure":false,"session":false,"storeId":"0","value":"ad550994-b717-475c-a09d-8e4cbc3a47a8"},{"domain":".chatgpt.com","hostOnly":false,"httpOnly":true,"name":"_cfuvid","path":"/","sameSite":"no_restriction","secure":true,"session":true,"storeId":"0","value":".ZCzOJ0HNEjbK91wVle70wP3trWE7YHKqSZdgLdAVa8-1744690871171-0.0.1.1-604800000"},{"domain":"chatgpt.com","hostOnly":true,"httpOnly":true,"name":"__Secure-next-auth.callback-url","path":"/","sameSite":"lax","secure":true,"session":true,"storeId":"0","value":"https%3A%2F%2Fchatgpt.com%2F"},{"domain":"chatgpt.com","expirationDate":1775794891.241609,"hostOnly":true,"httpOnly":false,"name":"oai-hlib","path":"/","sameSite":"lax","secure":false,"session":false,"storeId":"0","value":"true"},{"domain":"chatgpt.com","expirationDate":1747282965.209637,"hostOnly":true,"httpOnly":false,"name":"oai-last-model","path":"/","sameSite":"lax","secure":false,"session":false,"storeId":"0","value":"gpt-4o"},{"domain":".chatgpt.com","expirationDate":1744704853.116044,"hostOnly":false,"httpOnly":true,"name":"__cf_bm","path":"/","sameSite":"no_restriction","secure":true,"session":false,"storeId":"0","value":"eidvaDKwtbwpzrq_NJH.8ywhU.vVijHaVFGQRkyUhYw-1744703053-1.0.1.1-NefiTbmmfXv_8q2sul4dkkP3RmK4ktDE75ulFGxiMUWqBl50y5jKFL4HqwjaW6GviS6GboCbabSNFqhF.Ho0agHhTLkzPcIIpHLlcgDKpbw"},{"domain":"chatgpt.com","expirationDate":1744706653.116104,"hostOnly":true,"httpOnly":true,"name":"__cflb","path":"/","sameSite":"no_restriction","secure":true,"session":false,"storeId":"0","value":"0H28vzvP5FJafnkHxiseZX82KGkF3aDneuym4DsnykP"},{"domain":".chatgpt.com","expirationDate":1752479110.805003,"hostOnly":false,"httpOnly":true,"name":"__Secure-next-auth.session-token.0","path":"/","sameSite":"lax","secure":true,"session":false,"storeId":"0","value":"eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..cU2BC9TN0Dtu249y.rG4LXkHvBtSWg4fahhqUwcT3c2vSEXF9UNjhpEkjKbsaSt_olRyQSrjF3SWLvFtrJYHaOYmNX8qutYWtnIrhy6uUda5M4L8SkOVqwDaLnfMsdxtkmrDuiHaIrW49fR65USLZeZKZe_gIJNkHmUwgNcmNSXU9CONzlCKiG5khNZIZh185QDXk6oidVbXleDTmtmG1KmXTPg1v6hAen1zS8rtCxrCyNwVteWrSczvVJVmZwaPPm_atnmCIVqQ5h6OLSR30y96NemRTLjl8jfXKtd09MXF7a1XSSg5q2sn3DFYu1Wse4FJzoc37TEAhsC_GnOmY3MXHubHdVCHwlxlrrIjG8adaztLNZNhBSjTp0UBfvMgl1lAaXUgYLdyX3pPLTpN43SfUqFv7hgJnsyiFXe5ze_3SecoxURBw7uZU2g0uqh5tdn0_TMg3vJwaJZ3iUMP_63HkKRwhe0mq02f22vkuGuet2P_i5SzjHTsTTKdVliR-_TW_Gel4bTl2eAw6rm5tXjfo0-D1FfHvivcADNzCJCLrVeIC1p6NV3Sr70Rhj_ip0s_r3aN9NOxLwYt9aEhcpZPS4joyRgddFWLyQcXHqZr-45pAJ-LMR0crL5-wTTCtnluxGCV_HksvSGcDceR4xVIWIMbk5yr1xSPAx7cHKDHDZcj-VJR2cIGfo5-94yvYTR9HynKURkT9ZMR6EjcE9I8fSlwQlpeEipR-ZefKmKA40NcRM5phTYtOwfNHt9TWJSZZ2-beaxViD6ui6JMWINr4Nk8my0WoIx3NIIQNGQqu2yvu3lyTUknvQNhtNT4I6fxTjKFAlstjM0NH-6uhOwUzjos3ze0qx8O3-OB_yVWybla9yaWyZcyozw6lYdWeqww0jlIjtOPAeNUYJ7z8iIiBy6h6ehNrAdA7SWg1BT1SgqeZxQsqWMc5EaEQwEJ_nQNcyh-1zr8H3Jt25evMKbq23_e0K11RmpwOKULlRzDyBq5KaAU_EDSTWLX0FSWPv6bpCJtC3ycanXqy6HiXOy9dKgqxDjRJCRcD-PWEoyN8N1uJuW1ZPdSH1pjERKabHWwP-toE5O6SyNRy46wOZmELCi83ltsq2To0qC2QbIiThJ5mJG3KOgijIQywqkcxGtvNLEAYx05TfsTlBdkJDDrkFSv3zaUc_eLniwK2hXsdivYZpE7sAVqLp9ooK-PDRllD-ISzKEwY2_EJJEvzjWy3ovzSrSQhgnpwnzK8TNrV9AqEV4sWPwhvvOx1giuUV2v4ApCPveWMsJqQfT4rVdJ2oGX-QY66XFKm1Hkyc6hbR_3_0HMMbFJHECm5lEXLW0OkkHkHPKv0W80x9jf0OI0F29LP4MMil4ZcsZdXFLOLClm_dHALOY_Q5b3cOTp6fvvmIJ_unuD5_4DPHcVLJ5pyCjnM5r-pefkxsdaJKtBKvKa2MJNKj1T0I4jwfz1eKxIvcpngNosXijlMRlcqafyKrYinILUPXuGNNDG5hxkRtjI-H4QZlDl9SY0hrcaT92E3Tc3RPabuOSB4w0LzKAiocnDh12aj7gZAAhuF1iJeG9J48p5yQaJ76P5V9mB9UyjdPd9GNMg0ylhdwXzOAe-w4kg6bLDuQGWWYs80MbBj33ATipGTOPpxJCB242PxXeWFweIGMQwtUwQQG__ubdV9FSwPp2vk2kaUzCi_NIoPTGZjhLuzLQ-J_xQ-BckrGsd7RozTQZhbitwwiBUKFxCgsLsVkV7UqR2DFzgGrx7vP2X33gQlkr0KK72RZvJLeCwr7VI0tzMYuc8w71bEgDrVktc_HRdPV9j-_NFbC6_Dw_YIHjsovqtE0-9Ctbr5EuQIWggjZEYmtgJbWiyJfAx9WkmAcv4ygqawTOJnBk5xsb_MRREICDJ47LtetFdTVIYVuChk8eta7fXKRA8AGUxUCt6KXruYE2mOUAYnmU_0oC0sZ9mcSLkHvINRA7r4-A496sqw9spYDZrpq7T3vuwD-Cg-HqYZM4VLDxtbRfmFbA6CrmCrIIESu_2Vb_kgbJlyCJne9MGi5j8tftvIFNwqZKFpOpmrahOaXepyNGuqX9arphh2OOWvhA6tpS6p-E1Xrvc5c1LnJzYtykSpCL48JBxX-ZjzUK8j2hEDgFmyL5zsV8AoKhNY5hZy-zy3lWRJnTaAq_zsbYFq7ZbckkLTyz8OfC_xGYBsv2chcoa4MuqySx_QaQi8spZbwe2ccKBKny8NcFQKA_bXkBPohCCntgpeY-mjWfQyps_voDzcZH197GDjTsklO430f7iyGBX5-CDCO6dLRI2RsA8e-TqQYpwtPKf_2kaFPBFVd6ViyP4Xa5f6P5g5awOA1EQpVA54uG1TUY9yDvgAeZIRJX-U8mI65y9BTpyXtp4518o5pSIevSDW0wbveRVcQHHJ5w_oSlAdVRtZnnHs_I-H3M1mmxvWhoAnXlgKbZZeHayoDjMTw_1em83gRjbtqjA0fvLyPDWwdXTjBuF8d9oDaJMIaPZz3TRmB5tpfGbkwbJj_adIsiRUiOy7GieT6tnNn9kavDUHfpJQFSGOkRtFYEIwAuIZz2fYkoGLQGDA5gUJbWAUOpoic2Ys5SPHTAcaoafA8rBgAhzNQv9Y1n8HNoGA53PJbxxBNECDq0atAySkpEc-SJ4_EMMd0LfCC9Y1vab15Wn7Fi08avINRS3QmsSIYb5aYsu1JDYWUWWmh8TY_PV-5VrPw8tBdh6RkauSfIr_NOV5r9clI3VnSJ4W_uCuFHvhg0wEZKmqyBvITUMxQ4ynYT_ofbbBw1K38NxhyFjHwXs0KIOBi9GrFpr6G-hbWVPcAcJIAe6ZbggjzpIFkJBMeCWeIDT6cukj9RD-ayxqMYqENB9Ub-ermwxl4RgMrq3ElOrVAPOQBON2ioS9AacrOvYbljvzfOuq5B-dphJoiTbDmdFPQjO73Nrry3yQ1NedYaCemKjgg0KWiP0UJuc8zk1UJ9AcU7m5NTgf2MWIsiz_YUrW7bt8JQPEPYysjdQaARoi_CSajd1lr8ZCedg-4anc-lmItm1COXTd7sc7Gp9OarBiDf25WwE6Uy5eVRKTCjubrF_zC_-_tNDd7Incyea0I28mRq29OcCGriRgHGx12vmVih73Wr1rA8aCXRjk_-du8u52iKwyxAvvCnvl1La3pIN4OdXQPsPBr62aWqCu-Qbgh6fH4i8u8C0aPxATNKmY_8jM19SA9ijjhXSMtZO_mheuIpseWlgCRyWd0Z7LqwAhoTzKGAken9C2kiU7LDeI4Y-6j2pKMzTqSr741YHfSQotvPLlAqjXQbnY9LjlPyhEJqPoPEqM_Zhv_6DcGc49cRL-pt3fJi_1CnxeMD2LETwIdUTydRCzInieGkuhe9M0Py70Olpgp-GDevwOk5R9zJ4nZ_vmk60vQw5skPMP_X63Gaed2A0tOZcYc0dS9uHrDmlFbj5nPHlKKwDN8FbF7ziY4Dxgb59e718lqqc9bVsBQQ7XfOyAKOXnKnIWDFr_zPkKzObfp_hNeledKWZ0SA51rM5997HOn7ZoRYPU2HMAJEiw61Ej041sNOjOFRTAYhTWVOiS4cE4podDnVCudb4w4e_y1SFhLMxZnlXlXoN3laX5D075SojQVosjMFvfawSOcSlcwjE8H1Nh1xxkjU7Rz8y94rvIExdYA5VuSxWOSTnlEVlbW6te8VmCOODTuPaAMxLDxz7gXWXyEfD_j_EkKewWYS4iMo_I1r-t7my3mVL0_ICl_hVx9vJCVQEkUyHlvUZiI3g0jaFFwP0t-25y-DrOKD-Punmfs2dDKswkT2CanOakdMg2YPmWlHp7GdyWzmGybcLQSmXzTfzHWFcRcVsPztWT0a4Ri1F"},{"domain":".chatgpt.com","expirationDate":1752479110.805117,"hostOnly":false,"httpOnly":true,"name":"__Secure-next-auth.session-token.1","path":"/","sameSite":"lax","secure":true,"session":false,"storeId":"0","value":"FyHQcqvoTNXJwcRpDCiAxOivNJHhKzUuJq7OPbwHeA5EV9_-oOZI.e0eSUVNVgSgRgO_krXyEBQ"},{"domain":".chatgpt.com","expirationDate":1776239111.913607,"hostOnly":false,"httpOnly":false,"name":"oai-sc","path":"/","sameSite":"no_restriction","secure":true,"session":false,"storeId":"0","value":"0gAAAAABn_g6IWjRIPM9d6fSX7kRgWouvExGNs0ZXM1kDFqkpYADsRc8PrPkClyZvrocUX4epOylI33QJh0ad5feClHpwcch9mKwFoYc-ShpD6crmCtPqpuhViq2UNSxHSVOQw2OxG-JZc0z3zvSkYBA7_qCmOzXNYIjT59MZRdpONZy_qIBJf6Uy_hYk-9SK6-2G9JXhrwndE8kkMRcNQgCcACup7Xr0RpgDHLiXQxUqeYd3zmV7tLA"},{"domain":"chatgpt.com","expirationDate":1744704104,"hostOnly":true,"httpOnly":false,"name":"_dd_s","path":"/","sameSite":"strict","secure":false,"session":false,"storeId":"0","value":"rum=0&expire=1744704100422&logs=1&id=d172268d-bb48-438e-84a1-df230e44e25b&created=1744699886272"}]}
void htmlParserFrom()
{
deal_description = "<p><img src=\"https://media.sunhub.com/pictures/item/image_2a8b93a2.jpg\" alt=\"Hyundai Logo\"></p><h2><strong>Hyundai 405W 132 Half Cell BoB Bifacial Solar Panel</strong></h2><p>As a core energy business entity of HHI, Hyundai Energy Solutions has strong pride in providing high-quality PV products to more than 3,000 customers worldwide.</p><p> </p><h3><strong>Key Features:</strong></h3><ul><li>Maximized Power Generation</li><li>Half-Cut & Multi-Wire Technology</li><li>Anti-LID / PID</li><li>Mechanical Strength</li><li>UL / VDE Test Labs</li><li>Reliable Warranty</li></ul><h3><strong>Products Details:</strong></h3><ul><li>Manufacturing Part number: HIS-S405YH(BK)</li><li>Power Output: 405 Watt</li><li>Cells: 132 Half cut Bifacial cells</li><li>Weight: 46.51 lb</li><li>Dimensions: 75.74 x 40.86 x 1.26 in</li><li>Pallet Qty: 32 Pcs</li><li>Container Qty: 768 Pcs<br><br>Current Stock In: TX, NJ, FL, CA</li></ul>";
// Remove all HTML tags using replaceAll
clean_description = deal_description.replaceAll("<[^>]+>","");
info clean_description;
// This will show the text without HTML tags
}
1.put all these files and folders in a folder called task-manager(create one)

2.[[[[now open cmd in the task manager folder or set the path in cmd to the folder.

Hold Shift and right click on task-manager folder select open terminal or Open Command Window]]]]

3. once opened run these commands in cmd
npm init -y
npm install express mongoose jsonwebtoken bcryptjs cors
npm install dotenv

4. run this finally
  node server.js

if it doesnt work pray to god and leave the internal🙂


    
    


/**
2
 * Make Woodmart WooCommerce variation buttons appear with different styles based on stock status
3
 */
4
​
5
add_action('wp_head', 'add_woodmart_size_variation_css');
6
function add_woodmart_size_variation_css() {
7
    ?>
8
    <style>
9
        /* Available in stock - normal state with green border */
10
        .wd-swatch.wd-in-stock,
11
        div[data-id="pa_size"] .wd-swatch.wd-in-stock {
12
            border: 1px solid #294567 !important;
13
            background-color: #f9fff5 !important;
14
        }
15
        
16
        /* Out of stock but available for backorder - orange styling */
17
        .wd-swatch.wd-backorder,
18
        div[data-id="pa_size"] .wd-swatch.wd-backorder {
19
            background-color: #bbbbbb !important;
20
            border: 1px solid #bbbbbb !important;
21
        }
22
        
23
        .wd-swatch.wd-backorder .wd-swatch-text,
24
        div[data-id="pa_size"] .wd-swatch.wd-backorder .wd-swatch-text {
25
            color: #fff !important;
26
        }
27
        
28
        /* Out of stock and not available for backorder - gray styling */
29
        .wd-swatch.wd-disabled,
30
        div[data-id="pa_size"] .wd-swatch.wd-disabled {
31
            opacity: 0.5 !important;
32
            background-color: #f5f5f5 !important;
33
            border: 1px solid #d6d6d6 !important;
34
            cursor: not-allowed;
35
        }

const express = require('express');
const mongoose = require('mongoose');
const dotenv = require('dotenv');
const cors = require('cors');
const path = require('path');
const authRoutes = require('./routes/auth');
const taskRoutes = require('./routes/tasks');

dotenv.config(); 

const app = express();
const PORT = process.env.PORT || 5000;


app.use(express.json()); 
app.use(cors()); 




mongoose.connect(process.env.MONGO_URI, {
    useNewUrlParser: true,
    useUnifiedTopology: true
  })
  .then(() => console.log('MongoDB connected'))
  .catch(err => console.error('MongoDB connection error:', err));
  

app.use('/api/auth', authRoutes);
app.use('/api/tasks', taskRoutes);


app.listen(process.env.PORT, () =>
    console.log(`Server running on port ${process.env.PORT}`)
  );
  
MONGO_URI=mongodb://127.0.0.1:27017/taskdb
JWT_SECRET=mysecretkey
PORT=5000
//auth.js

const express = require('express');
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const User = require('../models/User');

const router = express.Router();

// Register
router.post('/register', async (req, res) => {
  const { name, email, password } = req.body;

  if (!name || !email || !password) {
    return res.status(400).json({ message: 'All fields are required' });
  }

  try {
    const existingUser = await User.findOne({ email });
    if (existingUser) {
      return res.status(400).json({ message: 'User already exists' });
    }

    const hashedPassword = await bcrypt.hash(password, 10);
    const newUser = new User({
      name,
      email,
      password: hashedPassword,
    });

    await newUser.save();

    res.status(201).json({ message: 'User registered successfully' });
  } catch (err) {
    console.error('Registration failed:', err);
    res.status(500).json({ message: 'Server error during registration' });
  }
});

// Login
router.post('/login', async (req, res) => {
  const { email, password } = req.body;

  try {
    const user = await User.findOne({ email });
    if (!user) return res.status(400).json({ message: 'Invalid credentials' });

    const isMatch = await bcrypt.compare(password, user.password);
    if (!isMatch) return res.status(400).json({ message: 'Invalid credentials' });

    const token = jwt.sign({ _id: user._id }, process.env.JWT_SECRET, {
      expiresIn: '1h'
    });

    res.json({ token });
  } catch (err) {
    console.error('Login failed:', err);
    res.status(500).json({ message: 'Server error during login' });
  }
});

module.exports = router;



//tasks.js

const express = require('express');
const TaskModel = require('../models/Task');
const authMiddleware = require('../middleware/authMiddleware'); // Authentication middleware
const router = express.Router();

// Apply authentication middleware to all routes in this file
router.use(authMiddleware);

// Create a new task
router.post('/create', async (req, res) => {
  const newTask = new TaskModel({
    ...req.body,
    assignedTo: req.user._id, // Assign the task to the authenticated user
  });
  try {
    await newTask.save();
    res.status(201).json(newTask); // Send the created task as response
  } catch (err) {
    res.status(500).json({ error: 'Error creating task' });
  }
});

// Get all tasks for the logged-in user
router.get('/all', async (req, res) => {
  try {
    const userTasks = await TaskModel.find({ assignedTo: req.user._id });
    res.status(200).json(userTasks);
  } catch (err) {
    res.status(500).json({ error: 'Error fetching tasks' });
  }
});

// Get a specific task by ID
router.get('/single/:taskId', async (req, res) => {
  try {
    const task = await TaskModel.findOne({ _id: req.params.taskId, assignedTo: req.user._id });
    if (!task) return res.status(404).json({ error: 'Task not found' });
    res.status(200).json(task);
  } catch (err) {
    res.status(500).json({ error: 'Error fetching task' });
  }
});

// Update a specific task
router.put('/update/:taskId', async (req, res) => {
  try {
    const updatedTask = await TaskModel.findOneAndUpdate(
      { _id: req.params.taskId, assignedTo: req.user._id },
      req.body,
      { new: true }
    );
    if (!updatedTask) return res.status(404).json({ error: 'Task not found' });
    res.status(200).json(updatedTask);
  } catch (err) {
    res.status(500).json({ error: 'Error updating task' });
  }
});

// Delete a task
router.delete('/delete/:taskId', async (req, res) => {
  try {
    const deletedTask = await TaskModel.findOneAndDelete({ _id: req.params.taskId, assignedTo: req.user._id });
    if (!deletedTask) return res.status(404).json({ error: 'Task not found' });
    res.status(200).json({ message: 'Task Deleted' });
  } catch (err) {
    res.status(500).json({ error: 'Error deleting task' });
  }
});

module.exports = router;
//index.html
<!DOCTYPE html>
<html>
<head>
  <title>Login</title>
</head>
<body>
  <h2>Login</h2>
  <input id="email" placeholder="Email" required><br>
  <input id="password" type="password" placeholder="Password" required><br>
  <button onclick="login()">Login</button>
  <p>No account? <a href="register.html">Register here</a></p>

  <script>
    const API = 'http://localhost:5000/api/auth';

    async function login() {
      const email = document.getElementById('email').value;
      const password = document.getElementById('password').value;

      if (!email || !password) {
        alert("Please fill in all fields");
        return;
      }

      try {
        const res = await fetch(`${API}/login`, {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify({ email, password })
        });

        const data = await res.json();

        if (res.ok) {
          localStorage.setItem('token', data.token);
          alert('Login successful!');
          window.location.href = 'tasks.html';
        } else {
          alert(data.message || 'Login failed');
        }
      } catch (err) {
        console.error('Login error:', err);
        alert('Something went wrong. Please try again.');
      }
    }
  </script>
</body>
</html>


//register.html
<!DOCTYPE html>
<html>
<head>
  <title>Register</title>
</head>
<body>
  <h2>Register</h2>
  <input id="name" placeholder="Full Name" required><br>
  <input id="email" placeholder="Email" required><br>
  <input id="password" type="password" placeholder="Password" required><br>
  <button id="registerBtn">Register</button>
  <p>Already have an account? <a href="index.html">Login here</a></p>

  <script>
    const API = 'http://localhost:5000/api/auth';

    document.getElementById('registerBtn').addEventListener('click', async () => {
      const name = document.getElementById('name').value;
      const email = document.getElementById('email').value;
      const password = document.getElementById('password').value;

      if (!name || !email || !password) {
        return alert('All fields are required.');
      }

      try {
        const res = await fetch(`${API}/register`, {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify({ name, email, password })
        });

        const data = await res.json();

        if (res.ok) {
          alert(data.message);
          window.location.href = 'index.html';
        } else {
          alert(data.message || 'Registration failed');
        }
      } catch (err) {
        console.error('Register error:', err);
        alert('Something went wrong. Try again.');
      }
    });
  </script>
</body>
</html>


//tasks.html

<!DOCTYPE html>
<html>
<head>
  <title>Task Management</title>
</head>
<body>
  <h2>Manage Your Tasks</h2>

  <div>
    <input id="taskTitle" placeholder="Enter Task Title"><br>
    <input id="taskDescription" placeholder="Enter Description"><br>
    <input id="taskDueDate" type="date"><br>
    <select id="taskStatus">
      <option value="pending">Pending</option>
      <option value="in-progress">In Progress</option>
      <option value="completed">Completed</option>
    </select><br><br>
    <button onclick="addNewTask()">Add New Task</button>
  </div>

  <h3>Task List</h3>
  <ul id="taskList"></ul>

  <script>
    const API_URL = 'http://localhost:5000/api/tasks';
    const userToken = localStorage.getItem('token');

    if (!userToken) {
      alert("You need to log in first.");
      window.location.href = "login.html"; // Redirect to login page if no token found
    }

    // Fetch and display all tasks
    async function getAllTasks() {
      try {
        const response = await fetch(API_URL + '/all', {
          headers: { Authorization: 'Bearer ' + userToken }
        });
        const tasks = await response.json();

        const taskListElement = document.getElementById('taskList');
        taskListElement.innerHTML = '';

        if (tasks.length === 0) {
          taskListElement.innerHTML = '<li>No tasks found.</li>';
        } else {
          tasks.forEach(task => {
            const taskItem = document.createElement('li');
            taskItem.innerHTML = `
              <b>${task.title}</b> - ${task.status}
              <button onclick="deleteTask('${task._id}')">Delete</button>
            `;
            taskListElement.appendChild(taskItem);
          });
        }
      } catch (err) {
        console.error("Fetching tasks failed:", err);
        alert("Error fetching tasks. Please try again.");
      }
    }

    // Add a new task
    async function addNewTask() {
      const title = document.getElementById('taskTitle').value.trim();
      const description = document.getElementById('taskDescription').value.trim();
      const dueDate = document.getElementById('taskDueDate').value;
      const status = document.getElementById('taskStatus').value;

      if (!title) {
        return alert("Title is required.");
      }

      try {
        const response = await fetch(API_URL + '/create', {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
            Authorization: 'Bearer ' + userToken
          },
          body: JSON.stringify({ title, description, dueDate, status })
        });

        const responseData = await response.json();
        alert('Task added successfully!');
        getAllTasks();
      } catch (err) {
        console.error("Adding task failed:", err);
        alert("Could not add task.");
      }
    }

    // Delete a task by ID
    async function deleteTask(taskId) {
      if (!confirm("Are you sure you want to delete this task?")) return;

      try {
        const response = await fetch(`${API_URL}/delete/${taskId}`, {
          method: 'DELETE',
          headers: { Authorization: 'Bearer ' + userToken }
        });

        const responseData = await response.json();
        alert(responseData.message);
        getAllTasks();
      } catch (err) {
        console.error("Deleting task failed:", err);
        alert("Could not delete task.");
      }
    }

    // Load tasks when the page loads
    getAllTasks();
  </script>
</body>
</html>
//task.js

const mongoose = require('mongoose');

const TaskSchema = new mongoose.Schema({
  title: { type: String, required: true },
  description: String,
  status: { type: String, enum: ['pending', 'in-progress', 'completed'], default: 'pending' },
  dueDate: Date,
  assignedTo: { type: mongoose.Schema.Types.ObjectId, ref: 'User' }
});

module.exports = mongoose.model('Task', TaskSchema);



//user.js
const mongoose = require('mongoose');

const UserSchema = new mongoose.Schema({
  name: { type: String, required: true },
  email: { type: String, required: true, unique: true },
  password: { type: String, required: true },
  createdAt: { type: Date, default: Date.now }
});

module.exports = mongoose.model('User', UserSchema);

//authMiddleware.js

const jwt = require('jsonwebtoken');

module.exports = function (req, res, next) {
  
  const token = req.header('Authorization')?.split(' ')[1];

  if (!token) return res.status(401).send('Access Denied'); 

  try {

    const verified = jwt.verify(token, process.env.JWT_SECRET);
    req.user = verified; 
    next(); 
  } catch (err) {

    res.status(400).send('Invalid Token');
  }
};
To Deploy all the design for the one report----
CD K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\
.\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory" -ReportName DrumLabel*
 
to deploy one desighn from report----
CD K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\
.\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory" -ReportName DrumLabel.Medium_DualLang
 
TEXT(MONTH(DATEVALUE({!f_StartDateTimeWithTimeZoneOffset}))) & "/" &
TEXT(DAY(DATEVALUE({!f_StartDateTimeWithTimeZoneOffset}))) & "/" &
TEXT(YEAR(DATEVALUE({!f_StartDateTimeWithTimeZoneOffset}))) & " " &
IF(
    VALUE(MID(TEXT({!f_StartDateTimeWithTimeZoneOffset}), 12, 2)) = 0, 
    "12:" & 
    RIGHT("00" & MID(TEXT({!f_StartDateTimeWithTimeZoneOffset}), 15, 2), 2) & 
    " AM", 
    IF(
        VALUE(MID(TEXT({!f_StartDateTimeWithTimeZoneOffset}), 12, 2)) < 12,
        TEXT(VALUE(MID(TEXT({!f_StartDateTimeWithTimeZoneOffset}), 12, 2))) & ":" & 
        RIGHT("00" & MID(TEXT({!f_StartDateTimeWithTimeZoneOffset}), 15, 2), 2) & 
        " AM",
        IF(
            VALUE(MID(TEXT({!f_StartDateTimeWithTimeZoneOffset}), 12, 2)) = 12,
            "12:" & 
            RIGHT("00" & MID(TEXT({!f_StartDateTimeWithTimeZoneOffset}), 15, 2), 2) & 
            " PM",
            TEXT(VALUE(MID(TEXT({!f_StartDateTimeWithTimeZoneOffset}), 12, 2)) - 12) & ":" & 
            RIGHT("00" & MID(TEXT({!f_StartDateTimeWithTimeZoneOffset}), 15, 2), 2) & 
            " PM"
        )
    )
)
//f_GMTOffset
24 * (DATETIMEVALUE({!$Flow.CurrentDate}) - {!Convert_Today_To_DateTime.datetimeValue})

//Convert_Today_To_DateTime is an UnofficialSF Action - ConvertDateToDatetimeFlowAction

{!dateTimeVariable} + ({!f_GMTOffset}/24)

{
	"blocks": [
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":xeros-connect: Boost Days - What's on this week! :xeros-connect:"
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "Morning Ahuriri :wave: Happy Monday, let's get ready to dive into another week in the Hawke's Bay office! See below for what's in store :eyes:"
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-16: Wednesday, 16th April :camel:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Café Partnership*: Enjoy coffee and café-style beverages from our cafe partner, *Adoro*, located in our office building *8:00AM - 11:30AM*.\n:breakfast: *Breakfast*: Provided by *Design Cuisine* from *9:30AM-10:30AM* in the Kitchen."
			}
		},
		{
			"type": "header",
			"text": {
				"type": "plain_text",
				"text": ":calendar-date-17: Thursday, 17th April :rabbit:",
				"emoji": true
			}
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n:coffee: *Café Partnership*: Enjoy coffee and café-style beverages from our cafe partner, *Adoro*, located in our office building *8:00AM - 11:30AM*.\n:wrap: *Lunch*: Provided by *Roam* from *12:30PM-1:30PM* in the Kitchen."
			}
		},
		{
			"type": "divider"
		},
		{
			"type": "section",
			"text": {
				"type": "mrkdwn",
				"text": "\n *What else?* Stay tuned to this channel for more details, check out the <https://calendar.google.com/calendar/u/0?cid=eGVyby5jb21fbXRhc2ZucThjaTl1b3BpY284dXN0OWlhdDRAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ|*Hawkes Bay Social Calendar*>, and get ready to Boost your workdays!\n\nWX Team :party-wx:"
			}
		}
	]
}
class MockApiService implements ApiService {
  @override
  Future<String> fetchUserName() async {
    return "Mock User"; // Fake data, no delay
  }
}

void main() {
  // For testing, inject the mock
  runApp(
    MaterialApp(
      home: Scaffold(
        body: UserWidget(apiService: MockApiService()),
      ),
    ),
  );
}
void main() {
  runApp(
    MaterialApp(
      home: Scaffold(
        body: UserWidget(apiService: ApiService()),
      ),
    ),
  );
}
class UserWidget extends StatelessWidget {
  final ApiService apiService; // Dependency injected

  UserWidget({required this.apiService});

  @override
  Widget build(BuildContext context) {
    return FutureBuilder<String>(
      future: apiService.fetchUserName(),
      builder: (context, snapshot) {
        if (snapshot.hasData) {
          return Text("User: ${snapshot.data}");
        }
        return CircularProgressIndicator();
      },
    );
  }
}
class UserWidget extends StatelessWidget {
  final ApiService apiService = ApiService(); // Hardcoded dependency

  @override
  Widget build(BuildContext context) {
    return FutureBuilder<String>(
      future: apiService.fetchUserName(),
      builder: (context, snapshot) {
        if (snapshot.hasData) {
          return Text("User: ${snapshot.data}");
        }
        return CircularProgressIndicator();
      },
    );
  }
}
class ApiService {
  Future<String> fetchUserName() async {
    // Simulate an API call
    await Future.delayed(Duration(seconds: 1));
    return "John Doe";
  }
}
$ git remote -v
> origin    https://github.com/YOUR-USERNAME/YOUR-FORK.git (fetch)
> origin    https://github.com/YOUR-USERNAME/YOUR-FORK.git (push)
> upstream  https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (fetch)
> upstream  https://github.com/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (push)
msiexec.exe /package PowerShell-7.5.0-win-x64.msi /quiet ADD_EXPLORER_CONTEXT_MENU_OPENPOWERSHELL=1 ADD_FILE_CONTEXT_MENU_RUNPOWERSHELL=1 ENABLE_PSREMOTING=1 REGISTER_MANIFEST=1 USE_MU=1 ENABLE_MU=1 ADD_PATH=1
Imagine a shopping platform where products never run out, browsing is lightning-fast, and checkout is as easy as a single click. Our Amazon Clone online store brings you an unmatched shopping experience with a wide range of products, smart recommendations, and smooth navigation. Whether you’re searching for the latest gadgets, fashion, or daily essentials, everything is just a tap away!
Why You’ll Like It?
 Infinite Choices – Browse an endless catalog of products.
 Fast & Easy Search – Find what you need instantly.
 Safe & Secure Payments – Shop with confidence.

Visit now >> https://www.beleaftechnologies.com/amazon-clone
Whatsapp :  +91 8056786622
Email id :  business@beleaftechnologies.com
Telegram : https://telegram.me/BeleafSoftTech 
<lightning-input class="searchBar" data-id="searchBar" type="search" variant="label-hidden" placeholder="Search..."
                onmouseout={handleSearch}>
            </lightning-input>
            <div class="tooltip-pointer">
                <div class="tooltip-content">
                    {searchAttributesText}
                </div>
            </div>

.tooltip-pointer {
    position: absolute;
    z-index: 7000;
    /* opacity: 0;
    visibility: hidden; */
    margin-top: 3rem;
    width: 13.5rem;
    padding: 0.5rem;
    background-color: #003366;
    text-align: left;
    color: white;
}

/* Show tooltip on hover */
.searchBar:hover .tooltip-pointer {
    opacity: 1;
    visibility: visible;
}

/* Triangle pointer at the top of tooltip */
.tooltip-pointer:before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #003366;
}

.tooltip-content {
    font-size: 13px;
    line-height: 1.5;
}

Teamwork has acquired impeccable recognition among premium firms as the best PR firm in Delhi NCR. We have been providing excellent public relations services in India for years and our PR professionals always focus on result-oriented campaigns. A separate department for everything allows Teamwork to develop ideas and strategies like no other.
Get a feature-rich, scalable, and fully customizable betting platform with live odds, casino games, and secure payments—all modeled after BET365.

Developed by COINSQUEENS – Experts in iGaming Solutions.

Start your betting business today.

For more info:
Call/Whatsapp - +91 87540 53377
Email:sales@coinsqueen.com
Visit https://www.coinsqueens.com/blog/bet365-clone-script 

<%{
	fetinst = Installation[ID == input.rec].ID;
	fetinst1 = Installation[ID == input.rec];
	fetciv = Civil_Work_Detail1[Installation == input.rec].ID;
	fetearth = Product_Details_Check_List[Installation == input.rec].ID;
	fetinst = Installation_SPQ1[Installation == input.rec].ID;
	fetfcc = Final_Connection[Installation == input.rec].ID;
	fetkwh = Kwh_Line_Item_Form[Installation == input.rec].ID;
	fetfccomp = Final_Connection_Checklist_Individual_Yes_No[Installation_Assignment == input.rec].ID;
	fetgin = GIN_ID_Status[Installation == input.rec].ID;
	fetgin1 = GIN_ID_Status[Installation == input.rec];
	fetinstass = Installation_Assignment[Installation == input.rec];
	ginform = Gin_Form[GIN_ID_Status1 == fetgin];
	data = Installation_SPQ1[Installation == input.rec];
	%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <style>
        body.custom-links-page {
            font-family: 'Arial', sans-serif;
            background-color: #f8f8f8;
            margin: 0;
            padding: 10px;
        }

        body.custom-links-page h1 {
            color: #333;
            text-align: center;
        }

        .group-container {
            background-color: #14638e;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            margin-bottom: 10px;
            padding: 10px;
            overflow: hidden;
        }

        .subgroup-container {
            background-color: #f2f2f2;
            border-radius: 8px;
            margin-bottom: 10px;
            padding: 10px;
            overflow: hidden;
        }

        .column {
            width: 33.33%;
            float: left;
            box-sizing: border-box;
            padding: 0 5px;
			margin-right: 10%;
        }
.column1 {
            width: 33.33%;
            float: left;
            box-sizing: border-box;
            padding: 0 5px;
        }
        .column ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
        }

        .column li {
            margin-bottom: 10px;
            border-bottom: 1px solid #ddd;
            padding-bottom: 5px;
        }

        .column a {
            text-decoration: none;
            color: #14638e;
            font-weight: bold;
            transition: color 0.3s ease;
        }

        .column a:hover {
            color: #da251c;
        }


        .column b:hover {
            color: #da251c;
        }

        @media only screen and (max-width: 767px) {
            .column {
                width: 100%;
                float: none;
                margin-bottom: 15px;
            }
        }
    </style>
</head>
<body class="custom-links-page">

    <div class="group-container">
	<h2 style="text-align: center">CHECKLIST</h2>

        <div class="subgroup-container">

			<div class="column">            
                <ul>
<%
	if(fetinst1.No_of_Civil_Work > 0)
	{
		%>
<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Civil_Work_Detail1?recLinkID=<%=fetciv%>&Redirect=RM&viewLinkName=All_Civil_Work_Details1" target="_blank">Civil Work Checklist</a></li>
<%
	}
	if(fetinst1.No_of_Civil_Work <= 0 || fetinst1.No_of_Civil_Work == null)
	{
		%>
<li><b href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Civil_Work_Detail1?recLinkID=<%=fetciv%>&Redirect=RM&viewLinkName=All_Civil_Work_Details1" target="_blank">Civil Work Checklist</a></li>
<%
	}
	if(fetinst1.No_of_Earthing1 > 0)
	{
		%>
<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Product_Details_Check_List?recLinkID=<%=fetearth%>&Redirect=RM&viewLinkName=Product_Details_Check_List_Report" target="_blank">Earthing Checklist</a></li>
<%
	}
	if(fetinst1.No_of_Earthing1 <= 0 || fetinst1.No_of_Earthing1 == null)
	{
		%>
<li><b href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Product_Details_Check_List?recLinkID=<%=fetearth%>&Redirect=RM&viewLinkName=Product_Details_Check_List_Report" target="_blank">Earthing Checklist</a></li>
<%
	}
	%>
<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Installation_SPQ1?recLinkID=<%=fetinst1.Installation_SPQ1%>&Redirect=RM&viewLinkName=Installation_SPQ1_Report&Backend_hide_subform=true" target="_blank">Installation Checklist</a></li>
<%
	if(fetinst1.No_of_7_7_KWh_Chargers > 0)
	{
		%>
<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Report:kwh_Line_Items?Installation=<%=input.rec%>" target="_blank">View 7.7KWh Checklist</a></li>
<%
	}
	if(fetinst1.No_of_7_7_KWh_Chargers <= 0 || fetinst1.No_of_7_7_KWh_Chargers == null)
	{
		%>
<li><b href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Report:kwh_Line_Items?Installation=<%=input.rec%>" target="_blank">View 7.7KWh Checklist</a></li>
<%
	}
	if(fetinstass.New_Status_Final_Connection != "Vendor assignment pending" || fetinstass.New_Status_Final_Connection == null && fetinst1.Final_Connection != null)
	{
		%>
<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Final_Connection?recLinkID=<%=fetinst1.Final_Connection%>&Redirect=RM&viewLinkName=All_Final_Connections&zc_LoadIn=dialog" >Final Connection Checklist</a></li>
<%
	}
	if(fetinstass.New_Status_Final_Connection == "Vendor assignment pending" || fetinstass.New_Status_Final_Connection != null || fetinst1.Final_Connection == null)
	{
		%>
<li><b href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Final_Connection?recLinkID=<%=fetfcc%>&Redirect=RM&viewLinkName=All_Final_Connections&zc_LoadIn=dialog">Final Connection Checklist</a></li>
<%
	}
	if(fetinst1.Final_Connection_Checklist_Individual_Yes_No_Multiple == null && fetinst1.Final_Connection_Status == "Final Connection Pending")
	{
		%>
<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Final_Connection_Checklist_Individual_Yes_No?Installation_Assignment=<%=fetinst1.Installation_Assignment%>&zc_LoadIn=dialog">FC needs to be completed?</a></li>
<%
	}
	if(fetinst1.Final_Connection_Status == "Final Connection Completed" || fetinst1.Final_Connection_Checklist_Individual_Yes_No_Multiple != null)
	{
		%>
<li><b href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Final_Connection_Checklist_Individual_Yes_No?Installation_Assignment=<%=fetfccomp%>" target="_blank">FC needs to be completed?</a></li>
<%
	}
	%>
<!-- Below code is for Proceed for Activation button code-->
<%
	if(fetinst1.Status4 == "Open")
	{
		%>
<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Copy_of_Approval?Installation_ID=<%=input.rec%>&zc_LoadIn=dialog">Approve</a></li>
<%
	}
	if(fetinst1.Status4 != "Open")
	{
		%>
<li><b href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Report:Network_Engineer_Approval?fetinst1.GIN_ID_Status<%=fetgin%>" target="_blank">Approve</a></li>
<%
	}
	%>
</ul>
            </div>
			<div class="column">            
                <ul>
				<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Report:All_Civil_Work_Details1?Installation=<%=input.rec%>" target="_blank">Export Civilwork Checklist</a></li>
				<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Report:Product_Details_Check_List_Report?Installation=<%=input.rec%>" target="_blank">Export Earthing Checklist</a></li>
				<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Report:Installation_SPQ1_Report?Installation=<%=input.rec%>" target="_blank">Export Installation Checklist</a></li>
				<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Report:kwh_Line_Items?Installation=<%=input.rec%>" target="_blank">Export 7.7KWh Checklist</a></li>
					<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Report:All_Final_Connections?Installation=<%=input.rec%>" target="_blank">Export Final Connection Checklist</a></li>
					<li><br></li>
<%
	if(fetinst1.Status4 != "Rejected")
	{
		%>
<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Reject_Remarks_For_Rm?Installation=<%=input.rec%>&zc_LoadIn=dialog" >Reject</a></li>
<%
	}
	if(fetinst1.Status4 == "Rejected")
	{
		%>
<li><b href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Reject_Remarks_For_Rm?Installation=<%=input.rec%>&zc_LoadIn=dialog">Reject</a></li>
<%
	}
	%>
<!--<li><a href="https://creatorapp.zoho.in/atherenergy/environment/development/atherops/#Form:Test_Approval?Installation_ID=<%=input.rec%>&zc_LoadIn=dialog">Test</a></li>
</ul>-->
            </div>
			 </div>
			
			

</body>
</html>
<%

}%>
void Books.create_bills(int ids)
{
	billdata = Bills[ID == input.ids];
	if(billdata.Books_Bill_ID.isEmpty() == true)
	{
		getID = Bills[ID != null] sort by Books_Bill_ID desc;
		if(getID.count() == 0)
		{
			billdata.Books_Bill_ID="Bill-001";
		}
		else
		{
			var1 = getID.Books_Bill_ID.getsuffix("Bill-");
			if(var1.isEmpty() || !var1.isNumber())
			{
				var2 = 1;
			}
			else
			{
				var2 = var1.tolong() + 1;
			}
			autoList = var2.toString().length();
			TarnsList = {1:"Bill-00",2:"Bill-0",3:"Bill-"};
			billdata.Books_Bill_ID=TarnsList.get(autoList) + var2;
			billnum = TarnsList.get(autoList) + var2;
		}
	}
	// Create Bill Process to Books
	iternal_inv = Internal_Invoice[ID == billdata.Bill_Id1];
	test = billdata.Partner_Details.Zoho_books_ID;
	var_par = Partner_Details[Partner_Entity_Name == billdata.Vendor_Name];
	vendordet = Partner_Onboarding_and_KYC[Partner_Entity_Name == billdata.Vendor_Name];
	book = vendordet.Zoho_Book_vendor_ID;
	info book;
	item_list = List();
	item_map = Map();
	item_map.put("rate",billdata.Total_Amount);
	item_map.put("account_id",2293182000000041035);
	item_map.put("bill_number",billnum);
	// // 	check the GST details from zoho books 
	vendorDetailsResponse = invokeurl
	[
		url :"https://www.zohoapis.in/books/v3/contacts/" + book + "?organization_id=60036667486"
		type :GET
		connection:"zoho_books_connection"
	];
	vendorDetails = vendorDetailsResponse.get("contact");
	gstTreatment = vendorDetails.get("gst_treatment");
	info "GST Treatment: " + gstTreatment;
	// 	   taxResponse = invokeurl
	// 	[
	// 	    url :"https://www.zohoapis.in/books/v3/settings/taxes?organization_id=60036667486"
	// 	    type :GET
	// 	    connection:"zoho_books_connection"
	// 	];
	// 	info taxResponse;
	if(gstTreatment != null)
	{
		item_map.put("gst_treatment_code","out_of_scope");
	}
	item_list.add(item_map);
	Head1 = Map();
	if(billdata.Contracting_organisation == "USDC")
	{
		Head1.put("branch_id",2293182000000188007);
	}
	if(billdata.Contracting_organisation == "Jain University")
	{
		Head1.put("branch_id",2293182000000188048);
	}
	Head1.put("reference_number",billdata.Bill_Id1.Internal_Invoice_ID);
	Head1.put("bill_number",billdata.Books_Bill_ID);
	Head1.put("notes",billdata.Order_Number);
	Head1.put("date_formatted",zoho.currentdate);
	Head1.put("is_draft",true);
	Head1.put("vendor_id",book);
	Head1.put("line_items",item_list);
	//Head1.put("tax_total",billdata.GST_Amount);
	Head1.put("total",billdata.Total_Amount);
	custom_field_list = List();
	customfields = Map();
	customfields.put("api_name","cf_internal_invoice_id");
	customfields.put("value",iternal_inv.ID);
	custom_field_list.add(customfields);
	Head1.put("custom_fields",custom_field_list);
	info customfields;
	var = invokeurl
	[
		url :"https://www.zohoapis.in/books/v3/bills?organization_id=60036667486"
		type :POST
		parameters:Head1.toString()
		connection:"zoho_books_connection"
	];
	info "Bill Creation API Status " + var;
	if(var.get("code") == 0 && var.get("bill") != null)
	{
		// 				/*create record in New Bill*/
		if(var.get("code") == 0 && var.get("bill") != null)
		{
			getBill = var.get("bill");
			addNewBills = insert into New_Bills
			[
				Bill_ID=getBill.get("bill_number")
				Bill_Date=getBill.get("date").toString("dd-mm-YYYY")
				Bill_Status=getBill.get("status")
				Total_Amount=getBill.get("total")
				Vendor_Name=getBill.get("vendor_name")
				Zoho_books_ID=getBill.get("bill_id")
				Internal_Invoice=billdata.Bill_Id1
				Added_User=zoho.loginuser
			];
		}
	}
	billcreateform = Create_Bill[Bills == input.ids];
	// 	invoicebackend = Create_Bill[CP_Internal_Invoice_Backend.inp]
	if(var.getJson("code") == 0)
	{
		for each  recs12 in billcreateform.CP_Internal_Invoice_Backend
		{
			recs12.Bill_Creation_Status="Yes";
		}
		iternal_inv.Invoice_Amount=ifnull(iternal_inv.Invoice_Amount,0) + ifnull(billdata.Total_Amount,0);
		billcreateform.Bill_Creation_Status="Yes";
		billdata.Bill_Creation_Status="Yes";
		bills = var.get("bill");
		bills_id = bills.getJSON("bill_id");
		total1 = bills.getJSON("total");
		iternal_inv.Books_Bill_ID=bills_id;
		// 		info bills_id;
		file = invokeurl
		[
			url :"https://www.zohoapis.in/creator/v2.1/data/centralisedprocurement_usdcglobal/usdc1/report/All_Bills/" + billdata.ID + "/External_Invoice/download"
			type :GET
			connection:"zoho_oauth_connection"
		];
		file.setparamname("attachment");
		info "download files " + file;
		response = invokeurl
		[
			url :"https://www.zohoapis.in/books/v3/bills/" + bills_id + "/attachment?organization_id=60036667486"
			type :POST
			files:file
			connection:"zoho_books_connection1"
		];
		// 		info file;
		billdata.Zoho_Books_Id=bills_id;
		billdata.Total_Invoice_Amount_Incl_GST=total1;
		var_bill = var.get("bill").getJSON("reference_number");
		info "var_bill" + var_bill;
		// 		openUrl("#Report:Associated_Bill?Internal_Invoice_ID=" + var_bill,"same window");
		iternal_inv = Internal_Invoice[ID == billdata.Bill_Id1];
		iternal_inv.Balance_Amount=billdata.Balance_Amount;
		// iternal_inv.Total_Amount=input.Total_Amount;
		iternal_inv.Total_Amount=ifnull(iternal_inv.Total_Amount,0) + billdata.Total_Amount;
		iternal_inv.Balance_Amount=billdata.Accumulated_Commission_Amount - ifnull(iternal_inv.Total_Amount,0);
		iternal_inv.External_Invoice="";
		iternal_inv.Status="New";
		/*Sending mail to CP*/
		// 		sendmail
		// 		[
		// 			from :zoho.adminuserid
		// 			to :billdata.CP_Details1.Partner_Entity_Name,"vimal@techvaria.com"
		// 			subject :"CP Invoice Verification Successfull"
		// 			message :"CP invoice Verification Done and Submitted to Finance team"
		// 		]
		totalAmount = 0;
		item_list = List();
		hard_lst = {1,2};
		for each  split in hard_lst
		{
			if(split == 1)
			{
				get_creator_amount = billdata.Total_Amount;
				get_credit_debit = "debit";
				get_creator_Description = "Comments";
				item_map = Map();
				item_map.put("amount",get_creator_amount);
				item_map.put("debit_or_credit",get_credit_debit);
				item_map.put("account_id",2293182000000114065);
				// 				2293182000000114073
				item_map.put("customer_id",book);
			}
			if(split == 2)
			{
				get_creator_amount = billdata.Total_Amount;
				get_credit_debit = "credit";
				get_creator_Description = "Test";
				item_map = Map();
				item_map.put("amount",get_creator_amount);
				item_map.put("debit_or_credit",get_credit_debit);
				item_map.put("account_id",2293182000000114073);
				item_map.put("customer_id",book);
			}
			item_list.add(item_map);
		}
		mymap = Map();
		if(billdata.Contracting_organisation == "USDC")
		{
			mymap.put("branch_id",2293182000000188007);
		}
		if(billdata.Contracting_organisation == "Jain University")
		{
			mymap.put("branch_id",2293182000000188048);
		}
		mymap.put("journal_date",zoho.currentdate.toString("yyyy-MM-dd"));
		mymap.put("reference_number",billdata.Order_Number);
		mymap.put("notes","test");
		mymap.put("line_items",item_list);
		mymap.put("total",billdata.Total_Invoice_Amount_Incl_GST);
		//mymap.put("tax_total",billdata.GST_Amount);
		responseBooks = invokeurl
		[
			url :"https://www.zohoapis.in/books/v3/journals?organization_id=60036667486"
			type :POST
			parameters:mymap.toString()
			connection:"zoho_books_connection1"
		];
		getJournal = responseBooks.get("journal");
		Zoho_Books_ID = getJournal.get("journal_id");
		file = invokeurl
		[
			url :"https://www.zohoapis.in/creator/v2.1/data/centralisedprocurement_usdcglobal/usdc1/report/All_Bills/" + billdata.ID + "/External_Invoice/download"
			type :GET
			connection:"zoho_oauth_connection"
		];
		file.setparamname("attachment");
		response = invokeurl
		[
			url :"https://www.zohoapis.in/books/v3/journals/" + Zoho_Books_ID + "/attachment?organization_id=60036667486"
			type :POST
			files:file
			connection:"zoho_books_connection1"
		];
	}
	else
	{
		for each  recs123 in billcreateform.CP_Internal_Invoice_Backend
		{
			recs123.Bill_Creation_Status="No";
			recs123.Bill_Creation_Error_Message=var;
		}
		billcreateform.Bill_Creation_Status="No";
		billcreateform.Bill_Creation_Error_Message=var;
		billdata.Bill_Creation_Status="No";
		billdata.Bill_Creation_Error_Message=var;
	}
}
<%{
	%>
<style>
.zc-pb-embed-placeholder-content
{
	font-size: 18px;
	margin-top: 15px !important;
	align: center;
}
.margin
{
	margin-top: 18px !important;
	margin-bottom: 18px !important;
}
.zcpopup.compact .popupbox-wraper .popupbox 
{
width: 60%!important;
max-height: 90%;
height: 80%!important;
overflow: auto;
background: #fff;
}
// a:hover{
// 	background:red;
// }
// button:hover {
// 	background-color:red;
// }
</style>
<%
	// 	ord = Order[Invoice == id.toLong()].Order;
	%>
<div class="zc-pb-embed-placeholder-content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
	<div class="zc-pb-embed-placeholder-content">&nbsp;&nbsp;&nbsp;&nbsp<%=input.id1%> &nbsp;</div>
	<div style="clear:both" align = "center" class="margin">
	<span>
				<button style="background-color: #5C94C2;
			    border: none;
			    color: white;
			 	padding: 8px 24px;
			    text-align: center;
			    text-decoration: none;
			    display: inline-block;
			    font-size: 12px;
				font-color:#e7e7e7;
			    margin: 4px 2px;
			    cursor: pointer;
			    ">
				<a href="#Script:dialog.close","same window"><font size="4"color="white">Close</font></a></button></span>
		</div>
<%

}%>
void Integrations_to_books.ItemsToBooks_New(int itmid)
{
	fet_itm = Item_Master[ID == input.itmid];
	fetorg = Organization_Master[Organization_Code == fet_itm.Organization_Code.Organization_Code];
	orgid = fetorg.Organization_Code;
	fetapp = Approval[Item_ID.Item_Code == fet_itm.Item_Code];
	app = Approval[Organization_Name == fet_itm.Organization_Name && Item_ID.Item_Code == fet_itm.Item_Code];
	fet_itm.Status="Active";
	if(fet_itm.Item_Type == "Service")
	{
		mattype = "service";
	}
	else
	{
		mattype = "goods";
	}
	itmmap = Map();
	itmmap.put("name",fet_itm.Item_Name);
	itmmap.put("sku",fet_itm.Item_Code);
	itmmap.put("product_type",mattype);
	itmmap.put("unit",fet_itm.UOM);
	if(fet_itm.Selling_Price != null)
	{
		itmmap.put("rate",ifnull(fet_itm.Selling_Price,0.00));
		itmmap.put("description",fet_itm.Selling_Description);
		itmmap.put("account_name",fet_itm.Account.Accounts_Type);
		//itmmap.put("purchase_description",fet_itm.Specification);
	}
	if(fet_itm.Cost_Price != null)
	{
		itmmap.put("purchase_rate",ifnull(fet_itm.Cost_Price,0.00));
		itmmap.put("purchase_description",fet_itm.Purchase_Description);
		itmmap.put("account_name",fet_itm.Account.Accounts_Type);
		//itmmap.put("purchase_description",fet_itm.Specification);
	}
	if(fetapp.Do_You_want_to_create_Item_for_other_organization == "No")
	{
		response_books = invokeurl
		[
			url :"https://www.zohoapis.in/books/v3/items?organization_id=" + orgid
			type :POST
			parameters:itmmap.toString()
			connection:"books"
		];
		info response_books;
		for each  rec1 in app.Organization_Name
		{
			if(0 == response_books.get("code"))
			{
				contect_Data = response_books.get("item");
				zbid = contect_Data.get("item_id");
			}
			// 			ins = insert into Item_Master_Books_Details
			// 			[
			// 				Type_field="Item"
			// 				Added_User=zoho.loginuser
			// 				Organization_Name=rec1.ID
			// 				Item_Master_ID=fet_itm.ID
			// 				Organization_Code=rec1.ID
			// 				Item_Books_ID=zbid
			// 			];
		}
	}
	if(fetapp.Do_You_want_to_create_Item_for_other_organization == "Yes")
	{
		for each  rec in app.Organization_Name
		{
			org = rec.Organization_Code;
			resp = invokeurl
			[
				url :"https://www.zohoapis.in/books/v3/items?organization_id=" + org
				type :POST
				parameters:itmmap.toString()
				connection:"books"
			];
			info resp;
			if(0 == resp.get("code"))
			{
				contect_Data = resp.get("item");
				zbid = contect_Data.get("item_id");
			}
			// 			ins = insert into Item_Master_Books_Details
			// 			[
			// 				Type_field="Item"
			// 				Added_User=zoho.loginuser
			// 				Organization_Name=rec.ID
			// 				Item_Master_ID=fet_itm.ID
			// 				Organization_Code=rec.ID
			// 				Item_Books_ID=zbid
			// 			];
		}
	}
	//266977000000445214
}
void Integrations_to_books.CreditnotesTobooks(int id)
{
	sal = Sales_Order[ID == input.id];
	inv_det = Invoice[Sales_Order_ID == sal];
	// 	info "org "+sal.Organization;
	fetorg = Organization_Master[ID == sal.Organization];
	// 	info fetorg.Organization_Name;
	// 	if(inv_det.Books_Invoice_ID == null || inv_det.Books_Invoice_ID == "")
	// 	{
	// 		info "Error: Invoice ID is missing. Cannot proceed.";
	// 		return;
	// 	}
	// 	else
	// 	{
	// 		info "Invoice ID: " + inv_det.Books_Invoice_ID;
	// 		invid = inv_det.Books_Invoice_ID;
	// 	}
	fetbks = Account_Master_Books_Details[Account_Master_ID == sal.Customer_Name];
	// 	info fetbks.Organization_Code.Organization_Code;
	// 	info fetorg.Organization_Code;
	for each  rec1 in fetbks
	{
		if(rec1.Organization_Code.Organization_Code == fetorg.Organization_Code)
		{
			conbks = rec1.Books_ID;
			//info conbks;
		}
		//info itmbks;
		//	info rec1.Organization_Code.Organization_Code;
	}
	sodate = zoho.currentdate.toString("yyyy-MM-dd");
	main_data = Map();
	main_data.put("customer_id",conbks);
	main_data.put("reference_number",sal.Sales_Order);
	//main_data.put("reference_invoice_type","b2c_others");
	// 	b2c_large
	// 	main_data.put("is_invoice_type_standalone",true);
	// 	main_data.put("creditnote_number",sal.Sales_Order);
	main_data.put("date",sodate);
	// 	invoice_list = List();
	// 	invoice_map = Map();
	// 	invoice_map.put("invoice_id","");
	// 	invoice_map.put("invoice_number","");
	// 	invoice_list.add(invoice_map);
	// 	main_data.put("invoices",invoice_list);
	// 	info invoice_map;
	//  Line Items
	Line_list = List();
	for each  line_data in sal.Order_Details
	{
		item_data = Item_Master[ID == line_data.Item_Name];
		itm = Item_Master_Books_Details[Item_Master_ID == item_data.ID];
		for each  rec in itm
		{
			if(rec.Organization_Code.Organization_Code == fetorg.Organization_Code)
			{
				itmbks = rec.Item_Books_ID;
			}
			//	info itmbks;
			//info rec.Organization_Code.Organization_Code;
		}
		//	info fetorg.Organization_Code;
		line_map = Map();
		// 		Align the line Details
		line_map.put("item_id",itmbks);
		break;
	}
	line_map.put("quantity",1);
	// 		line_map.put("description","test");
	line_map.put("rate",sal.Grand_Total);
	Line_list.add(line_map);
	main_data.put("line_items",Line_list);
	info main_data;
	response_books = invokeurl
	[
		url :"https://www.zohoapis.in/books/v3/creditnotes?organization_id=" + fetorg.Organization_Code
		type :POST
		parameters:main_data.toString()
		connection:"books"
	];
	info response_books;
	if(response_books.get("code") == 0)
	{
		sal.SO_Status="SO Cancelled";
		invoice_data = response_books.get("creditnote");
		sal.CreditNote_Books_ID=invoice_data.get("creditnote_id");
		sal.Creditnote_No=invoice_data.get("creditnote_number");
		sal.Credit_Note_Status="Credit Note Integrated";
		for each  rec_items in sal.Order_Details
		{
			if(rec_items.Service_Details == "Item")
			{
				// 				num = randomnumber(1,9999);
				count3 = Transit_Inventory[ID != null];
				num = count3.count() + 1;
				info "if ";
				data_add = insert into Transit_Inventory
				[
					Added_User=zoho.loginuser
					Item_Name=rec_items.Item_Name
					Quantity=rec_items.Qty
					Date_field=zoho.currentdate
					Rate=sal.Grand_Total
					Deal_ID=sal.Deal_ID
					Transit_Inventory_Number=num
				];
				info data_add;
				sendmail
				[
					from :zoho.adminuserid
					to :"vimal@techvaria.com"
					subject :"item transit"
					message :"transit id " + data_add
				]
			}
		}
	}
	else
	{
		info "Error in API Response: " + response_books;
	}
}
void Integrations_to_books.CancelInvoiceinBooks(int soid)
{
	fetch_inv = Invoice[ID == input.soid];
	fetorg = Organization_Master[ID == fetch_inv.Organization];
	//fetch_so.SO_Status="SO Cancelled";
	mymap = Map();
	stts = "void";
	mymap.put("status",stts);
	books_id = fetch_inv.Books_Invoice_ID;
	test_map = Map();
	header_data = Map();
	header_data.put("content-type","application/json");
	void_so = invokeurl
	[
		url :"https://www.zohoapis.in/books/v3/invoices/" + books_id + "/status/void?organization_id=" + fetorg.Organization_Code
		type :POST
		parameters:test_map
		headers:header_data
		connection:"books"
	];
	thisapp.Integrations_to_books.CancelSOBooks(fetch_inv.Sales_Order_ID);
	// 	info void_so;
}
void Integrations_to_books.AccountsToBooks_New(int accid)
{
	account_data = Account_Master[ID == input.accid];
	fetorg = Organization_Master[Organization_Code == account_data.Organization_Name.Organization_Code];
	orgid = fetorg.Organization_Code;
	fetapp = Approval[Account_ID.Account_ID == account_data.Account_ID];
	//main map
	custom_map = Map();
	custom_map.put("address",account_data.Address.address_line_1);
	custom_map.put("street2",account_data.Address.address_line_2);
	custom_map.put("city",account_data.Address.district_city);
	custom_map.put("state",account_data.Address.state_province);
	custom_map.put("country",account_data.Address.country);
	custom_map.put("zip",account_data.Address.postal_Code);
	//main mapping	
	main_map = Map();
	main_map.put("phone",account_data.Account_Number);
	main_map.put("contact_name",account_data.Account_Name);
	main_map.put("company_name",account_data.Account_Name);
	main_map.put("billing_address",custom_map);
	main_map.put("shipping_address",custom_map);
	main_map.put("email",account_data.Account_Mail);
	main_map.put("contact_type","customer");
	cont_list = List();
	primary_cont_pers = Map();
	primary_cont_pers.put("first_name",account_data.Account_Name);
	primary_cont_pers.put("phone",account_data.Account_Number);
	// 	primary_cont_pers.put("email",account_data.Account_Mail);
	cont_list.add(primary_cont_pers);
	//secndary Contact persons updated.
	if(account_data.Contact_Person_Details != null)
	{
		for each  contacts_val in account_data.Contact_Person_Details
		{
			cont_pers = Map();
			cont_pers.put("first_name",contacts_val.Contact_Person);
			cont_pers.put("phone",contacts_val.Phone_Number);
			// 			cont_pers.put("email",contacts_val.Email);
			cont_pers.put("designation",contacts_val.Designation);
			cont_pers.put("department",contacts_val.Department.Department);
			cont_list.add(cont_pers);
		}
	}
	main_map.put("contact_persons",cont_list);
	app = Approval[Organization_Name == fetapp.Organization_Name && Account_ID == fetapp.Account_ID];
	if(fetapp.Do_you_want_to_create_Customer_Vendor_for_other_organization == "Yes")
	{
		for each  rec in app.Organization_Name
		{
			org = rec.Organization_Code;
			info org;
			info rec.Organization_Name;
			resp = zoho.books.createRecord("contacts",org,main_map,"books");
			info "else books response " + resp;
			res_code = resp.get("code").toLong();
			if(res_code == 0)
			{
				for each  vart1 in account_data.Account_Master_Books_Details
				{
					if(vart1.Organization_Name == rec && vart1.Type_field == "Customer")
					{
						books_id = resp.toMap().get("contact").toMap().get("contact_id");
						vart1.Books_ID=books_id;
						info books_id;
					}
				}
				contact_person_list = List();
				contact_person_list = resp.toMap().get("contact").toMap().get("contact_persons").toList();
				for each  contacts_1 in contact_person_list
				{
					contact_rec = contacts_1.toMap();
					contact_person_id = contact_rec.get("contact_person_id");
					for each  cont in account_data.Contact_Person_Details
					{
						cont.Contact_Person_Booksid=contact_person_id;
						updateContactPersonID = Contact_Person_Details[Account_Master_ID == input.accid];
						if(updateContactPersonID.count() > 0)
						{
							updateContactPersonID.Contact_Person_Booksid=contact_person_id;
						}
					}
				}
			}
			if(0 == resp.get("code"))
			{
				contect_Data = resp.get("contact");
				zbid = contect_Data.get("contact_id");
				ins = insert into Account_Master_Books_Details
				[
					Type_field="Customer"
					Added_User=zoho.loginuser
					Organization_Name=rec.ID
					Account_Master_ID=account_data.ID
					Organization_Code=rec.ID
					Books_ID=zbid
				];
			}
		}
	}
	else
	{
		resp = zoho.books.createRecord("contacts",orgid,main_map,"books");
		info "Create Books " + resp;
		res_code = resp.get("code").toLong();
		if(res_code == 0)
		{
			for each  rec1 in app.Organization_Name
			{
				contect_Data = resp.get("contact");
				zbid = contect_Data.get("contact_id");
				ins = insert into Account_Master_Books_Details
				[
					Type_field="Customer"
					Added_User=zoho.loginuser
					Organization_Name=rec1.ID
					Account_Master_ID=account_data.ID
					Organization_Code=rec1.ID
					Books_ID=zbid
				];
			}
			for each  vart in account_data.Account_Master_Books_Details
			{
				if(app.Organization_Name.contains(vart.Organization_Name) == true && vart.Type_field == "Customer")
				{
					books_id = resp.toMap().get("contact").toMap().get("contact_id");
					vart.Books_ID=books_id;
					info books_id;
				}
			}
			contact_person_list = List();
			contact_person_list = resp.toMap().get("contact").toMap().get("contact_persons").toList();
			for each  contacts_1 in contact_person_list
			{
				contact_rec = contacts_1.toMap();
				contact_person_id = contact_rec.get("contact_person_id");
				for each  cont in account_data.Contact_Person_Details
				{
					cont.Contact_Person_Booksid=contact_person_id;
					updateContactPersonID = Contact_Person_Details[Account_Master_ID == input.accid];
					if(updateContactPersonID.count() > 0)
					{
						updateContactPersonID.Contact_Person_Booksid=contact_person_id;
					}
				}
			}
		}
	}
}
<%{
	deal_id = input.Dealid;
	rec_id = input.scenario_id;
	Field_list = list();
	itmrfq = ITEM_RFQ[Deal_ID.Deal_ID1 == deal_id];
	for each  line_data in rec_id.toList(",")
	{
		Field_list.add(line_data);
	}
	// 	// 	Completed********************************************
	%>
<!DOCTYPE html>
			<html lang="en">
			<head>
			    <meta charset="UTF-8">
			    <meta name="viewport" content="width=device-width, initial-scale=1.0">
			    <title>Quotation Comparison</title>
			    <style>
			        /* Basic Styles */
			        body {
			            font-family: Arial, sans-serif;
			            margin: 0;
			            padding: 0;
			            background-color: #f4f4f4;
			            display: flex;
			//             flex-direction: column;
			//             align-items: center;
			            justify-content: flex-start;
			        }
			        header {
			            background-color: #004b87;
			            color: white;
			            padding: 15px;
			            text-align: center;
			            width: 100%;
			        }
			        header h1 {
			            margin: 0;
			            font-size: 28px;
			        }
			        .scenario-selection {
			            padding: 15px;
			            text-align: center;
			        }
			        .comparison-dashboard {
			            display: flex;
			            justify-content: space-around;
			            margin-top: 20px;
			            padding: 10px;
			        }
			        .scenario {
			            background-color: #fff;
			            padding: 20px;
			            border-radius: 8px;
			            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
			            width: 30%;
			        }
			        h3 {
			            text-align: center;
			        }
			        .key-data table {
			            width: 100%;
			            margin-top: 15px;
			            border-collapse: collapse;
			        }
			        .key-data th, .key-data td {
			            padding: 8px;
			            border: 1px solid #ddd;
			            text-align: left;
			        }
			        .actions {
			            text-align: center;
			            margin-top: 20px;
			        }
			        .actions button {
			            padding: 10px 20px;
			            font-size: 16px;
			            margin: 10px;
			            background-color: #004b87;
			            color: white;
			            border: none;
			            border-radius: 5px;
			            cursor: pointer;
			        }
			        .actions button:hover {
			            background-color: #003366;
			        }
			        /* Modal Styles */
			        .modal {
			            display: none;
			            position: fixed;
			            z-index: 1;
			            left: 0;
			            top: 0;
			            width: 100%;
			            height: 100%;
			            background-color: rgba(0, 0, 0, 0.5);
			        }
			        .modal-content {
			            background-color: white;
			            margin: 15% auto;
			            padding: 20px;
			            border-radius: 8px;
			            width: 40%;
			        }
			        .close {
			            color: #aaa;
			            font-size: 28px;
			            font-weight: bold;
			            cursor: pointer;
			            position: absolute;
			            right: 10px;
			            top: 5px;
			        }
			        .close:hover,
			        .close:focus {
			            color: black;
			            text-decoration: none;
			            cursor: pointer;
			        }
					.tr
   {
   border :1px solid black;
   border-collapse : collapse;
   font-size : 10.5px;
   height : 2px;
   }
   .td
   {
   border :1px solid black;
   border-collapse : collapse;
   font-size : 12px;
   height : 2px;
   }
   
   .th
   {
   border :1px solid black;
   border-collapse : collapse;
   font-size : 10.5px;
   height : 2px;
   background-color : lightsteelblue;
   }
			    </style>
			</head>

			    <div class="comparison-dashboard">
<%
	// 	***************************************
	for each  line_data in rec_id.toList(",")
	{
		fetch_scenario_Data = Scenario[ID == line_data];
		deal = fetch_scenario_Data.Deal;
		fet = Deal[ID == deal];
		if(fetch_scenario_Data.count() > 0)
		{
			data_map = Map();
			for each  line_Data in fetch_scenario_Data.Services
			{
				logistic_price = line_Data.Logistic_Price;
				if(logistic_price != null)
				{
					data_map.put("logistic_price",line_Data.Logistic_Price);
				}
				Supplier_Price = line_Data.Supplier_Price;
				if(Supplier_Price != null)
				{
					data_map.put("Supplier_Price",line_Data.Supplier_Price);
				}
				Target_Price = line_Data.Target_Price;
				if(Target_Price != null)
				{
					data_map.put("Target_Price",line_Data.Target_Price);
				}
				qty = line_Data.Qt_Quintal;
				if(qty != null)
				{
					data_map.put("qty",line_Data.Qt_Quintal);
				}
				Lab_Chargers = line_Data.Lab_Chargers;
				if(Lab_Chargers != null)
				{
					data_map.put("Lab_Chargers",line_Data.Lab_Chargers);
				}
				Branding_Quality_Charges = fetch_scenario_Data.Quality_Price;
				if(Branding_Quality_Charges != null)
				{
					data_map.put("Branding_Quality_Charges",fetch_scenario_Data.Quality_Price);
				}
				Selling_Price = fetch_scenario_Data.Selling_Price;
				if(Selling_Price != null)
				{
					data_map.put("Selling_Price",fetch_scenario_Data.Selling_Price);
				}
				Total_Cost = fetch_scenario_Data.Total_Cost1;
				if(Total_Cost != null)
				{
					data_map.put("Total_Cost",fetch_scenario_Data.Total_Cost1);
				}
				mois_percentage = fet.MOIS;
				if(mois_percentage != null)
				{
					data_map.put("mois_percentage",itmrfq.MOIS_Vendor);
				}
				length = fet.Length_field;
				if(length != null)
				{
					data_map.put("length",itmrfq.Length_Vendor);
				}
				trash = fet.Trash;
				if(length != null)
				{
					data_map.put("trash",itmrfq.Trash_Vendor);
				}
				rd = fet.RD;
				if(rd != null)
				{
					data_map.put("rd",itmrfq.RD_Vendor);
				}
				mic = fet.MIC;
				if(mic != null)
				{
					data_map.put("mic",itmrfq.MIC_Vendor);
				}
				brokerage_per_bale = fetch_scenario_Data.Brokerage1.Brokerage_Value;
				if(brokerage_per_bale != null)
				{
					data_map.put("brokerage_per_bale",fetch_scenario_Data.Brokerage1.Brokerage_Value);
				}
			}
			data_map.put("Item_name",line_Data.Item_Name.Item_Name);
		}
		// 		Fetch Data Goes Here 
		// 		***********************************
		%>
<div class="scenario" id="scenarioB">
			            <h3><%=fetch_scenario_Data.Scenario_ID%></h3>
			            <div class="key-data">
			                <table>
						<!--	<tr><th>Item</th><td><%=ifnull(data_map.get("Item_name"),"Name Empty")%></td></tr>-->
						<!--	<tr><th>Quantity</th><td><%=ifnull(data_map.get("qty"),0)%></td></tr>-->
			                 <!--   <tr><th>Target Price</th><td><%=ifnull(data_map.get("Target_Price"),0)%></td></tr>-->
			                    <tr><th>Purchase price </th><td><%=ifnull(data_map.get("Supplier_Price"),0)%></td></tr>
			                    <tr><th> Freight </th><td><%=ifnull(data_map.get("logistic_price"),0)%></td></tr>
			                    <tr><th>3rd Party Services</th><td><%=ifnull(data_map.get("Lab_Chargers"),0)%></td></tr>
								<tr><th>Branding / Quality Charges</th><td><%=ifnull(data_map.get("Branding_Quality_Charges"),0)%></td></tr>
								 <tr><th>Selling Price </th><td><%=ifnull(data_map.get("Selling_Price"),0)%></td></tr>
								  <tr><th>Total Cost</th><td><%=ifnull(data_map.get("Total_Cost"),0)%></td></tr>
								 <tr><th>Brokerage </th><td><%=ifnull(data_map.get("brokerage_per_bale"),0)%></td></tr>
								 <!-- <tr><th>No. of Bales</th><td><%=ifnull(data_map.get("num_bales"),0)%></td></tr>-->
			    				<tr><th>MOIS %</th><td><%=ifnull(data_map.get("mois_percentage"),0)%></td></tr>
			    				<tr><th>Length</th><td><%=ifnull(data_map.get("length"),"Not Provided")%></td></tr>
			    				<tr><th>Trash</th><td><%=ifnull(data_map.get("trash"),0)%></td></tr>
			   				    <tr><th>RD</th><td><%=ifnull(data_map.get("rd"),"Not Provided")%></td></tr>
			                    <tr><th>MIC</th><td><%=ifnull(data_map.get("mic"),"Not Provided")%></td></tr>
			                 <!--   <tr><th>Total Cost</th><td><%=ifnull(fetch_scenario_Data.Total_Cost1,0)%></td></tr>-->
			                    <tr><th>Delivery Time</th><td>12 days</td></tr>
			                </table>
			            </div>
			        </div>
<%
	}
	// 	***************************************
	fetch_scenario_Data = Scenario[ID == line_data];
	deal = fetch_scenario_Data.Deal;
	fet = Deal[ID == deal];
	if(fetch_scenario_Data.count() > 0)
	{
		data_map1 = Map();
		for each  line_Data in fetch_scenario_Data.Services
		{
			mois_percentage = fet.MOIS;
			if(mois_percentage != null)
			{
				data_map1.put("mois_percentage",itmrfq.MOIS_Vendor);
			}
			length = fet.Length_field;
			if(length != null)
			{
				data_map1.put("length",itmrfq.Length_Vendor);
			}
			trash = fet.Trash;
			if(length != null)
			{
				data_map1.put("trash",itmrfq.Trash_Vendor);
			}
			rd = fet.RD;
			if(rd != null)
			{
				data_map1.put("rd",itmrfq.RD_Vendor);
			}
			mic = fet.MIC;
			if(mic != null)
			{
				data_map1.put("mic",itmrfq.MIC_Vendor);
			}
			brokerage_per_bale = fetch_scenario_Data.Brokerage_Value12;
			if(brokerage_per_bale != null)
			{
				data_map1.put("brokerage_per_bale",fetch_scenario_Data.Brokerage_Value12);
			}
		}
		data_map1.put("Item_name",line_Data.Item_Name.Item_Name);
		// 		Fetch Data Goes Here 
		// 		***********************************
		%>
<div class="scenario" id="scenarioB">
			            <h3>Requested</h3>
			            <div class="key-data">
			                <table>
						<!--	<tr><th>Item</th><td><%=ifnull(data_map1.get("Item_name"),"Name Empty")%></td></tr>-->
						<!--	<tr><th>Quantity</th><td><%=ifnull(data_map1.get("qty"),0)%></td></tr>-->
			                 <!--   <tr><th>Target Price</th><td><%=ifnull(data_map1.get("Target_Price"),0)%></td></tr>-->
			                    <tr><th>Item</th><td><%=ifnull(data_map1.get("Item_name"),"Name Empty")%></td></tr>
			    				<tr><th>MOIS %</th><td><%=ifnull(data_map1.get("mois_percentage"),0)%></td></tr>
			    				<tr><th>Length</th><td><%=ifnull(data_map1.get("length"),"Not Provided")%></td></tr>
			    				<tr><th>Trash</th><td><%=ifnull(data_map1.get("trash"),0)%></td></tr>
			   				    <tr><th>RD</th><td><%=ifnull(data_map1.get("rd"),"Not Provided")%></td></tr>
			                    <tr><th>MIC</th><td><%=ifnull(data_map1.get("mic"),"Not Provided")%></td></tr>
			                 <!--   <tr><th>Total Cost</th><td><%=ifnull(fetch_scenario_Data.Total_Cost1,0)%></td></tr>-->
			                    <tr><th>Delivery Time</th><td>12 days</td></tr>
			                </table>
			            </div>
			        </div>
<%
	}
	%>
</tr>
<!-- Scenario 1 -->
			        <!-- Scenario 2 -->
			        <!-- Scenario 3 -->
			    </div>
			    <!-- Actions -->
			   <!-- <div class="actions"> -->
			     <!--   <button onclick="selectScenario()">Select Scenario</button-->
			      <!--  <button onclick="editScenario()">Edit Scenario</button-->
			   <!--     <button onclick="saveComparison()">Save Comparison</button-->
			     <!--   <button onclick="finalizeDeal()">Generate Final Deal</button-->
			    </div>
			    <!-- Scenario Creation Modal (Hidden) -->
<%

}%>
void defaultFunction(Scenario recID)
{
	recid_list = List();
	result = 0;
	poid = list();
	povendlist = list();
	for each  recval in recID
	{
		poid.add(recval);
		//info recval.Deal.Deal_ID1;
		povendlist.add(recval.Deal);
		//info povendlist;
	}
	for each  linerec in recID
	{
		recid_list.add(linerec.ID);
		line_list = List();
		senari_Data = Scenario[ID == linerec.ID];
		//	senari_Data.Scenario_ID=recid_list;
		for each  line_Data in senari_Data.Services
		{
			line_list.add(line_Data);
		}
		if(line_list.size() > 0)
		{
		}
		else
		{
			result = 1;
		}
	}
	if(result == 0 && povendlist.distinct().size() == 1)
	{
		openUrl("#Page:Quotation_Comparison_page?Deal_bg_id=" + senari_Data.Deal.ID + "&Deal_name=" + senari_Data.Deal_Name + "&Dealid=" + senari_Data.Deal.Deal_ID1 + "&scenario_id=" + recid_list + "&Select_Scenario=" + recid_list,"same window");
	}
	else if(result == 1)
	{
		info "Please review the record line items";
	}
	else
	{
		info "Select the same Deal ID.";
		//openUrl("#Page:Alert?id1=Select the same Deal ID.&zc_LoadIn=dialog","same window");
	}
}
star

Wed Apr 16 2025 09:58:44 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/best-crypto-wallets/

@CharleenStewar #bestcryptowallets #topcryptowallets #cryptocurrencywallets

star

Wed Apr 16 2025 09:24:56 GMT+0000 (Coordinated Universal Time) https://www.newassignmenthelp.co.uk

@tracyscott790

star

Wed Apr 16 2025 05:58:50 GMT+0000 (Coordinated Universal Time) https://www.addustechnologies.com/p2e-nft-game-platform-development-company

@Seraphina

star

Tue Apr 15 2025 20:06:45 GMT+0000 (Coordinated Universal Time) https://github.com/ainextgentool/Free-Instagram-Follower-Generator-Tool

@extrememiniboat ##instagramfollower ##free

star

Tue Apr 15 2025 18:15:03 GMT+0000 (Coordinated Universal Time)

@sayedhurhussain

star

Tue Apr 15 2025 10:43:01 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/cryptocurrency-exchange-business-plan/

@CharleenStewar #cryptocurrencyexchangebusinessplan #cryptocurrencyexchange #cryptoentrepreneur #cryptolaunch #cryptocurrencybusiness

star

Tue Apr 15 2025 09:13:46 GMT+0000 (Coordinated Universal Time) https://ottinfluence.com/best-influencer-marketing-agency-in-delhi/

@ottinfluence #influencermarketing agency delhi #influencermarketing agency in delhi #influenceragency india #influencermarketing agency india

star

Tue Apr 15 2025 07:47:05 GMT+0000 (Coordinated Universal Time)

@chatgpt4cham0

star

Tue Apr 15 2025 07:35:25 GMT+0000 (Coordinated Universal Time) https://www.uniccm.com/blog/how-to-use-sin-cos-tan-and-why-its-useful-for-your-career\

@mollietalbot #onlinecourses

star

Tue Apr 15 2025 06:35:56 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/are-clone-scripts-legal-to-use/

@janetbrownjb #areclonescriptslegal #cryptoexchangecompliance #legalcryptoplatforms #clonescriptsexplained #cryptoregulations

star

Mon Apr 14 2025 17:49:18 GMT+0000 (Coordinated Universal Time)

@Hassnain_Abbas #html

star

Mon Apr 14 2025 17:30:20 GMT+0000 (Coordinated Universal Time)

@salam123

star

Mon Apr 14 2025 17:29:04 GMT+0000 (Coordinated Universal Time) https://i.imgur.com/DoWSbG3.png

@Y@sir

star

Mon Apr 14 2025 17:19:06 GMT+0000 (Coordinated Universal Time)

@salam123

star

Mon Apr 14 2025 17:16:09 GMT+0000 (Coordinated Universal Time)

@salam123

star

Mon Apr 14 2025 17:15:37 GMT+0000 (Coordinated Universal Time)

@salam123

star

Mon Apr 14 2025 17:14:03 GMT+0000 (Coordinated Universal Time)

@salam123

star

Mon Apr 14 2025 17:10:56 GMT+0000 (Coordinated Universal Time)

@salam123

star

Mon Apr 14 2025 17:08:25 GMT+0000 (Coordinated Universal Time)

@salam123

star

Mon Apr 14 2025 08:29:49 GMT+0000 (Coordinated Universal Time) https://www.linkedin.com/pulse/deploy-ssrs-reports-using-powershell-d365-fo-shayan-arshi

@Manjunath

star

Sun Apr 13 2025 23:00:56 GMT+0000 (Coordinated Universal Time)

@dannygelf #salesforce #screnflow #formula

star

Sun Apr 13 2025 22:59:22 GMT+0000 (Coordinated Universal Time)

@dannygelf #salesforce #screnflow #formula

star

Sun Apr 13 2025 21:30:10 GMT+0000 (Coordinated Universal Time)

@FOHWellington

star

Sun Apr 13 2025 18:19:22 GMT+0000 (Coordinated Universal Time) https://getgems.io/collection/EQBG-g6ahkAUGWpefWbx-D_9sQ8oWbvy6puuq78U2c4NUDFS/EQB9OVZtapC96xAt6yLf6EZKc02KrBVj7x1XwqXW9fLnub4o

@GADJI123

star

Sun Apr 13 2025 17:06:25 GMT+0000 (Coordinated Universal Time) https://giseo.rkomi.ru/app/school/studentdiary/

@nikitos06062011

star

Sun Apr 13 2025 17:03:37 GMT+0000 (Coordinated Universal Time) https://giseo.rkomi.ru/app/school/studentdiary/

@nikitos06062011

star

Sun Apr 13 2025 07:31:07 GMT+0000 (Coordinated Universal Time)

@manish23 #flutter

star

Sun Apr 13 2025 07:26:36 GMT+0000 (Coordinated Universal Time)

@manish23 #flutter

star

Sun Apr 13 2025 07:24:41 GMT+0000 (Coordinated Universal Time)

@manish23 #flutter

star

Sun Apr 13 2025 07:21:10 GMT+0000 (Coordinated Universal Time)

@manish23 #flutter

star

Sun Apr 13 2025 07:17:57 GMT+0000 (Coordinated Universal Time)

@manish23 #flutter

star

Sat Apr 12 2025 22:26:36 GMT+0000 (Coordinated Universal Time) https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo

@Mido4477

star

Sat Apr 12 2025 21:08:15 GMT+0000 (Coordinated Universal Time)

@v1ral_ITS

star

Sat Apr 12 2025 17:18:40 GMT+0000 (Coordinated Universal Time)

@freepythoncode ##python #coding #python #forloop

star

Sat Apr 12 2025 12:49:08 GMT+0000 (Coordinated Universal Time) https://www.beleaftechnologies.com/amazon-clone

@raydensmith #amazon #clone #e-commerce

star

Fri Apr 11 2025 21:53:35 GMT+0000 (Coordinated Universal Time)

@gbritgs

star

Fri Apr 11 2025 10:25:29 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/best-crypto-wallets/

@CharleenStewar #top10cryptowallets #bestcryptowallets #cryptobusiness

star

Fri Apr 11 2025 10:07:23 GMT+0000 (Coordinated Universal Time) https://www.kryptobees.com/blog/fantasy-sports-app-development

@Franklinclas

star

Fri Apr 11 2025 10:05:51 GMT+0000 (Coordinated Universal Time) https://www.groupteamwork.com/pr-agency-in-delhi/

@smriti1133 #prcompany in delhi #bestpr agency in delhi #prfirms in delhi #publicrelations agency in delhi #publicrelations firm in delhi

star

Fri Apr 11 2025 09:26:58 GMT+0000 (Coordinated Universal Time) https://www.coinsqueens.com/blog/bet365-clone-script

@athenapetridis #gaming #bet365clone #scinlinebetting

star

Fri Apr 11 2025 07:29:35 GMT+0000 (Coordinated Universal Time)

@Pooja

star

Fri Apr 11 2025 05:05:18 GMT+0000 (Coordinated Universal Time)

@Pooja

star

Fri Apr 11 2025 04:25:47 GMT+0000 (Coordinated Universal Time)

@Pooja

star

Fri Apr 11 2025 04:21:27 GMT+0000 (Coordinated Universal Time)

@Pooja

star

Fri Apr 11 2025 04:20:21 GMT+0000 (Coordinated Universal Time)

@Pooja

star

Fri Apr 11 2025 04:19:16 GMT+0000 (Coordinated Universal Time)

@Pooja

star

Fri Apr 11 2025 04:17:44 GMT+0000 (Coordinated Universal Time)

@Pooja

star

Fri Apr 11 2025 04:16:48 GMT+0000 (Coordinated Universal Time)

@Pooja

star

Fri Apr 11 2025 04:15:45 GMT+0000 (Coordinated Universal Time)

@Pooja

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension