I am trying to automate the leave balance workflow and remove the dependency from the managers to approve it because if the leave is available its available and employees can take it.
I have created a share point where I have mentioned the date , day and leave balance(suppose at one day only 3 people can take a leave so it will be showing as 3), logic I am following, if the leave is greater than 0 in share point then employee can book the leave and an email should sent to the manager plus power automate should create an entry in the same share point that employee XX taken a leave for xyz dates.
In share point I have 3 Columns:
1: Date
2: Day
3: Leave balance
Please help me, thanks in advance
Thank you so much for your responses and this is the first time I am posting something and you guys are awesome.
Its like a train ticket system.
Suppose we have 2 categories
1: general Quota
2: Sleeper class
When a user book a ticket, user generally get if the ticket is available or not!,If the ticket is showing ( example: 30 tickets available) then user can book that ticket and its auto approved if its not available, user generally look for another day whenever the tickets are available to book the ticket.
Workflow should be: User entered the keyword "Book Ticket"--> gets all the dates when the ticket is available -> user click on book ticket -- if the ticket is available then user should able to book the ticket as the flow will be auto approved.
If the ticket is not available then user get a denial message that ticket is not available for the date and please try some other day.
In share point, I have created 3 Colum's:
1 Date
2: Days
3: Sleeper Quota
4: general quota
5: Available Tickets
I have already created the Bot by power virtual agent and now I want as soon as user selects " Book my ticket" and select General or sleeper quota, user should get the available tickets and can book it by BOT only with out any approval.
Related
I'm working on e-learning academy system like udemy every instructor have wallets and wallets have three type of balance
1- total balance and it present total earning
2- available balance and it present earning that he can make payout or transfer it to his bank account
3- hold balance and it present earning that is not available for specific time then will be available to transfer it.
Project build by Laravel my issue how can I hold money for 14 days and after that make this money available without any action from my side I need logical idea to make it
can use cron job, or is anyone have this experience before ?
Let me break down the issue as per my understanding so we make sure I'm answering the correct question;
You have a system that has a wallet feature.
This wallet needs to hold some money and make the money unavailable to be paid out (hold status)
Then after 14 days, the money gets paid automatically without any interaction.
If I'm correct, then keep reading the answer below. If i'm not, correct me with a comment and I'll update my answer accordingly.
Answer:
We will create a new table. Let's call it pending_payments. It'll have the following information: user_id, payment_amount, pay_at
That table will hold information about pending payments and to which user they should be paid as well as the amount and the date it should be paid at.
We'll have a Laravel job that can be automated ( read this for more information: https://laravel.com/docs/9.x/scheduling) which will do the following:
a. Run daily on a specific time. Let's say at 13:00 daily for ease.
b. It'll check the pending_payments table for payments that should be paid today.
c. Pay them ( which means run whatever function/task you have to run in order to process the payment).
d. On a successful payment, remove the row from pending_payments table. And on a failure payment, log the error and insert the row again with a later date to be retried again later.
That's it.
Has anybody here dealt with incrementing subscriptions for "admin" users? Also, how do you handle invoicing and first/second-month charges in a neat manner?
I have a use case where users can sign up other subscribers and pay for these subscriptions from their card on file. The "admin" user signs up for the first subscription, and I keep incrementing the original sub every time a new sub is added.
When I send these through Cashier, the user only seems to get charged once, and then the second, third, etc., the first-month cost gets added onto the next month's invoice, and a new line item of unused time every time the admin user adds a new sub. So I first do:
$request->user()->newSubscription()->create();
Then I do:
$request->user()->subscription()->incrementQuantity();
The user only gets charged one monthly charge at newSubscription()->create(), And the next month's invoice has the following math.
(# of Subscriptions x Monthly Charge) - (Monthly Charge)
And the invoice has a ton of line items saying "Unused Time ..." which looks OK if that admin user only has one or two additions to their subscription but gets messy real quick beyond that. This seems super unprofessional and annoying to explain to the admin users. How do you/would you guys go about making this smoother? I understand that the invoicing for the incrementQuantity() method is enforced by the Stripe API, but it doesn't make sense to have so many prorating adjustments in a first invoice.
What is your goal/desired behavior here? Laravel cashier does allow you to change how you want the prorations to behave. By default prorations will be created and pulled into the next invoice, but you can also choose to disable prorations entirely or create prorations and have them immediately invoiced so that the difference is price is paid for immediately.
If you don't want any prorations generated at all when you update the quantity of a Subscription you can use noProrate() (see laravel's docs). Disabling prorations entirely may not be what you want though, since it won't allow you to charge a customer for the difference in price when they update mid-cycle. As an example, if you start off with a quantity: 1 Subscription they'll be charge for just 1 unit at the start of the month. If prorations are turned off and you update to quantity: 5, the customer won't have to pay for the new price until the subscription is renewed. If this is still what you want to do, you'd use it like this: $request->user()->subscription()->noProrate()-> incrementQuantity().
Another option would be to keep generating prorations, but have them immediately invoiced so that they aren't reflected in the renewal invoice at the end of the month. This will result in the customer being invoiced more often, but would solve your issue where the renewal invoice looks cluttered because of all the prorations. You would get this behavior by using alwaysInvoice() like this: $request->user()->subscription()->alwaysInvoice()-> incrementQuantity().
I'm trying to create a recurring payment on Square, ala Stripe subscriptions. However, I am having trouble retrieving a customer's card information (specifically customer_card_id) to pass into Charge.
Our flow is such:
A customer visits to our store and subscribes to a membership, which we process via the point of sale app.
We continuously poll Square to retrieve payment information, and create membership records appropriately.
When the user's membership period expires, charge them for the next month's membership.
When researching RetrieveCustomer, I find that there is a cards property under Customer, but iterating through all the Customers under our account, they all have cards = None despite us having taken card payments via the point of sale app.
Also, looking at ListTransactions, there doesn't seem to be anything that might be customer_card_id. The IDs I see there are tender ID, location ID, and transaction ID. The card_fingerprint also looks promising but that doesn't seem right either, since a card can have both an ID and a fingerprint.
Am I missing something? Where might I find customer_card_id?
EDIT
Looks like I was dumb and my local instance of our application was just out of date with transactions from Square. After updating my data with customers we've processed since the last time I updated, customers with a non-None card property now show up. tristansokol's answer below is still valid however.
How do you process the first charge? You need to explicitly add the card on file, it won't be added by default from processing a transaction from a customer. See: https://squareup.com/help/us/en/article/5770-use-card-on-file-with-the-square-point-of-sale-app
i will appriciate any help with my problem, I created a script that basically takes a students list and starts to send invitations to different courses, at some point i am getting this error "Error: #UserInvitationQuotaExhausted The user does not have enough quota to invite users to this course."
I am using a domain account not a personal account, i have read that the invitations quota for personal accounts is 100 per day, but i can not find any information about domain accounts. Is there any form to increase the quota of invitations for my domain account?
Thank you.
Here's the Usage Limits
To view or change usage limits for your project, or to request an increase to your quota, do the following:
If you don't already have a billing account for your project, then create one.
Visit the Enabled APIs page of the API library in the API Console, and select an API from the list.
To view and change quota-related settings, select Quotas. To view usage statistics, select Usage
This also seems relevant.
Activity or feature
Google Workspace or school account
Personal Google Account
Teachers per class
20
20
Class members (teachers and students)
1,000
250
Classes you can join
1,000
100 maximum, 30 per day
Classes you can create
No limit
30 per day
Class-member invitations you can send
500 per day, per teacher
100 per day, per teacher
Guardians per student
20
Feature not available
Email address visibility
No limit
Feature not available
Topics per class
200
200
Classes you can select to simultaneously post an assignment, material, question, or announcement
20
20
Taken from https://support.google.com/edu/classroom/answer/7300976?hl=en (2022-04-14)
In Google Admin API,
For a domain, lets assume today is 1st Jan, 2015. I performed case [1] today. 5 days later I performed case [2] for report date (1st Jan 2015) since case 2 data is not available instantly.
Cases:
Retrieve list of users from directory.users.list (showDeleted = False)
Retrieve list of users from reports.userUsageReport.get (userKey = all)
Will the list of users in case [1] and [2] be same? If not, what's the difference.
Thanks
With directory.users.list, you will get all the users in the domain if you give the domain name. But with reports.userUsageReport.get, you will get all the users with the recent activites. If user has no recent activity, then user wont show up in the list.
If userKey=all in reports.userUsageReport.get, it means you get all the users with recent activites. If you give userkey, you will get recent activities of that particular user. Let me know if you have any questions.