How rename description of Stripe subscription invoice line item from "trial period" - ruby

I have a plan for which I generate subscriptions with trial periods.
Stripe is generating invoices with a line item of 0$ for this trial period, with Trial period for <my_plan_name> as description. I would like to rename this description because my customers are French (and you know, we French people don't speak very well English but that's another story).
When I'm trying to update the item description
Stripe::InvoiceItem.update("sli_xyz",
{ description: "Essai..." })
I'm getting error Stripe::InvalidRequestError: When passing an invoice's line item id, you may only update tax_rates.
I can't delete such a line item neither because this is a subscription item and I can't remove the description neither.
What am I missing here ? Is there a way to resolve that ?

There are two Stripe concepts here: an Invoice and InvoiceItem.
InvoiceItems are essentially line items of individual items/services that is being tendered. An Invoice can contain many InvoiceItems. Imagine an Invoice is the complete receipt, and InvoiceItem is the individual grocery item.
Normally, you can update the InvoiceItem either before you attach to an Invoice, or even after you attach it, before the Invoice is finalized/closed (a.k.a. paid for by the customer).
Stripe does not allow you to update the description of InvoiceItems that are closed/finalized, because as a merchant, invoice is a record of what you sold (and receipting) to the customer, and once the invoice paid by the customer, you cannot change it.
Imagine if your invoice was originally for 50 beers, but after they pay for it, you decide to update the invoice to say 5 beers! How is that fair to your customers?
Your only solution is to make sure the description is defined properly in French for your French customers before issuing the invoice going forward into the future.
There is no way to fix this for past InvoiceItems.

Related

Libreoffice-base subform_sales_desc inside form_order . first form cannot enter items as number and show as names and not gst,unit etc automatically

I am creating free accounting package in libreoffice-base to compete already available ones your contribution is appreciated. the package include tables:
items
item_groups
order_details
sales_bill_desc
cash
units
companyinfo
bill sales
Customer_ledger
etc.
and created two forms
first to enter items in items table with following fields:
id
List item
particulars
units from units table linked with id gst chooses from
tax table related as id basic price basic stock, barcode, group,
subgroup,
second form is sales bill entry form
it contains a form which relates to order_details table selects customers name from ledger where its state code is also defined e.g. for punjab its 03 basically it is picked from customer's GSTIN number
a subform which is connected to sales_bill_desc table related to order_details table with bill number in both tables.
now in subform when we enter one item, its name is displayed which is same entered in sales_desc table additionally it also need automatically display item units, gst, price(editable field but basic price must be displayed there).but it does not. how to do that i have studied books but am lacking i created same in access 2016 somewhere which worked fine (full working package accounts with inventory).At this time,I am trying to use same database but advanced with features such as barcode. Of course the issue is to be resolved if someone can help. I am loading code of the package.Please rectify and update.

Laravel Cashier incrementQuantity() tidy invoicing

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().

How display model with four relationships based on date in laravel?

I have these models:
Partner
Invoice
Bill
Transaction
CreditNote
Invoice, Bill, Transaction, and CreditNote belong to Partner.
and Partner has many invoices, bills, transactions, credit_notes.
I want to make SOA reports, which are based on date.
for example:
DATE TYPE ITEM
2021-1-1 partner invoiced us invoice_number..
2021-1-2 us invoiced partner bill_number..
2021-1-3 partner paid us transaction_debit
2021-1-4 us paid partner transaction_credit
2021-1-5 partner paid us credit_note
I use `rappasoft livewire data table to show this information.
I get partner stuff like this:
Partner::where('id', 1)->with('invoices', 'bills', 'transactions', 'credit_notes')->get()
I don't know how to display these information in a table a sort based on date
How to do this?
It sounds to me like your structure is wrong. All of the five things that you're putting in your table are what I'd consider "transactions" (not to be confused with your model "Transactions".
That being the case, then you want either want a Transactions model which is morphable (that's the more complicated solution) or which has a "type" property.
If morphable, each transaction would then be associated to the corresponding partner, and to the corresponding model - invoice, bill, payment, refund, etc. - on a "morphsTo" basis.
If you went down the easier route, each transaction would just have a type, linked to a TransactionType model, which would indicate the type of the transaction.
As things stand, your structure is overcomplicated. Either of the above approaches would simplify it.

By using CRM 2011 online, I want to E-mail INVOICE automatically with Product Description(line items) in ,to My Customers

My Organization wants to Email (automatically means system itself generate the invoice mail) Invoices to their Customers 25th of every Month with the number of products(LINE ITEMS Means Invoice products) in The INVOICE. For Having Line items in the invoive form I've made some customization and add "grid" Which now shows the line items information means you get information that how many products this invoice actually is..
For this I've made an e-mail tempelete For the Entity invoice .But Problem is that the grids fields are not there in the the tempelete "Insert\delete" option .
I research alot and made all possible attempts To mail(AUTOMATICALLY) the invoice with all the line items in it
There is no way to easily accomplish what you wish to do. You can't create custom workflow activities in crm online so your only real option is to create some type of external program that does the work. Templates will only handle part of the problem and not the invoice line items at all.

Creating a Relationship Between Order Product (salesorderdetail) and Service Activity (serviceappointment)

We are using Microsoft CRM 4.0 to run a consulting business. Its working pretty well but we want to simplify the way we are doing some things. What we want to do is create an Order (salesorder) with multiple Order Products (salesorderdetal). So good so far.
Next I want to be able associate each Order Product (salesorderdetail) with a Service Activity (serviceappointment), this representing that this billable line item in the order is actually going to be fulfilled as a consuting engagement.
The problem is, I can't seem to be able to create an association between the Order Product (salesorderdetail) and Service Activiy (serviceappointment). It simply doesn't appear in the drop downlist.
Can anyone think of a reason for this? I've seen some posts about relating field mapping between Quote Product, Order Product, Opportunity Product and Invoice Product, but that isn't quite what I am after.
Any suggestions gratefully received - even if it is an explaination of why its not possible.
I created a simple 1:N mapping from Case to Invoice. The Case records its ID and Title in custom fields in the Invoice. Unfortunately this does not allow for product creation as children of the Invoice, so that should be created as a custom code workflow.

Resources