Skip to content

Commit

Permalink
test commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Faraz Maqsood committed May 22, 2024
1 parent 138bc90 commit f96bb10
Show file tree
Hide file tree
Showing 17 changed files with 502 additions and 376 deletions.
18 changes: 18 additions & 0 deletions ecommerce/extensions/basket/migrations/0018_line_tax_code.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.25 on 2024-05-22 10:20

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('basket', '0017_alter_lineattribute_value'),
]

operations = [
migrations.AddField(
model_name='line',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Generated by Django 3.2.25 on 2024-05-22 10:20

from django.db import migrations
import oscar.models.fields


class Migration(migrations.Migration):

dependencies = [
('catalogue', '0057_auto_20231205_1034'),
]

operations = [
migrations.AddField(
model_name='attributeoption',
name='code',
field=oscar.models.fields.NullCharField(max_length=255, unique=True, verbose_name='Unique identifier'),
),
migrations.AddField(
model_name='attributeoptiongroup',
name='code',
field=oscar.models.fields.NullCharField(max_length=255, unique=True, verbose_name='Unique identifier'),
),
migrations.AddField(
model_name='category',
name='code',
field=oscar.models.fields.NullCharField(max_length=255, unique=True, verbose_name='Code'),
),
migrations.AddField(
model_name='historicalcategory',
name='code',
field=oscar.models.fields.NullCharField(db_index=True, max_length=255, verbose_name='Code'),
),
migrations.AddField(
model_name='productimage',
name='code',
field=oscar.models.fields.NullCharField(max_length=255, unique=True, verbose_name='Code'),
),
]
51 changes: 51 additions & 0 deletions ecommerce/extensions/offer/migrations/0056_auto_20240522_1020.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Generated by Django 3.2.25 on 2024-05-22 10:20

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('offer', '0055_auto_20231108_1355'),
]

operations = [
migrations.CreateModel(
name='FixedUnitDiscountBenefit',
fields=[
],
options={
'verbose_name': 'Fixed unit discount benefit',
'verbose_name_plural': 'Fixed unit discount benefits',
'proxy': True,
'indexes': [],
'constraints': [],
},
bases=('offer.absolutediscountbenefit',),
),
migrations.AddField(
model_name='rangeproductfileupload',
name='upload_type',
field=models.CharField(choices=[('included', 'Included products upload'), ('excluded', 'Excluded products upload')], default='included', max_length=8),
),
migrations.AlterField(
model_name='benefit',
name='type',
field=models.CharField(blank=True, choices=[('Percentage', "Discount is a percentage off of the product's value"), ('Absolute', "Discount is a fixed amount off of the basket's total"), ('Fixed', "Discount is a fixed amount off of the product's value"), ('Multibuy', 'Discount is to give the cheapest product for free'), ('Fixed price', 'Get the products that meet the condition for a fixed price'), ('Shipping absolute', 'Discount is a fixed amount of the shipping cost'), ('Shipping fixed price', 'Get shipping for a fixed price'), ('Shipping percentage', 'Discount is a percentage off of the shipping cost')], max_length=128, verbose_name='Type'),
),
migrations.AlterField(
model_name='historicalbenefit',
name='type',
field=models.CharField(blank=True, choices=[('Percentage', "Discount is a percentage off of the product's value"), ('Absolute', "Discount is a fixed amount off of the basket's total"), ('Fixed', "Discount is a fixed amount off of the product's value"), ('Multibuy', 'Discount is to give the cheapest product for free'), ('Fixed price', 'Get the products that meet the condition for a fixed price'), ('Shipping absolute', 'Discount is a fixed amount of the shipping cost'), ('Shipping fixed price', 'Get shipping for a fixed price'), ('Shipping percentage', 'Discount is a percentage off of the shipping cost')], max_length=128, verbose_name='Type'),
),
migrations.AlterField(
model_name='historicalrange',
name='description',
field=models.TextField(blank=True, verbose_name='Description'),
),
migrations.AlterField(
model_name='range',
name='description',
field=models.TextField(blank=True, verbose_name='Description'),
),
]
64 changes: 64 additions & 0 deletions ecommerce/extensions/order/migrations/0029_auto_20240522_1020.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Generated by Django 3.2.25 on 2024-05-22 10:20

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('order', '0028_alter_lineattribute_value'),
]

operations = [
migrations.AlterModelOptions(
name='surcharge',
options={'ordering': ['pk'], 'verbose_name': 'Surcharge', 'verbose_name_plural': 'Surcharges'},
),
migrations.AddField(
model_name='historicalline',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
migrations.AddField(
model_name='historicalorder',
name='shipping_tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='Shipping VAT rate code'),
),
migrations.AddField(
model_name='line',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
migrations.AddField(
model_name='lineprice',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
migrations.AddField(
model_name='order',
name='shipping_tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='Shipping VAT rate code'),
),
migrations.AddField(
model_name='surcharge',
name='tax_code',
field=models.CharField(blank=True, max_length=64, null=True, verbose_name='VAT rate code'),
),
migrations.CreateModel(
name='OrderLineDiscount',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_incl_tax', models.BooleanField()),
('amount', models.DecimalField(decimal_places=2, default=0, max_digits=12, verbose_name='Line discount (excl. tax)')),
('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='discounts', to='order.line', verbose_name='Line')),
('order_discount', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='discount_lines', to='order.orderdiscount', verbose_name='Order discount')),
],
options={
'verbose_name': 'Order line discount',
'verbose_name_plural': 'Order line discounts',
'ordering': ['pk'],
'abstract': False,
},
),
]
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ stripe
unicodecsv
xss-utils
zeep

Loading

0 comments on commit f96bb10

Please sign in to comment.