Okay, so Lorenzo is joining us from Cuba. This is your first aeropitone Lorenzo? Yeah, my first aeropitone ever. Cool, welcome. It's also for me. It's also my first aeropitone. It's not my first python conference, but it's my first aeropitone. So thank you very much for presenting. A reminder for everyone. You can ask questions in the Q&A. And I will ask those questions. After the talk, this talk is 30 minutes. So Lorenzo, all yours. You're ready to go. Well, thank you so much and good afternoon or good night. Good morning. Thank you for joining me today in this journey to discover yet another package for multi-tenancy in Django. My name is Lorenzo Peña. That's my handle where you can find me pretty much everywhere. I have been a software developer for over a decade. And I have around 11 years of experience in Django with around three packages in the pipi registry. So I hope you're having a great time in this online version of your python 2020. And I hope as long as my connection behaves properly that you're going to enjoy this talk as well. So yet another package for multi-tenancy in Django. Let's play this title kind of backwards. And let's begin with Django. And firstly, let's get all on the same page in that 2020 has gotten a little bit out of control. Yeah. And with the raise of GPT-3, future is uncertain in some aspects. You know, probably we're thinking whether we're going to be keeping our jobs by the end of the year. But I honestly think we don't have to be worried too much, worried about it. Because we are Pythonistas and Django nuts. And we are in the world of Django, the web framework for perfectionists with deadlines. We just turned 15 years old, which is a great milestone, is mature, solid and battle tested. It has an amazing community and a great momentum and is getting stronger than ever with more async and reactivity as of late. So just in case you're wondering whether it's still a valid investment to be thinking in Django and multi-tenancy as of 2020, I think it is. And I think Django can perfectly handle the rest of the year and the upcoming decade and provide for you and for me and we're actually rooting for it. So multi-tenancy. What is exactly multi-tenancy? Let's play by an example. Suppose there is a customer red, which has a problem. And you develop a solution for that customer. You deploy the solution is working great, but now customers blue, green and yellow have exactly the same problem. So what to do? You have a solution that is already working for the customer red. There are two things you could do. You could just copy and paste that solution and provide multiple single tenant solutions. Or you could make the jump into a multi-tenant solution, which is single instance of the software that can provide for the needs of all your customers. That's exactly what multi-tenancy is. It's a software architecture in which a single instance of the software serves multiple tenants. And as an example, you can see Dropbox, Shopify, Slack and WordPress. So what are tenants? Well, tenants are the isolated spaces in which users with specific privileges interact. There is the accounts of Dropbox, workspaces at Slack, blogs in WordPress, servers at Discord, stores at Shopify, or sites slash communities as stack exchange. So all shaping good so far. Now, how do we actually get to implement multi-tenancy in Django? Well, one does not simply add it to the project. Why? Because if you want to implement it from scratch, there's a number of things to do and do right. And even if you're going to use any of the existing packages out there, it takes some knowledge to properly decide and determine which one is going to be suitable for your needs. So about this thing of packages, will you actually end up needing a package for multi-tenancy? Well, most likely, yes. And there are many of them. I made one of those. I contributed towards the entropy, which is kind of a fork actually with some conceptual changes. But the truth is that there is no one size fits all packages tend to be very opinionated in a number of architectural decisions that need to be taken. And so there is no silver bullet for us when selecting packages for multi-tenancy. So am I really going to give you yet another package for multi-tenancy in Django? Well, not exactly. Instead, we're going to take a look at the building blocks, the pieces that form the foundation of multi-tenancy in Django itself. And instead of taking a package-first approach, we're going to be taking a knowledge-first approach. We're going to be pretending that we are implementing multi-tenancy from scratch without actually doing. And I hope with this knowledge, you will be able to select, understand, debug to contribute back to just any existing package. So this is not just yet another package. This is the package to rule every other package. And if you think of it, it could actually be the ultimate package. So my dear audience, I give you the ultimate package for multi-tenancy in Django. I hope you're ready to get your hands happily dirty in the concepts and notions we are about to cover right away. And the first of these notions is the concept of the active tenant. Suppose we are inside Stack Exchange in some of the internal sites and we run this query, question, objects, all. Okay, but where are we expecting to get questions from? Because Stack Exchange is too big. It could be Stack Overflow, it could be Server Falls, Super User, maybe Area 51. So welcome to this new concept, the active tenant. And the idea is that one tenant has to be the active tenant and the framework needs to be aware that it's going to be operating in this scope, even in database access, URL reversing, admin side, cache, pretty much every part of the framework. But notice that this has to be in place even outside the request response cycle because we have things here like management commands and salary tasks where you don't have a request object to interrogate for the active tenant. Django has a couple of APIs currently that you're probably familiar with where there is this notion of the active something. It's the time zone and language and you probably know these couple of functions get current and activate where you don't have to be using a request at all. So we could take some inspiration in this and actually create a couple of functions, get current tenant and activate tenant so that we are able to enter the scope of a tenant by activating it and then retrieving the active tenant further on. This is a possible implementation of the active tenant notice we're using here ask your ref local, which is a drop in replacement from trading locals but without getting too deep. This is actually a global variable that is threat safe, but it's still a global variable and the use of global is generally discourage. Why, well, there is a reason why this pattern is actually so scar in Django code base itself. And the reason is that the more you depend on globals the more couple becomes your code the harder to test in isolation and therefore it's not super recommended and Django hasn't fallen in this pattern, except when it's absolutely necessary. So in this case I would consider that this would be a perfectly valid case for this, but it would be a pattern that is thrown upon otherwise so please don't go out of this that just creating globals for the sake of it. So there are two important questions about the active tenant and those are what is the type of tenant object when we get and set a tenant as the active tenant what type of object we're working with. And the other question is what happens if for some operation, there is just no active tenant, is that a buck. Is that a possible situation is that a wild card scenario in which you are actually hoping to around the operation in multiple tenants so these are all valid question but it's more of food for thought. So as we get settle this concept of the active tenant, there are three architectural choices that we need to make. And these three architectural choices are users and tenants database architecture and tenant routing. Regarding users users and tenants, there are three types of relationships between these. One is the type in which users exist outside the context of tenants, that is, you can have tenants you can have users there could be relationships between them. This kind of loose non strict an example or press Shopify and discord. Another type is the one in which users are bound and concentrate within the scope and the context of a tenant. The perfect example is lack where you cannot think of a user outside the concept of a workspace. And there's a third type in which users and tenants are pretty much the same thing. The example of this is Gmail Dropbox and the like. So which one to pick it will completely depend on your use case and how do you expect your users, your users and tenants to be interacting. The baseline question here is how many tenants do you expect a user to be related with the second day the second architectural choice to be making is the database architecture itself. And there are typically three approaches. One is the isolated approach in which in which you have multiple databases, one for tenant. The other one is the shared database approach in why in which you have a single database and a tenant column and on entry level tables. And the third one, which is kind of reason is the one in which you have one database but you use Postgres schemas to do the tenant to store your tenant information. So how, how would that be if you were to implement multi-tenancy with isolated databases? Well, Django is compatible with multi-database configuration, so there's nothing stopping you from having multiple databases there. The only thing you would have to do is that you would have to be switching between databases when accessing and storing your data. Here I am using a translation function from a tenant, from an active tenant into a database alias. And everything you would have to do is just using that alias for saving your objects or for filtering your queries, or even for generating already a scope manager so that all your subsequent queries are already in the context of that database alias. This could be somehow offloaded to database routers since we have this function to get the current tenant and we also have a translation function from a tenant into a database alias. We could be providing default values here so that we don't have to do the previous thing. The router makes it so that whenever you do a data access, this would be default value of a database, and you could still resort to doing manual specific scoping if you need to override the default behavior. The good thing about the isolated databases is that you are optimized for isolation. The bad is that there are no relationships across databases because Django doesn't allow it and that adding tenants requires reconfiguring the project. Why? Because your tenant catalog is actually living in your settings so every time you're adding a new tenant, you have to update your settings. The not so funny thing about the isolated databases approach is that as you scale, it's going to become quite expensive with operational costs. So unless you're planning to have a number of tenants in the lower 10s or unless you're planning to have Scrooge, Madoc as your billing manager, this is generally not recommended approach. But for the shared database approach is the one in which, remember, we have mixed records in a single database. So in this case, entry-level tenant-specific models will require a pointer to the tenant they belong to. And notice that I'm saying tenant-specific models because not every model needs to be tenant-specific. You could have models that are used to share information across tenants and notice that I'm also saying entry-level because models determine relationships between them. So you don't actually need to provide a pointer for each one of those as long as you're able to reach the tenant with a reasonable number of joins. And this is an example of a hypothetical question model following the stock exchange example where you're having a foreign key to the site which is kind of the tenant in this example. In this case, you still have to rely on the active tenant in order to complete the missing part of your queries because you will have to use that tenant in order to create your records if you haven't provided, if you have provided a tenant agnostic interface to the client. And you still have to filter by tenant, no matter if you're actually filtering a model that has the tenant pointer right away or if you're doing a number of joins in order to get to the tenant. You could do some of these automatically and you could try to assign the tenant automatically by means of using a default value for the field that holds the tenant which could be a callable. And in this case, if appropriate, could be get current tenant or you could have a custom field with a pre-safe hook. If you're using a foreign key, you could even subclass that a field. Finally, you could resort to having a signal on relevant models in order to complete the model prior to saving it. As for querying, well, you could use custom managers and custom queries in order to pre-filter by your active tenant and therefore the subsequent queries account that these are already filtered. However, there could be some annotations on sub queries where these customization probably doesn't work. So you still have to be open to be doing manual scoping from time to time. The good thing about shared databases is that you are optimized for scalability because adding tenants is just a matter of adding rows into your tables. The bad is that your data isolation will take extra effort on the development side. And the not so funny thing about the shared databases is that it's very easy to just forget to scope any specific query by the tenant. And therefore, if you don't want to wake up in the middle of an eye with your brain wondering whether you have filtered by the active tenant or not, my recommendation is that you bookmark all your tenant scope queries that you make automated tests for each one of them. And you make sure that they are returning results in the scope of the active tenant. And even that you take a step further and you make an automated test to test that you tested each one of them. So it's kind of a riddle, but it's going to save you at some point. And the other that tests are the softest pillow you could have in general for software development, but specifically if you're going to share database approach for multi-tenancy. As for semi-isolated databases approach, this is going to rely in possible schemas in order to isolate the tenant within a single database. So what are schemas? Well, this is a specific postgres concept. They are a layer of abstraction between databases and tables. They are not thought of as name spaces, but the good thing about these name spaces is that they are not mutually exclusive. So you can organize them on fine tables in many of them by means of properly configuring your search path, which is also another postgres specific concept. In this case, your queries remain practically unchanged. This seems like magic, but you're going to pay the price with an increased technical challenge somewhere else. This is where you will have to do two major things or it's required to major things in order to get this approach working. First, we're going to require a custom database backend based in the postgres backend or any other backend that is postgres friendly. And this backend will have to be able to convert the active tenant into a sequence of schemas and then you will have to run a query to activate those schemas by means of setting the search path. The other interesting challenge, and this is kind of the biggest challenge, is that we have to teach Django to do migrations again. Why? Because Django doesn't know anything about schemas. Django knows about databases and Django, you can pass a database in order to run your migrations, but when it comes to schemas, that is not part of the world view of Django itself. So the idea here is that we are also using a database router in order to use the allow migrate hook in order to tell Django whether or not it's legal to migrate a specific model based on the active tenant. And this also requires the migrate command itself to be kind of tweaked because the migrate need to operate at the schema level. The good thing about semi isolated database approach is that you're optimized for isolation. And at the same time, you're having increased scalability because since you have a single database, you can scale faster by means of adding schemas. The bad is that it's going to take extra effort to understand and control how schemas interact. The not so funny part about the semi isolated database approach is that since you're able to scale faster, you're going to be hitting the thousands of tenants very soon and therefore thousands of schemas and you still have to run your migrations on each one of those schemas. So you're going to be paying the price with an increased time to run your migration. So please be advice about this, which one is the best. Well, neither is it why because there are pros and cons in each one of them. And it will depend on your specific use case and each one of those approaches is capable of shining in their specific use case anyways, if you want to engage in a respectful ice cream fight. You can hit me in the breakout and we can continue the debate there. So your architectural choice is tenant routing that is how do you expect to take an incoming request and generate an active tenant out of it. So it's generally possible to do that because your tenant is somehow encoded encoded in the incoming request by means of the user session or headers, or it could be even better if your tenant can be inferred from the URL itself. You can do the translation from the domain subfolder or query parameter. So where is the perfect place to do this translation from an incoming request into an active tenant but that places the middleware. It's a perfect place to do it, because you're capable of taking the request in common requests just activated 10 and therefore the rest of your request and respond cycle for that request is going to be guaranteed to be in the scope of that active tenant. So the implementation of that middleware of one of the middleware. And in this, in this case, this middleware is translating from a session into into a tenant. Notice that the major complexity here is actually creating the translation function like to take something from the session and convert it into a tenant to activate because the rest is pretty much checking if there is no active tenant already, and then activated. So one of these is that you only need to provide different translation functions for different retrieval methods and you could have similar functions for users headers domain to folder parameters. And you could still chain one middleware after the other if you want to combine the power the power of these retrieval methods. So you only have to take care that the order will determine the the precedence of those retrieval methods. So what if you want the opposite. What if you are already in the, in the scope of a tenant and you just want to generate a canonical URL that is capable to give you I mean if you share that URL. It can take, take you not only to a specific path within your URLs but also to a specific time. It's not going to be possible in some cases because I mean user sessions and Heather are not easily encodable as part of the URL. But you can totally do that if you're inferring your tenants from domains of folder or query parameter because even though Django only reverses the path part of the URL, you can still prevent interpolate or append the tenant in order to allow the canonical URL to land in a specific path of a specific tenant. And this of course will require a little tweaking in the URL reversing process as a bonus. I also tell you that as I also give you that it's possible to provide custom your outcomes based on the active tenant so if you have different types of tenants. And you want to provide different different your your else for those tenants, you could also provide this translation function. In order to convert a tenant into a URL comes module Django already provides this hook where you can just assign the your outcome module into this variable in the request, and you will be using that different module. You have to make major architectural choices you have to make. And you'll see there are multiple choices for each one of those some combinations make sense play nice together while others don't make much sense at all. So it's going to be up to you to determine whether or not things are playing nice for you, but there is more to Django than just those three parts and those those three architectural choices. Let's take a quick look at the scope of everything else and while this list is not going to be comprehensive. Let's please at least see one of the five major places where this dynamic of the active tenant is going to be an important thing. So management commands, it's going to be very valuable to be able to run management commands in the scope of a specific tenant. You management commands, you could just include a tenant argument so that this command is capable of first activating the tenant. And then performing the, the operation that the management command is expected to do. Now, for existing non tenant award commands. I mean, these commands are basically everything that chips with Django and third party application. So for this case, you will have to define a special command wrapper that basically takes the tenant as an argument but also a neater command to be running. And this wrapper it should be in charge of activating the tenant and then calling the inner command. You will find some packages existing out there that even take a step further in elegance and combine the arguments of both commands. But you know this is kind of trickier to implement but it's possible completely possible to do. As for file storage is also going to be extremely valuable to be able to somehow organize the files by tenant. And in this case, you can totally define a custom file storage in order to perhaps prepend your else with a string representation of your tenant, etc. Notice that I'm not providing any code example here because there are multiple types of file storage depending on your backend. It could be file system or it could be something in the cloud. So this actually takes a little bit of more specific use case thinking. Now in higher security context where you cannot afford one tenant accessing files in alert tenant, there are two kind of workarounds you can do in order to increase the security level. So one is generating pre-signed URLs so that your static or media URLs are a short leave and therefore it makes it's harder to visit tenant specific URLs for files. And the other one is actually using a proxy view so that the view acts as a middleman and determines whether or not the incoming request has security clearance to access the specific file storage. And then there are some interesting packages that are doing most part of these themselves. So this is more like the underlying concept. As for cash, well as a buck, the cash that comes with Django is tenant agnostic. So if two tenants are using the same cash key, there will be a clash. And most dangerously, you could be leaking information by means of one tenant storing some data in the cache and then other tenants retrieving that. That's a leak. So one thing you could do is actually generate a special key function that you could then use as part of your cash configuration and that key function. The only things that need to do is just augment the string representation of the key itself with the current tenant. For salary task, well, it's more it's more matter of discipline. The idea is that you pass an identifier of your tenant so that the first thing you do in your tenant specific salary task is to activate the tenant, and then you can resort to doing the rest of the task itself. And finally, for channels. Well, you're going to require a separate middleware for your web sockets, whatever you do for your regular request you're going to be doing, you'll have to be doing that also for your middleware for your channels, because they are not fully compatible. And if you want to activate tenants from the incoming scope, you're going to be kind of duplicating your middleware because they are not compatible. And if you're using channel layers, you will have to also do a similar approach like we did with cash with your consumer groups name, because if you use a tenant agnostic name you will also end up leaking messages between the groups of multiple tenants. So for everything else that was was not covered like admin side or template and specific templates, I am certain that the principles here are generally extensible. So I'm almost sure that you will be able to extend the principles in order to cover pretty much everywhere in the framework otherwise feel free to continue discussion in the breakout. Now, some of the packages that actually implement multi tendency and help you in generating multi tendency with your project, which you could choose from here on this plane for packages notice that they are kind of opinionated based on the database approach. These packages were taken from the multi tendency greed of Django packages.org which I consider to be the market for Django packages. Please visit there, you could find more interesting things there just make sure you see whether or not the package is Python three compatible whether or not it's production ready and even if it's actively maintained because otherwise you might end up in a very difficult situation. If you want to contribute back to any of those packages, the ones I mentioned and the ones I didn't I by means of reporting box implementing new features or even improving documentation. I will dare to speak on behalf of everybody of all the package maintainers and tell you please come. Thank you. You're more than welcome to do so it could be a gold opportunity for you to put in practice everything you may have learned here, or everything you have learned in your own experience and progress through multi tendency in Django. So that's it. We can keep in touch for more. And I would like to give a special thanks to Russel Keith McGee Orlando William and Rafael Michel, which were of a huge health in the preparation of this talk. And lastly, thank you my dear audience for joining me today in this journey. Thank you.


Number three and number six those are the rankings respectively for the pillager and Pine River back as football teams. The Huskies occupy their spot in class 2A while the Tigers hold firm at number six in class A but you can throw all that out the window as tonight the two did face off in a conference matchup. Taking to the final moments of the second quarter the Huskies had 24 to 6 but the Tigers fought back running back Tim Bardot from momentum to the Tigers on this pass right here he gets taken down at the one-yard line but this sets up Pine River back as for their next play as they push to get this touchdown another six points to make the score 24-12 the home team answered back quickly though Huskies quarterback Josh Doss hands the ball off to Ridge Hunstad who finds the end zone and extends the Huskies lead 30 to 12 two-point conversion would be good Huskies end the first half leading 32-12 they win this one tonight by a final of 46 to 12 over PRB. If you've enjoyed this segment of Lakeland news please consider making a tax-deductible contribution to Lakeland Public Television.


Lux presents Hollywood. Lever Brothers Company, the makers of Lux Flakes, bring you the Lux Radio Theatre, starring Janet Gainer and Charles Farrell in 7th Heaven. Ladies and gentlemen, your producer, Mr. William Keylet. From Hollywood, ladies and gentlemen, when the Academy of Motion Picture Arts and Sciences was founded in 1927, it chose a slim gold statuette to be the symbol of its award for distinctive achievement in any art or science within the motion picture industry. This famous statuette has since become the most coveted prize in Hollywood, representing, as it does, the highest of praise, the tribute of one's fellow artists. It's our pleasure tonight to present the charming and gifted lady who was the first actress to receive one of these treasured Oscars, Janet Gainer. As a romantic team, Janet Gainer and Charles Farrell had an appeal that has never been surpassed, and together they reigned as the king and queen of the movies, elected by the best of all possible judges, the American movie public. When Janet Gainer was presented with the Academy Award as Best Actress of the Year, she was chosen for her outstanding performances in three pictures. Naturally, we have chosen to present her and Charles Farrell in the one that has become a classic love story, 7th Heaven, and for which Frank Bozegi received the first Academy Award for Direction and Benjamin Glazer for adapting the screenplay. Now for distinctive achievement in another field, we present Lux Flakes with new color freshener. This new Lux gives an outstanding performance that you won't forget, keeping your new spring wardrobe as colorful as it was in yesterday's Easter Parade. Here's 7th Heaven, starting Janet Gainer as Deanne and Charles Farrell as Chico. Paris 1914 In a few weeks preceding the First World War, the city waits breathlessly for a word which will plunge the world toward destruction. There is only one quarter where life goes on in the usual way, the Paris Slums. There amid poverty and squalor, in a world of screams and curses, street brawls and petty thievery, a teeming population fights for its existence in the dump heap of the city. On the darkest and dirtiest of these streets, a familiar cry goes up. Through the crowd slips a thin, long nose creature with a quick BDI. Like a rabbit, he darts and turns. The police close behind. Let me go. Let me go. I'm done. I swear it. Be quiet. Stand still. What's your name? My name? Yes, that's right. That's what they call me. Surat. But I haven't done anything. I swear it. Of course you haven't, except to steal a watch from Father Chevignon. A watch? I stole a watch. Here it is. I found it, Miss Puck. No. No, I didn't steal it. I swear I didn't. Be quiet. You pray. Yes. Clear a path through the church door at the end of the street. We'll take this Surat to see Father Chevignon. Stand back there. Go on. Won't you come in? Good evening, Father. Well, we found him. This is the thief. Let me go. Please. Oh, no, you don't. We found your watch in his pocket. Did you? Mr. Brissac, I hope you will excuse this little interruption. Oh, of course, Father. I'm in no hurry. Thank you. This is your watch, isn't it, Father? Yes, that's it. It is my watch. Thank you. Come along, you. Oh, but wait. There's no need to arrest him. But he stole your watch. It was my joke, Mr. Brissac. A joke on him. The watch is made of tin. It has no value. Is there anything I can do, Father? No, thank you, Mr. Brissac. This man stole a tin watch from me. A tin watch? Yes. You see, with that as my bait, once in a while I find out who the thieves are. And when I've found them, I convert them. Or I try. I buy these watches by the dust of these. I see. You may leave the prisoner here, officer. Very well, Father, if you wish. Good night, good night. Come here, please. Sit down. What is your name? They call me sewer rat. You work in the sewers? Yes, with Chico. We clean the sewers. Chico, I've been wanting to meet him for some time. Why don't you bring him to me? Chico? Oh, I couldn't do that. He hates priests. Oh, and why? Chico, he says there is no God. That's what he says. He's an atheist. That's what he is. Now, as for you, you believe in God, of course. Oh, yes. Yes. Now I want you to go into the church, through that little door there, and pray. Yes, Father. And you won't steal again, will you? Oh, no. I hope not. Yes, I hope not too. I'm sorry, Mr. Brissac. Now then, you were telling me about the two sisters. I was about to say, Father Cheviot, that when the two sisters are found, they will inherit the bulk of their uncle's estate. Have you any information at all of these girls, Father? Their names again, Mr. Brissac. Vermeer. None of Vermeer's the older sister, beyond the younger. None of them. They ran away from their uncle's farm some years ago. My firm has finally managed to trace them to this quarter. Tell me, Mr. Brissac, this inheritance the girls are to receive. Are there any complications? Well, their uncle was rather uncompromising on one point. It's a matter of morality. I see. And you expect to find morality in this quarter, Mr. I hope to find it, Father. You know these girls? I know them. I shall take you to them in the morning, Mr. Brissac. Thank you. You know, I cannot help thinking about that miserable little thief a moment ago. Do you think it was wise, Father, letting him go? That creature belongs in jail, not in church. Does he? I don't know. Sometimes I'm a little discouraged, but then I stand here by the window, I think of all the people out there who need help with two girls, Nana and Dee. I'm the man Chico, perhaps, who is strong as a young bull and the atheist. And there, look, you see that man down there, cranking his taxi cab? Yes. He calls it Eloise, after his old horse. That man is Papa Bull. He's a thief, a purveyor of stolen goods. Why not have him arrested? No, it's been done, but has it changed him? No, I'll find a way to help him sometime. I'm just waiting. Just waiting, Mr. Brissac. Tell me, my old friend, start my beauty now. One, two, three, four. Eloise, is that a way to act? Are you sick?  You monster of tin and grease, I'll conquer you yet. No, no, no, no. What's the matter? Take it back or I'll choke the life out. I'll take it back. That's better. I'll bring this bracelet to V.O. and get the absence for it. It makes you crazy. You knew it, I say. Come back soon. I'll be waiting. Deion. Deion. Hey. Deion, it's me, Papa Bull. None hurts you again? Look at me. I'm all right. It's nothing. Why do you let her do it? Why don't you hit her back? I'm afraid of her, Papa Bull. She's my sister. Sister? Well, that doesn't stop her. Well, perhaps you're right. It's better not to cross her when she's been drinking. Why don't you take her away, Deion? Away. She wouldn't leave here. We lived on a farm once. She hated it. She made me run away with her. A farm? I don't blame her. I wonder what it would be like, Papa Bull, to see the clear sky again, to lie in the grass and smell the cleaners. Yes. That's dirt. And you'd catch cold, too. Deion. Oh, there she is up in the window. Yes, Nanny. Yes, I'm going. I'm going now. Well, Louise, we have our own troubles, eh? Come on now. One, two, three, four. Oh, oh, good evening, Sue, all that. What do you want, eh? Look, I have money, Bull. Money? Where did you get money? I was in the church. I was praying in the church. You mean you took it from the poor box? Sue, all right. How much is it? 10 francs, enough for supper for Chico and me. Enough for us all. Where is Chico? In the sewer over here beneath the cover. Why, why, why, list it up and call it. You want me to do everything you call them. Oh, mother in heaven, these things are too heavy. Now, where is he? How can you see anything down here anyway? Chico! How can a man who works in the sewer find it in his heart to see? Hey, Chico! Hey, Bull! Come up there! Coming! Get out of the way. Fresh air again. Good. Well, Papa Bull, how are you tonight? You sound happy, Chico. I am, and you know why? Because I've discovered something, and it's this. If you pretend you're happy and pretend long enough, you will be happy. I've proved that to myself. That's why I'm such a remarkable fellow. That's why I'm an atheist. Look, Chico, money. We're going to have supper. 10 francs. Well, we're going to have a feast. I know the best café in the quarter. The hole in the sock. Come on. And now let's drink to something else. Come on, Bull. Oh, no.  No room for anything else. No more. Where were you? Now, what's all that? None again. The aunt must have been late for the absent. Why are you sitting like this? She's beating her. Let them fight. Let them fight. You stand for it. Let her alone, you hear? Let the girl alone. Get away from me. I said to let her alone. Get out. Go on. Get out of here. You there on the floor. Start crying and stand up. Now come with me. Let us out there. What does it matter? And what are you crying for? You're not being beaten now?  We can walk over there and sit down. There on the church steps. Wow. This is a fine ending to a nice supper. I didn't mean to bother you. Please go back. Oh, now you want me to go back. I give up my wine and my friends to get you out of there, and now you want me to go back. Well, maybe I should. It's none of my affair anyway. Of course it isn't. Every time I come up out of this sewer, I get into trouble. Then I'll go. You have troubles enough. I'm probably one of a half dozen men in all Paris who at this moment has practically no troubles to speak of. That's because of my principles.  I can't help it. I know.  Well, it'll all pass off in a little while. Who was that girl? My sister. Your sister? Did she beat you like a street dog? Well, that's justice for you. That's love. That's why I don't believe in God. That's why I'm an atheist. You what? Well, why do you look at me like that? Is there anything so strange in a man not believing in God? Oh, but you must believe in him. It's the only hope there is. You must have faith. Religion? Listen, let me tell you something. I'm an atheist because I was religious. I've gone all through that. Didn't you ever pray? Didn't you ever... Pray? How I've prayed. But he never heard me. And I gave him a fair test, true, three times. First, I prayed to be a street washer. Above all things, my ambition was to be a street washer and work in the clean air on top of the ground. So I chose the finest church in Paris, the Cathedral of Notre Dame, and with my good money, I bought the biggest candle in the place. Five francs. And you didn't become a street washer. Of course I didn't. I'm still in a sewer. That's because you prayed with words. And a candle. Five francs worth of candle. But no soul. Who has no soul? If you had, you'd use it to pray with your soul and your heart. Just words and nothing. Listen, I'm a philosopher. If you think I just gave up, you're crazy. I said perhaps God meant me for a sewer man. All right? I'd be a sewer man. Then you did give up. No. I just changed to something else I wanted. Again, I put my hand in my pocket. Five more francs for another big candle. This time I wanted a wife. A good wife with yellow hair. Yellow hair is not so hard to find. I don't mean yellow like yours. Much prettier. And did you get her? No. I'm still in a sewer and I still live alone.  You should have kept on praying. Who said I didn't? I'm broad-minded. I gave him still another chance. From this time I wanted an experience. Everything we do is an experience. I don't understand what you mean. I didn't expect you to. Nobody but Chico understands these big thoughts. I wanted for once in my life to have enough money in my pocket to climb into a taxi cab like a gentleman would say, You, driver, make the grand tour. You prayed to God for that? Who knew what you had to do with to ask Papa Boor? He would have done it for you for nothing. That is not the point. First I was going to tell the driver, take me to the Place Concorde, then to the Champs Elysees, then the Arc de Triomphe, and then to my home at number 48, Runeau to Dam de Lorette, and the devil with the expense. Yes, I gave the Lord every opportunity. And what did you get? Candlesmoke. 15 francs worth of candlesmoke. That's why I'm a natious. I can't believe you really are, my son. Who's that? Someone standing there in the shadows. Good evening, dear. Oh, Father Chevalier. Good evening, Chico. You'll forgive me, Father, but I'm not very happy to see you. I'm not at all fond of priests. So I understand. But I want to do something for you. I don't want anything. I ask for nothing. You did once 15 francs worth. Oh, so you were listening to me. Be charitable, Chico. Let us say I overheard. And since the good Lord is rather busy answering all the requests made of him, let me answer one for him. You wish to be a street washer, Chico?  What? You can do this? It's done. Here. Take this card to the commissioner. The cart and the hose are yours, Chico. You see a street washer. Now I'm going to ask something of you, Chico. Take these two medals of St. John and St. Agnes. Oh, wait a minute. Religious medals? They'll protect you from danger, Chico. Please give them a chance. And whether you like it or not, I'm going to pray for you. Good night, dear. Good night, Father. I'm coming to see you tomorrow in the morning. Good night, Chico. And remember, the good Lord has a sense of humor, too. Did you hear him? I'm a street washer. I've risen. I've risen. Oh, I've got to tell Bull. Wait here for me. I'll be back. You're alone?  Oh, that's what I like best about a church. The steps. No one ever speaks to me. Oh, I'm sorry, sewer rat. I was thinking. Deep problems? I'm very interested in deep problems. There is a God, isn't there? Oh, yes, I believe in God. God just helped Chico, but he doesn't know it. I wonder if God would be very angry if a person grew tired. If instead of waiting for God to come to her, she tried to go to God. Oh, that's a very deep problem. Very deep, yes. Sometimes I have... Where are you going? Let me come. No, go back. But there's nothing down there. Just a river at the end of the street. That's... Deanne. Deanne, where are you going? It's just a river. I said Chico. I said Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. Chico. because I can't go on because I'm afraid afraid of your sister of everything no you can't be you have courage the idea of jumping into a river that takes courage I couldn't do it you could if you thought there was no hope but you say you don't like this life if you don't like it you're not bad why do you say that I don't know why but I know if you don't like it it makes all the difference look at me I never like working in a sewer but it has never made me feel low I sometimes I feel like a king for no reason at all I've noticed that I'm a very remarkable fellow nothing you're afraid of not a thing why should I be why should you be someday you stand up and fight your sister that will make you free be yourself again strong happy it's easy if you give yourself a chance look at me I've risen to be a street washer all on my own and I have two religious medals with at least 15 francs that's good you could be like me too of course you know I feel I feel sorry for you well now there I go I'll have you on my hands if I'm not careful you can go I'm not keeping you well that's the way to talk but I didn't mean it I'm your friend do you like that yes listen well life is never tell here is it come on let's see what's happening a ball what is it the police they're taking people right at left to rape the odd look they have your sister no come here what are you doing here nothing what's your occupation I have no work you pray take this girl too no wait you can't arrest her she hasn't done anything since when are you giving orders so a man so a man I'm a street washer and I say you can't take her we have orders to take every unmarried girl in this quarter for questioning I'll get out of the way wait that's just it unmarried girls she's married oh who's her husband who what do you mean who who me he's lying she's my sister she's not his wife one moment where do you live so a man street washer 48 runo down to the red we'll be up to see you tomorrow now get along get along everyone come on now get along now why did I do that why did I say that because you're kind yes and I'm ruined they'll come tomorrow and find I have no wife and I'll take my new job away from me well that's what I get for being so kind if I could be there when they come I could say I was your wife we could say we were married in Italy that's why it isn't on the records say that's pretty good and I won't have to go back to the sewer that's very good bull hey bull why not your taxi starter up sure what for you're going to drive me home me and my bride hey look she really stars in Eloise it's a miracle here get in get in I remember the arm you mustn't take this seriously I'm only doing this to help you they're not going to take advantage of me no oh no hurry up hurry up before it stops again where to make the grand wedding tour bull first the chance of these say then to the plaster the concord then the archery up and then home and the devil with the expense for tonight I am the bank of France it stopped oh never mind the bank of France will have to walk come on back to all the seventh heaven starting Janet Gaynor as Dionne and Charles Farrell as Chico it's a few hours later and dawn is just breaking over Paris as Chico and Dionne return from their walk slowly they mount the long open stairway six flights up to Chico's room high on the rooftop only a little more tired that's what I like up where the air is clean and you can breathe give me your hand no please I can manage you're not afraid are you no that's right never be afraid of anything this is my room well go in do you like it what's the matter with you can't you speak oh it's very nice but it's so small I thought you mean it's only one room a yes well it's all I ever needed it's all you need it's yours mind but what about you oh don't worry about me I must go to work now today I wash the streets they'll be washed as never before everyone will talk of it and tonight tonight oh I'll stay with fool he'll be glad to have me is that why you were worried I don't like you to give up your room just for me when would you come back you want me to it's your place well I'll tell you what we'll do I'll come back for all my meals breakfast dinner and wait are you a good cook I think so well we'll see now remember what I said be afraid of nothing be brave and be happy hey if I'm happy I'll owe it to you no no no to yourself goodbye dear goodbye Chico is that you singing the other wasn't so very bad well it wasn't good but it was good to hear I just saw Chico on the street he was singing too loud the same song was he it comes easy to him for me it's so new until you came here until I came here Papa Bull until I climbed up here with him one week ago six flights into the sweet air it's a fine view of heaven you get from here it is heaven seven heaven I suppose now no will be really surprised when she finds you've been staying here no no they're letting her out of jail tomorrow I thought you ought to know it's just one week of heaven wasn't it you're still afraid of her course it could be fixed well if you were really Chico's wife why should he want me for his wife he prayed for one once he told me a wife with yellow hair much prettier than mine he doesn't want me Papa Bull I don't blame him I don't know he's very funny this week he sings all the time he's always done that hasn't he yes but I don't know it's never been so loud Chico go to sleep I can't I want to speak to you Chico all night I've been wondering all night I've been telling you to go to sleep go on you've been awake too well I have problems thinking of the war I hear we may go to war no no it's not the war what's that got to do with me this is the greatest problem in the world bull I've almost come to a decision what is it I'll shut up all right I've decided decided what bull have your taxi at my house at three o'clock tomorrow afternoon why I'm going to be married to Diane Chico that's all right let me look at you I haven't had a chance to fix my hair oh you look nice just been making some soup for madame go band her husband sick she's at a window yes madame go band it'll be ready in a moment here what's the matter with you oh you don't like to be called madame Chico way no oh no it's not that here look at this what is it it's a paper a legal one I spent all morning at the bureau I had to prove I was born and that you were born and then they let me have it Chico it's a marriage license yes you have to have a license for everything now Chico you want to marry me I guess so yes why oh I don't know you're so strange you're not like anyone that's true there's nobody like me I'm a very remarkable fellow but I don't understand you you say you'll marry me but you you don't what you don't say anything oh you mean you want me to make love to you yes Chico well oh I feel like a fool oh Chico please well I'll do it this once but no more yeah you and I I mean well it's like a arithmetic arithmetic of course you and I are each one well one one makes one you understand no oh stop it I can't you ask me to make love to you now look at you well this way down look I am Chico you are the end and this this is heaven say it again yeah Chico again the hour Chico oh stop it oh Chico I can't believe it it's so hard to believe well it's true what brought you to me Chico I can't remember was it God no not God I came to you and you to me because because that's the way things happen and we're together because we want it so we have courage that's my religion Dianne it's the idea that makes you what you are you must put courage inside of you that's what I do that's why I'm such a remarkable fellow when astonished myself with what I am that's why I'm an atheist no oh no Chico please not now don't say those things now I'm too happy too happy Chico this must be it missy-bissy it's a long climb father it's high father sherry on father baby come in Chico isn't home father he's gone out to work we didn't come to see Chico this is missy bissac he wants to speak to you my child to me if I may we've been looking for you all week dear I've been here father but it's real clock Chico is coming back we're going to be married father married missy bissac perhaps I'd better leave you alone goodbye my child goodbye father what is it please you're much younger and much prettier than I thought you'd be what is it you want may I sit on the on you know you don't belong in this quarter I hope I'm not too late to take you out of it I don't know what you mean are you from the police no I'm a lawyer I have some news for you you didn't know that your uncle had died I suppose died he's left you and your sister his soul heirs but there's well there's a little difficulty about your sister you'll receive it all it's a matter of some 30,000 Franks well what would I have to do you don't seem as surprised as I thought you'd be your uncle has made a few stipulations you'd have to leave here of course and Chico what about Chico Chico I'm I'm afraid not down but she goes my husband or will be it's the will be that presents the difficulties now this money I don't want it what not without Chico I see I ought to know better than to interfere in these things but you're being very foolish you could have everything now but without him so it wouldn't be anything would it I'm sorry Dion because I think you're making a great mistake this Chico is probably a fine fellow he's a wonderful fellow a remarkable fellow I'm sure he must be nevertheless what's that well it's here it must be they wouldn't cheer like that for anything else it's war war then that means Chico all of us oh no no Chico Chico don't worry he'll be back they won't send them at once what should I do back to the house wait for it there go on we would have been married now they'll be time when I come back I'm not afraid Chico no you mustn't be the women take the men's places in war they'll take care of you the certificate says so you see it says what is it Chico I'm a fool it says wife and you're not my wife I'll stay here I'll be safe here no I will be married now this minute how Chico by ourselves because I say so because I will it I Chico say we're married dear Lord can't ask God I'm an atheist but I must appeal to someone to something there is a God Chico I think we're only true do you know that it isn't try him Chico try him once more God in heaven perhaps you are there perhaps not perhaps you give me this wife perhaps not but if there is any truth in the idea of you please make this a true marriage I take you Deanna for my wife I take you Chico for my husband forever I must go now Deanna don't be afraid I won't let me come to the street with you no don't don't follow me Chico stand still don't move I want to remember you like this and Deanna I'll come to you every day at this hour every morning it will feel me here with you with my arms around you goodbye Chico your husband leave didn't boom tell you I needed you but I wanted you to come home with me I'm married now Nana well the war's got in the war and you're coming with me you can't make me the whip will help would you like to feel it again it's no use Nana I'm not afraid of you anymore come here you think I'm the way I used to be I'm not like that anymore Nana come here to me I'm coming you my sister my sister who filled me with terror because I was alone because I was helpless it's you who are alone now Nana it's you who are helpless what are you talking about I'm telling you that you will never touch me again I'll kill you no no if you ever come back here I'll kill you you can never frighten me again never do you hear because I'm brave I'm not afraid anymore I'm the wife of Chico and I'm not afraid the curtain rises on Act 3 of 7th Heaven starring Janet Gaynor as Deanna and Charles Farrell as Chico a roadside near the Marne River waiting for orders a battalion of French infantry sprawls virily on the muddy ground heedless of the shells that come screaming ever closer then down the road a solitary figure is seen one of the soldiers leaps to his feet and dashes taught him what are you doing here what am I doing I'm in the war like you Chico who is Eloise you left her home Eloise Eloise is dead your taxi cab is dead it was very sad Chico my poor Eloise it was in Paris here was the German army marching through Kampia and on to the very gates of the city and here was our whole reserve force in back of the city what did Papashoff do he called on us the taxi cabs of Paris we brought up the whole reserve what a sight there was Eloise in the very front going like a red hot devil with seven soldiers inside of her and five on top she rose to the occasion the old girl never missed fire once got to the front lines first was hit with a shell blew up and collapsed in the mud heaven rest her soul poor Eloise yes poor bull bull tell me did you see her before you left yeah yes Chico she is fine and her sister none of troubles are no more Chico she has disappeared the aunt she works works in the factory they make shells shells Chico a very strange girl I do not comprehend her she says that every day as she stands before the machinery it whispers to her shells shells shells to kill and every day also in the morning she goes back to your room on the roof Chico she says you are there and it makes her feel better I worry Chico I do not understand it I understand it bull every day at 11 what well goodbye bull goodbye what is happening we're going to move up and start at the big offense you'll be careful Chico they can't touch me bull I am Chico my life is charmed their bullets will flatten against my chest you'll be careful you'll see goodbye bull and when you go back tell her that I'll be there every day you will not report for work tomorrow by orders of the war ministry this factory is closed it means the armistice we're not to come to work tomorrow does it mean peace father I don't know my child they're talking of it and then Chico will come home he will won't he father yeah you've never heard from him in all these years oh but that doesn't mean it doesn't mean he's dead father I know that you see when he went away we promised we'd join each other every morning and he's never failed me even at the factory and all that noise I feel him standing at my side and when I worked at night and slept during the day no matter how tired I was I always woke up to find it's 11 o'clock my child no father don't say I imagined it all these years it was faith the thing you preach yes it was faith what's getting near the time now I'll go home dear mr. Bissac was here this morning he's back from the front oh then he'll come to see me too every lead these had his come to see me he's been very kind to me father once he even asked me to marry him that's funny isn't it when I have a husband already why do you look at me like that Chico and I we were married father yes my child I think you were mr. Bissac I've been waiting here for you you are back for good monsieur I hope so it's nice to see you they say there's going to be peace do you think so again I hope so I hope so too then they'll all come back all our friends you need them now Dion what did you say I've just come from the war office I've been digging in the files all morning I I found this what is it a religious medal and identification disc there's no last name Chico Dion please listen it comes from a German prison hospital he was dying then a long time ago no no Dion but he came to me did he he didn't come no Dion no no he couldn't have come please Dion you must have courage now courage he never came to me at all I just imagined it yes I was so sure I thought God was helping me for four years what nonsense what childish nonsense Dion you must come away from here let me take care of you please Dion why not what does it matter I call this place heaven I never want to see it again Dion what is it nothing 11 o'clock habit of believe me listen the crowd it's peace peace they signed the arm of do you hear them it's peace my child Dion they've signed they've signed over the war is over the war is over I want to pray father help me to pray all of us will pray in excelsis do you know stop it pray to what I'd like to know tell me to a God there is no God don't let me alone I know what I'm talking about for four years I believe I believed I was married and there was a God predicting me well there's nothing it's all false my hope and Chico was false I pretended this place was heaven I come to what is Chico told me to but it's all fall he said when I want your God most he's not here he doesn't exist and there's nothing nothing nothing please please come away with me yes that's right take me wherever you want me to go anywhere the war is over isn't it let me touch you no Dion but my eyes are filled with you oh my Chico that is true you have been here always and I thought God deserted me no Dion he never has at the hospital I thought I was dead dead I've been hit by every shell it's made but nothing can kill me I don't think I'll ever die I see again too they can't keep me blind because it's all true those big thoughts I had that was God after all he's within us Dion I know it for now that I'm blind I see I tell you I'm a very remarkable here's Mr. Keely with our stars and here they are Janet Gaynor and Charles Farrell you know we can't tell you what a thrill it was to hear you recreate that immortal love story how did you enjoy playing Dion again after all this time well I loved playing it Bill just as much as I did the first time I didn't dream that Deanne would ever be anything to me again but a cherished memory and of course it was wonderful to be such a remarkable fellow again you know when you pick up a copy of Look magazine tomorrow you'll find an excellent story about tonight's broadcast there was such widespread interest in our show that Look magazine has pictorially recorded this historic reunion for their readers so you'll both be able to add another cherished memory to your scrapbooks Janet Gaynor and Charles Farrell in the 1951 version of 7th heaven well that was a mighty long layoff between performances Bill yes it was too long Charlie and I think our audience would be interested to know why you both have been content to give up such successful picture careers how about you Janet well I've been happily married for many years and Adrian and I have a wonderful 10-year-old son named Robin Jan is too modest to mention that she's also one of the best dressed women in Hollywood the credit for that goes to Adrian of course but how about you Charlie are you too modest to add that you're the mayor of Palm Springs and own the very famous rocket club there yes it sounds Charlie as a very remarkable fellow Janet you remember how you felt when you were presented with your Academy Award extremely nervous and excited naturally I was thrilled and honored but the awards were brand new then and I didn't have the precedent of all the suspense and excitement there is now well Janet would you care to guess with a lucky lady will be next Thursday night I should say now I can just imagine what those five nominees are going through my sympathy goes out to them and of course my congratulations to the winner and speaking of winners Bill your new luck flakes with color freshener is a winner in our house and I know it's always been a winner in Hollywood well not only in Hollywood but in Palm Springs I'm the mayor and I ought to know but I do think before we go Charlie we ought to know about next week show well next week we'll have a very unusual story about a policeman who hates criminals only to accidentally become one himself it's 20 essentially Fox's exciting drama where the sidewalk ends and as our stars of this intriguing drama and playing his original role Dana Andrews co-starting with him will be beautiful and talented and back there sounds wonderful bill good night she's in the news one of Hollywood join me in inviting you to be with us again next Monday evening when the Lux Radio Theatre presents where the sidewalk ends starring Dana Andrews and and back this is William Keele saying good night to you from Hollywood the play 7th heaven was written by Austin strong and originally produced on Broadway under the direction of John Golden our music was directed by Rudy Schrager this is your announcer John Milton Kennedy reminding you to join us again next Monday night to hear Dana Andrews and Anne Baxter in where the sidewalk end


Income tax 2021-2022, tax software example, business expenses, car and truck expenses. Get ready to get refunds to the max. Diving into income tax 2021-2022. Lassert tax software. You don't need tax software to follow along, but you might want to have the Form 1040, which you can find on the IRS website at irs.gov, irs.gov, starting point single file or Adam Smith living in Beverly Hills 90210. We've got the Schedule C business rolling into page one of the Form 1040 line number eight. Let's see that rolling through. We're going to go over to the Schedule C where we have our business income on the Schedule C profit or loss from business. And we're going to say that we had 120,000 income. We've got the 20,000 of expenses to start off with. Here's the 100,000, the net then rolling in to Schedule 1. So it rolls into Schedule 1, additional income on line number three, which totals up down here down below line number 10. That rolls then in to page one of the Form 1040, which we could see on line number eight. Then we also have the self-employment tax we've got to deal with. So if we go to the self-employment tax, you'll recall that it's going to be calculated on the net income. This is Social Security and Medicare calculated at the 14,129. That 14,129 rolling in to the Form 1040 this time to page number two. That's not the federal income tax. That's the self-employment tax, Social Security and Medicare. Half of that amount you could see also calculated on the Schedule SE at the 7065. Half of the 14,129 is deductible above the line, which we see on Schedule 1 page number two. Schedule 1 page number two having 7,065. That pulls into the 1040 page numero uno. That's number one and that's here on the 7,065. That gets us to the adjusted gross income of the 92935. We've got the standard deduction for the single filer 12,550. And then we've got the business to qualify business income deduction, which we're letting the software calculate coming from Form 8,990 to get us finally to the taxable income. Let's just recalculate that real quick on our Excel sheet. So we've got the income that comes from the Schedule SE, Schedule SE, which we could recreate. I'm just going to put the recreation here. That's going to give us our 100,000 pulling in then to the 100,000 here. We then have the added tax, the self-employment tax. Let's take a look at that first, the additional tax. We did this calculation before. I won't go through it again, but we did this nice calculation that calculates it for us here at the 14,130. And that pulls on over to our formula at the added tax here. And then we get half of that that's deductible above the line in the adjustment, which we've got our automatic worksheet that just does that for us. We've automated that process as well, bringing it on in here. So there's the 92935AGI tying out to what we have here, 92935, 12,550 standard deduction. And then I'm just going to populate from the software at this point the 1677 for the qualified business income. So I'm going to say this is going to be 1677. That gives us to the taxable income 64308. Page number two, calculating the federal income tax, 9,900, 9,900 here. And then the 14130 for the Social Security and Medicare payroll tax or the self-employment tax gets us to the 2430 about, which is off by $1 of the 2429. So that looks good. That's our starting point. Now we're looking at the car. We've got a car that we use in the business. Two methods we can use for the deduction, actual method or the standard method. First year that you put the car in place, you want to try to project out into the future and see what your benefit would be if you were to take one or the other deductions, also noting, however, that if you use the actual method, then generally you can't jump back on over to the standard mileage method. The actual method is usually going to be a little bit more complex to calculate as well and you've got to have better bookkeeping for the actual method. But the mileage method, you just need basically the business miles and the personal miles, possibly the commuting miles as well. So let's do the mileage method first. So I'm going to go back on over, mileage method, a method that's done with the miles, hence mileage method. So we're going to go then down to the data input for the mileage method, which is 2106 form. And so I'm going to say that this is going to go to the schedule C. So it's going to be applied to the schedule C here. And let's scroll on down and say, I'm just going to put a generic name here. So it's going to be a truck. You might be more specific than that, a truck and possibly naming the actual specific truck because you want to make sure that you can check it out from the future. You might put the last four digits of the license place number or something like that, date placed in service. I'm just going to put 010122. Remember that if it's been in service for more than the current year, 010122, then you got to see if you need consistency with the method that was used in the prior year or not. So you got to take that into consideration. The first year you put it into place, then you want to possibly try out both methods if you have the available information to see which would be most beneficial, possibly not just in the current year, but thinking forward into future years. And so then we could say the total miles. Now, this is something that sometimes it's a little bit difficult to kind of get or get from a client or determine yourself and you might have some estimates of this, but you would want to make sure that you have this, the supporting information to determine how you came up with the total miles and how you came up with the business miles. And you might do that with kind of an estimate. So we might say, well, the total miles, let's say on the year were, let's say they were 12,500, 12,5. And obviously part of the way you could do this is just check your mileage at the beginning of the year and then check it at the end of the year and try to determine what the difference is. And we might say that maybe 80% of that we're going to say is business related. So I'm going to say then times 0.8. Now, if it was purely used for business, if this was your business vehicle, then it might be all business related. But I'm going to say that the 10,000 is for business, 80%. So we're going to say 80% business. And then the commuting miles, which are going to be part of the non-business miles, and let's say our total commuting miles, I'll just put 500 for the commute. Then we have up here, we've got the vehicle is used primarily by a more than 5% owner. So I'm going to say, yes, vehicle is available for off duty. I'm going to say it is in this case. No other vehicle is available for personal use. So whether that be applicable or not, no evidence to support your deduction. I'm not going to check that. No written evidence to support your deduction. I'll keep that the way it is. So then that's going to be our mileage information. Average daily round trip, number of months of business use, if charged from 100% personal use, parking and tolls. So you can also still add basically the parking and tolls here, even though you're using this mileage method. So maybe we say parking and tolls, we'll say 300, and there we have it. So let's pull it on over and let's see what happens on our form, shall we? So if we go back on over, we've got then our schedule C, schedule C here. And so now we've got this added line item for the car and truck expenses. Now note that the thing that you've got to be careful of here with your bookkeeping side of things is that the bookkeeping that you might then have might have some stuff that's in there for like gas or repairs or something like that. Which if you're using the mileage method, you've got to kind of remove it from there and then put it into the, and then use your mileage method in place of that. So it can cause a little bit of trickiness just with regards to the bookkeeping differences between what's on the bookkeeping side and the business side. And if you get a lot of differences like that, it could be useful to set up kind of a worksheet in Excel to basically see what those differences are and kind of account for those differences in the event that there's an audit or some questioning that happens later on. Or just to explain it to somebody, but I won't dive into that at this point. So then we're going to say that the other calculation for it, let's see the detail on it. There's usually a worksheet down here, vehicle expenses. So now we've got the truck. It was 10,000 business miles and then 80% the use for the business. So they just did the division problem here. So we said, okay, total mile or business miles, 10,000 divided by 12,580%. That's how we came up with the 10,000. We took the 12,5 times 80%. And then we've got then the multiple line three by 0.56. That's the amount they're going to give us per mile on the mileage method. That's why it's the mileage method because they give us that amount per mile. So we multiply that out. That gives us the 5,600. We've got the depreciation per mile, 26 cents, and the portion of mileage. So they broke out the basically percentage down here for the depreciation portion and the operating portion. So there's going to be the 5,006. If we scroll on down, we're going to also add in the parking fees and tolls because those we still get even though we're using the mileage method. Brings it up to the 5,9. The 5,9 then pulls into our car and truck expense here. Now we could also mirror that on our worksheet over here. You might then, you might actually add another schedule to calculate the mileage method, but it's usually going to be part of the schedule. See, what's this, we could add the other form if we wanted to. Maybe we should, maybe we should, we should do that. So the other form then was the, well, let's just put a schedule to call vehicle. So I'll add another one and I'm just going to call it vehicle or auto vehicle. And then I'll make this thing, I'll make this thing formatted right click. And I'm going to do this fairly quickly because it's not an Excel course, but we'll just show you the Excel thing here. I'm going to say brackets, no, and then get rid of the decimals for now. I'm going to scroll it in and then I'm going to first put the mileage method. And so let's do that. Let's make the whole thing bolden and bolden it. We got to be emboldened. And then let's make this, let's make this black and white, black and white as has been our custom for headers. That's not, where's the white part? I can't see the text. Okay, so then we're going to say, we're going to say business miles, which we put in was 10,000, 10,000. And then the amount per mile, so the rate, the rate in other words, that's what I mean by the amount per mile was, the rate was 56 cents. So 0.56 per mile. Let's bracketize, let's add some decimals to that one. Multiplying it out this times this. So there's our amount. So there's our amount. So let's call this a subtotal. And then we've got parking, parking and fees. I think it was fees that we can include still. Parking and fees that we could include. So parking fees and tolls, parking fees and tolls. Parking fees and tolls. Tolls. So that's going to be 300. And so that's going to give us the total mileage method, which is going to be equal to, let's say, the sum equals the sum of these items. So there we have it. Let's put that on the outside. Now let's put it in here. So we're going to then sum, let's make this blue. We'll make it blue and border it, borders. And then this one I'll keep white, but border. Because actually, no, this one I'm going to make white because that one's calculating there. And the subtotal, I can make that white. And then this one needs data input. So this one should be blue. And bordered. And there's our total, which is going to total up for us. So that 5,009, then I'm going to put over here in the Schedule C, auto is going to be equal to the vehicle stuff over here at the 5,9. So that's our starting point. That brings us then to the 94, 100. 94, 100. If I go to my Schedule C, that gets us to the 94, 100 that pulls into the first page of the 1040, 94, 100, pulling in to the first page of the form 1040, 94, 100. I won't go into the rest of it right now because we're focusing in on the miles. OK, so now let's say that we want to test out the actual method. So let's delete this one here. Let's do it a different way. Let's say we go into the depreciation stuff, depreciable thing. It's going to be a truck again, truck. So we're going to have to calculate the cost of the depreciation then, so category. And this is going to go into the form. This needs to be going into the form. I'm going to take it to the Schedule C. And then I'm going to say that the category is this time going to be an automobile. And the date, place, and service 010122 will say the cost. Let's say it was a $50,000 automobile. And then the method we're going to use is going to be make sure you've got the right makers method, which is an accelerated method. But we could have a cap on the luxury autos. So I'm going to say five-year makers with the auto limit supplied. And then I'll keep the 179 and so on if applicable. So that looks good. And then we could jump down to the automobile stuff. So I'm going to go to the vehicle stuff down here. So listed property, NOVA evidence of support, no written evidence, sport utility, reduced SE. If the vehicle improvement additions, use of vehicle, vehicle is available for off-duty. I'm going to say yes. No other vehicle is available. So I'll check that off. Vehicle is used primarily by more. I'm going to check that off. Now, we also could have a situation where not 100% of that would be personal, as we're indicating here. But let's keep it easy right now and keep it all personal. We also have this idea of the sport utility vehicle, which could adjust the cap that might be on the vehicle and basically adjust the method that we might be using. But we won't get into that now. I'm going to keep it there for now. So now, if I pull on over, then go into the Schedule C. So now on the Schedule C. And there's nothing there. I think I put it in the future. I figured it out. So I'm going to go back. It's got to be in the current year. There we go. In 2021, now I'm going to go back on over. And so now we've got the information not in the car and truck, but down here in the depreciation and section 179 expense deduction down below. So we've got the item of the depreciation being calculated. And then we've got the depreciation schedules on the calculation as well. Let's go to the regular one where we've got the cost, the special depreciation being applied or allocated here. And this instance is pulling in to the Schedule C. Now we might have other expenses that would be applied here. So if I went back on over and we go to the automobile information. So now we've got that stuff. And then we have the actual vehicle expenses. So we might still have the parking and tolls, for example, that would still be applicable under possibly either method that we saw 300. And then the gasoline and whatnot could be on top of the depreciation. So let's say this was 150 repairs, is 200 tires is going to be 30 insurance. Let's say is a thousand or something like that, right? And these other things could be applicable if we're using the actual method as opposed to the mileage method. So before I jump over, I'm gonna assume still that we're using it 100% this time for business. So I put 10,000 in the total miles and then 10,000 in the business miles so that if I pull then back on over to the Schedule C, now we've got the depreciation and we also have the car and truck, which is related to the same thing, depreciation on the car and the car and truck expenses here. If I then go into the vehicle worksheet, then we could see the information that's doing the same calculation here and it's pulling over the actual expenses, which are coming out to that 1,680, the 1,680, which consists of the gasoline, the repairs, the tire insurance, and then also this $300, the parking and fees, which would be applicable under either method that was used that that's then pulling into the Schedule C. Now, if we had some kind of allocation, let's say that 80% of the automobile was used for business, let's say, so now I can go back up and say, okay, well, I can't take the full depreciation, then I have to have some percentage that we're going to take. So in the additional information, so I'm gonna say the percent used for percent of business use, we'll say was 80%, so that's gonna restrict the depreciation amount and then when I go to the automobile information down here on the actual expenses, what did I have it before? I had it at 12, 12 something, let's say it was, let's say it was 1,200 or 12,000 miles, 12,000 miles, and let's give it the 80% 12,000 times 0.8, which would be 9,006, 9,006 here, 9,600, and then we've got our items then on down below. So now if I go back on over and see what we calculate for it, we're at the 14,560 on the depreciation. If I go to the depreciation here on the schedule and look at the regular depreciation, so now we've got the 80%, we've got the 14,560 on the special that's pulling in then to schedule C. If we look at the vehicle information then we've got, this is a little bit tricky, we've got those same items for the full amount, the 150, the 200, the 30 plus the 1,000, and I'm gonna multiply that times 0.8, that gives us the 1104 and then add the other, the 300 here plus the 300 plus 300, that's what gives us that 1404 that then pulls into the schedule C that they're pulling in here. Now again, you can put both of these methods kind of together into the system. So notice that I have the system calculating basically the two methods here because I got the total, the mileage method that's calculating up top, as well as the actual method that is up top here. So you can basically, it'll take the larger of the two methods given the fact that I've got the information for both methods in place. Now you might end up in a situation where you try to do that, but maybe you still wanna force one method or the other in the first year because you also kind of take into consideration the following years where you're not gonna have like the advanced depreciation in the beginning of the timeframe. So the fact that we took more depreciation in period one could have an impact on the following years. So you might say, well, I'd still wanna force the standard mileage rate, for example. So if I was to say, I wanna force the standard mileage rate, then if I go back on over and look at the schedule C, now we just got the 5,676 in line nine, and we're not taking basically the depreciation here that has been calculated. And so, and then on the vehicle worksheet, if we were to take a look at it, we have the same calculations up top between the two methods, but we're now gonna be picking and taking the mileage method, which came out to that 5,676, which pulled in to the schedule C. Now just realize if you were to try to mirror this on your Excel worksheet over here, then if you were doing the vehicle, you're probably not gonna recalculate the depreciation methods, so you're gonna rely on the software to some degree to help you with the depreciation methods to determine which would be the most beneficial method, most likely, and just kind of try to mirror that basically in your Excel sheet, and then that's what you could pull into your schedule C, but also just realize that the more complex your business is and the more of these complex items, you might put together a more complex worksheet to help you to figure these things out or see what the differences between the books are and the tax code, which could have differences that would result from things like using a mileage method, for example. Also note that if you're using the actual method, I'm gonna bring this back to the 50,000 and say we have 100% that will be deductible just to take a look at going back on over to the forms here and looking at our depreciation down below, you'll note that it's been put in here into the special depreciation, so you gotta keep in mind the qualifications for the auto limits that could be involved, you gotta keep in mind the special depreciation and the 179 depreciation, which is a whole other kind of topic in and of itself if you're getting into the depreciation methods, the special depreciation, the 179s are forms of accelerated depreciation, so you could have a situation, for example, it might not qualify for the special depreciation, then possibly qualify for the 179 depreciation in that event and if not, then you'd be kicked down to basically the current depreciation method, so just to take a look at that real quick, if I got the 18, 200 with the special depreciation applied, if we didn't qualify for the special depreciation, we could say, okay, I'm not gonna qualify for the special and then if I go back on over, it's gonna be at the 10,000 unless I do qualify for the current, so you might say I'm sorry for the 179 deduction, so I could go over to the 179 deduction here and say, okay, I'm gonna put the 50,000 into the 179, making that, so if I go back on over, that then is at the 10,200, so you've got the special depreciation to determine whether or not it would qualify for the special, if not, do you still qualify? Would it qualify for the 179? If not, then you would be taken the general double declining depreciation for the makers, which is basically a double decline, half year convention method as well, so I won't dive into those in too much more detail here, but we might dive into them in a little bit more detail in future presentations with regards to special depreciation, current 179 and then the auto limits that are combined in with those depreciation methods, which again is why, another reason why a lot of times the actual method is a little bit more confusing than of course the mileage method.