• About
    • Features
    • Pricing
    • Partner
    • Resources
      • Insights
      • Case Studies
      • Downloads
      • Help Center
      • FAQs
      • Support
    • Book Your Demo Now!

Getting Started

  • Introduction
  • Installing Saleculator POS on Windows
  • Printer Setup for POS Software
  • Performing your first sale
  • Basic POS Operations
  • Understand Saleculator User Interface

What's New

  • Dynamic product labeling and more

Features

  • Different Billing Methods or Modes in Saleculator

Tutorials

  • Cashier Mode

How-tos

  • Happy hour sale

Hardware setup

  • Setting-up Network thermal printer
Home | Help Center | How-tos | Happy hour sale

Happy hour sale

This code implement happy hour functionality.

Administrator Menu > Maintenance > Resources
Add the below lines of code in event.addline resource.

import java.util.Calendar;
 
 Calendar cal = Calendar.getInstance();
 int hour = cal.get(Calendar.HOUR_OF_DAY);
 
 //Discount
 discountrate = 0.2;
 
 //Happy hour range
 start = 12;
 end = 16; 
 
 if (hour>=start && hour<end) {
   p = line.getPrice();
   line.setSalePrice(p - (p*discountrate));
 }

Save & restart

Book a Demo Now

Get Started With
Saleculator Today

Ready to see how Saleculator can transform your business? Start your free 30-day trial now and experience the benefits firsthand.

Book Your Demo Now!
  • About
  • Features
  • Pricing
  • Case Studies
  • Insights
  • Clients
  • FAQs
  • Become a Partner
  • Help Center
  • Downloads
  • Free Trial Key
  • Partner Login
  • Support
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Saleculator 2025. All Rights Reserved.
    Powered by CYFER